Trait ping::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 Types§

source

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

IP Socket address type.

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IpExt for Ipv4

§

type SockAddr = SocketAddrV4

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§

impl IpExt for Ipv6

§

type SockAddr = SocketAddrV6

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

Implementors§