pub struct LinuxSocket {
pub fd: RawFd,
pub ifindex: i32,
pub default_gateway: Ipv4Addr,
pub mmap: Option<(*mut c_void, usize)>,
}Fields§
§fd: RawFd§ifindex: i32§default_gateway: Ipv4Addr§mmap: Option<(*mut c_void, usize)>Implementations§
Source§impl LinuxSocket
impl LinuxSocket
pub fn new() -> Result<Self, LinuxSocketErrors>
pub fn set_ops(&mut self) -> Result<(), LinuxSocketErrors>
pub fn send_raw_packet( &self, dst_mac: [u8; 6], ether_type: u16, packet: &[u8], ) -> Result<(), LinuxSocketErrors>
Trait Implementations§
Source§impl Debug for LinuxSocket
impl Debug for LinuxSocket
Auto Trait Implementations§
impl Freeze for LinuxSocket
impl RefUnwindSafe for LinuxSocket
impl !Send for LinuxSocket
impl !Sync for LinuxSocket
impl Unpin for LinuxSocket
impl UnwindSafe for LinuxSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more