Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CaptureLengthFixed denotes a simple fixed snaplen strategy CaptureLengthFixed = func(snaplen int) CaptureLengthStrategy { return func(*link.Link) int { return snaplen } } // CaptureLengthMinimalIPv4Header indicates that the minimal necessary length to // facilitate IPv4 layer analysis should be chosen CaptureLengthMinimalIPv4Header = func(l *link.Link) int { return int(l.Type.IPHeaderOffset()) + ipv4.HeaderLen } // CaptureLengthMinimalIPv6Header indicates that the minimal necessary length to // facilitate IPv6 layer analysis should be chosen CaptureLengthMinimalIPv6Header = func(l *link.Link) int { return int(l.Type.IPHeaderOffset()) + ipv6.HeaderLen } // CaptureLengthMinimalIPv4Transport indicates that the minimal necessary length to // facilitate IPv4 transport layer analysis should be chosen CaptureLengthMinimalIPv4Transport = func(l *link.Link) int { return int(l.Type.IPHeaderOffset()) + ipv4.HeaderLen + 14 } // CaptureLengthMinimalIPv6Transport indicates that the minimal necessary length to // facilitate IPv6 transport layer analysis should be chosen CaptureLengthMinimalIPv6Transport = func(l *link.Link) int { return int(l.Type.IPHeaderOffset()) + ipv6.HeaderLen + 14 } )
Functions ¶
This section is empty.
Types ¶
type BPFFn ¶
type BPFFn func(int, bool, ...bpf.RawInstruction) []bpf.RawInstruction
BPFFn denotes a generic BPF wrapper function that is used to provide link type dependent filters
type CaptureLengthStrategy ¶
CaptureLengthStrategy denotes a strategy to calculate an optimal snaplen for a link (type) depending on the use case
type EtherType ¶
type EtherType uint16
EtherType denotes the protocol encapsulated in the payload of the ethernet frame
func (EtherType) HasValidIPLayer ¶
HasValidIPLayer determines if the ethernet frame has a valid IPv4 or IPv6 layer
Click to show internal directories.
Click to hide internal directories.