#[non_exhaustive]pub enum IcmpError {
NetUnreachable,
HostUnreachable,
ProtoUnreachable,
PortUnreachable,
PacketTooBig,
Other,
}Expand description
ICMP error reported against a socket.
Returned by take_icmp_error on UDP and TCP sockets (and by
UdpSocket::recv) when an ICMP error message quoting
one of the socket’s packets arrives. Requires the icmp-errors cargo
feature.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NetUnreachable
The destination network is unreachable (ENETUNREACH).
HostUnreachable
The destination host is unreachable (EHOSTUNREACH). Also reported when
the stack’s own neighbor resolution (ARP/NDISC) for the destination fails.
ProtoUnreachable
The destination host does not speak this protocol (EPROTO).
PortUnreachable
Nothing is listening on the destination port (ECONNREFUSED).
PacketTooBig
The packet was too big for a link on the path and could not be fragmented
(EMSGSIZE): ICMPv4 “fragmentation needed and DF set” / ICMPv6 packet too
big.
Other
Any other error: time exceeded, parameter problem, source route failed, …