Documentation
¶
Overview ¶
Package sniffer provides the implementation of data-link layer endpoints that wrap another endpoint and logs inbound and outbound packets.
Sniffer endpoints can be used in the networking stack by calling New(eID) to create a new endpoint, where eID is the ID of the endpoint being wrapped, and then passing it as an argument to Stack.CreateNIC().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogPacket ¶
func LogPacket(prefix string, protocol tcpip.NetworkProtocolNumber, b, plb []byte)
LogPacket logs the given packet.
func New ¶
func New(lower tcpip.LinkEndpointID) tcpip.LinkEndpointID
New creates a new sniffer link-layer endpoint. It wraps around another endpoint and logs packets and they traverse the endpoint.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.