Trait mutnet::ethernet::EthernetMethods
source · pub trait EthernetMethods: HeaderMetadata + BufferAccess {
// Provided methods
fn ethernet_destination(&self) -> MacAddress { ... }
fn ethernet_source(&self) -> MacAddress { ... }
fn ethernet_ether_type(&self) -> u16 { ... }
fn ethernet_typed_ether_type(
&self
) -> Result<EtherType, UnrecognizedEtherTypeError> { ... }
}
Expand description
Methods available for DataBuffer
containing an
Eth
header.
Provided Methods§
sourcefn ethernet_destination(&self) -> MacAddress
fn ethernet_destination(&self) -> MacAddress
Returns the ethernet II destination.
sourcefn ethernet_source(&self) -> MacAddress
fn ethernet_source(&self) -> MacAddress
Returns the ethernet II source.
sourcefn ethernet_ether_type(&self) -> u16
fn ethernet_ether_type(&self) -> u16
Returns the ethernet II ether type.
sourcefn ethernet_typed_ether_type(
&self
) -> Result<EtherType, UnrecognizedEtherTypeError>
fn ethernet_typed_ether_type( &self ) -> Result<EtherType, UnrecognizedEtherTypeError>
Object Safety§
This trait is not object safe.