Module pnet_datalink::dummy
source · Expand description
Support for sending and receiving data link layer packets on a fake network managed by in memory FIFO queues. Useful for writing tests.
Structs
- Configuration for the dummy datalink backend. Contains
std::sync::mpsc
channels that are used to communicate with the fake network.
Functions
- Create a data link channel backed by FIFO queues. Useful for debugging and testing. See
Config
for how to inject and read packets on this fake network. - Generates a fake
NetworkInterface
. The name of the interface will beethX
where X is the integeri
. The index will bei
. The MAC will be01:02:03:04:05:i
. - Get three fake interfaces generated with
dummy_interface(0..3)
.