netstack3_core::device_socket

Trait DeviceSocketBindingsContext

Source
pub trait DeviceSocketBindingsContext<DeviceId>: DeviceSocketTypes {
    // Required method
    fn receive_frame(
        &self,
        socket: &Self::SocketState,
        device: &DeviceId,
        frame: Frame<&[u8]>,
        raw_frame: &[u8],
    );
}
Expand description

The execution context for device sockets provided by bindings.

Required Methods§

Source

fn receive_frame( &self, socket: &Self::SocketState, device: &DeviceId, frame: Frame<&[u8]>, raw_frame: &[u8], )

Called for each received frame that matches the provided socket.

frame and raw_frame are parsed and raw views into the same data.

Implementors§