pub trait IpExt: EthernetIpExt + IcmpIpExt {
type PacketParseError: From<ParseError> + Debug + PartialEq + Send + Sync;
type Packet<B: SplitByteSlice>: IpPacket<B, Self> + GenericOverIp<Self, Type = Self::Packet<B>> + GenericOverIp<Ipv4, Type = Ipv4Packet<B>> + GenericOverIp<Ipv6, Type = Ipv6Packet<B>>;
type PacketRaw<B: SplitByteSlice>: IpPacketRaw<B, Self> + GenericOverIp<Self, Type = Self::PacketRaw<B>> + GenericOverIp<Ipv4, Type = Ipv4PacketRaw<B>> + GenericOverIp<Ipv6, Type = Ipv6PacketRaw<B>>;
type PacketBuilder<C: IpSerializationContext<Self>>: IpPacketBuilder<C, Self> + Eq;
const MIN_HEADER_LENGTH: usize;
}Expand description
An extension trait to the Ip trait adding associated types relevant for
packet parsing and serialization.
Required Associated Constants§
Sourceconst MIN_HEADER_LENGTH: usize
const MIN_HEADER_LENGTH: usize
Minimal IP header size.
Required Associated Types§
Sourcetype PacketParseError: From<ParseError> + Debug + PartialEq + Send + Sync
type PacketParseError: From<ParseError> + Debug + PartialEq + Send + Sync
The error type returned when parsing a packet of this IP version fails.
Sourcetype Packet<B: SplitByteSlice>: IpPacket<B, Self> + GenericOverIp<Self, Type = Self::Packet<B>> + GenericOverIp<Ipv4, Type = Ipv4Packet<B>> + GenericOverIp<Ipv6, Type = Ipv6Packet<B>>
type Packet<B: SplitByteSlice>: IpPacket<B, Self> + GenericOverIp<Self, Type = Self::Packet<B>> + GenericOverIp<Ipv4, Type = Ipv4Packet<B>> + GenericOverIp<Ipv6, Type = Ipv6Packet<B>>
An IP packet type for this IP version.
Sourcetype PacketRaw<B: SplitByteSlice>: IpPacketRaw<B, Self> + GenericOverIp<Self, Type = Self::PacketRaw<B>> + GenericOverIp<Ipv4, Type = Ipv4PacketRaw<B>> + GenericOverIp<Ipv6, Type = Ipv6PacketRaw<B>>
type PacketRaw<B: SplitByteSlice>: IpPacketRaw<B, Self> + GenericOverIp<Self, Type = Self::PacketRaw<B>> + GenericOverIp<Ipv4, Type = Ipv4PacketRaw<B>> + GenericOverIp<Ipv6, Type = Ipv6PacketRaw<B>>
A raw IP packet type for this IP version.
Sourcetype PacketBuilder<C: IpSerializationContext<Self>>: IpPacketBuilder<C, Self> + Eq
type PacketBuilder<C: IpSerializationContext<Self>>: IpPacketBuilder<C, Self> + Eq
An IP packet builder type for the IP version.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".