package
4.1.3+incompatible
Repository: https://github.com/els0r/goprobe.git
Documentation: pkg.go.dev

# Functions

AddStats is a convenience method to total capture stats.
ClassifyPacketDirectionV4 is responsible for running a variety of heuristics on IPv4 packets in order to determine its direction.
ClassifyPacketDirectionV6 is responsible for running a variety of heuristics on IPv6 packets in order to determine its direction.
FromIfaceNames generates a list of IfaceChange instances from a list of interface names.
SubStats is a convenience method to total capture stats.

# Constants

Direction detection states.
Direction detection states.
Direction detection states.
EPHashSizeV4 : The (static) length of an IPv4 EPHash.
EPHashSizeV6 : The (static) length of an IPv6 EPHash.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
10.
11.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
4.
5.
EPHashV4 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:4] -> Src IP epHash[4:6] -> Src Port epHash[6:10] -> Dst IP epHash[10:12] -> Dst Port epHash[12] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
34.
35.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
16.
17.
EPHashV6 array position constants (all explicit so they can theoretically be switched around with zero effort and to avoid having to do index math in functions) epHash[0:16] -> Src IP epHash[16:18] -> Src Port epHash[18:34] -> Dst IP epHash[34:36] -> Dst Port epHash[36] -> Protocol.
ErrnoInvalidIPHeader : received neither IPv4 nor IPv6 IP header.
ErrnoOK : No Error.
ErrnoPacketFragmentIgnore : packet fragment does not carry relevant information (will be skipped as non-error).
ErrnoPacketTruncated : packet too short / truncated.
ESP : 50.
ICMP : 1.
ICMPv6 : 58.
Ephemeral ports as union of: -> suggested by IANA / RFC6335 (49152–65535) -> used by most Linux kernels (32768–60999).
matches condition in isEphemeralPort().
NumParsingErrors : Number of tracked parsing errors.
TCP : 6.
UDP : 17.

# Variables

ParsingErrnoNames maps a ParsingErrno to a string.

# Structs

CaptureStats stores the capture stores its statistics.
IfaceChange denotes the result from a config update / reload of an interface.
TaggedAggFlowMap represents an aggregated flow map tagged with Stats and an an interface name.

# Type aliases

Direction denotes if the detected packet direction should remain or changed, based on flow analysis.
EPHashV4 is a typedef that allows us to replace the type of hash for IPv4 flows.
EPHashV6 is a typedef that allows us to replace the type of hash for IPv6 flows.
IfaceChanges denotes a list of IfaceChange instances.
InterfaceStats stores the statistics for each interface.
ParsingErrno denotes a non-critical packet parsing error / failure.
ParsingErrTracker denotes a simple table-based parsing error structure for counting all available parsing error (errno) types.