pub enum RawMode {
Ethernet {
iface: IfaceHandle,
ethertype: Option<EthernetProtocol>,
},
Ip {
version: Option<IpVersion>,
protocol: Option<IpProtocol>,
},
}Expand description
The mode of a raw socket, set by RawSocket::bind.
Variants§
Ethernet
Send and receive whole Ethernet frames on one interface.
Fields
§
iface: IfaceHandleThe interface the socket sends and receives on. Its medium must be
Medium::Ethernet.
§
ethertype: Option<EthernetProtocol>If set, only frames with this ethertype are received, and only frames with this ethertype may be sent.
Ip
Send and receive whole IP packets, on all interfaces.
Trait Implementations§
impl Copy for RawMode
impl Eq for RawMode
impl StructuralPartialEq for RawMode
Auto Trait Implementations§
impl Freeze for RawMode
impl RefUnwindSafe for RawMode
impl Send for RawMode
impl Sync for RawMode
impl Unpin for RawMode
impl UnsafeUnpin for RawMode
impl UnwindSafe for RawMode
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