Crate pnet_datalink

Source
Expand description

Support for sending and receiving data link layer packets.

Modules§

dummy
Support for sending and receiving data link layer packets on a fake network managed by in memory FIFO queues. Useful for writing tests.
linux
Support for sending and receiving data link layer packets using Linux’s AF_PACKET.

Structs§

Config
A generic configuration type, encapsulating all options supported by each backend.
FanoutOption
Fanout settings (Linux only).
MacAddr
A MAC address.
NetworkInterface
Represents a network interface and its associated addresses.

Enums§

Channel
A channel for sending and receiving at the data link layer.
ChannelType
Type of data link channel to present (Linux only).
FanoutType
Socket fanout type (Linux only).
ParseMacAddrErr
Represents an error which occurred whilst parsing a MAC address.

Traits§

DataLinkReceiver
Structure for receiving packets at the data link layer. Should be constructed using datalink_channel().
DataLinkSender
Trait to enable sending $packet packets.

Functions§

channel
Create a new datalink channel for sending and receiving data.
interfaces
Get a list of available network interfaces for the current machine.

Type Aliases§

EtherType
Type alias for an EtherType.
InterfaceType
Type alias for an InterfaceType.