Enum RawMode
pub enum RawMode {
Ethernet {
ethertype: Option<EtherType>,
},
Ip {
version: Option<Version>,
protocol: Option<Protocol>,
},
}Expand description
The mode of a raw socket, set by [RawSocket::bind].
Variants§
Ethernet
Send and receive whole Ethernet frames. Feature raw-ethernet.
The socket receives frames from every Ethernet-medium interface and
sends out of the first one, unless it is bound to one interface with
bind_to_iface (feature iface-bind).
Fields
Ip
Send and receive whole IP packets, on all interfaces, or on the one
bound with bind_to_iface (feature iface-bind). Feature raw-ip.
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