Skip to main content

Module backend

Module backend 

Source
Expand description

SmoltcpBackend — libkrun NetBackend implementation that bridges the NetWorker thread to the smoltcp poll thread via lock-free queues.

The NetWorker calls write_frame() when the guest sends a frame and read_frame() to deliver frames back to the guest. Frames flow through SharedState’s tx_ring/rx_ring queues with WakePipe notifications. Unix libkrun registers raw_socket_fd in edge-triggered mode, while Windows libkrun waits on an event source. Reads must drain the wake primitive before returning.

Structs§

SmoltcpBackend
Network backend that bridges libkrun’s NetWorker to smoltcp via lock-free queues.