pub struct MutableArpPacket<'a> { /* private fields */ }Expand description
Represents a mutable ARP Packet.
Implementations§
Source§impl<'a> MutableArpPacket<'a>
impl<'a> MutableArpPacket<'a>
Sourcepub fn new_unchecked(buffer: &'a mut [u8]) -> Self
pub fn new_unchecked(buffer: &'a mut [u8]) -> Self
Create a packet without performing length checks.
pub fn get_hardware_type(&self) -> ArpHardwareType
pub fn set_hardware_type(&mut self, ty: ArpHardwareType)
pub fn get_protocol_type(&self) -> EtherType
pub fn set_protocol_type(&mut self, ty: EtherType)
pub fn get_hw_addr_len(&self) -> u8
pub fn set_hw_addr_len(&mut self, len: u8)
pub fn get_proto_addr_len(&self) -> u8
pub fn set_proto_addr_len(&mut self, len: u8)
pub fn get_operation(&self) -> ArpOperation
pub fn set_operation(&mut self, op: ArpOperation)
pub fn get_sender_hw_addr(&self) -> MacAddr
pub fn set_sender_hw_addr(&mut self, addr: MacAddr)
pub fn get_sender_proto_addr(&self) -> Ipv4Addr
pub fn set_sender_proto_addr(&mut self, addr: Ipv4Addr)
pub fn get_target_hw_addr(&self) -> MacAddr
pub fn set_target_hw_addr(&mut self, addr: MacAddr)
pub fn get_target_proto_addr(&self) -> Ipv4Addr
pub fn set_target_proto_addr(&mut self, addr: Ipv4Addr)
Trait Implementations§
Source§impl<'a> MutablePacket<'a> for MutableArpPacket<'a>
impl<'a> MutablePacket<'a> for MutableArpPacket<'a>
Source§fn new(buffer: &'a mut [u8]) -> Option<Self>
fn new(buffer: &'a mut [u8]) -> Option<Self>
Construct a mutable packet from the provided buffer.
Source§fn packet_mut(&mut self) -> &mut [u8] ⓘ
fn packet_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable view over the entire packet buffer.
Source§fn header_mut(&mut self) -> &mut [u8] ⓘ
fn header_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable view over the serialized header bytes of the packet.
Source§fn payload_mut(&mut self) -> &mut [u8] ⓘ
fn payload_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable view over the payload bytes of the packet.
Auto Trait Implementations§
impl<'a> Freeze for MutableArpPacket<'a>
impl<'a> RefUnwindSafe for MutableArpPacket<'a>
impl<'a> Send for MutableArpPacket<'a>
impl<'a> Sync for MutableArpPacket<'a>
impl<'a> Unpin for MutableArpPacket<'a>
impl<'a> !UnwindSafe for MutableArpPacket<'a>
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