Trait netstack3_tcp::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.

Object Safety§

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>

§

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§