pub trait IpExt:
IpExt
+ IcmpIpExt
+ BroadcastIpExt
+ IpProtoExt {
type RecvSrcAddr: Into<Self::Addr> + TryFrom<Self::Addr, Error: Debug> + Copy + Clone;
const IP_HEADER_LENGTH: NonZeroU32;
const IP_MAX_PAYLOAD_LENGTH: NonZeroU32;
}
Expand description
An Ip
extension trait adding functionality specific to the IP layer.
Required Associated Constants§
Sourceconst IP_HEADER_LENGTH: NonZeroU32
const IP_HEADER_LENGTH: NonZeroU32
The length of an IP header without any IP options.
Sourceconst IP_MAX_PAYLOAD_LENGTH: NonZeroU32
const IP_MAX_PAYLOAD_LENGTH: NonZeroU32
The maximum payload size an IP payload can have.
Required Associated Types§
Sourcetype RecvSrcAddr: Into<Self::Addr> + TryFrom<Self::Addr, Error: Debug> + Copy + Clone
type RecvSrcAddr: Into<Self::Addr> + TryFrom<Self::Addr, Error: Debug> + Copy + Clone
The type used to specify an IP packet’s source address in a call to
[IpTransportContext::receive_ip_packet
].
For IPv4, this is Ipv4Addr
. For IPv6, this is Ipv6SourceAddr
.
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.