pub struct DataLinkSocket {
pub interface: Interface,
/* private fields */
}
Expand description
Cross-platform raw socket. Enables to send and receive packets with custom headers.
Fields§
§interface: Interface
Implementations§
Source§impl DataLinkSocket
impl DataLinkSocket
Sourcepub fn new(interface: Interface, promiscuous: bool) -> Result<DataLinkSocket>
pub fn new(interface: Interface, promiscuous: bool) -> Result<DataLinkSocket>
Constructs a new DataLinkSocket
Sourcepub fn send(&mut self, packet_builder: PacketBuildOption) -> Result<usize>
pub fn send(&mut self, packet_builder: PacketBuildOption) -> Result<usize>
Build packet from PacketBuildOption and send it
Auto Trait Implementations§
impl Freeze for DataLinkSocket
impl !RefUnwindSafe for DataLinkSocket
impl Send for DataLinkSocket
impl !Sync for DataLinkSocket
impl Unpin for DataLinkSocket
impl !UnwindSafe for DataLinkSocket
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