Struct surge_ping::Icmpv4Packet
source · [−]pub struct Icmpv4Packet { /* private fields */ }
Expand description
Packet structure returned by ICMPv4.
Implementations
sourceimpl 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) -> u16
pub fn get_identifier(&self) -> u16
Get the identifier of the icmp_v4 packet.
sourcepub fn get_sequence(&self) -> u16
pub fn get_sequence(&self) -> u16
Get the sequence of the icmp_v4 packet.
Trait Implementations
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more