ping

Trait IpExt

Source
pub trait IpExt: Ip + Unpin {
    type SockAddr: Into<SockAddr> + TryFromSockAddr + Clone + Copy + Unpin + PartialEq + Debug + Display + Eq + Hash;

    const DOMAIN: Domain;
    const PROTOCOL: Protocol;
    const ECHO_REQUEST_TYPE: u8;
    const ECHO_REPLY_TYPE: u8;
}
Expand description

Trait for IP protocol versions.

Required Associated Constants§

Source

const DOMAIN: Domain

ICMP socket domain.

Source

const PROTOCOL: Protocol

ICMP socket protocol.

Source

const ECHO_REQUEST_TYPE: u8

ICMP echo request type.

Source

const ECHO_REPLY_TYPE: u8

ICMP echo reply type.

Required Associated Types§

Source

type SockAddr: Into<SockAddr> + TryFromSockAddr + Clone + Copy + Unpin + PartialEq + Debug + Display + Eq + Hash

IP Socket address type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IpExt for Ipv4

Source§

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

Source§

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

Source§

const ECHO_REQUEST_TYPE: u8 = 8u8

Source§

const ECHO_REPLY_TYPE: u8 = 0u8

Source§

type SockAddr = SocketAddrV4

Source§

impl IpExt for Ipv6

Source§

const DOMAIN: Domain = socket2::Domain::IPV6

Source§

const PROTOCOL: Protocol = socket2::Protocol::ICMPV6

Source§

const ECHO_REQUEST_TYPE: u8 = 128u8

Source§

const ECHO_REPLY_TYPE: u8 = 129u8

Source§

type SockAddr = SocketAddrV6

Implementors§