Struct surge_ping::Icmpv4Packet
source · pub struct Icmpv4Packet { /* private fields */ }
Expand description
Packet structure returned by ICMPv4.
Implementations§
source§impl Icmpv4Packet
impl Icmpv4Packet
sourcepub fn get_source(&self) -> Ipv4Addr
pub fn get_source(&self) -> Ipv4Addr
Get the source field.
sourcepub fn get_destination(&self) -> Ipv4Addr
pub fn get_destination(&self) -> Ipv4Addr
Get the destination field.
sourcepub fn get_icmp_type(&self) -> IcmpType
pub fn get_icmp_type(&self) -> IcmpType
Get the icmp_type of the icmpv4 packet.
sourcepub fn get_icmp_code(&self) -> IcmpCode
pub fn get_icmp_code(&self) -> IcmpCode
Get the icmp_code of the icmpv4 packet.
sourcepub fn get_real_dest(&self) -> Ipv4Addr
pub fn get_real_dest(&self) -> Ipv4Addr
If it is an echo_reply
packet, it is the source address in the IPv4 packet.
If it is other packets, it is the destination address in the IPv4 packet in ICMP’s payload.
sourcepub fn get_identifier(&self) -> PingIdentifier
pub fn get_identifier(&self) -> PingIdentifier
Get the identifier of the icmp_v4 packet.
sourcepub fn get_sequence(&self) -> PingSequence
pub fn get_sequence(&self) -> PingSequence
Get the sequence of the icmp_v4 packet.
Trait Implementations§
source§impl Debug for Icmpv4Packet
impl Debug for Icmpv4Packet
Auto Trait Implementations§
impl RefUnwindSafe for Icmpv4Packet
impl Send for Icmpv4Packet
impl Sync for Icmpv4Packet
impl Unpin for Icmpv4Packet
impl UnwindSafe for Icmpv4Packet
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