netstack3_tcp

Trait TcpDualStackContext

Source
pub trait TcpDualStackContext<I: DualStackIpExt, D: WeakDeviceIdentifier, BT: TcpBindingsTypes> {
    type DualStackIpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + TransportIpContext<I::OtherVersion, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I::OtherVersion, BT> + TcpCoreTimerContext<I::OtherVersion, D, BT> + CounterContext<TcpCounters<I>>;

    // Required methods
    fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<I>;
    fn dual_stack_enabled(&self, ip_options: &I::DualStackIpOptions) -> bool;
    fn set_dual_stack_enabled(
        &self,
        ip_options: &mut I::DualStackIpOptions,
        value: bool,
    );
    fn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>, &mut DemuxState<I::OtherVersion, D, BT>) -> O>(
        &mut self,
        cb: F,
    ) -> O;

    // Provided methods
    fn into_other_demux_socket_id(
        &self,
        id: TcpSocketId<I, D, BT>,
    ) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT> { ... }
    fn dual_stack_demux_id(
        &self,
        id: TcpSocketId<I, D, BT>,
    ) -> DualStackTuple<I, DemuxSocketId<I, D, BT>> { ... }
}
Expand description

A provider of dualstack socket functionality required by TCP sockets.

Required Associated Types§

Source

type DualStackIpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + TransportIpContext<I::OtherVersion, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I::OtherVersion, BT> + TcpCoreTimerContext<I::OtherVersion, D, BT> + CounterContext<TcpCounters<I>>

The inner IP transport context,

Required Methods§

Source

fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<I>

Gets a converter to get the demux socket ID for the other stack.

Source

fn dual_stack_enabled(&self, ip_options: &I::DualStackIpOptions) -> bool

Gets the enabled state of dual stack operations on the given socket.

Source

fn set_dual_stack_enabled( &self, ip_options: &mut I::DualStackIpOptions, value: bool, )

Sets the enabled state of dual stack operations on the given socket.

Source

fn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>, &mut DemuxState<I::OtherVersion, D, BT>) -> O>( &mut self, cb: F, ) -> O

Calls cb with mutable access to both demux states.

Provided Methods§

Source

fn into_other_demux_socket_id( &self, id: TcpSocketId<I, D, BT>, ) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>

Turns a TcpSocketId into the demuxer ID of the other stack.

Source

fn dual_stack_demux_id( &self, id: TcpSocketId<I, D, BT>, ) -> DualStackTuple<I, DemuxSocketId<I, D, BT>>

Returns a dual stack tuple with both demux identifiers for id.

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<I: DualStackIpExt, D: WeakDeviceIdentifier, BT: TcpBindingsTypes, P: TcpDualStackContext<I::OtherVersion, D, BT>> TcpDualStackContext<I, D, BT> for UninstantiableWrapper<P>

Source§

type DualStackIpTransportCtx<'a> = <P as TcpDualStackContext<<I as DualStackIpExt>::OtherVersion, D, BT>>::DualStackIpTransportCtx<'a>

Source§

fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<I>

Source§

fn dual_stack_enabled(&self, _ip_options: &I::DualStackIpOptions) -> bool

Source§

fn set_dual_stack_enabled( &self, _ip_options: &mut I::DualStackIpOptions, _value: bool, )

Source§

fn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>, &mut DemuxState<I::OtherVersion, D, BT>) -> O>( &mut self, _cb: F, ) -> O

Implementors§