Struct HwIf
af_packet
pub struct HwIf { /* fields omitted */ }
ioctl operations on a hardware interface
impl HwIf
fn new<S>(if_name: S) -> HwIf where S: Into<String>,
Create new hardware interface instance
The interface name is something like eth0.
eth0
fn set_promisc(&mut self) -> Result<c_int>
fn recv_single_packet(&self, buf: &mut [u8]) -> Result<usize>