pub trait DualStackBaseIpExt:
DualStackIpExt
+ SocketIpExt
+ IpExt
+ FilterIpExt
+ IpLayerIpExt {
type DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec>: Clone + Debug + Eq;
type OtherStackIpOptions<State: Clone + Debug + Default + Send + Sync>: Clone + Debug + Default + Send + Sync;
type DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>>: Clone + Debug + Send + Sync + Into<(Option<SpecifiedAddr<Self::Addr>>, NonZeroU16)>;
type DualStackConnIpAddr<S: DatagramSocketSpec>: Clone + Debug + Into<ConnInfoAddr<Self::Addr, <S::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>>;
type DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec>: Debug + Send + Sync
where Self::OtherVersion: DualStackBaseIpExt;
// Required methods
fn into_dual_stack_bound_socket_id<D: WeakDeviceIdentifier, S: DatagramSocketSpec>(
id: S::SocketId<Self, D>,
) -> Self::DualStackBoundSocketId<D, S>
where Self: IpExt;
fn conn_addr_from_state<D: WeakDeviceIdentifier, S: DatagramSocketSpec>(
state: &Self::DualStackConnState<D, S>,
) -> ConnAddr<Self::DualStackConnIpAddr<S>, D>
where Self::OtherVersion: DualStackBaseIpExt;
}Expand description
Required Associated Types§
Sourcetype DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec>: Clone + Debug + Eq
type DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec>: Clone + Debug + Eq
The type of socket that can receive an IP packet.
For Ipv4, this is EitherIpSocket<S>, and for Ipv6 it is just
S::SocketId<Ipv6>.
[EitherIpSocket<S>]: EitherIpSocket
Sourcetype OtherStackIpOptions<State: Clone + Debug + Default + Send + Sync>: Clone + Debug + Default + Send + Sync
type OtherStackIpOptions<State: Clone + Debug + Default + Send + Sync>: Clone + Debug + Default + Send + Sync
Sourcetype DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>>: Clone + Debug + Send + Sync + Into<(Option<SpecifiedAddr<Self::Addr>>, NonZeroU16)>
type DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>>: Clone + Debug + Send + Sync + Into<(Option<SpecifiedAddr<Self::Addr>>, NonZeroU16)>
A listener address for dual-stack operation.
Sourcetype DualStackConnIpAddr<S: DatagramSocketSpec>: Clone + Debug + Into<ConnInfoAddr<Self::Addr, <S::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>>
type DualStackConnIpAddr<S: DatagramSocketSpec>: Clone + Debug + Into<ConnInfoAddr<Self::Addr, <S::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>>
A connected address for dual-stack operation.
Sourcetype DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec>: Debug + Send + Sync
where
Self::OtherVersion: DualStackBaseIpExt
type DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec>: Debug + Send + Sync where Self::OtherVersion: DualStackBaseIpExt
Connection state for a dual-stack socket.
Required Methods§
Sourcefn into_dual_stack_bound_socket_id<D: WeakDeviceIdentifier, S: DatagramSocketSpec>(
id: S::SocketId<Self, D>,
) -> Self::DualStackBoundSocketId<D, S>where
Self: IpExt,
fn into_dual_stack_bound_socket_id<D: WeakDeviceIdentifier, S: DatagramSocketSpec>(
id: S::SocketId<Self, D>,
) -> Self::DualStackBoundSocketId<D, S>where
Self: IpExt,
Convert a socket ID into a Self::DualStackBoundSocketId.
For coherency reasons this can’t be a From bound on
DualStackBoundSocketId. If more methods are added, consider moving
this to its own dedicated trait that bounds DualStackBoundSocketId.
Sourcefn conn_addr_from_state<D: WeakDeviceIdentifier, S: DatagramSocketSpec>(
state: &Self::DualStackConnState<D, S>,
) -> ConnAddr<Self::DualStackConnIpAddr<S>, D>where
Self::OtherVersion: DualStackBaseIpExt,
fn conn_addr_from_state<D: WeakDeviceIdentifier, S: DatagramSocketSpec>(
state: &Self::DualStackConnState<D, S>,
) -> ConnAddr<Self::DualStackConnIpAddr<S>, D>where
Self::OtherVersion: DualStackBaseIpExt,
Retrieves the associated connection address from the connection state.
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 DualStackBaseIpExt for Ipv4
impl DualStackBaseIpExt for Ipv4
Source§type DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = EitherIpSocket<D, S>
type DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = EitherIpSocket<D, S>
Incoming IPv4 packets may be received by either IPv4 or IPv6 sockets.
Source§type DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>> = ListenerIpAddr<<Ipv4 as Ip>::Addr, LocalIdentifier>
type DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>> = ListenerIpAddr<<Ipv4 as Ip>::Addr, LocalIdentifier>
IPv4 sockets can’t listen on dual-stack addresses.
Source§type DualStackConnIpAddr<S: DatagramSocketSpec> = ConnIpAddrInner<SocketIpAddr<<Ipv4 as Ip>::Addr>, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>
type DualStackConnIpAddr<S: DatagramSocketSpec> = ConnIpAddrInner<SocketIpAddr<<Ipv4 as Ip>::Addr>, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>
IPv4 sockets cannot connect on dual-stack addresses.
Source§type DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = ConnState<Ipv4, D, S>
type DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = ConnState<Ipv4, D, S>
IPv4 sockets cannot connect on dual-stack addresses.
type OtherStackIpOptions<State: Clone + Debug + Default + Send + Sync> = ()
fn into_dual_stack_bound_socket_id<D: WeakDeviceIdentifier, S: DatagramSocketSpec>( id: S::SocketId<Self, D>, ) -> Self::DualStackBoundSocketId<D, S>
fn conn_addr_from_state<D: WeakDeviceIdentifier, S: DatagramSocketSpec>( state: &Self::DualStackConnState<D, S>, ) -> ConnAddr<Self::DualStackConnIpAddr<S>, D>
Source§impl DualStackBaseIpExt for Ipv6
impl DualStackBaseIpExt for Ipv6
Source§type DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = <S as DatagramSocketSpec>::SocketId<Ipv6, D>
type DualStackBoundSocketId<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = <S as DatagramSocketSpec>::SocketId<Ipv6, D>
Incoming IPv6 packets may only be received by IPv6 sockets.
Source§type DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>> = DualStackListenerIpAddr<<Ipv6 as Ip>::Addr, LocalIdentifier>
type DualStackListenerIpAddr<LocalIdentifier: Clone + Debug + Send + Sync + Into<NonZeroU16>> = DualStackListenerIpAddr<<Ipv6 as Ip>::Addr, LocalIdentifier>
IPv6 listeners can listen on dual-stack addresses (if the protocol and socket are dual-stack-enabled).
Source§type DualStackConnIpAddr<S: DatagramSocketSpec> = DualStackConnIpAddr<<Ipv6 as Ip>::Addr, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>
type DualStackConnIpAddr<S: DatagramSocketSpec> = DualStackConnIpAddr<<Ipv6 as Ip>::Addr, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier, <<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>
IPv6 sockets can connect on dual-stack addresses (if the protocol and socket are dual-stack-enabled).
Source§type DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = DualStackConnState<Ipv6, D, S>
type DualStackConnState<D: WeakDeviceIdentifier, S: DatagramSocketSpec> = DualStackConnState<Ipv6, D, S>
IPv6 sockets can connect on dual-stack addresses (if the protocol and socket are dual-stack-enabled).