Struct Icmpv4

Source
pub struct Icmpv4;
Expand description

ICMPv4 marker impl of IcmpVersion.

See RFC 792.

Trait Implementations§

Source§

impl Debug for Icmpv4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EncodeIcmpMessage<Icmpv4> for IcmpEchoRequest

Source§

fn encode(&mut self) -> &mut IcmpMessageBuffer

Encode the message per the spec for V.
Source§

impl IcmpVersion for Icmpv4

Source§

const DOMAIN: Domain = socket2::Domain::IPV4

The socket domain to use when opening a socket
Source§

const PROTOCOL: Protocol = socket2::Protocol::ICMPV4

The socket protocol to use when opening a socket
Source§

const DEFAULT_BIND: Self::SocketAddr

The sockaddr to bind to if none is specified in socket::SocketConfig. Read more
Source§

type Address = Ipv4Addr

The type of IP address used with this version
Source§

type SocketAddr = SocketAddrV4

The type of sockaddr used with this version
Source§

fn extract_icmp_from_recv_packet(packet: &[u8]) -> Result<(&[u8], Range<usize>)>

Extract the portion of the packet that comprises the ICMP message
Source§

fn checksum_required() -> bool

Whether the ICMP checksum should be calculated when sending a message.

Auto Trait Implementations§

§

impl Freeze for Icmpv4

§

impl RefUnwindSafe for Icmpv4

§

impl Send for Icmpv4

§

impl Sync for Icmpv4

§

impl Unpin for Icmpv4

§

impl UnwindSafe for Icmpv4

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V