pub struct LoopbackDevice { /* private fields */ }Expand description
Loopback device implementation
Implementations§
Trait Implementations§
Source§impl Default for LoopbackDevice
impl Default for LoopbackDevice
Source§impl NetworkDevice for LoopbackDevice
impl NetworkDevice for LoopbackDevice
Source§fn mac_address(&self) -> MacAddress
fn mac_address(&self) -> MacAddress
Get device MAC address
Source§fn capabilities(&self) -> DeviceCapabilities
fn capabilities(&self) -> DeviceCapabilities
Get device capabilities
Source§fn state(&self) -> DeviceState
fn state(&self) -> DeviceState
Get device state
Source§fn set_state(&mut self, state: DeviceState) -> Result<(), KernelError>
fn set_state(&mut self, state: DeviceState) -> Result<(), KernelError>
Set device state
Source§fn statistics(&self) -> DeviceStatistics
fn statistics(&self) -> DeviceStatistics
Get device statistics
Source§fn transmit(&mut self, packet: &Packet) -> Result<(), KernelError>
fn transmit(&mut self, packet: &Packet) -> Result<(), KernelError>
Transmit a packet
Source§fn receive(&mut self) -> Result<Option<Packet>, KernelError>
fn receive(&mut self) -> Result<Option<Packet>, KernelError>
Receive a packet (non-blocking)