Crate ethrecv

source ·
Expand description

ethrecv can be used to receive ethernet packets, with the goal of being able to do so at a high rate. It runs a receiver loop in a dedicated thread and passes packets to a application callback implemented using the trait PacketHandler.

It optionally supports an inspect callback, which passes some receiver statistics to a callback. It also supports an optional idle callback which will be called whenever the receiver has been idle for a configurable amount of time (basically a debouncer for detecting an idle period).

§Features

FeatureFunction
idleEnable support for PacketHandler::idle().
inspectEnable support for PacketHandler::inspect().

Structs§

  • A controller that can be used to interact with the receiver thread.
  • A builder-like object for initializing the packet receiver thread.

Enums§

Traits§