pub enum ArpRepr {
EthernetIpv4 {
operation: Operation,
source_hardware_addr: EthernetAddress,
source_protocol_addr: Ipv4Address,
target_hardware_addr: EthernetAddress,
target_protocol_addr: Ipv4Address,
},
// some variants omitted
}
Expand description
A high-level representation of an Address Resolution Protocol packet.
Variants§
EthernetIpv4
Fields
§
source_hardware_addr: EthernetAddress
§
source_protocol_addr: Ipv4Address
§
target_hardware_addr: EthernetAddress
§
target_protocol_addr: Ipv4Address
An Ethernet and IPv4 Address Resolution Protocol packet.
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::Unrecognized)
if the packet is not recognized.
sourcepub fn buffer_len(&self) -> usize
pub fn buffer_len(&self) -> usize
Return the length of a packet that will be emitted from this high-level representation.