Trait wasmer_vnet::VirtualRawSocket
source · pub trait VirtualRawSocket: VirtualSocket + Debug + Send + Sync + 'static {
fn send(&mut self, data: Bytes) -> Result<usize>;
fn flush(&mut self) -> Result<()>;
fn recv(&mut self) -> Result<SocketReceive>;
fn set_promiscuous(&mut self, promiscuous: bool) -> Result<()>;
fn promiscuous(&self) -> Result<bool>;
}
Required Methods§
sourcefn recv(&mut self) -> Result<SocketReceive>
fn recv(&mut self) -> Result<SocketReceive>
Recv a packet from the socket
sourcefn set_promiscuous(&mut self, promiscuous: bool) -> Result<()>
fn set_promiscuous(&mut self, promiscuous: bool) -> Result<()>
Tells the raw socket and its backing switch that all packets should be received by this socket even if they are not destined for this device
sourcefn promiscuous(&self) -> Result<bool>
fn promiscuous(&self) -> Result<bool>
Returns if the socket is running in promiscuous mode whereby it will receive all packets even if they are not destined for the local interface