[][src]Module pnet_datalink_bandwhich_fork::dummy

Support for sending and receiving data link layer packets on a fake network managed by in memory FIFO queues. Useful for writing tests.

Structs

Config

Configuration for the dummy datalink backend. Contains std::sync::mpsc channels that are used to communicate with the fake network.

Functions

channel

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.

dummy_interface

Generates a fake NetworkInterface. The name of the interface will be ethX where X is the integer i. The index will be i. The MAC will be 01:02:03:04:05:i.

interfaces

Get three fake interfaces generated with dummy_interface(0..3).