#[non_exhaustive]pub enum ArpRepr {
EthernetIpv4 {
operation: Operation,
source_hardware_addr: EthernetAddress,
source_protocol_addr: Ipv4Address,
target_hardware_addr: EthernetAddress,
target_protocol_addr: Ipv4Address,
},
}
Expand description
A high-level representation of an Address Resolution Protocol packet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EthernetIpv4
An Ethernet and IPv4 Address Resolution Protocol packet.
Fields
§
source_hardware_addr: EthernetAddress
§
source_protocol_addr: Ipv4Address
§
target_hardware_addr: EthernetAddress
§
target_protocol_addr: Ipv4Address
Implementations§
Source§impl Repr
impl Repr
Sourcepub fn parse<T: AsRef<[u8]>>(packet: &Packet<T>) -> Result<Repr>
pub fn parse<T: AsRef<[u8]>>(packet: &Packet<T>) -> Result<Repr>
Parse an Address Resolution Protocol packet and return a high-level representation,
or return Err(Error)
if the packet is not recognized.
Sourcepub const fn buffer_len(&self) -> usize
pub const fn buffer_len(&self) -> usize
Return the length of a packet that will be emitted from this high-level representation.
Trait Implementations§
impl Copy for Repr
impl Eq for Repr
impl StructuralPartialEq for Repr
Auto Trait Implementations§
impl Freeze for Repr
impl RefUnwindSafe for Repr
impl Send for Repr
impl Sync for Repr
impl Unpin for Repr
impl UnwindSafe for Repr
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