Documentation ¶
Index ¶
Constants ¶
View Source
const TunnelFilter = "(udp and (udp[8:2] = 0x0800 or dst port 8472 or dst port 6081))"
TunnelFilter is a tcpdump filter which captures encapsulated packets.
Some explanations:
- "udp[8:2] = 0x0800" compares the first two bytes of an UDP payload against VXLAN commonly used flags. In addition we check against the default Cilium's VXLAN port (8472).
- To catch Geneve traffic we cannot use the "geneve" filter, as it shifts offset of a filtered packet, which invalidates a filter matching on the outer headers. Thus this poor UDP/6081 check.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sniffer ¶
type Sniffer struct {
// contains filtered or unexported fields
}
func Sniff ¶
func Sniff(ctx context.Context, name string, target *check.Pod, iface string, filter string, mode Mode, dbg debugLogger, ) (*Sniffer, error)
Start starts a tcpdump capture on the given pod, listening to the specified interface. The mode configures whether Validate() will (not) expect any packet to match the filter.
Click to show internal directories.
Click to hide internal directories.