pub struct ArpEthIpv4Packet {
pub operation: ArpOperation,
pub sender_mac: [u8; 6],
pub sender_ipv4: [u8; 4],
pub target_mac: [u8; 6],
pub target_ipv4: [u8; 4],
}
Expand description
An ethernet & IPv4 “Address Resolution Protocol” Packet (a specific
version of crate::ArpPacket
).
Fields§
§operation: ArpOperation
Specifies the operation that the sender is performing.
sender_mac: [u8; 6]
Sender MAC address.
sender_ipv4: [u8; 4]
Sender IPv4 address.
target_mac: [u8; 6]
Sender MAC address.
target_ipv4: [u8; 4]
Target IPv4 address.
Implementations§
Source§impl ArpEthIpv4Packet
impl ArpEthIpv4Packet
Sourcepub const fn sender_ipv4_addr(&self) -> Ipv4Addr
pub const fn sender_ipv4_addr(&self) -> Ipv4Addr
Sender IPv4 address as core::net::Ipv4Addr
.
Sourcepub const fn target_ipv4_addr(&self) -> Ipv4Addr
pub const fn target_ipv4_addr(&self) -> Ipv4Addr
Target IPv4 address as core::net::Ipv4Addr
.
Sourcepub const fn to_arp_packet(&self) -> ArpPacket
pub const fn to_arp_packet(&self) -> ArpPacket
Converts the packet to generic arp packet.
Trait Implementations§
Source§impl Clone for ArpEthIpv4Packet
impl Clone for ArpEthIpv4Packet
Source§fn clone(&self) -> ArpEthIpv4Packet
fn clone(&self) -> ArpEthIpv4Packet
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ArpEthIpv4Packet
impl Debug for ArpEthIpv4Packet
Source§impl From<ArpEthIpv4Packet> for ArpPacket
impl From<ArpEthIpv4Packet> for ArpPacket
Source§fn from(value: ArpEthIpv4Packet) -> Self
fn from(value: ArpEthIpv4Packet) -> Self
Converts to this type from the input type.
Source§impl Hash for ArpEthIpv4Packet
impl Hash for ArpEthIpv4Packet
Source§impl PartialEq for ArpEthIpv4Packet
impl PartialEq for ArpEthIpv4Packet
Source§impl TryFrom<ArpPacket> for ArpEthIpv4Packet
impl TryFrom<ArpPacket> for ArpEthIpv4Packet
impl Eq for ArpEthIpv4Packet
impl StructuralPartialEq for ArpEthIpv4Packet
Auto Trait Implementations§
impl Freeze for ArpEthIpv4Packet
impl RefUnwindSafe for ArpEthIpv4Packet
impl Send for ArpEthIpv4Packet
impl Sync for ArpEthIpv4Packet
impl Unpin for ArpEthIpv4Packet
impl UnwindSafe for ArpEthIpv4Packet
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