Skip to main content

Module device

Module device 

Source
Expand description

Slot-based smoltcp::phy::Device implementation.

SmoltcpDevice bridges SharedState’s lock-free queues to smoltcp’s token-based Device API. It uses a single-frame slot design: the poll loop pops a frame from tx_ring via stage_next_frame(), inspects it (creating TCP sockets before smoltcp sees a SYN), then smoltcp consumes the staged frame via receive().

Structs§

SmoltcpDevice
smoltcp device backed by SharedState’s lock-free queues.
SmoltcpRxToken
Token returned by the Device::receive() implementation — delivers one frame from the guest to smoltcp.
SmoltcpTxToken
Token returned by the Device::receive() and Device::transmit() implementations — sends one frame from smoltcp to the guest.