pub struct ArpPacket<B, HwAddr, ProtoAddr> { /* private fields */ }
Expand description
An ARP packet.
A ArpPacket
shares its underlying memory with the byte slice it was parsed
from or serialized to, meaning that no copying or extra allocation is
necessary.
Implementations§
Source§impl<B: SplitByteSlice, HwAddr, ProtoAddr> ArpPacket<B, HwAddr, ProtoAddr>
impl<B: SplitByteSlice, HwAddr, ProtoAddr> ArpPacket<B, HwAddr, ProtoAddr>
Sourcepub fn sender_hardware_address(&self) -> HwAddr
pub fn sender_hardware_address(&self) -> HwAddr
The hardware address of the ARP packet sender.
Sourcepub fn sender_protocol_address(&self) -> ProtoAddr
pub fn sender_protocol_address(&self) -> ProtoAddr
The protocol address of the ARP packet sender.
Sourcepub fn target_hardware_address(&self) -> HwAddr
pub fn target_hardware_address(&self) -> HwAddr
The hardware address of the ARP packet target.
Sourcepub fn target_protocol_address(&self) -> ProtoAddr
pub fn target_protocol_address(&self) -> ProtoAddr
The protocol address of the ARP packet target.
Sourcepub fn builder(&self) -> ArpPacketBuilder<HwAddr, ProtoAddr>
pub fn builder(&self) -> ArpPacketBuilder<HwAddr, ProtoAddr>
Construct a builder with the same contents as this packet.
Trait Implementations§
Source§impl<B: SplitByteSlice, HwAddr, ProtoAddr> ParsablePacket<B, ()> for ArpPacket<B, HwAddr, ProtoAddr>
impl<B: SplitByteSlice, HwAddr, ProtoAddr> ParsablePacket<B, ()> for ArpPacket<B, HwAddr, ProtoAddr>
Source§fn parse_metadata(&self) -> ParseMetadata
fn parse_metadata(&self) -> ParseMetadata
Gets metadata about this packet required by [
GrowBuffer::undo_parse
]. Read moreAuto Trait Implementations§
impl<B, HwAddr, ProtoAddr> Freeze for ArpPacket<B, HwAddr, ProtoAddr>where
B: Freeze,
impl<B, HwAddr, ProtoAddr> RefUnwindSafe for ArpPacket<B, HwAddr, ProtoAddr>
impl<B, HwAddr, ProtoAddr> Send for ArpPacket<B, HwAddr, ProtoAddr>
impl<B, HwAddr, ProtoAddr> Sync for ArpPacket<B, HwAddr, ProtoAddr>
impl<B, HwAddr, ProtoAddr> Unpin for ArpPacket<B, HwAddr, ProtoAddr>
impl<B, HwAddr, ProtoAddr> UnwindSafe for ArpPacket<B, HwAddr, ProtoAddr>
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