Type Alias netstack3_core::CoreCtx
source · pub type CoreCtx<'a, BT, L> = Locked<&'a StackState<BT>, L>;
Expand description
Provides access to core context implementations.
L
is the current lock level of CoreCtx
. The alias UnlockedCoreCtx
is
provided at the Unlocked
level.
Aliased Type§
struct CoreCtx<'a, BT, L>(/* private fields */);
Implementations§
source§impl<'a, BT: BindingsTypes> CoreCtx<'a, BT, Unlocked>
impl<'a, BT: BindingsTypes> CoreCtx<'a, BT, Unlocked>
sourcepub fn new(stack_state: &'a StackState<BT>) -> Self
pub fn new(stack_state: &'a StackState<BT>) -> Self
Creates a new CoreCtx
from a borrowed [StackState
].
Trait Implementations§
source§impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> ArpContext<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> ArpContext<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
§type ConfigCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv4Arp as WrappedLockLevel>::LockLevel>>
type ConfigCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv4Arp as WrappedLockLevel>::LockLevel>>
The inner configuration context.
§type ArpSenderCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv4Arp as WrappedLockLevel>::LockLevel>>
type ArpSenderCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv4Arp as WrappedLockLevel>::LockLevel>>
The inner sender context.
source§fn with_arp_state_mut_and_sender_ctx<O, F: FnOnce(&mut ArpState<EthernetLinkDevice, BC>, &mut Self::ArpSenderCtx<'_>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_arp_state_mut_and_sender_ctx<O, F: FnOnce(&mut ArpState<EthernetLinkDevice, BC>, &mut Self::ArpSenderCtx<'_>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with a mutable reference to ARP state and the
core sender context.
source§fn get_protocol_addr(
&mut self,
_bindings_ctx: &mut BC,
device_id: &EthernetDeviceId<BC>,
) -> Option<Ipv4Addr>
fn get_protocol_addr( &mut self, _bindings_ctx: &mut BC, device_id: &EthernetDeviceId<BC>, ) -> Option<Ipv4Addr>
Get a protocol address of this interface. Read more
source§fn get_hardware_addr(
&mut self,
_bindings_ctx: &mut BC,
device_id: &EthernetDeviceId<BC>,
) -> UnicastAddr<Mac>
fn get_hardware_addr( &mut self, _bindings_ctx: &mut BC, device_id: &EthernetDeviceId<BC>, ) -> UnicastAddr<Mac>
Get the hardware address of this interface.
source§fn with_arp_state_mut<O, F: FnOnce(&mut ArpState<EthernetLinkDevice, BC>, &mut Self::ConfigCtx<'_>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_arp_state_mut<O, F: FnOnce(&mut ArpState<EthernetLinkDevice, BC>, &mut Self::ConfigCtx<'_>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with a mutable reference to ARP state and the ARP
configuration context.
source§fn with_arp_state<O, F: FnOnce(&ArpState<EthernetLinkDevice, BC>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_arp_state<O, F: FnOnce(&ArpState<EthernetLinkDevice, BC>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with an immutable reference to ARP state.
source§impl<BC: BindingsContext, L: LockBefore<UdpBoundMap<Ipv4>>> BoundStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<UdpBoundMap<Ipv4>>> BoundStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <UdpBoundMap<Ipv4> as WrappedLockLevel>::LockLevel>
type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <UdpBoundMap<Ipv4> as WrappedLockLevel>::LockLevel>
The core context passed to the callback provided to methods.
§type DualStackContext = UninstantiableWrapper<Locked<&StackState<BC>, L>>
type DualStackContext = UninstantiableWrapper<Locked<&StackState<BC>, L>>
The inner dual stack context.
§type NonDualStackContext = Locked<&StackState<BC>, L>
type NonDualStackContext = Locked<&StackState<BC>, L>
The inner non dual stack context.
source§fn with_bound_sockets<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_sockets<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with an immutable reference to UDP sockets.
source§fn with_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to UDP sockets.
source§fn dual_stack_context(
&mut self,
) -> MaybeDualStack<&mut Self::DualStackContext, &mut Self::NonDualStackContext>
fn dual_stack_context( &mut self, ) -> MaybeDualStack<&mut Self::DualStackContext, &mut Self::NonDualStackContext>
Returns a context for dual- or non-dual-stack operation.
source§fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function without access to the UDP bound socket state.
source§impl<BC: BindingsContext, L: LockBefore<UdpBoundMap<Ipv4>>> BoundStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<UdpBoundMap<Ipv4>>> BoundStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <UdpBoundMap<Ipv6> as WrappedLockLevel>::LockLevel>
type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <UdpBoundMap<Ipv6> as WrappedLockLevel>::LockLevel>
The core context passed to the callback provided to methods.
§type DualStackContext = Locked<&StackState<BC>, L>
type DualStackContext = Locked<&StackState<BC>, L>
The inner dual stack context.
§type NonDualStackContext = UninstantiableWrapper<Locked<&StackState<BC>, L>>
type NonDualStackContext = UninstantiableWrapper<Locked<&StackState<BC>, L>>
The inner non dual stack context.
source§fn with_bound_sockets<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &BoundSockets<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_sockets<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &BoundSockets<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with an immutable reference to UDP sockets.
source§fn with_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to UDP sockets.
source§fn dual_stack_context(
&mut self,
) -> MaybeDualStack<&mut Self::DualStackContext, &mut Self::NonDualStackContext>
fn dual_stack_context( &mut self, ) -> MaybeDualStack<&mut Self::DualStackContext, &mut Self::NonDualStackContext>
Returns a context for dual- or non-dual-stack operation.
source§fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function without access to the UDP bound socket state.
source§impl<'a, BT, L> ContextProvider for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
impl<'a, BT, L> ContextProvider for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
source§impl<L, BT: BindingsTypes> CoreTimerContext<DadTimerId<WeakDeviceId<BT>, Weak<Ipv6AddressEntry<BT>>>, BT> for CoreCtx<'_, BT, L>
impl<L, BT: BindingsTypes> CoreTimerContext<DadTimerId<WeakDeviceId<BT>, Weak<Ipv6AddressEntry<BT>>>, BT> for CoreCtx<'_, BT, L>
source§fn convert_timer(
dispatch_id: DadTimerId<WeakDeviceId<BT>, WeakRc<Ipv6AddressEntry<BT>>>,
) -> BT::DispatchId
fn convert_timer( dispatch_id: DadTimerId<WeakDeviceId<BT>, WeakRc<Ipv6AddressEntry<BT>>>, ) -> BT::DispatchId
Converts an inner timer to the bindings timer type.
source§impl<BT: BindingsTypes, L> CoreTimerContext<EthernetTimerId<BaseWeakDeviceId<EthernetLinkDevice, BT>>, BT> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> CoreTimerContext<EthernetTimerId<BaseWeakDeviceId<EthernetLinkDevice, BT>>, BT> for CoreCtx<'_, BT, L>
source§fn convert_timer(
dispatch_id: EthernetTimerId<EthernetWeakDeviceId<BT>>,
) -> BT::DispatchId
fn convert_timer( dispatch_id: EthernetTimerId<EthernetWeakDeviceId<BT>>, ) -> BT::DispatchId
Converts an inner timer to the bindings timer type.
source§impl<'a, BT, L> CoreTimerContext<Infallible, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
impl<'a, BT, L> CoreTimerContext<Infallible, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
source§fn convert_timer(dispatch_id: Never) -> <BT as TimerBindingsTypes>::DispatchId
fn convert_timer(dispatch_id: Never) -> <BT as TimerBindingsTypes>::DispatchId
Converts an inner timer to the bindings timer type.
source§impl<I: IpDeviceIpExt, BT: BindingsTypes, L> CoreTimerContext<IpDeviceTimerId<I, WeakDeviceId<BT>, IpAddrCtxSpec<BT>>, BT> for CoreCtx<'_, BT, L>
impl<I: IpDeviceIpExt, BT: BindingsTypes, L> CoreTimerContext<IpDeviceTimerId<I, WeakDeviceId<BT>, IpAddrCtxSpec<BT>>, BT> for CoreCtx<'_, BT, L>
source§fn convert_timer(
dispatch_id: IpDeviceTimerId<I, WeakDeviceId<BT>, IpAddrCtxSpec<BT>>,
) -> BT::DispatchId
fn convert_timer( dispatch_id: IpDeviceTimerId<I, WeakDeviceId<BT>, IpAddrCtxSpec<BT>>, ) -> BT::DispatchId
Converts an inner timer to the bindings timer type.
source§impl<I, BC, L> CoreTimerContext<MulticastForwardingTimerId<I>, BC> for CoreCtx<'_, BC, L>where
I: IpExt,
BC: BindingsContext,
impl<I, BC, L> CoreTimerContext<MulticastForwardingTimerId<I>, BC> for CoreCtx<'_, BC, L>where
I: IpExt,
BC: BindingsContext,
source§fn convert_timer(dispatch_id: MulticastForwardingTimerId<I>) -> BC::DispatchId
fn convert_timer(dispatch_id: MulticastForwardingTimerId<I>) -> BC::DispatchId
Converts an inner timer to the bindings timer type.
source§fn new_timer(
bindings_ctx: &mut BT,
dispatch_id: T,
) -> <BT as TimerBindingsTypes>::Timerwhere
BT: TimerContext,
fn new_timer(
bindings_ctx: &mut BT,
dispatch_id: T,
) -> <BT as TimerBindingsTypes>::Timerwhere
BT: TimerContext,
A helper function to create a new timer with the provided dispatch id.
source§impl<L, BT: BindingsTypes> CoreTimerContext<RsTimerId<WeakDeviceId<BT>>, BT> for CoreCtx<'_, BT, L>
impl<L, BT: BindingsTypes> CoreTimerContext<RsTimerId<WeakDeviceId<BT>>, BT> for CoreCtx<'_, BT, L>
source§fn convert_timer(dispatch_id: RsTimerId<WeakDeviceId<BT>>) -> BT::DispatchId
fn convert_timer(dispatch_id: RsTimerId<WeakDeviceId<BT>>) -> BT::DispatchId
Converts an inner timer to the bindings timer type.
source§impl<I, BC, L> CoreTimerContext<WeakTcpSocketId<I, WeakDeviceId<BC>, BC>, BC> for CoreCtx<'_, BC, L>where
I: DualStackIpExt,
BC: BindingsContext,
impl<I, BC, L> CoreTimerContext<WeakTcpSocketId<I, WeakDeviceId<BC>, BC>, BC> for CoreCtx<'_, BC, L>where
I: DualStackIpExt,
BC: BindingsContext,
source§fn convert_timer(
dispatch_id: WeakTcpSocketId<I, WeakDeviceId<BC>, BC>,
) -> BC::DispatchId
fn convert_timer( dispatch_id: WeakTcpSocketId<I, WeakDeviceId<BC>, BC>, ) -> BC::DispatchId
Converts an inner timer to the bindings timer type.
source§fn new_timer(
bindings_ctx: &mut BT,
dispatch_id: T,
) -> <BT as TimerBindingsTypes>::Timerwhere
BT: TimerContext,
fn new_timer(
bindings_ctx: &mut BT,
dispatch_id: T,
) -> <BT as TimerBindingsTypes>::Timerwhere
BT: TimerContext,
A helper function to create a new timer with the provided dispatch id.
source§impl<BT: BindingsTypes, L> CounterContext<ArpCounters> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> CounterContext<ArpCounters> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&ArpCounters) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&ArpCounters) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BT: BindingsTypes, L> CounterContext<DeviceCounters> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> CounterContext<DeviceCounters> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&DeviceCounters) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&DeviceCounters) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BC: BindingsContext, L> CounterContext<EthernetDeviceCounters> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L> CounterContext<EthernetDeviceCounters> for CoreCtx<'_, BC, L>
source§fn with_counters<O, F: FnOnce(&EthernetDeviceCounters) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&EthernetDeviceCounters) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BT: BindingsTypes, I: IpLayerIpExt, L> CounterContext<IpCounters<I>> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, I: IpLayerIpExt, L> CounterContext<IpCounters<I>> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&IpCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&IpCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BT: BindingsTypes, I: DualStackIpExt, L> CounterContext<IpMarked<I, IcmpRxCountersInner>> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, I: DualStackIpExt, L> CounterContext<IpMarked<I, IcmpRxCountersInner>> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&IcmpRxCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&IcmpRxCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BT: BindingsTypes, I: DualStackIpExt, L> CounterContext<IpMarked<I, IcmpTxCountersInner>> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, I: DualStackIpExt, L> CounterContext<IpMarked<I, IcmpTxCountersInner>> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&IcmpTxCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&IcmpTxCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BC: BindingsContext, I: Ip, L> CounterContext<IpMarked<I, NudCountersInner>> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, I: Ip, L> CounterContext<IpMarked<I, NudCountersInner>> for CoreCtx<'_, BC, L>
source§fn with_counters<O, F: FnOnce(&NudCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&NudCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BC: BindingsContext, I: Ip, L> CounterContext<IpMarked<I, TcpCountersInner>> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, I: Ip, L> CounterContext<IpMarked<I, TcpCountersInner>> for CoreCtx<'_, BC, L>
source§fn with_counters<O, F: FnOnce(&TcpCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&TcpCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BC: BindingsContext, I: Ip, L> CounterContext<IpMarked<I, UdpCountersInner>> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, I: Ip, L> CounterContext<IpMarked<I, UdpCountersInner>> for CoreCtx<'_, BC, L>
source§fn with_counters<O, F: FnOnce(&UdpCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&UdpCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<I, BC, L> CounterContext<MulticastForwardingCounters<I>> for CoreCtx<'_, BC, L>where
I: IpExt,
BC: BindingsContext,
impl<I, BC, L> CounterContext<MulticastForwardingCounters<I>> for CoreCtx<'_, BC, L>where
I: IpExt,
BC: BindingsContext,
source§fn with_counters<O, F: FnOnce(&MulticastForwardingCounters<I>) -> O>(
&self,
cb: F,
) -> O
fn with_counters<O, F: FnOnce(&MulticastForwardingCounters<I>) -> O>( &self, cb: F, ) -> O
Call the function with an immutable reference to counter type T.
source§impl<BT: BindingsTypes, L> CounterContext<NdpCounters> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> CounterContext<NdpCounters> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&NdpCounters) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&NdpCounters) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BC: BindingsContext, L> CounterContext<PureIpDeviceCounters> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L> CounterContext<PureIpDeviceCounters> for CoreCtx<'_, BC, L>
source§fn with_counters<O, F: FnOnce(&PureIpDeviceCounters) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&PureIpDeviceCounters) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<I: IpExt, BC: BindingsContext, L> CounterContext<RawIpSocketCounters<I>> for CoreCtx<'_, BC, L>
impl<I: IpExt, BC: BindingsContext, L> CounterContext<RawIpSocketCounters<I>> for CoreCtx<'_, BC, L>
source§fn with_counters<O, F: FnOnce(&RawIpSocketCounters<I>) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&RawIpSocketCounters<I>) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BT: BindingsTypes, L> CounterContext<SlaacCounters> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> CounterContext<SlaacCounters> for CoreCtx<'_, BT, L>
source§fn with_counters<O, F: FnOnce(&SlaacCounters) -> O>(&self, cb: F) -> O
fn with_counters<O, F: FnOnce(&SlaacCounters) -> O>(&self, cb: F) -> O
Call the function with an immutable reference to counter type T.
source§impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> DelegateNudContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> DelegateNudContext<Ipv4> for CoreCtx<'_, BC, L>
source§impl<'a, BT, L> DeviceCollectionContext<EthernetLinkDevice, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
L: LockBefore<DeviceLayerState>,
impl<'a, BT, L> DeviceCollectionContext<EthernetLinkDevice, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
L: LockBefore<DeviceLayerState>,
source§fn insert(&mut self, device: EthernetPrimaryDeviceId<BT>)
fn insert(&mut self, device: EthernetPrimaryDeviceId<BT>)
Adds
device
to the device collection.source§fn remove(
&mut self,
device: &EthernetDeviceId<BT>,
) -> Option<EthernetPrimaryDeviceId<BT>>
fn remove( &mut self, device: &EthernetDeviceId<BT>, ) -> Option<EthernetPrimaryDeviceId<BT>>
Removes
device
from the collection, if it exists.source§impl<'a, BT, L> DeviceCollectionContext<LoopbackDevice, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
L: LockBefore<DeviceLayerState>,
impl<'a, BT, L> DeviceCollectionContext<LoopbackDevice, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
L: LockBefore<DeviceLayerState>,
source§fn insert(&mut self, device: LoopbackPrimaryDeviceId<BT>)
fn insert(&mut self, device: LoopbackPrimaryDeviceId<BT>)
Adds
device
to the device collection.source§fn remove(
&mut self,
device: &LoopbackDeviceId<BT>,
) -> Option<LoopbackPrimaryDeviceId<BT>>
fn remove( &mut self, device: &LoopbackDeviceId<BT>, ) -> Option<LoopbackPrimaryDeviceId<BT>>
Removes
device
from the collection, if it exists.source§impl<'a, BT, L> DeviceCollectionContext<PureIpDevice, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
L: LockBefore<DeviceLayerState>,
impl<'a, BT, L> DeviceCollectionContext<PureIpDevice, BT> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
L: LockBefore<DeviceLayerState>,
source§fn insert(&mut self, device: PureIpPrimaryDeviceId<BT>)
fn insert(&mut self, device: PureIpPrimaryDeviceId<BT>)
Adds
device
to the device collection.source§fn remove(
&mut self,
device: &PureIpDeviceId<BT>,
) -> Option<PureIpPrimaryDeviceId<BT>>
fn remove( &mut self, device: &PureIpDeviceId<BT>, ) -> Option<PureIpPrimaryDeviceId<BT>>
Removes
device
from the collection, if it exists.source§impl<'a, BT, L> DeviceConfigurationContext<EthernetLinkDevice> for CoreCtx<'a, BT, L>
impl<'a, BT, L> DeviceConfigurationContext<EthernetLinkDevice> for CoreCtx<'a, BT, L>
source§fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>(
&mut self,
device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>( &mut self, device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version
I
. Read moresource§fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>(
&mut self,
device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>( &mut self, device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version
I
. Read moresource§impl<'a, BT, L> DeviceConfigurationContext<LoopbackDevice> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
impl<'a, BT, L> DeviceConfigurationContext<LoopbackDevice> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
source§fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>(
&mut self,
_device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>( &mut self, _device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version
I
. Read moresource§fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>(
&mut self,
_device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>( &mut self, _device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version
I
. Read moresource§impl<'a, BT, L> DeviceConfigurationContext<PureIpDevice> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
impl<'a, BT, L> DeviceConfigurationContext<PureIpDevice> for CoreCtx<'a, BT, L>where
BT: BindingsTypes,
source§fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>(
&mut self,
_device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>( &mut self, _device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version
I
. Read moresource§fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>(
&mut self,
_device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>( &mut self, _device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version
I
. Read moresource§impl<BT: BindingsTypes, L> DeviceIdContext<AnyDevice> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> DeviceIdContext<AnyDevice> for CoreCtx<'_, BT, L>
§type WeakDeviceId = WeakDeviceId<BT>
type WeakDeviceId = WeakDeviceId<BT>
The type of weakly referenced device IDs.
source§impl<BT: BindingsTypes, L> DeviceIdContext<EthernetLinkDevice> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> DeviceIdContext<EthernetLinkDevice> for CoreCtx<'_, BT, L>
§type DeviceId = BaseDeviceId<EthernetLinkDevice, BT>
type DeviceId = BaseDeviceId<EthernetLinkDevice, BT>
The type of device IDs.
§type WeakDeviceId = BaseWeakDeviceId<EthernetLinkDevice, BT>
type WeakDeviceId = BaseWeakDeviceId<EthernetLinkDevice, BT>
The type of weakly referenced device IDs.
source§impl<BT: BindingsTypes, L> DeviceIdContext<LoopbackDevice> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> DeviceIdContext<LoopbackDevice> for CoreCtx<'_, BT, L>
§type DeviceId = BaseDeviceId<LoopbackDevice, BT>
type DeviceId = BaseDeviceId<LoopbackDevice, BT>
The type of device IDs.
§type WeakDeviceId = BaseWeakDeviceId<LoopbackDevice, BT>
type WeakDeviceId = BaseWeakDeviceId<LoopbackDevice, BT>
The type of weakly referenced device IDs.
source§impl<BT: BindingsTypes, L> DeviceIdContext<PureIpDevice> for CoreCtx<'_, BT, L>
impl<BT: BindingsTypes, L> DeviceIdContext<PureIpDevice> for CoreCtx<'_, BT, L>
§type DeviceId = BaseDeviceId<PureIpDevice, BT>
type DeviceId = BaseDeviceId<PureIpDevice, BT>
The type of device IDs.
§type WeakDeviceId = BaseWeakDeviceId<PureIpDevice, BT>
type WeakDeviceId = BaseWeakDeviceId<PureIpDevice, BT>
The type of weakly referenced device IDs.
source§impl<BC: BindingsContext, L: LockBefore<DeviceSockets>> DeviceSocketAccessor<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<DeviceSockets>> DeviceSocketAccessor<BC> for CoreCtx<'_, BC, L>
§type DeviceSocketCoreCtx<'a> = Locked<&'a StackState<BC>, <DeviceSockets as WrappedLockLevel>::LockLevel>
type DeviceSocketCoreCtx<'a> = Locked<&'a StackState<BC>, <DeviceSockets as WrappedLockLevel>::LockLevel>
Core context available in callbacks to methods on this context.
source§fn with_device_sockets<F: FnOnce(&DeviceSockets<Self::WeakDeviceId, BC>, &mut Self::DeviceSocketCoreCtx<'_>) -> R, R>(
&mut self,
device: &Self::DeviceId,
cb: F,
) -> R
fn with_device_sockets<F: FnOnce(&DeviceSockets<Self::WeakDeviceId, BC>, &mut Self::DeviceSocketCoreCtx<'_>) -> R, R>( &mut self, device: &Self::DeviceId, cb: F, ) -> R
Executes the provided callback with immutable access to device-specific
socket state.
source§fn with_device_sockets_mut<F: FnOnce(&mut DeviceSockets<Self::WeakDeviceId, BC>, &mut Self::DeviceSocketCoreCtx<'_>) -> R, R>(
&mut self,
device: &Self::DeviceId,
cb: F,
) -> R
fn with_device_sockets_mut<F: FnOnce(&mut DeviceSockets<Self::WeakDeviceId, BC>, &mut Self::DeviceSocketCoreCtx<'_>) -> R, R>( &mut self, device: &Self::DeviceId, cb: F, ) -> R
Executes the provided callback with mutable access to device-specific
socket state.
source§impl<BC: BindingsContext, L: LockBefore<AllDeviceSockets>> DeviceSocketContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<AllDeviceSockets>> DeviceSocketContext<BC> for CoreCtx<'_, BC, L>
§type SocketTablesCoreCtx<'a> = Locked<&'a StackState<BC>, <AnyDeviceSockets as WrappedLockLevel>::LockLevel>
type SocketTablesCoreCtx<'a> = Locked<&'a StackState<BC>, <AnyDeviceSockets as WrappedLockLevel>::LockLevel>
The core context available in callbacks to methods on this context.
source§fn with_all_device_sockets_mut<F: FnOnce(&mut AllSockets<Self::WeakDeviceId, BC>) -> R, R>(
&mut self,
cb: F,
) -> R
fn with_all_device_sockets_mut<F: FnOnce(&mut AllSockets<Self::WeakDeviceId, BC>) -> R, R>( &mut self, cb: F, ) -> R
Executes the provided callback with mutable access to the collection of
all sockets.
source§fn with_any_device_sockets<F: FnOnce(&AnyDeviceSockets<Self::WeakDeviceId, BC>, &mut Self::SocketTablesCoreCtx<'_>) -> R, R>(
&mut self,
cb: F,
) -> R
fn with_any_device_sockets<F: FnOnce(&AnyDeviceSockets<Self::WeakDeviceId, BC>, &mut Self::SocketTablesCoreCtx<'_>) -> R, R>( &mut self, cb: F, ) -> R
Executes the provided callback with immutable access to socket state.
source§fn with_any_device_sockets_mut<F: FnOnce(&mut AnyDeviceSockets<Self::WeakDeviceId, BC>, &mut Self::SocketTablesCoreCtx<'_>) -> R, R>(
&mut self,
cb: F,
) -> R
fn with_any_device_sockets_mut<F: FnOnce(&mut AnyDeviceSockets<Self::WeakDeviceId, BC>, &mut Self::SocketTablesCoreCtx<'_>) -> R, R>( &mut self, cb: F, ) -> R
Executes the provided callback with mutable access to socket state.
source§impl<BC: BindingsContext, L: LockBefore<UdpBoundMap<Ipv4>>> DualStackBoundStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<UdpBoundMap<Ipv4>>> DualStackBoundStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <UdpBoundMap<Ipv6> as WrappedLockLevel>::LockLevel>
type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <UdpBoundMap<Ipv6> as WrappedLockLevel>::LockLevel>
The core context passed to the callbacks to methods.
source§fn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv6, Self::WeakDeviceId, BC>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv6, Self::WeakDeviceId, BC>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the provided callback with mutable access to both the
demultiplexing maps.
source§fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the provided callback with mutable access to the demultiplexing
map for the other IP version.
source§fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the provided callback with access to the
IpSocketsCtx
.source§impl<BC: BindingsContext, L: LockBefore<EthernetDeviceDynamicState>> EthernetIpLinkDeviceDynamicStateContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<EthernetDeviceDynamicState>> EthernetIpLinkDeviceDynamicStateContext<BC> for CoreCtx<'_, BC, L>
source§fn with_ethernet_state<O, F: FnOnce(&StaticEthernetDeviceState, &DynamicEthernetDeviceState) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_ethernet_state<O, F: FnOnce(&StaticEthernetDeviceState, &DynamicEthernetDeviceState) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with the ethernet device’s static state and immutable
reference to the dynamic state.
source§fn with_ethernet_state_mut<O, F: FnOnce(&StaticEthernetDeviceState, &mut DynamicEthernetDeviceState) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_ethernet_state_mut<O, F: FnOnce(&StaticEthernetDeviceState, &mut DynamicEthernetDeviceState) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with the ethernet device’s static state and mutable
reference to the dynamic state.
source§impl<BC: BindingsContext, L> EthernetIpLinkDeviceStaticStateContext for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L> EthernetIpLinkDeviceStaticStateContext for CoreCtx<'_, BC, L>
source§fn with_static_ethernet_device_state<O, F: FnOnce(&StaticEthernetDeviceState) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_static_ethernet_device_state<O, F: FnOnce(&StaticEthernetDeviceState) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with an immutable reference to the ethernet device’s
static state.
source§impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterContext<BC> for CoreCtx<'_, BC, L>
source§impl<'a, BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterHandlerProvider<Ipv4, BC> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterHandlerProvider<Ipv4, BC> for CoreCtx<'a, BC, L>
§type Handler<'b> = FilterImpl<'b, Locked<&'a StackState<BC>, L>>
where
Self: 'b
type Handler<'b> = FilterImpl<'b, Locked<&'a StackState<BC>, L>> where Self: 'b
The filter handler.
source§fn filter_handler(&mut self) -> Self::Handler<'_>
fn filter_handler(&mut self) -> Self::Handler<'_>
Gets the filter handler for this context.
source§impl<'a, BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> FilterHandlerProvider<Ipv6, BC> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> FilterHandlerProvider<Ipv6, BC> for CoreCtx<'a, BC, L>
§type Handler<'b> = FilterImpl<'b, Locked<&'a StackState<BC>, L>>
where
Self: 'b
type Handler<'b> = FilterImpl<'b, Locked<&'a StackState<BC>, L>> where Self: 'b
The filter handler.
source§fn filter_handler(&mut self) -> Self::Handler<'_>
fn filter_handler(&mut self) -> Self::Handler<'_>
Gets the filter handler for this context.
source§impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterIpContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> FilterIpContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type NatCtx<'a> = Locked<&'a StackState<BC>, <FilterState<Ipv4> as WrappedLockLevel>::LockLevel>
type NatCtx<'a> = Locked<&'a StackState<BC>, <FilterState<Ipv4> as WrappedLockLevel>::LockLevel>
The execution context that allows the filtering engine to perform
Network Address Translation (NAT).
source§fn with_filter_state_and_nat_ctx<O, F: FnOnce(&State<Ipv4, BC>, &mut Self::NatCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_filter_state_and_nat_ctx<O, F: FnOnce(&State<Ipv4, BC>, &mut Self::NatCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a reference to filtering state and the NAT
context.
§fn with_filter_state<O, F>(&mut self, cb: F) -> Owhere
F: FnOnce(&State<I, BT>) -> O,
fn with_filter_state<O, F>(&mut self, cb: F) -> Owhere
F: FnOnce(&State<I, BT>) -> O,
Calls the function with a reference to filtering state.
source§impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> FilterIpContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> FilterIpContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type NatCtx<'a> = Locked<&'a StackState<BC>, <FilterState<Ipv6> as WrappedLockLevel>::LockLevel>
type NatCtx<'a> = Locked<&'a StackState<BC>, <FilterState<Ipv6> as WrappedLockLevel>::LockLevel>
The execution context that allows the filtering engine to perform
Network Address Translation (NAT).
source§fn with_filter_state_and_nat_ctx<O, F: FnOnce(&State<Ipv6, BC>, &mut Self::NatCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_filter_state_and_nat_ctx<O, F: FnOnce(&State<Ipv6, BC>, &mut Self::NatCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a reference to filtering state and the NAT
context.
§fn with_filter_state<O, F>(&mut self, cb: F) -> Owhere
F: FnOnce(&State<I, BT>) -> O,
fn with_filter_state<O, F>(&mut self, cb: F) -> Owhere
F: FnOnce(&State<I, BT>) -> O,
Calls the function with a reference to filtering state.
source§impl<I, BT, L> FragmentContext<I, BT> for CoreCtx<'_, BT, L>
impl<I, BT, L> FragmentContext<I, BT> for CoreCtx<'_, BT, L>
source§fn with_state_mut<O, F: FnOnce(&mut IpPacketFragmentCache<I, BT>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state_mut<O, F: FnOnce(&mut IpPacketFragmentCache<I, BT>) -> O>( &mut self, cb: F, ) -> O
Returns a mutable reference to the fragment cache.
source§impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv4>>> IcmpEchoBoundStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv4>>> IcmpEchoBoundStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <IcmpBoundMap<Ipv4> as WrappedLockLevel>::LockLevel>
type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <IcmpBoundMap<Ipv4> as WrappedLockLevel>::LockLevel>
The inner context providing IP socket access.
source§fn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to
IpSocketsCtx
and
a mutable reference to ICMP sockets.source§impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv6>>> IcmpEchoBoundStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv6>>> IcmpEchoBoundStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <IcmpBoundMap<Ipv6> as WrappedLockLevel>::LockLevel>
type IpSocketsCtx<'a> = Locked<&'a StackState<BC>, <IcmpBoundMap<Ipv6> as WrappedLockLevel>::LockLevel>
The inner context providing IP socket access.
source§fn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_icmp_ctx_and_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to
IpSocketsCtx
and
a mutable reference to ICMP sockets.source§impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv4>>> IcmpEchoStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv4>>> IcmpEchoStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <IcmpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <IcmpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
The inner socket context.
source§fn with_all_sockets_mut<O, F: FnOnce(&mut IcmpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets_mut<O, F: FnOnce(&mut IcmpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with mutable access to the set with all ICMP
sockets.
source§fn with_all_sockets<O, F: FnOnce(&IcmpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets<O, F: FnOnce(&IcmpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with immutable access to the set with all ICMP
sockets.
source§fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &IcmpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &IcmpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &IcmpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &IcmpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with an immutable reference to the given socket’s
state.
source§fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut IcmpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &IcmpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut IcmpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &IcmpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with a mutable reference to the given socket’s state.
source§fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function without access to ICMP socket state.
source§fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &IcmpSocketId<Ipv4, Self::WeakDeviceId, BC>, &IcmpSocketState<Ipv4, Self::WeakDeviceId, BC>)>(
&mut self,
cb: F,
)
fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &IcmpSocketId<Ipv4, Self::WeakDeviceId, BC>, &IcmpSocketState<Ipv4, Self::WeakDeviceId, BC>)>( &mut self, cb: F, )
Call
f
with each socket’s state.source§impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv6>>> IcmpEchoStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv6>>> IcmpEchoStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <IcmpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <IcmpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
The inner socket context.
source§fn with_all_sockets_mut<O, F: FnOnce(&mut IcmpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets_mut<O, F: FnOnce(&mut IcmpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with mutable access to the set with all ICMP
sockets.
source§fn with_all_sockets<O, F: FnOnce(&IcmpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets<O, F: FnOnce(&IcmpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with immutable access to the set with all ICMP
sockets.
source§fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &IcmpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &IcmpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &IcmpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &IcmpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with an immutable reference to the given socket’s
state.
source§fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut IcmpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &IcmpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut IcmpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &IcmpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with a mutable reference to the given socket’s state.
source§fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function without access to ICMP socket state.
source§fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &IcmpSocketId<Ipv6, Self::WeakDeviceId, BC>, &IcmpSocketState<Ipv6, Self::WeakDeviceId, BC>)>(
&mut self,
cb: F,
)
fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &IcmpSocketId<Ipv6, Self::WeakDeviceId, BC>, &IcmpSocketState<Ipv6, Self::WeakDeviceId, BC>)>( &mut self, cb: F, )
Call
f
with each socket’s state.source§impl<BC: BindingsContext, L: LockBefore<IpDeviceGmp<Ipv4>>> IgmpStateContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceGmp<Ipv4>>> IgmpStateContext<BC> for CoreCtx<'_, BC, L>
source§fn with_igmp_state<O, F: FnOnce(&MulticastGroupSet<Ipv4Addr, IgmpGroupState<BC::Instant>>) -> O>(
&mut self,
device: &Self::DeviceId,
cb: F,
) -> O
fn with_igmp_state<O, F: FnOnce(&MulticastGroupSet<Ipv4Addr, IgmpGroupState<BC::Instant>>) -> O>( &mut self, device: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the device’s IGMP
state.
source§impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv4>> + LockBefore<TcpAllSocketsSet<Ipv4>> + LockBefore<UdpAllSocketsSet<Ipv4>>> InnerIcmpContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv4>> + LockBefore<TcpAllSocketsSet<Ipv4>> + LockBefore<UdpAllSocketsSet<Ipv4>>> InnerIcmpContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type EchoTransportContext = IcmpEchoIpTransportContext
type EchoTransportContext = IcmpEchoIpTransportContext
A type implementing
IpTransportContext
that handles ICMP Echo
replies.source§fn receive_icmp_error(
&mut self,
bindings_ctx: &mut BC,
device: &DeviceId<BC>,
original_src_ip: Option<SpecifiedAddr<Ipv4Addr>>,
original_dst_ip: SpecifiedAddr<Ipv4Addr>,
original_proto: Ipv4Proto,
original_body: &[u8],
err: Icmpv4ErrorCode,
)
fn receive_icmp_error( &mut self, bindings_ctx: &mut BC, device: &DeviceId<BC>, original_src_ip: Option<SpecifiedAddr<Ipv4Addr>>, original_dst_ip: SpecifiedAddr<Ipv4Addr>, original_proto: Ipv4Proto, original_body: &[u8], err: Icmpv4ErrorCode, )
Receives an ICMP error message and demultiplexes it to a transport layer
protocol. Read more
source§fn with_error_send_bucket_mut<O, F: FnOnce(&mut TokenBucket<BC::Instant>) -> O>(
&mut self,
cb: F,
) -> O
fn with_error_send_bucket_mut<O, F: FnOnce(&mut TokenBucket<BC::Instant>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to ICMP error send tocket
bucket.
source§impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv6>> + LockBefore<TcpAllSocketsSet<Ipv6>> + LockBefore<UdpAllSocketsSet<Ipv6>>> InnerIcmpContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv6>> + LockBefore<TcpAllSocketsSet<Ipv6>> + LockBefore<UdpAllSocketsSet<Ipv6>>> InnerIcmpContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type EchoTransportContext = IcmpEchoIpTransportContext
type EchoTransportContext = IcmpEchoIpTransportContext
A type implementing
IpTransportContext
that handles ICMP Echo
replies.source§fn receive_icmp_error(
&mut self,
bindings_ctx: &mut BC,
device: &DeviceId<BC>,
original_src_ip: Option<SpecifiedAddr<Ipv6Addr>>,
original_dst_ip: SpecifiedAddr<Ipv6Addr>,
original_next_header: Ipv6Proto,
original_body: &[u8],
err: Icmpv6ErrorCode,
)
fn receive_icmp_error( &mut self, bindings_ctx: &mut BC, device: &DeviceId<BC>, original_src_ip: Option<SpecifiedAddr<Ipv6Addr>>, original_dst_ip: SpecifiedAddr<Ipv6Addr>, original_next_header: Ipv6Proto, original_body: &[u8], err: Icmpv6ErrorCode, )
Receives an ICMP error message and demultiplexes it to a transport layer
protocol. Read more
source§fn with_error_send_bucket_mut<O, F: FnOnce(&mut TokenBucket<BC::Instant>) -> O>(
&mut self,
cb: F,
) -> O
fn with_error_send_bucket_mut<O, F: FnOnce(&mut TokenBucket<BC::Instant>) -> O>( &mut self, cb: F, ) -> O
Calls the function with a mutable reference to ICMP error send tocket
bucket.
source§impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv4>> + LockBefore<TcpAllSocketsSet<Ipv4>> + LockBefore<UdpAllSocketsSet<Ipv4>>> InnerIcmpv4Context<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpBoundMap<Ipv4>> + LockBefore<TcpAllSocketsSet<Ipv4>> + LockBefore<UdpAllSocketsSet<Ipv4>>> InnerIcmpv4Context<BC> for CoreCtx<'_, BC, L>
source§fn should_send_timestamp_reply(&self) -> bool
fn should_send_timestamp_reply(&self) -> bool
Returns true if a timestamp reply may be sent.
source§impl<BC: BindingsContext, L> IpAddressIdSpecContext for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L> IpAddressIdSpecContext for CoreCtx<'_, BC, L>
§type AddressIdSpec = IpAddrCtxSpec<BC>
type AddressIdSpec = IpAddrCtxSpec<BC>
The address ID spec for this context.
source§impl<BC: BindingsContext, L: LockBefore<Ipv4DeviceAddressState>> IpDeviceAddressContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<Ipv4DeviceAddressState>> IpDeviceAddressContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§fn with_ip_address_state<O, F: FnOnce(&Ipv4AddressState<BC::Instant>) -> O>(
&mut self,
_: &Self::DeviceId,
addr_id: &Self::AddressId,
cb: F,
) -> O
fn with_ip_address_state<O, F: FnOnce(&Ipv4AddressState<BC::Instant>) -> O>( &mut self, _: &Self::DeviceId, addr_id: &Self::AddressId, cb: F, ) -> O
Calls the callback with a reference to the address state
addr_id
on
device_id
.source§fn with_ip_address_state_mut<O, F: FnOnce(&mut Ipv4AddressState<BC::Instant>) -> O>(
&mut self,
_: &Self::DeviceId,
addr_id: &Self::AddressId,
cb: F,
) -> O
fn with_ip_address_state_mut<O, F: FnOnce(&mut Ipv4AddressState<BC::Instant>) -> O>( &mut self, _: &Self::DeviceId, addr_id: &Self::AddressId, cb: F, ) -> O
Calls the callback with a mutable reference to the address state
addr_id
on device_id
.source§impl<BC: BindingsContext, L: LockBefore<Ipv6DeviceAddressState>> IpDeviceAddressContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<Ipv6DeviceAddressState>> IpDeviceAddressContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§fn with_ip_address_state<O, F: FnOnce(&Ipv6AddressState<BC::Instant>) -> O>(
&mut self,
_device_id: &Self::DeviceId,
addr_id: &Self::AddressId,
cb: F,
) -> O
fn with_ip_address_state<O, F: FnOnce(&Ipv6AddressState<BC::Instant>) -> O>( &mut self, _device_id: &Self::DeviceId, addr_id: &Self::AddressId, cb: F, ) -> O
Calls the callback with a reference to the address state
addr_id
on
device_id
.source§fn with_ip_address_state_mut<O, F: FnOnce(&mut Ipv6AddressState<BC::Instant>) -> O>(
&mut self,
_device_id: &Self::DeviceId,
addr_id: &Self::AddressId,
cb: F,
) -> O
fn with_ip_address_state_mut<O, F: FnOnce(&mut Ipv6AddressState<BC::Instant>) -> O>( &mut self, _device_id: &Self::DeviceId, addr_id: &Self::AddressId, cb: F, ) -> O
Calls the callback with a mutable reference to the address state
addr_id
on device_id
.source§impl<BC: BindingsContext, L> IpDeviceAddressIdContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L> IpDeviceAddressIdContext<Ipv4> for CoreCtx<'_, BC, L>
§type AddressId = Strong<Ipv4AddressEntry<BC>>
type AddressId = Strong<Ipv4AddressEntry<BC>>
The strong address identifier.
§type WeakAddressId = Weak<Ipv4AddressEntry<BC>>
type WeakAddressId = Weak<Ipv4AddressEntry<BC>>
The weak address identifier.
source§impl<BC: BindingsContext, L> IpDeviceAddressIdContext<Ipv6> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L> IpDeviceAddressIdContext<Ipv6> for CoreCtx<'_, BC, L>
§type AddressId = Strong<Ipv6AddressEntry<BC>>
type AddressId = Strong<Ipv6AddressEntry<BC>>
The strong address identifier.
§type WeakAddressId = Weak<Ipv6AddressEntry<BC>>
type WeakAddressId = Weak<Ipv6AddressEntry<BC>>
The weak address identifier.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> IpDeviceConfigurationContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> IpDeviceConfigurationContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type DevicesIter<'s> = DevicesIter<'s, BC>
type DevicesIter<'s> = DevicesIter<'s, BC>
The iterator provided by this context.
§type WithIpDeviceConfigurationInnerCtx<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s Ipv4DeviceConfiguration, <IpDeviceConfiguration<Ipv4> as WrappedLockLevel>::LockLevel, BC>
type WithIpDeviceConfigurationInnerCtx<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s Ipv4DeviceConfiguration, <IpDeviceConfiguration<Ipv4> as WrappedLockLevel>::LockLevel, BC>
The inner configuration context.
§type WithIpDeviceConfigurationMutInner<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s mut Ipv4DeviceConfiguration, <IpDeviceConfiguration<Ipv4> as WrappedLockLevel>::LockLevel, BC>
type WithIpDeviceConfigurationMutInner<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s mut Ipv4DeviceConfiguration, <IpDeviceConfiguration<Ipv4> as WrappedLockLevel>::LockLevel, BC>
The inner mutable configuration context.
§type DeviceAddressAndGroupsAccessor<'s> = Locked<&'s StackState<BC>, <DeviceLayerState as WrappedLockLevel>::LockLevel>
type DeviceAddressAndGroupsAccessor<'s> = Locked<&'s StackState<BC>, <DeviceLayerState as WrappedLockLevel>::LockLevel>
Provides access to device state.
source§fn with_ip_device_configuration<O, F: FnOnce(&Ipv4DeviceConfiguration, Self::WithIpDeviceConfigurationInnerCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ip_device_configuration<O, F: FnOnce(&Ipv4DeviceConfiguration, Self::WithIpDeviceConfigurationInnerCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the IP device
configuration and a
WithIpDeviceConfigurationInnerCtx
.source§fn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a
WithIpDeviceConfigurationMutInner
.source§fn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function with an
Iterator
of IDs for all initialized
devices and an accessor for device state.source§fn loopback_id(&mut self) -> Option<Self::DeviceId>
fn loopback_id(&mut self) -> Option<Self::DeviceId>
Returns the ID of the loopback interface, if one exists on the system
and is initialized.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> IpDeviceConfigurationContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> IpDeviceConfigurationContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type DevicesIter<'s> = DevicesIter<'s, BC>
type DevicesIter<'s> = DevicesIter<'s, BC>
The iterator provided by this context.
§type WithIpDeviceConfigurationInnerCtx<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
type WithIpDeviceConfigurationInnerCtx<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
The inner configuration context.
§type WithIpDeviceConfigurationMutInner<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s mut Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
type WithIpDeviceConfigurationMutInner<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s mut Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
The inner mutable configuration context.
§type DeviceAddressAndGroupsAccessor<'s> = Locked<&'s StackState<BC>, <DeviceLayerState as WrappedLockLevel>::LockLevel>
type DeviceAddressAndGroupsAccessor<'s> = Locked<&'s StackState<BC>, <DeviceLayerState as WrappedLockLevel>::LockLevel>
Provides access to device state.
source§fn with_ip_device_configuration<O, F: FnOnce(&Ipv6DeviceConfiguration, Self::WithIpDeviceConfigurationInnerCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ip_device_configuration<O, F: FnOnce(&Ipv6DeviceConfiguration, Self::WithIpDeviceConfigurationInnerCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the IP device
configuration and a
WithIpDeviceConfigurationInnerCtx
.source§fn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a
WithIpDeviceConfigurationMutInner
.source§fn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function with an
Iterator
of IDs for all initialized
devices and an accessor for device state.source§fn loopback_id(&mut self) -> Option<Self::DeviceId>
fn loopback_id(&mut self) -> Option<Self::DeviceId>
Returns the ID of the loopback interface, if one exists on the system
and is initialized.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> IpDeviceConfirmReachableContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> IpDeviceConfirmReachableContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§fn confirm_reachable(
&mut self,
bindings_ctx: &mut BC,
device: &Self::DeviceId,
neighbor: SpecifiedAddr<<Ipv4 as Ip>::Addr>,
)
fn confirm_reachable( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, neighbor: SpecifiedAddr<<Ipv4 as Ip>::Addr>, )
Confirm transport-layer forward reachability to the specified neighbor
through the specified device.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> IpDeviceConfirmReachableContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> IpDeviceConfirmReachableContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§fn confirm_reachable(
&mut self,
bindings_ctx: &mut BC,
device: &Self::DeviceId,
neighbor: SpecifiedAddr<<Ipv6 as Ip>::Addr>,
)
fn confirm_reachable( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, neighbor: SpecifiedAddr<<Ipv6 as Ip>::Addr>, )
Confirm transport-layer forward reachability to the specified neighbor
through the specified device.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> IpDeviceContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> IpDeviceContext<Ipv4> for CoreCtx<'_, BC, L>
source§fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
Is the device enabled?
§type DeviceAndAddressStatusIter<'a> = FilterPresentWithDevices<Ipv4, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv4, BC>>::DevicesIter<'a>, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv4, BC>>::DeviceAddressAndGroupsAccessor<'a>, BC>
type DeviceAndAddressStatusIter<'a> = FilterPresentWithDevices<Ipv4, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv4, BC>>::DevicesIter<'a>, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv4, BC>>::DeviceAddressAndGroupsAccessor<'a>, BC>
The iterator provided to
IpDeviceContext::with_address_statuses
.source§fn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>(
&mut self,
addr: SpecifiedAddr<Ipv4Addr>,
cb: F,
) -> R
fn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>( &mut self, addr: SpecifiedAddr<Ipv4Addr>, cb: F, ) -> R
Provides access to the status of an address. Read more
source§fn is_device_unicast_forwarding_enabled(
&mut self,
device_id: &Self::DeviceId,
) -> bool
fn is_device_unicast_forwarding_enabled( &mut self, device_id: &Self::DeviceId, ) -> bool
Returns true iff the device has unicast forwarding enabled.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> IpDeviceContext<Ipv6> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> IpDeviceContext<Ipv6> for CoreCtx<'_, BC, L>
source§fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
Is the device enabled?
§type DeviceAndAddressStatusIter<'a> = FilterPresentWithDevices<Ipv6, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv6, BC>>::DevicesIter<'a>, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv6, BC>>::DeviceAddressAndGroupsAccessor<'a>, BC>
type DeviceAndAddressStatusIter<'a> = FilterPresentWithDevices<Ipv6, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv6, BC>>::DevicesIter<'a>, <Locked<&StackState<BC>, L> as IpDeviceConfigurationContext<Ipv6, BC>>::DeviceAddressAndGroupsAccessor<'a>, BC>
The iterator provided to
IpDeviceContext::with_address_statuses
.source§fn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>(
&mut self,
addr: SpecifiedAddr<Ipv6Addr>,
cb: F,
) -> R
fn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>( &mut self, addr: SpecifiedAddr<Ipv6Addr>, cb: F, ) -> R
Provides access to the status of an address. Read more
source§fn is_device_unicast_forwarding_enabled(
&mut self,
device_id: &Self::DeviceId,
) -> bool
fn is_device_unicast_forwarding_enabled( &mut self, device_id: &Self::DeviceId, ) -> bool
Returns true iff the device has unicast forwarding enabled.
source§impl<I: IpExt, BC: BindingsContext, L: LockBefore<DeviceLayerState>> IpDeviceMtuContext<I> for CoreCtx<'_, BC, L>
impl<I: IpExt, BC: BindingsContext, L: LockBefore<DeviceLayerState>> IpDeviceMtuContext<I> for CoreCtx<'_, BC, L>
source§impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> IpDeviceSendContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv4>>> IpDeviceSendContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§fn send_ip_frame<S>(
&mut self,
bindings_ctx: &mut BC,
device: &DeviceId<BC>,
destination: IpPacketDestination<Ipv4, &DeviceId<BC>>,
ip_layer_metadata: DeviceIpLayerMetadata,
body: S,
_: ProofOfEgressCheck,
) -> Result<(), SendFrameError<S>>where
S: Serializer,
S::Buffer: BufferMut,
fn send_ip_frame<S>(
&mut self,
bindings_ctx: &mut BC,
device: &DeviceId<BC>,
destination: IpPacketDestination<Ipv4, &DeviceId<BC>>,
ip_layer_metadata: DeviceIpLayerMetadata,
body: S,
_: ProofOfEgressCheck,
) -> Result<(), SendFrameError<S>>where
S: Serializer,
S::Buffer: BufferMut,
Sends an IP packet through the device.
source§impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> IpDeviceSendContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> IpDeviceSendContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§fn send_ip_frame<S>(
&mut self,
bindings_ctx: &mut BC,
device: &DeviceId<BC>,
destination: IpPacketDestination<Ipv6, &DeviceId<BC>>,
ip_layer_metadata: DeviceIpLayerMetadata,
body: S,
_: ProofOfEgressCheck,
) -> Result<(), SendFrameError<S>>where
S: Serializer,
S::Buffer: BufferMut,
fn send_ip_frame<S>(
&mut self,
bindings_ctx: &mut BC,
device: &DeviceId<BC>,
destination: IpPacketDestination<Ipv6, &DeviceId<BC>>,
ip_layer_metadata: DeviceIpLayerMetadata,
body: S,
_: ProofOfEgressCheck,
) -> Result<(), SendFrameError<S>>where
S: Serializer,
S::Buffer: BufferMut,
Sends an IP packet through the device.
source§impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> IpDeviceStateContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> IpDeviceStateContext<Ipv4> for CoreCtx<'_, BC, L>
source§fn with_next_packet_id<O, F: FnOnce(&AtomicU16) -> O>(&self, cb: F) -> O
fn with_next_packet_id<O, F: FnOnce(&AtomicU16) -> O>(&self, cb: F) -> O
Calls the callback with the next packet ID.
source§fn get_local_addr_for_remote(
&mut self,
device_id: &Self::DeviceId,
_remote: Option<SpecifiedAddr<Ipv4Addr>>,
) -> Option<IpDeviceAddr<Ipv4Addr>>
fn get_local_addr_for_remote( &mut self, device_id: &Self::DeviceId, _remote: Option<SpecifiedAddr<Ipv4Addr>>, ) -> Option<IpDeviceAddr<Ipv4Addr>>
Returns the best local address for communicating with the remote.
source§fn get_hop_limit(&mut self, _device_id: &Self::DeviceId) -> NonZeroU8
fn get_hop_limit(&mut self, _device_id: &Self::DeviceId) -> NonZeroU8
Returns the hop limit.
source§fn address_status_for_device(
&mut self,
dst_ip: SpecifiedAddr<Ipv4Addr>,
device_id: &Self::DeviceId,
) -> AddressStatus<Ipv4PresentAddressStatus>
fn address_status_for_device( &mut self, dst_ip: SpecifiedAddr<Ipv4Addr>, device_id: &Self::DeviceId, ) -> AddressStatus<Ipv4PresentAddressStatus>
Gets the status of an address. Read more
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceAddresses<Ipv4>>> IpDeviceStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceAddresses<Ipv4>>> IpDeviceStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type IpDeviceAddressCtx<'a> = Locked<&'a StackState<BC>, <IpDeviceAddresses<Ipv4> as WrappedLockLevel>::LockLevel>
type IpDeviceAddressCtx<'a> = Locked<&'a StackState<BC>, <IpDeviceAddresses<Ipv4> as WrappedLockLevel>::LockLevel>
Inner accessor context.
source§fn with_ip_device_flags<O, F: FnOnce(&IpDeviceFlags) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ip_device_flags<O, F: FnOnce(&IpDeviceFlags) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with immutable access to the device’s flags. Read more
source§fn add_ip_address(
&mut self,
device_id: &Self::DeviceId,
addr: AddrSubnet<Ipv4Addr, Ipv4DeviceAddr>,
config: <Ipv4 as IpDeviceIpExt>::AddressConfig<BC::Instant>,
) -> Result<Self::AddressId, ExistsError>
fn add_ip_address( &mut self, device_id: &Self::DeviceId, addr: AddrSubnet<Ipv4Addr, Ipv4DeviceAddr>, config: <Ipv4 as IpDeviceIpExt>::AddressConfig<BC::Instant>, ) -> Result<Self::AddressId, ExistsError>
Adds an IP address for the device.
source§fn remove_ip_address(
&mut self,
device_id: &Self::DeviceId,
addr: Self::AddressId,
) -> RemoveResourceResultWithContext<AddrSubnet<Ipv4Addr>, BC>
fn remove_ip_address( &mut self, device_id: &Self::DeviceId, addr: Self::AddressId, ) -> RemoveResourceResultWithContext<AddrSubnet<Ipv4Addr>, BC>
Removes an address from the device identified by the ID.
source§fn get_address_id(
&mut self,
device_id: &Self::DeviceId,
addr: SpecifiedAddr<Ipv4Addr>,
) -> Result<Self::AddressId, NotFoundError>
fn get_address_id( &mut self, device_id: &Self::DeviceId, addr: SpecifiedAddr<Ipv4Addr>, ) -> Result<Self::AddressId, NotFoundError>
Returns the address ID for the given address value.
§type AddressIdsIter<'a> = AddressIdIter<'a, Ipv4, BC>
type AddressIdsIter<'a> = AddressIdIter<'a, Ipv4, BC>
The iterator given to
with_address_ids
.source§fn with_address_ids<O, F: FnOnce(Self::AddressIdsIter<'_>, &mut Self::IpDeviceAddressCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_address_ids<O, F: FnOnce(Self::AddressIdsIter<'_>, &mut Self::IpDeviceAddressCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an iterator over all the address IDs associated
with the device.
source§fn with_default_hop_limit<O, F: FnOnce(&NonZeroU8) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_default_hop_limit<O, F: FnOnce(&NonZeroU8) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the device’s default
hop limit for this IP version.
source§fn with_default_hop_limit_mut<O, F: FnOnce(&mut NonZeroU8) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_default_hop_limit_mut<O, F: FnOnce(&mut NonZeroU8) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a mutable reference to the device’s default
hop limit for this IP version.
source§fn join_link_multicast_group(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
multicast_addr: MulticastAddr<Ipv4Addr>,
)
fn join_link_multicast_group( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, multicast_addr: MulticastAddr<Ipv4Addr>, )
Joins the link-layer multicast group associated with the given IP
multicast group.
source§fn leave_link_multicast_group(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
multicast_addr: MulticastAddr<Ipv4Addr>,
)
fn leave_link_multicast_group( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, multicast_addr: MulticastAddr<Ipv4Addr>, )
Leaves the link-layer multicast group associated with the given IP
multicast group.
source§impl<BC: BindingsContext, L: LockBefore<IpState<Ipv6>>> IpDeviceStateContext<Ipv6> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpState<Ipv6>>> IpDeviceStateContext<Ipv6> for CoreCtx<'_, BC, L>
source§fn with_next_packet_id<O, F: FnOnce(&()) -> O>(&self, cb: F) -> O
fn with_next_packet_id<O, F: FnOnce(&()) -> O>(&self, cb: F) -> O
Calls the callback with the next packet ID.
source§fn get_local_addr_for_remote(
&mut self,
device_id: &Self::DeviceId,
remote: Option<SpecifiedAddr<Ipv6Addr>>,
) -> Option<IpDeviceAddr<Ipv6Addr>>
fn get_local_addr_for_remote( &mut self, device_id: &Self::DeviceId, remote: Option<SpecifiedAddr<Ipv6Addr>>, ) -> Option<IpDeviceAddr<Ipv6Addr>>
Returns the best local address for communicating with the remote.
source§fn get_hop_limit(&mut self, device_id: &Self::DeviceId) -> NonZeroU8
fn get_hop_limit(&mut self, device_id: &Self::DeviceId) -> NonZeroU8
Returns the hop limit.
source§fn address_status_for_device(
&mut self,
addr: SpecifiedAddr<Ipv6Addr>,
device_id: &Self::DeviceId,
) -> AddressStatus<<Ipv6 as IpLayerIpExt>::AddressStatus>
fn address_status_for_device( &mut self, addr: SpecifiedAddr<Ipv6Addr>, device_id: &Self::DeviceId, ) -> AddressStatus<<Ipv6 as IpLayerIpExt>::AddressStatus>
Gets the status of an address. Read more
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceAddresses<Ipv6>>> IpDeviceStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceAddresses<Ipv6>>> IpDeviceStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type IpDeviceAddressCtx<'a> = Locked<&'a StackState<BC>, <IpDeviceAddresses<Ipv6> as WrappedLockLevel>::LockLevel>
type IpDeviceAddressCtx<'a> = Locked<&'a StackState<BC>, <IpDeviceAddresses<Ipv6> as WrappedLockLevel>::LockLevel>
Inner accessor context.
source§fn with_ip_device_flags<O, F: FnOnce(&IpDeviceFlags) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ip_device_flags<O, F: FnOnce(&IpDeviceFlags) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with immutable access to the device’s flags. Read more
source§fn add_ip_address(
&mut self,
device_id: &Self::DeviceId,
addr: AddrSubnet<Ipv6Addr, Ipv6DeviceAddr>,
config: <Ipv6 as IpDeviceIpExt>::AddressConfig<BC::Instant>,
) -> Result<Self::AddressId, ExistsError>
fn add_ip_address( &mut self, device_id: &Self::DeviceId, addr: AddrSubnet<Ipv6Addr, Ipv6DeviceAddr>, config: <Ipv6 as IpDeviceIpExt>::AddressConfig<BC::Instant>, ) -> Result<Self::AddressId, ExistsError>
Adds an IP address for the device.
source§fn remove_ip_address(
&mut self,
device_id: &Self::DeviceId,
addr: Self::AddressId,
) -> RemoveResourceResultWithContext<AddrSubnet<Ipv6Addr>, BC>
fn remove_ip_address( &mut self, device_id: &Self::DeviceId, addr: Self::AddressId, ) -> RemoveResourceResultWithContext<AddrSubnet<Ipv6Addr>, BC>
Removes an address from the device identified by the ID.
source§fn get_address_id(
&mut self,
device_id: &Self::DeviceId,
addr: SpecifiedAddr<Ipv6Addr>,
) -> Result<Self::AddressId, NotFoundError>
fn get_address_id( &mut self, device_id: &Self::DeviceId, addr: SpecifiedAddr<Ipv6Addr>, ) -> Result<Self::AddressId, NotFoundError>
Returns the address ID for the given address value.
§type AddressIdsIter<'a> = AddressIdIter<'a, Ipv6, BC>
type AddressIdsIter<'a> = AddressIdIter<'a, Ipv6, BC>
The iterator given to
with_address_ids
.source§fn with_address_ids<O, F: FnOnce(Self::AddressIdsIter<'_>, &mut Self::IpDeviceAddressCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_address_ids<O, F: FnOnce(Self::AddressIdsIter<'_>, &mut Self::IpDeviceAddressCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an iterator over all the address IDs associated
with the device.
source§fn with_default_hop_limit<O, F: FnOnce(&NonZeroU8) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_default_hop_limit<O, F: FnOnce(&NonZeroU8) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the device’s default
hop limit for this IP version.
source§fn with_default_hop_limit_mut<O, F: FnOnce(&mut NonZeroU8) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_default_hop_limit_mut<O, F: FnOnce(&mut NonZeroU8) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a mutable reference to the device’s default
hop limit for this IP version.
source§fn join_link_multicast_group(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
multicast_addr: MulticastAddr<Ipv6Addr>,
)
fn join_link_multicast_group( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, multicast_addr: MulticastAddr<Ipv6Addr>, )
Joins the link-layer multicast group associated with the given IP
multicast group.
source§fn leave_link_multicast_group(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
multicast_addr: MulticastAddr<Ipv6Addr>,
)
fn leave_link_multicast_group( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, multicast_addr: MulticastAddr<Ipv6Addr>, )
Leaves the link-layer multicast group associated with the given IP
multicast group.
source§impl<BC, L> IpRouteTablesContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC, L> IpRouteTablesContext<Ipv4> for CoreCtx<'_, BC, L>
§type IpDeviceIdCtx<'a> = Locked<&'a StackState<BC>, <IpStateRoutingTable<Ipv4> as WrappedLockLevel>::LockLevel>
type IpDeviceIdCtx<'a> = Locked<&'a StackState<BC>, <IpStateRoutingTable<Ipv4> as WrappedLockLevel>::LockLevel>
The inner device id context.
source§fn main_table_id(&self) -> RoutingTableId<Ipv4, Self::DeviceId>
fn main_table_id(&self) -> RoutingTableId<Ipv4, Self::DeviceId>
Gets the main table ID.
source§fn with_ip_routing_tables_mut<O, F: FnOnce(&mut HashMap<RoutingTableId<Ipv4, Self::DeviceId>, Primary<RwLock<RoutingTable<Ipv4, Self::DeviceId>>>>) -> O>(
&mut self,
cb: F,
) -> O
fn with_ip_routing_tables_mut<O, F: FnOnce(&mut HashMap<RoutingTableId<Ipv4, Self::DeviceId>, Primary<RwLock<RoutingTable<Ipv4, Self::DeviceId>>>>) -> O>( &mut self, cb: F, ) -> O
Gets mutable access to all the routing tables that currently exist.
source§fn with_ip_routing_table<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &RoutingTable<Ipv4, Self::DeviceId>) -> O>(
&mut self,
table_id: &RoutingTableId<Ipv4, Self::DeviceId>,
cb: F,
) -> O
fn with_ip_routing_table<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &RoutingTable<Ipv4, Self::DeviceId>) -> O>( &mut self, table_id: &RoutingTableId<Ipv4, Self::DeviceId>, cb: F, ) -> O
Calls the function with an immutable reference to IP routing table.
source§fn with_ip_routing_table_mut<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &mut RoutingTable<Ipv4, Self::DeviceId>) -> O>(
&mut self,
table_id: &RoutingTableId<Ipv4, Self::DeviceId>,
cb: F,
) -> O
fn with_ip_routing_table_mut<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &mut RoutingTable<Ipv4, Self::DeviceId>) -> O>( &mut self, table_id: &RoutingTableId<Ipv4, Self::DeviceId>, cb: F, ) -> O
Calls the function with a mutable reference to IP routing table.
source§fn with_main_ip_routing_table<O, F>(&mut self, cb: F) -> O
fn with_main_ip_routing_table<O, F>(&mut self, cb: F) -> O
Calls the function with an immutable reference to IP routing table.
source§fn with_main_ip_routing_table_mut<O, F>(&mut self, cb: F) -> O
fn with_main_ip_routing_table_mut<O, F>(&mut self, cb: F) -> O
Calls the function with a mutable reference to IP routing table.
source§impl<BC, L> IpRouteTablesContext<Ipv6> for CoreCtx<'_, BC, L>
impl<BC, L> IpRouteTablesContext<Ipv6> for CoreCtx<'_, BC, L>
§type IpDeviceIdCtx<'a> = Locked<&'a StackState<BC>, <IpStateRoutingTable<Ipv6> as WrappedLockLevel>::LockLevel>
type IpDeviceIdCtx<'a> = Locked<&'a StackState<BC>, <IpStateRoutingTable<Ipv6> as WrappedLockLevel>::LockLevel>
The inner device id context.
source§fn main_table_id(&self) -> RoutingTableId<Ipv6, Self::DeviceId>
fn main_table_id(&self) -> RoutingTableId<Ipv6, Self::DeviceId>
Gets the main table ID.
source§fn with_ip_routing_tables_mut<O, F: FnOnce(&mut HashMap<RoutingTableId<Ipv6, Self::DeviceId>, Primary<RwLock<RoutingTable<Ipv6, Self::DeviceId>>>>) -> O>(
&mut self,
cb: F,
) -> O
fn with_ip_routing_tables_mut<O, F: FnOnce(&mut HashMap<RoutingTableId<Ipv6, Self::DeviceId>, Primary<RwLock<RoutingTable<Ipv6, Self::DeviceId>>>>) -> O>( &mut self, cb: F, ) -> O
Gets mutable access to all the routing tables that currently exist.
source§fn with_ip_routing_table<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &RoutingTable<Ipv6, Self::DeviceId>) -> O>(
&mut self,
table_id: &RoutingTableId<Ipv6, Self::DeviceId>,
cb: F,
) -> O
fn with_ip_routing_table<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &RoutingTable<Ipv6, Self::DeviceId>) -> O>( &mut self, table_id: &RoutingTableId<Ipv6, Self::DeviceId>, cb: F, ) -> O
Calls the function with an immutable reference to IP routing table.
source§fn with_ip_routing_table_mut<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &mut RoutingTable<Ipv6, Self::DeviceId>) -> O>(
&mut self,
table_id: &RoutingTableId<Ipv6, Self::DeviceId>,
cb: F,
) -> O
fn with_ip_routing_table_mut<O, F: FnOnce(&mut Self::IpDeviceIdCtx<'_>, &mut RoutingTable<Ipv6, Self::DeviceId>) -> O>( &mut self, table_id: &RoutingTableId<Ipv6, Self::DeviceId>, cb: F, ) -> O
Calls the function with a mutable reference to IP routing table.
source§fn with_main_ip_routing_table<O, F>(&mut self, cb: F) -> O
fn with_main_ip_routing_table<O, F>(&mut self, cb: F) -> O
Calls the function with an immutable reference to IP routing table.
source§fn with_main_ip_routing_table_mut<O, F>(&mut self, cb: F) -> O
fn with_main_ip_routing_table_mut<O, F>(&mut self, cb: F) -> O
Calls the function with a mutable reference to IP routing table.
source§impl<I: IpDeviceIpExt, BC: BindingsContext, L> IpRoutingDeviceContext<I> for CoreCtx<'_, BC, L>where
Self: IpDeviceStateContext<I, BC, DeviceId = DeviceId<BC>>,
impl<I: IpDeviceIpExt, BC: BindingsContext, L> IpRoutingDeviceContext<I> for CoreCtx<'_, BC, L>where
Self: IpDeviceStateContext<I, BC, DeviceId = DeviceId<BC>>,
source§fn get_routing_metric(&mut self, device_id: &Self::DeviceId) -> RawMetric
fn get_routing_metric(&mut self, device_id: &Self::DeviceId) -> RawMetric
Returns the routing metric for the device.
source§fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
Returns true if the IP device is enabled.
source§impl<BC, L> IpStateContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC, L> IpStateContext<Ipv4> for CoreCtx<'_, BC, L>
§type IpRouteTablesCtx<'a> = Locked<&'a StackState<BC>, <IpStateRulesTable<Ipv4> as WrappedLockLevel>::LockLevel>
type IpRouteTablesCtx<'a> = Locked<&'a StackState<BC>, <IpStateRulesTable<Ipv4> as WrappedLockLevel>::LockLevel>
The context that provides access to the IP routing tables.
source§fn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<Ipv4, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O
fn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<Ipv4, Self::DeviceId>) -> O>( &mut self, cb: F, ) -> O
Gets an immutable reference to the rules table.
source§fn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<Ipv4, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O
fn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<Ipv4, Self::DeviceId>) -> O>( &mut self, cb: F, ) -> O
Gets a mutable reference to the rules table.
source§impl<BC, L> IpStateContext<Ipv6> for CoreCtx<'_, BC, L>
impl<BC, L> IpStateContext<Ipv6> for CoreCtx<'_, BC, L>
§type IpRouteTablesCtx<'a> = Locked<&'a StackState<BC>, <IpStateRulesTable<Ipv6> as WrappedLockLevel>::LockLevel>
type IpRouteTablesCtx<'a> = Locked<&'a StackState<BC>, <IpStateRulesTable<Ipv6> as WrappedLockLevel>::LockLevel>
The context that provides access to the IP routing tables.
source§fn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<Ipv6, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O
fn with_rules_table<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &RulesTable<Ipv6, Self::DeviceId>) -> O>( &mut self, cb: F, ) -> O
Gets an immutable reference to the rules table.
source§fn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<Ipv6, Self::DeviceId>) -> O>(
&mut self,
cb: F,
) -> O
fn with_rules_table_mut<O, F: FnOnce(&mut Self::IpRouteTablesCtx<'_>, &mut RulesTable<Ipv6, Self::DeviceId>) -> O>( &mut self, cb: F, ) -> O
Gets a mutable reference to the rules table.
source§impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv4>>> IpTransportDispatchContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv4>>> IpTransportDispatchContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§fn dispatch_receive_ip_packet<B: BufferMut>(
&mut self,
bindings_ctx: &mut BC,
device: &Self::DeviceId,
src_ip: Ipv4Addr,
dst_ip: SpecifiedAddr<Ipv4Addr>,
proto: Ipv4Proto,
body: B,
meta: ReceiveIpPacketMeta<Ipv4>,
) -> Result<(), TransportReceiveError>
fn dispatch_receive_ip_packet<B: BufferMut>( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, src_ip: Ipv4Addr, dst_ip: SpecifiedAddr<Ipv4Addr>, proto: Ipv4Proto, body: B, meta: ReceiveIpPacketMeta<Ipv4>, ) -> Result<(), TransportReceiveError>
Dispatches a received incoming IP packet to the appropriate protocol.
source§impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv6>>> IpTransportDispatchContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv6>>> IpTransportDispatchContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§fn dispatch_receive_ip_packet<B: BufferMut>(
&mut self,
bindings_ctx: &mut BC,
device: &Self::DeviceId,
src_ip: Ipv6SourceAddr,
dst_ip: SpecifiedAddr<Ipv6Addr>,
proto: Ipv6Proto,
body: B,
meta: ReceiveIpPacketMeta<Ipv6>,
) -> Result<(), TransportReceiveError>
fn dispatch_receive_ip_packet<B: BufferMut>( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, src_ip: Ipv6SourceAddr, dst_ip: SpecifiedAddr<Ipv6Addr>, proto: Ipv6Proto, body: B, meta: ReceiveIpPacketMeta<Ipv6>, ) -> Result<(), TransportReceiveError>
Dispatches a received incoming IP packet to the appropriate protocol.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> Ipv6DeviceConfigurationContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> Ipv6DeviceConfigurationContext<BC> for CoreCtx<'_, BC, L>
§type Ipv6DeviceStateCtx<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
type Ipv6DeviceStateCtx<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
The context available while holding device configuration.
§type WithIpv6DeviceConfigurationMutInner<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s mut Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
type WithIpv6DeviceConfigurationMutInner<'s> = CoreCtxWithIpDeviceConfiguration<'s, &'s mut Ipv6DeviceConfiguration, <IpDeviceConfiguration<Ipv6> as WrappedLockLevel>::LockLevel, BC>
The context available while holding mutable device configuration.
source§fn with_ipv6_device_configuration<O, F: FnOnce(&Ipv6DeviceConfiguration, Self::Ipv6DeviceStateCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ipv6_device_configuration<O, F: FnOnce(&Ipv6DeviceConfiguration, Self::Ipv6DeviceStateCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the IPv6 device
configuration and an
Ipv6DeviceStateCtx
.source§fn with_ipv6_device_configuration_mut<O, F: FnOnce(Self::WithIpv6DeviceConfigurationMutInner<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ipv6_device_configuration_mut<O, F: FnOnce(Self::WithIpv6DeviceConfigurationMutInner<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a
WithIpv6DeviceConfigurationMutInner
.source§impl<BC: BindingsContext, L: LockBefore<IpDeviceAddresses<Ipv6>>> Ipv6DeviceContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceAddresses<Ipv6>>> Ipv6DeviceContext<BC> for CoreCtx<'_, BC, L>
§type LinkLayerAddr = Ipv6DeviceLinkLayerAddr
type LinkLayerAddr = Ipv6DeviceLinkLayerAddr
A link-layer address.
source§fn get_link_layer_addr_bytes(
&mut self,
device_id: &Self::DeviceId,
) -> Option<Ipv6DeviceLinkLayerAddr>
fn get_link_layer_addr_bytes( &mut self, device_id: &Self::DeviceId, ) -> Option<Ipv6DeviceLinkLayerAddr>
Gets the device’s link-layer address bytes, if the device supports
link-layer addressing.
source§fn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>
fn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>
Gets the device’s EUI-64 based interface identifier. Read more
source§fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu)
fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu)
Sets the link MTU for the device.
source§fn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the retransmit timer.
source§fn with_network_learned_parameters_mut<O, F: FnOnce(&mut Ipv6NetworkLearnedParameters) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_network_learned_parameters_mut<O, F: FnOnce(&mut Ipv6NetworkLearnedParameters) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a mutable reference to the retransmit timer.
source§impl<BC: BindingsContext> Ipv6DiscoveredRoutesContext<BC> for CoreCtx<'_, BC, <Ipv6DeviceRouteDiscovery as WrappedLockLevel>::LockLevel>
impl<BC: BindingsContext> Ipv6DiscoveredRoutesContext<BC> for CoreCtx<'_, BC, <Ipv6DeviceRouteDiscovery as WrappedLockLevel>::LockLevel>
source§fn add_discovered_ipv6_route(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
_: Ipv6DiscoveredRoute,
)
fn add_discovered_ipv6_route( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, _: Ipv6DiscoveredRoute, )
Adds a newly discovered IPv6 route to the routing table.
source§fn del_discovered_ipv6_route(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
_: Ipv6DiscoveredRoute,
)
fn del_discovered_ipv6_route( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, _: Ipv6DiscoveredRoute, )
Deletes a previously discovered (now invalidated) IPv6 route from the
routing table.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceGmp<Ipv6>>> MldStateContext<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceGmp<Ipv6>>> MldStateContext<BC> for CoreCtx<'_, BC, L>
source§fn with_mld_state<O, F: FnOnce(&MulticastGroupSet<Ipv6Addr, MldGroupState<BC::Instant>>) -> O>(
&mut self,
device: &Self::DeviceId,
cb: F,
) -> O
fn with_mld_state<O, F: FnOnce(&MulticastGroupSet<Ipv6Addr, MldGroupState<BC::Instant>>) -> O>( &mut self, device: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the device’s MLD
state.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> MulticastForwardingDeviceContext<Ipv4> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv4>>> MulticastForwardingDeviceContext<Ipv4> for CoreCtx<'_, BC, L>
source§fn is_device_multicast_forwarding_enabled(
&mut self,
device_id: &Self::DeviceId,
) -> bool
fn is_device_multicast_forwarding_enabled( &mut self, device_id: &Self::DeviceId, ) -> bool
True if the given device has multicast forwarding enabled.
source§impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> MulticastForwardingDeviceContext<Ipv6> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpDeviceConfiguration<Ipv6>>> MulticastForwardingDeviceContext<Ipv6> for CoreCtx<'_, BC, L>
source§fn is_device_multicast_forwarding_enabled(
&mut self,
device_id: &Self::DeviceId,
) -> bool
fn is_device_multicast_forwarding_enabled( &mut self, device_id: &Self::DeviceId, ) -> bool
True if the given device has multicast forwarding enabled.
source§impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingPendingPackets<Ipv4>>> MulticastForwardingPendingPacketsContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingPendingPackets<Ipv4>>> MulticastForwardingPendingPacketsContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§fn with_pending_table_mut<O, F: FnOnce(&mut MulticastForwardingPendingPackets<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<Ipv4, Self::DeviceId, BC>,
cb: F,
) -> O
fn with_pending_table_mut<O, F: FnOnce(&mut MulticastForwardingPendingPackets<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, state: &MulticastForwardingEnabledState<Ipv4, Self::DeviceId, BC>, cb: F, ) -> O
Provides mutable access to the table of pending packets.
source§impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingPendingPackets<Ipv6>>> MulticastForwardingPendingPacketsContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingPendingPackets<Ipv6>>> MulticastForwardingPendingPacketsContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§fn with_pending_table_mut<O, F: FnOnce(&mut MulticastForwardingPendingPackets<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<Ipv6, Self::DeviceId, BC>,
cb: F,
) -> O
fn with_pending_table_mut<O, F: FnOnce(&mut MulticastForwardingPendingPackets<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, state: &MulticastForwardingEnabledState<Ipv6, Self::DeviceId, BC>, cb: F, ) -> O
Provides mutable access to the table of pending packets.
source§impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingState<Ipv4>>> MulticastForwardingStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingState<Ipv4>>> MulticastForwardingStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastForwardingState<Ipv4>>
type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastForwardingState<Ipv4>>
The context available after locking the multicast forwarding state.
source§fn with_state<O, F: FnOnce(&MulticastForwardingState<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state<O, F: FnOnce(&MulticastForwardingState<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, cb: F, ) -> O
Provides immutable access to the state.
source§fn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, cb: F, ) -> O
Provides mutable access to the state.
source§impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingState<Ipv6>>> MulticastForwardingStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpMulticastForwardingState<Ipv6>>> MulticastForwardingStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastForwardingState<Ipv6>>
type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastForwardingState<Ipv6>>
The context available after locking the multicast forwarding state.
source§fn with_state<O, F: FnOnce(&MulticastForwardingState<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state<O, F: FnOnce(&MulticastForwardingState<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, cb: F, ) -> O
Provides immutable access to the state.
source§fn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_state_mut<O, F: FnOnce(&mut MulticastForwardingState<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, cb: F, ) -> O
Provides mutable access to the state.
source§impl<I: Ip + IpDeviceIpExt + IpLayerIpExt, BC: BindingsContext + IpDeviceBindingsContext<I, Self::DeviceId> + IpLayerBindingsContext<I, Self::DeviceId>, L: LockBefore<IpState<I>>> MulticastMembershipHandler<I, BC> for CoreCtx<'_, BC, L>
impl<I: Ip + IpDeviceIpExt + IpLayerIpExt, BC: BindingsContext + IpDeviceBindingsContext<I, Self::DeviceId> + IpLayerBindingsContext<I, Self::DeviceId>, L: LockBefore<IpState<I>>> MulticastMembershipHandler<I, BC> for CoreCtx<'_, BC, L>
source§fn join_multicast_group(
&mut self,
bindings_ctx: &mut BC,
device: &Self::DeviceId,
addr: MulticastAddr<I::Addr>,
)
fn join_multicast_group( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, addr: MulticastAddr<I::Addr>, )
Requests that the specified device join the given multicast group. Read more
source§fn leave_multicast_group(
&mut self,
bindings_ctx: &mut BC,
device: &Self::DeviceId,
addr: MulticastAddr<I::Addr>,
)
fn leave_multicast_group( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, addr: MulticastAddr<I::Addr>, )
Requests that the specified device leave the given multicast group. Read more
source§fn select_device_for_multicast_group(
&mut self,
addr: MulticastAddr<I::Addr>,
marks: &Marks,
) -> Result<Self::DeviceId, ResolveRouteError>
fn select_device_for_multicast_group( &mut self, addr: MulticastAddr<I::Addr>, marks: &Marks, ) -> Result<Self::DeviceId, ResolveRouteError>
Selects a default device with which to join the given multicast group. Read more
source§impl<BC: BindingsContext, L: LockBefore<IpMulticastRouteTable<Ipv4>>> MulticastRouteTableContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpMulticastRouteTable<Ipv4>>> MulticastRouteTableContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastRouteTable<Ipv4>>
type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastRouteTable<Ipv4>>
The context available after locking the multicast route table.
source§fn with_route_table<O, F: FnOnce(&MulticastRouteTable<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<Ipv4, Self::DeviceId, BC>,
cb: F,
) -> O
fn with_route_table<O, F: FnOnce(&MulticastRouteTable<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, state: &MulticastForwardingEnabledState<Ipv4, Self::DeviceId, BC>, cb: F, ) -> O
Provides immutable access to the route table.
source§fn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<Ipv4, Self::DeviceId, BC>,
cb: F,
) -> O
fn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<Ipv4, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, state: &MulticastForwardingEnabledState<Ipv4, Self::DeviceId, BC>, cb: F, ) -> O
Provides mutable access to the route table.
source§impl<BC: BindingsContext, L: LockBefore<IpMulticastRouteTable<Ipv6>>> MulticastRouteTableContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpMulticastRouteTable<Ipv6>>> MulticastRouteTableContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastRouteTable<Ipv6>>
type Ctx<'a> = Locked<&'a StackState<BC>, IpMulticastRouteTable<Ipv6>>
The context available after locking the multicast route table.
source§fn with_route_table<O, F: FnOnce(&MulticastRouteTable<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<Ipv6, Self::DeviceId, BC>,
cb: F,
) -> O
fn with_route_table<O, F: FnOnce(&MulticastRouteTable<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, state: &MulticastForwardingEnabledState<Ipv6, Self::DeviceId, BC>, cb: F, ) -> O
Provides immutable access to the route table.
source§fn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>(
&mut self,
state: &MulticastForwardingEnabledState<Ipv6, Self::DeviceId, BC>,
cb: F,
) -> O
fn with_route_table_mut<O, F: FnOnce(&mut MulticastRouteTable<Ipv6, Self::DeviceId, BC>, &mut Self::Ctx<'_>) -> O>( &mut self, state: &MulticastForwardingEnabledState<Ipv6, Self::DeviceId, BC>, cb: F, ) -> O
Provides mutable access to the route table.
source§impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> NatContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpState<Ipv4>>> NatContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§fn get_local_addr_for_remote(
&mut self,
device_id: &Self::DeviceId,
remote: Option<SpecifiedAddr<<Ipv4 as Ip>::Addr>>,
) -> Option<IpDeviceAddr<<Ipv4 as Ip>::Addr>>
fn get_local_addr_for_remote( &mut self, device_id: &Self::DeviceId, remote: Option<SpecifiedAddr<<Ipv4 as Ip>::Addr>>, ) -> Option<IpDeviceAddr<<Ipv4 as Ip>::Addr>>
Returns the best local address for communicating with the remote.
source§impl<BC: BindingsContext, L: LockBefore<IpState<Ipv6>>> NatContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpState<Ipv6>>> NatContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§fn get_local_addr_for_remote(
&mut self,
device_id: &Self::DeviceId,
remote: Option<SpecifiedAddr<<Ipv6 as Ip>::Addr>>,
) -> Option<IpDeviceAddr<<Ipv6 as Ip>::Addr>>
fn get_local_addr_for_remote( &mut self, device_id: &Self::DeviceId, remote: Option<SpecifiedAddr<<Ipv6 as Ip>::Addr>>, ) -> Option<IpDeviceAddr<<Ipv6 as Ip>::Addr>>
Returns the best local address for communicating with the remote.
source§impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> NudContext<Ipv6, EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<FilterState<Ipv6>>> NudContext<Ipv6, EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
§type ConfigCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv6Nud as WrappedLockLevel>::LockLevel>>
type ConfigCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv6Nud as WrappedLockLevel>::LockLevel>>
The inner configuration context.
§type SenderCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv6Nud as WrappedLockLevel>::LockLevel>>
type SenderCtx<'a> = CoreCtxWithDeviceId<'a, Locked<&'a StackState<BC>, <EthernetIpv6Nud as WrappedLockLevel>::LockLevel>>
The inner send context.
source§fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<Ipv6, EthernetLinkDevice, BC>, &mut Self::SenderCtx<'_>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<Ipv6, EthernetLinkDevice, BC>, &mut Self::SenderCtx<'_>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with a mutable reference to the NUD state and the
core sender context.
source§fn with_nud_state_mut<O, F: FnOnce(&mut NudState<Ipv6, EthernetLinkDevice, BC>, &mut Self::ConfigCtx<'_>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_nud_state_mut<O, F: FnOnce(&mut NudState<Ipv6, EthernetLinkDevice, BC>, &mut Self::ConfigCtx<'_>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with a mutable reference to the NUD state and NUD
configuration for the device.
source§fn with_nud_state<O, F: FnOnce(&NudState<Ipv6, EthernetLinkDevice, BC>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_nud_state<O, F: FnOnce(&NudState<Ipv6, EthernetLinkDevice, BC>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls the function with an immutable reference to the NUD state.
source§fn send_neighbor_solicitation(
&mut self,
bindings_ctx: &mut BC,
device_id: &EthernetDeviceId<BC>,
lookup_addr: SpecifiedAddr<Ipv6Addr>,
remote_link_addr: Option<Mac>,
)
fn send_neighbor_solicitation( &mut self, bindings_ctx: &mut BC, device_id: &EthernetDeviceId<BC>, lookup_addr: SpecifiedAddr<Ipv6Addr>, remote_link_addr: Option<Mac>, )
Sends a neighbor probe/solicitation message. Read more
source§impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv4>>> NudIcmpContext<Ipv4, EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv4>>> NudIcmpContext<Ipv4, EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
source§fn send_icmp_dest_unreachable(
&mut self,
bindings_ctx: &mut BC,
frame: Buf<Vec<u8>>,
device_id: Option<&Self::DeviceId>,
original_src_ip: SocketIpAddr<Ipv4Addr>,
original_dst_ip: SocketIpAddr<Ipv4Addr>,
(header_len, fragment_type): (usize, Ipv4FragmentType),
)
fn send_icmp_dest_unreachable( &mut self, bindings_ctx: &mut BC, frame: Buf<Vec<u8>>, device_id: Option<&Self::DeviceId>, original_src_ip: SocketIpAddr<Ipv4Addr>, original_dst_ip: SocketIpAddr<Ipv4Addr>, (header_len, fragment_type): (usize, Ipv4FragmentType), )
Send an ICMP destination unreachable error to
original_src_ip
as
a result of frame
being unable to be sent/forwarded due to link
layer address resolution failure. Read moresource§impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv6>>> NudIcmpContext<Ipv6, EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IcmpAllSocketsSet<Ipv6>>> NudIcmpContext<Ipv6, EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
source§fn send_icmp_dest_unreachable(
&mut self,
bindings_ctx: &mut BC,
frame: Buf<Vec<u8>>,
device_id: Option<&Self::DeviceId>,
original_src_ip: SocketIpAddr<Ipv6Addr>,
original_dst_ip: SocketIpAddr<Ipv6Addr>,
_: (),
)
fn send_icmp_dest_unreachable( &mut self, bindings_ctx: &mut BC, frame: Buf<Vec<u8>>, device_id: Option<&Self::DeviceId>, original_src_ip: SocketIpAddr<Ipv6Addr>, original_dst_ip: SocketIpAddr<Ipv6Addr>, _: (), )
Send an ICMP destination unreachable error to
original_src_ip
as
a result of frame
being unable to be sent/forwarded due to link
layer address resolution failure. Read moresource§impl<I: Ip, BC: BindingsContext, L: LockBefore<EthernetIpv4Arp> + LockBefore<EthernetIpv6Nud>> NudIpHandler<I, BC> for CoreCtx<'_, BC, L>where
Self: NudHandler<I, EthernetLinkDevice, BC> + DeviceIdContext<EthernetLinkDevice, DeviceId = EthernetDeviceId<BC>>,
impl<I: Ip, BC: BindingsContext, L: LockBefore<EthernetIpv4Arp> + LockBefore<EthernetIpv6Nud>> NudIpHandler<I, BC> for CoreCtx<'_, BC, L>where
Self: NudHandler<I, EthernetLinkDevice, BC> + DeviceIdContext<EthernetLinkDevice, DeviceId = EthernetDeviceId<BC>>,
source§fn handle_neighbor_probe(
&mut self,
bindings_ctx: &mut BC,
device_id: &DeviceId<BC>,
neighbor: SpecifiedAddr<I::Addr>,
link_addr: &[u8],
)
fn handle_neighbor_probe( &mut self, bindings_ctx: &mut BC, device_id: &DeviceId<BC>, neighbor: SpecifiedAddr<I::Addr>, link_addr: &[u8], )
Handles an incoming neighbor probe message. Read more
source§fn handle_neighbor_confirmation(
&mut self,
bindings_ctx: &mut BC,
device_id: &DeviceId<BC>,
neighbor: SpecifiedAddr<I::Addr>,
link_addr: &[u8],
flags: ConfirmationFlags,
)
fn handle_neighbor_confirmation( &mut self, bindings_ctx: &mut BC, device_id: &DeviceId<BC>, neighbor: SpecifiedAddr<I::Addr>, link_addr: &[u8], flags: ConfirmationFlags, )
Handles an incoming neighbor confirmation message. Read more
source§fn flush_neighbor_table(
&mut self,
bindings_ctx: &mut BC,
device_id: &DeviceId<BC>,
)
fn flush_neighbor_table( &mut self, bindings_ctx: &mut BC, device_id: &DeviceId<BC>, )
Clears the neighbor table.
source§impl<'a, BT: BindingsTypes, L> OriginTrackerContext for CoreCtx<'a, BT, L>
impl<'a, BT: BindingsTypes, L> OriginTrackerContext for CoreCtx<'a, BT, L>
source§fn origin_tracker(&mut self) -> OriginTracker
fn origin_tracker(&mut self) -> OriginTracker
Gets the origin tracker for this context.
source§impl<BC: BindingsContext, L: LockBefore<IpStatePmtuCache<Ipv4>>> PmtuContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpStatePmtuCache<Ipv4>>> PmtuContext<Ipv4, BC> for CoreCtx<'_, BC, L>
source§impl<BC: BindingsContext, L: LockBefore<IpStatePmtuCache<Ipv6>>> PmtuContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<IpStatePmtuCache<Ipv6>>> PmtuContext<Ipv6, BC> for CoreCtx<'_, BC, L>
source§impl<BC: BindingsContext, L: LockBefore<PureIpDeviceDynamicState>> PureIpDeviceStateContext for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<PureIpDeviceDynamicState>> PureIpDeviceStateContext for CoreCtx<'_, BC, L>
source§fn with_pure_ip_state<O, F: FnOnce(&DynamicPureIpDeviceState) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_pure_ip_state<O, F: FnOnce(&DynamicPureIpDeviceState) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the pure IP device’s
dynamic state.
source§fn with_pure_ip_state_mut<O, F: FnOnce(&mut DynamicPureIpDeviceState) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_pure_ip_state_mut<O, F: FnOnce(&mut DynamicPureIpDeviceState) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a mutable reference to the pure IP device’s
dynamic state.
source§impl<BC: BindingsContext, L: LockBefore<AllRawIpSockets<Ipv4>>> RawIpSocketMapContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<AllRawIpSockets<Ipv4>>> RawIpSocketMapContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type StateCtx<'a> = Locked<&'a StackState<BC>, AllRawIpSockets<Ipv4>>
type StateCtx<'a> = Locked<&'a StackState<BC>, AllRawIpSockets<Ipv4>>
The implementation of
RawIpSocketStateContext
available after having
accessed the system’s socket map.source§fn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<Ipv4, Self::WeakDeviceId, BC>, &mut Self::StateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<Ipv4, Self::WeakDeviceId, BC>, &mut Self::StateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the callback with an immutable reference to the socket map.
source§fn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the callback with a mutable reference to the socket map.
source§impl<BC: BindingsContext, L: LockBefore<AllRawIpSockets<Ipv6>>> RawIpSocketMapContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<AllRawIpSockets<Ipv6>>> RawIpSocketMapContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type StateCtx<'a> = Locked<&'a StackState<BC>, AllRawIpSockets<Ipv6>>
type StateCtx<'a> = Locked<&'a StackState<BC>, AllRawIpSockets<Ipv6>>
The implementation of
RawIpSocketStateContext
available after having
accessed the system’s socket map.source§fn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<Ipv6, Self::WeakDeviceId, BC>, &mut Self::StateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_socket_map_and_state_ctx<O, F: FnOnce(&RawIpSocketMap<Ipv6, Self::WeakDeviceId, BC>, &mut Self::StateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the callback with an immutable reference to the socket map.
source§fn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_socket_map_mut<O, F: FnOnce(&mut RawIpSocketMap<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the callback with a mutable reference to the socket map.
source§impl<BC: BindingsContext, L: LockBefore<RawIpSocketState<Ipv4>>> RawIpSocketStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<RawIpSocketState<Ipv4>>> RawIpSocketStateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type SocketHandler<'a> = Locked<&'a StackState<BC>, RawIpSocketState<Ipv4>>
type SocketHandler<'a> = Locked<&'a StackState<BC>, RawIpSocketState<Ipv4>>
The implementation of
IpSocketHandler
available after having locked
the state for an individual socket.source§fn with_locked_state<O, F: FnOnce(&RawIpSocketLockedState<Ipv4, Self::WeakDeviceId>) -> O>(
&mut self,
id: &RawIpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_locked_state<O, F: FnOnce(&RawIpSocketLockedState<Ipv4, Self::WeakDeviceId>) -> O>( &mut self, id: &RawIpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the callback with an immutable reference to the socket’s locked
state.
source§fn with_locked_state_and_socket_handler<O, F: FnOnce(&RawIpSocketLockedState<Ipv4, Self::WeakDeviceId>, &mut Self::SocketHandler<'_>) -> O>(
&mut self,
id: &RawIpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_locked_state_and_socket_handler<O, F: FnOnce(&RawIpSocketLockedState<Ipv4, Self::WeakDeviceId>, &mut Self::SocketHandler<'_>) -> O>( &mut self, id: &RawIpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the callback with an immutable reference to the socket’s locked
state and the
SocketHandler
.source§fn with_locked_state_mut<O, F: FnOnce(&mut RawIpSocketLockedState<Ipv4, Self::WeakDeviceId>) -> O>(
&mut self,
id: &RawIpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_locked_state_mut<O, F: FnOnce(&mut RawIpSocketLockedState<Ipv4, Self::WeakDeviceId>) -> O>( &mut self, id: &RawIpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the callback with a mutable reference to the socket’s locked
state.
source§impl<BC: BindingsContext, L: LockBefore<RawIpSocketState<Ipv6>>> RawIpSocketStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<RawIpSocketState<Ipv6>>> RawIpSocketStateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type SocketHandler<'a> = Locked<&'a StackState<BC>, RawIpSocketState<Ipv6>>
type SocketHandler<'a> = Locked<&'a StackState<BC>, RawIpSocketState<Ipv6>>
The implementation of
IpSocketHandler
available after having locked
the state for an individual socket.source§fn with_locked_state<O, F: FnOnce(&RawIpSocketLockedState<Ipv6, Self::WeakDeviceId>) -> O>(
&mut self,
id: &RawIpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_locked_state<O, F: FnOnce(&RawIpSocketLockedState<Ipv6, Self::WeakDeviceId>) -> O>( &mut self, id: &RawIpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the callback with an immutable reference to the socket’s locked
state.
source§fn with_locked_state_and_socket_handler<O, F: FnOnce(&RawIpSocketLockedState<Ipv6, Self::WeakDeviceId>, &mut Self::SocketHandler<'_>) -> O>(
&mut self,
id: &RawIpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_locked_state_and_socket_handler<O, F: FnOnce(&RawIpSocketLockedState<Ipv6, Self::WeakDeviceId>, &mut Self::SocketHandler<'_>) -> O>( &mut self, id: &RawIpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the callback with an immutable reference to the socket’s locked
state and the
SocketHandler
.source§fn with_locked_state_mut<O, F: FnOnce(&mut RawIpSocketLockedState<Ipv6, Self::WeakDeviceId>) -> O>(
&mut self,
id: &RawIpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_locked_state_mut<O, F: FnOnce(&mut RawIpSocketLockedState<Ipv6, Self::WeakDeviceId>) -> O>( &mut self, id: &RawIpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the callback with a mutable reference to the socket’s locked
state.
source§impl<BC: BindingsContext, L: LockBefore<LoopbackRxDequeue>> ReceiveDequeContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<LoopbackRxDequeue>> ReceiveDequeContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
§type ReceiveQueueCtx<'a> = Locked<&'a StackState<BC>, <LoopbackRxDequeue as WrappedLockLevel>::LockLevel>
type ReceiveQueueCtx<'a> = Locked<&'a StackState<BC>, <LoopbackRxDequeue as WrappedLockLevel>::LockLevel>
The inner dequeueing context.
source§fn with_dequed_frames_and_rx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Buf<Vec<u8>>>, &mut Self::ReceiveQueueCtx<'_>) -> O>(
&mut self,
device_id: &LoopbackDeviceId<BC>,
cb: F,
) -> O
fn with_dequed_frames_and_rx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Buf<Vec<u8>>>, &mut Self::ReceiveQueueCtx<'_>) -> O>( &mut self, device_id: &LoopbackDeviceId<BC>, cb: F, ) -> O
Calls the function with the RX deque state and the RX queue context.
source§impl<BC: BindingsContext, L: LockBefore<LoopbackRxQueue>> ReceiveQueueContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<LoopbackRxQueue>> ReceiveQueueContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
source§fn with_receive_queue_mut<O, F: FnOnce(&mut ReceiveQueueState<Self::Meta, Self::Buffer>) -> O>(
&mut self,
device_id: &LoopbackDeviceId<BC>,
cb: F,
) -> O
fn with_receive_queue_mut<O, F: FnOnce(&mut ReceiveQueueState<Self::Meta, Self::Buffer>) -> O>( &mut self, device_id: &LoopbackDeviceId<BC>, cb: F, ) -> O
Calls the function with the RX queue state.
source§impl<BC: BindingsContext, L: LockBefore<LoopbackRxQueue>> ReceiveQueueTypes<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<LoopbackRxQueue>> ReceiveQueueTypes<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
§type Meta = LoopbackRxQueueMeta<WeakDeviceId<BC>>
type Meta = LoopbackRxQueueMeta<WeakDeviceId<BC>>
Metadata associated with an RX frame.
source§impl<'a, BC: BindingsContext, D: DeviceStateSpec, L> ResourceCounterContext<BaseDeviceId<D, BC>, DeviceCounters> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, D: DeviceStateSpec, L> ResourceCounterContext<BaseDeviceId<D, BC>, DeviceCounters> for CoreCtx<'a, BC, L>
source§fn with_per_resource_counters<O, F: FnOnce(&DeviceCounters) -> O>(
&mut self,
device_id: &BaseDeviceId<D, BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&DeviceCounters) -> O>( &mut self, device_id: &BaseDeviceId<D, BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.source§impl<'a, BC: BindingsContext, L> ResourceCounterContext<BaseDeviceId<EthernetLinkDevice, BC>, EthernetDeviceCounters> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, L> ResourceCounterContext<BaseDeviceId<EthernetLinkDevice, BC>, EthernetDeviceCounters> for CoreCtx<'a, BC, L>
source§fn with_per_resource_counters<O, F: FnOnce(&EthernetDeviceCounters) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&EthernetDeviceCounters) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.source§impl<'a, BC: BindingsContext, L> ResourceCounterContext<BaseDeviceId<LoopbackDevice, BC>, EthernetDeviceCounters> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, L> ResourceCounterContext<BaseDeviceId<LoopbackDevice, BC>, EthernetDeviceCounters> for CoreCtx<'a, BC, L>
source§fn with_per_resource_counters<O, F: FnOnce(&EthernetDeviceCounters) -> O>(
&mut self,
device_id: &LoopbackDeviceId<BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&EthernetDeviceCounters) -> O>( &mut self, device_id: &LoopbackDeviceId<BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.source§impl<'a, BC: BindingsContext, L> ResourceCounterContext<BaseDeviceId<PureIpDevice, BC>, PureIpDeviceCounters> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, L> ResourceCounterContext<BaseDeviceId<PureIpDevice, BC>, PureIpDeviceCounters> for CoreCtx<'a, BC, L>
source§fn with_per_resource_counters<O, F: FnOnce(&PureIpDeviceCounters) -> O>(
&mut self,
device_id: &PureIpDeviceId<BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&PureIpDeviceCounters) -> O>( &mut self, device_id: &PureIpDeviceId<BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.source§impl<'a, BC: BindingsContext, L> ResourceCounterContext<DeviceId<BC>, DeviceCounters> for CoreCtx<'a, BC, L>
impl<'a, BC: BindingsContext, L> ResourceCounterContext<DeviceId<BC>, DeviceCounters> for CoreCtx<'a, BC, L>
source§fn with_per_resource_counters<O, F: FnOnce(&DeviceCounters) -> O>(
&mut self,
device_id: &DeviceId<BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&DeviceCounters) -> O>( &mut self, device_id: &DeviceId<BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.source§impl<I: IpExt, BC: BindingsContext, L, D: WeakDeviceIdentifier> ResourceCounterContext<RawIpSocketId<I, D, BC>, RawIpSocketCounters<I>> for CoreCtx<'_, BC, L>
impl<I: IpExt, BC: BindingsContext, L, D: WeakDeviceIdentifier> ResourceCounterContext<RawIpSocketId<I, D, BC>, RawIpSocketCounters<I>> for CoreCtx<'_, BC, L>
source§fn with_per_resource_counters<O, F: FnOnce(&RawIpSocketCounters<I>) -> O>(
&mut self,
id: &RawIpSocketId<I, D, BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&RawIpSocketCounters<I>) -> O>( &mut self, id: &RawIpSocketId<I, D, BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.source§impl<BC: BindingsContext, L: LockBefore<DeviceSocketState>> SocketStateAccessor<BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<DeviceSocketState>> SocketStateAccessor<BC> for CoreCtx<'_, BC, L>
source§fn with_socket_state<F: FnOnce(&BC::SocketState, &Target<Self::WeakDeviceId>) -> R, R>(
&mut self,
id: &DeviceSocketId<Self::WeakDeviceId, BC>,
cb: F,
) -> R
fn with_socket_state<F: FnOnce(&BC::SocketState, &Target<Self::WeakDeviceId>) -> R, R>( &mut self, id: &DeviceSocketId<Self::WeakDeviceId, BC>, cb: F, ) -> R
Provides read-only access to the state of a socket.
source§fn with_socket_state_mut<F: FnOnce(&BC::SocketState, &mut Target<Self::WeakDeviceId>) -> R, R>(
&mut self,
id: &DeviceSocketId<Self::WeakDeviceId, BC>,
cb: F,
) -> R
fn with_socket_state_mut<F: FnOnce(&BC::SocketState, &mut Target<Self::WeakDeviceId>) -> R, R>( &mut self, id: &DeviceSocketId<Self::WeakDeviceId, BC>, cb: F, ) -> R
Provides mutable access to the state of a socket.
source§impl<BC: BindingsContext, L: LockBefore<UdpAllSocketsSet<Ipv4>>> StateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<UdpAllSocketsSet<Ipv4>>> StateContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <UdpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <UdpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
The core context passed to the callback.
source§fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function without access to UDP socket state.
source§fn with_all_sockets_mut<O, F: FnOnce(&mut UdpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets_mut<O, F: FnOnce(&mut UdpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with mutable access to the set with all UDP
sockets.
source§fn with_all_sockets<O, F: FnOnce(&UdpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets<O, F: FnOnce(&UdpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with immutable access to the set with all UDP
sockets.
source§fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &UdpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &UdpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &UdpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &UdpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with an immutable reference to the given socket’s
state.
source§fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut UdpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &UdpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut UdpSocketState<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &UdpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with a mutable reference to the given socket’s state.
source§fn should_send_port_unreachable(&mut self) -> bool
fn should_send_port_unreachable(&mut self) -> bool
Returns true if UDP may send a port unreachable ICMP error message.
source§fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &UdpSocketId<Ipv4, Self::WeakDeviceId, BC>, &UdpSocketState<Ipv4, Self::WeakDeviceId, BC>)>(
&mut self,
cb: F,
)
fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &UdpSocketId<Ipv4, Self::WeakDeviceId, BC>, &UdpSocketState<Ipv4, Self::WeakDeviceId, BC>)>( &mut self, cb: F, )
Call
f
with each socket’s state.source§impl<BC: BindingsContext, L: LockBefore<UdpAllSocketsSet<Ipv6>>> StateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<UdpAllSocketsSet<Ipv6>>> StateContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <UdpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
type SocketStateCtx<'a> = Locked<&'a StackState<BC>, <UdpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
The core context passed to the callback.
source§fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_bound_state_context<O, F: FnOnce(&mut Self::SocketStateCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the function without access to UDP socket state.
source§fn with_all_sockets_mut<O, F: FnOnce(&mut UdpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets_mut<O, F: FnOnce(&mut UdpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with mutable access to the set with all UDP
sockets.
source§fn with_all_sockets<O, F: FnOnce(&UdpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets<O, F: FnOnce(&UdpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with immutable access to the set with all UDP
sockets.
source§fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &UdpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &UdpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &UdpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &UdpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with an immutable reference to the given socket’s
state.
source§fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut UdpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
id: &UdpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketStateCtx<'_>, &mut UdpSocketState<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, id: &UdpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with a mutable reference to the given socket’s state.
source§fn should_send_port_unreachable(&mut self) -> bool
fn should_send_port_unreachable(&mut self) -> bool
Returns true if UDP may send a port unreachable ICMP error message.
source§fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &UdpSocketId<Ipv6, Self::WeakDeviceId, BC>, &UdpSocketState<Ipv6, Self::WeakDeviceId, BC>)>(
&mut self,
cb: F,
)
fn for_each_socket<F: FnMut(&mut Self::SocketStateCtx<'_>, &UdpSocketId<Ipv6, Self::WeakDeviceId, BC>, &UdpSocketState<Ipv6, Self::WeakDeviceId, BC>)>( &mut self, cb: F, )
Call
f
with each socket’s state.source§impl<L, BC> TcpContext<Ipv4, BC> for CoreCtx<'_, BC, L>
impl<L, BC> TcpContext<Ipv4, BC> for CoreCtx<'_, BC, L>
§type ThisStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
type ThisStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
The core context for the current version of the IP protocol. This is
used to be version agnostic when the operation is on the current stack.
§type SingleStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
type SingleStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>
The core context that will give access to this version of the IP layer.
§type DualStackIpTransportAndDemuxCtx<'a> = UninstantiableWrapper<Locked<&'a StackState<BC>, <TcpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>>
type DualStackIpTransportAndDemuxCtx<'a> = UninstantiableWrapper<Locked<&'a StackState<BC>, <TcpSocketState<Ipv4> as WrappedLockLevel>::LockLevel>>
The core context that will give access to both versions of the IP layer.
§type SingleStackConverter = ()
type SingleStackConverter = ()
A collection of type assertions that must be true in the single stack
version, associated types and concrete types must unify and we can
inspect types by converting them into the concrete types.
§type DualStackConverter = Uninstantiable
type DualStackConverter = Uninstantiable
A collection of type assertions that must be true in the dual stack
version, associated types and concrete types must unify and we can
inspect types by converting them into the concrete types.
source§fn with_all_sockets_mut<O, F: FnOnce(&mut TcpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets_mut<O, F: FnOnce(&mut TcpSocketSet<Ipv4, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with mutable access to the set with all TCP sockets.
source§fn for_each_socket<F: FnMut(&TcpSocketId<Ipv4, Self::WeakDeviceId, BC>, &TcpSocketState<Ipv4, Self::WeakDeviceId, BC>)>(
&mut self,
cb: F,
)
fn for_each_socket<F: FnMut(&TcpSocketId<Ipv4, Self::WeakDeviceId, BC>, &TcpSocketState<Ipv4, Self::WeakDeviceId, BC>)>( &mut self, cb: F, )
Calls the callback once for each currently installed socket.
source§fn with_socket_mut_isn_transport_demux<O, F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<Ipv4, Self::WeakDeviceId, BC>, &IsnGenerator<BC::Instant>) -> O>(
&mut self,
id: &TcpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_mut_isn_transport_demux<O, F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<Ipv4, Self::WeakDeviceId, BC>, &IsnGenerator<BC::Instant>) -> O>( &mut self, id: &TcpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with access to the socket state, ISN generator, and
Transport + Demux context.
source§fn with_socket_and_converter<O, F: FnOnce(&TcpSocketState<Ipv4, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O>(
&mut self,
id: &TcpSocketId<Ipv4, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_and_converter<O, F: FnOnce(&TcpSocketState<Ipv4, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O>( &mut self, id: &TcpSocketId<Ipv4, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with the immutable reference to the socket state and
a converter to inspect.
source§fn with_socket<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket<O, F>( &mut self, id: &TcpSocketId<I, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with immutable access to the socket state.
source§fn with_socket_mut_transport_demux<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<I, Self::WeakDeviceId, BC>) -> O,
fn with_socket_mut_transport_demux<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<I, Self::WeakDeviceId, BC>) -> O,
Calls the function with access to the socket state and Transport + Demux
context.
source§fn with_socket_mut<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_mut<O, F>( &mut self, id: &TcpSocketId<I, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with mutable access to the socket state.
source§fn with_socket_mut_and_converter<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: FnOnce(&mut TcpSocketState<I, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O,
fn with_socket_mut_and_converter<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: FnOnce(&mut TcpSocketState<I, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O,
Calls the function with the mutable reference to the socket state and a
converter to inspect.
source§impl<L, BC> TcpContext<Ipv6, BC> for CoreCtx<'_, BC, L>
impl<L, BC> TcpContext<Ipv6, BC> for CoreCtx<'_, BC, L>
§type ThisStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
type ThisStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
The core context for the current version of the IP protocol. This is
used to be version agnostic when the operation is on the current stack.
§type SingleStackIpTransportAndDemuxCtx<'a> = UninstantiableWrapper<Locked<&'a StackState<BC>, <TcpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>>
type SingleStackIpTransportAndDemuxCtx<'a> = UninstantiableWrapper<Locked<&'a StackState<BC>, <TcpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>>
The core context that will give access to this version of the IP layer.
§type DualStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
type DualStackIpTransportAndDemuxCtx<'a> = Locked<&'a StackState<BC>, <TcpSocketState<Ipv6> as WrappedLockLevel>::LockLevel>
The core context that will give access to both versions of the IP layer.
§type SingleStackConverter = Uninstantiable
type SingleStackConverter = Uninstantiable
A collection of type assertions that must be true in the single stack
version, associated types and concrete types must unify and we can
inspect types by converting them into the concrete types.
§type DualStackConverter = ()
type DualStackConverter = ()
A collection of type assertions that must be true in the dual stack
version, associated types and concrete types must unify and we can
inspect types by converting them into the concrete types.
source§fn with_all_sockets_mut<O, F: FnOnce(&mut TcpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_all_sockets_mut<O, F: FnOnce(&mut TcpSocketSet<Ipv6, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the function with mutable access to the set with all TCP sockets.
source§fn for_each_socket<F: FnMut(&TcpSocketId<Ipv6, Self::WeakDeviceId, BC>, &TcpSocketState<Ipv6, Self::WeakDeviceId, BC>)>(
&mut self,
cb: F,
)
fn for_each_socket<F: FnMut(&TcpSocketId<Ipv6, Self::WeakDeviceId, BC>, &TcpSocketState<Ipv6, Self::WeakDeviceId, BC>)>( &mut self, cb: F, )
Calls the callback once for each currently installed socket.
source§fn with_socket_mut_isn_transport_demux<O, F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<Ipv6, Self::WeakDeviceId, BC>, &IsnGenerator<BC::Instant>) -> O>(
&mut self,
id: &TcpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_mut_isn_transport_demux<O, F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<Ipv6, Self::WeakDeviceId, BC>, &IsnGenerator<BC::Instant>) -> O>( &mut self, id: &TcpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with access to the socket state, ISN generator, and
Transport + Demux context.
source§fn with_socket_and_converter<O, F: FnOnce(&TcpSocketState<Ipv6, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O>(
&mut self,
id: &TcpSocketId<Ipv6, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_and_converter<O, F: FnOnce(&TcpSocketState<Ipv6, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O>( &mut self, id: &TcpSocketId<Ipv6, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with the immutable reference to the socket state and
a converter to inspect.
source§fn with_socket<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket<O, F>( &mut self, id: &TcpSocketId<I, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with immutable access to the socket state.
source§fn with_socket_mut_transport_demux<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<I, Self::WeakDeviceId, BC>) -> O,
fn with_socket_mut_transport_demux<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: for<'a> FnOnce(MaybeDualStack<(&'a mut Self::DualStackIpTransportAndDemuxCtx<'a>, Self::DualStackConverter), (&'a mut Self::SingleStackIpTransportAndDemuxCtx<'a>, Self::SingleStackConverter)>, &mut TcpSocketState<I, Self::WeakDeviceId, BC>) -> O,
Calls the function with access to the socket state and Transport + Demux
context.
source§fn with_socket_mut<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> O
fn with_socket_mut<O, F>( &mut self, id: &TcpSocketId<I, Self::WeakDeviceId, BC>, cb: F, ) -> O
Calls the function with mutable access to the socket state.
source§fn with_socket_mut_and_converter<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: FnOnce(&mut TcpSocketState<I, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O,
fn with_socket_mut_and_converter<O, F>(
&mut self,
id: &TcpSocketId<I, Self::WeakDeviceId, BC>,
cb: F,
) -> Owhere
F: FnOnce(&mut TcpSocketState<I, Self::WeakDeviceId, BC>, MaybeDualStack<Self::DualStackConverter, Self::SingleStackConverter>) -> O,
Calls the function with the mutable reference to the socket state and a
converter to inspect.
source§impl<L, BC> TcpDemuxContext<Ipv4, WeakDeviceId<BC>, BC> for CoreCtx<'_, BC, L>
impl<L, BC> TcpDemuxContext<Ipv4, WeakDeviceId<BC>, BC> for CoreCtx<'_, BC, L>
§type IpTransportCtx<'a> = Locked<&'a StackState<BC>, <TcpDemux<Ipv4> as WrappedLockLevel>::LockLevel>
type IpTransportCtx<'a> = Locked<&'a StackState<BC>, <TcpDemux<Ipv4> as WrappedLockLevel>::LockLevel>
The inner IP transport context.
source§fn with_demux<O, F: FnOnce(&DemuxState<Ipv4, WeakDeviceId<BC>, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_demux<O, F: FnOnce(&DemuxState<Ipv4, WeakDeviceId<BC>, BC>) -> O>( &mut self, cb: F, ) -> O
Calls
f
with non-mutable access to the demux state.source§fn with_demux_mut<O, F: FnOnce(&mut DemuxState<Ipv4, WeakDeviceId<BC>, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_demux_mut<O, F: FnOnce(&mut DemuxState<Ipv4, WeakDeviceId<BC>, BC>) -> O>( &mut self, cb: F, ) -> O
Calls
f
with mutable access to the demux state.source§impl<L, BC> TcpDemuxContext<Ipv6, WeakDeviceId<BC>, BC> for CoreCtx<'_, BC, L>
impl<L, BC> TcpDemuxContext<Ipv6, WeakDeviceId<BC>, BC> for CoreCtx<'_, BC, L>
§type IpTransportCtx<'a> = Locked<&'a StackState<BC>, <TcpDemux<Ipv6> as WrappedLockLevel>::LockLevel>
type IpTransportCtx<'a> = Locked<&'a StackState<BC>, <TcpDemux<Ipv6> as WrappedLockLevel>::LockLevel>
The inner IP transport context.
source§fn with_demux<O, F: FnOnce(&DemuxState<Ipv6, WeakDeviceId<BC>, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_demux<O, F: FnOnce(&DemuxState<Ipv6, WeakDeviceId<BC>, BC>) -> O>( &mut self, cb: F, ) -> O
Calls
f
with non-mutable access to the demux state.source§fn with_demux_mut<O, F: FnOnce(&mut DemuxState<Ipv6, WeakDeviceId<BC>, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_demux_mut<O, F: FnOnce(&mut DemuxState<Ipv6, WeakDeviceId<BC>, BC>) -> O>( &mut self, cb: F, ) -> O
Calls
f
with mutable access to the demux state.source§impl<L: LockBefore<TcpDemux<Ipv4>>, BC: BindingsContext> TcpDualStackContext<Ipv6, WeakDeviceId<BC>, BC> for CoreCtx<'_, BC, L>
impl<L: LockBefore<TcpDemux<Ipv4>>, BC: BindingsContext> TcpDualStackContext<Ipv6, WeakDeviceId<BC>, BC> for CoreCtx<'_, BC, L>
§type DualStackIpTransportCtx<'a> = Locked<&'a StackState<BC>, <TcpDemux<Ipv6> as WrappedLockLevel>::LockLevel>
type DualStackIpTransportCtx<'a> = Locked<&'a StackState<BC>, <TcpDemux<Ipv6> as WrappedLockLevel>::LockLevel>
The inner IP transport context,
source§fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<Ipv6>
fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<Ipv6>
Gets a converter to get the demux socket ID for the other stack.
source§fn dual_stack_enabled(&self, ip_options: &Ipv6Options) -> bool
fn dual_stack_enabled(&self, ip_options: &Ipv6Options) -> bool
Gets the enabled state of dual stack operations on the given socket.
source§fn set_dual_stack_enabled(&self, ip_options: &mut Ipv6Options, value: bool)
fn set_dual_stack_enabled(&self, ip_options: &mut Ipv6Options, 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<Ipv6, WeakDeviceId<BC>, BC>, &mut DemuxState<Ipv4, WeakDeviceId<BC>, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<Ipv6, WeakDeviceId<BC>, BC>, &mut DemuxState<Ipv4, WeakDeviceId<BC>, BC>) -> O>( &mut self, cb: F, ) -> O
Calls
cb
with mutable access to both demux states.source§fn into_other_demux_socket_id(
&self,
id: TcpSocketId<I, D, BT>,
) -> <<I as DualStackIpExt>::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>
fn into_other_demux_socket_id( &self, id: TcpSocketId<I, D, BT>, ) -> <<I as DualStackIpExt>::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>>
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
.source§impl<BC: BindingsContext, L: LockBefore<EthernetTxDequeue>> TransmitDequeueContext<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<EthernetTxDequeue>> TransmitDequeueContext<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
§type TransmitQueueCtx<'a> = Locked<&'a StackState<BC>, <EthernetTxDequeue as WrappedLockLevel>::LockLevel>
type TransmitQueueCtx<'a> = Locked<&'a StackState<BC>, <EthernetTxDequeue as WrappedLockLevel>::LockLevel>
The inner context providing dequeuing.
source§fn with_dequed_packets_and_tx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Self::Buffer>, &mut Self::TransmitQueueCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_dequed_packets_and_tx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Self::Buffer>, &mut Self::TransmitQueueCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with the TX deque state and the TX queue context.
source§impl<BC: BindingsContext, L: LockBefore<LoopbackTxDequeue>> TransmitDequeueContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<LoopbackTxDequeue>> TransmitDequeueContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
§type TransmitQueueCtx<'a> = Locked<&'a StackState<BC>, <LoopbackTxDequeue as WrappedLockLevel>::LockLevel>
type TransmitQueueCtx<'a> = Locked<&'a StackState<BC>, <LoopbackTxDequeue as WrappedLockLevel>::LockLevel>
The inner context providing dequeuing.
source§fn with_dequed_packets_and_tx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Self::Buffer>, &mut Self::TransmitQueueCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_dequed_packets_and_tx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Self::Buffer>, &mut Self::TransmitQueueCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with the TX deque state and the TX queue context.
source§impl<BC: BindingsContext, L: LockBefore<PureIpDeviceTxDequeue>> TransmitDequeueContext<PureIpDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<PureIpDeviceTxDequeue>> TransmitDequeueContext<PureIpDevice, BC> for CoreCtx<'_, BC, L>
§type TransmitQueueCtx<'a> = Locked<&'a StackState<BC>, PureIpDeviceTxDequeue>
type TransmitQueueCtx<'a> = Locked<&'a StackState<BC>, PureIpDeviceTxDequeue>
The inner context providing dequeuing.
source§fn with_dequed_packets_and_tx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Self::Buffer>, &mut Self::TransmitQueueCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_dequed_packets_and_tx_queue_ctx<O, F: FnOnce(&mut DequeueState<Self::Meta, Self::Buffer>, &mut Self::TransmitQueueCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with the TX deque state and the TX queue context.
source§impl<BC: BindingsContext, L: LockBefore<EthernetTxQueue>> TransmitQueueCommon<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<EthernetTxQueue>> TransmitQueueCommon<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
§type Allocator = BufVecU8Allocator
type Allocator = BufVecU8Allocator
An allocator of
Self::Buffer
.§type DequeueContext = <BC as DeviceLayerEventDispatcher>::DequeueContext
type DequeueContext = <BC as DeviceLayerEventDispatcher>::DequeueContext
The context given to
send_frame
when dequeueing.source§fn parse_outgoing_frame<'a, 'b>(
buf: &'a [u8],
(): &'b Self::Meta,
) -> Result<SentFrame<&'a [u8]>, ParseSentFrameError>
fn parse_outgoing_frame<'a, 'b>( buf: &'a [u8], (): &'b Self::Meta, ) -> Result<SentFrame<&'a [u8]>, ParseSentFrameError>
Parses an outgoing frame for packet socket delivery.
source§impl<BC: BindingsContext, L: LockBefore<LoopbackTxQueue>> TransmitQueueCommon<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<LoopbackTxQueue>> TransmitQueueCommon<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
§type Meta = LoopbackTxQueueMeta<WeakDeviceId<BC>>
type Meta = LoopbackTxQueueMeta<WeakDeviceId<BC>>
The metadata associated with every packet in the queue.
§type Allocator = BufVecU8Allocator
type Allocator = BufVecU8Allocator
An allocator of
Self::Buffer
.§type DequeueContext = Infallible
type DequeueContext = Infallible
The context given to
send_frame
when dequeueing.source§fn parse_outgoing_frame<'a, 'b>(
buf: &'a [u8],
_meta: &'b Self::Meta,
) -> Result<SentFrame<&'a [u8]>, ParseSentFrameError>
fn parse_outgoing_frame<'a, 'b>( buf: &'a [u8], _meta: &'b Self::Meta, ) -> Result<SentFrame<&'a [u8]>, ParseSentFrameError>
Parses an outgoing frame for packet socket delivery.
source§impl<BC: BindingsContext, L: LockBefore<PureIpDeviceTxQueue>> TransmitQueueCommon<PureIpDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<PureIpDeviceTxQueue>> TransmitQueueCommon<PureIpDevice, BC> for CoreCtx<'_, BC, L>
§type Meta = PureIpDeviceTxQueueFrameMetadata
type Meta = PureIpDeviceTxQueueFrameMetadata
The metadata associated with every packet in the queue.
§type Allocator = BufVecU8Allocator
type Allocator = BufVecU8Allocator
An allocator of
Self::Buffer
.§type DequeueContext = <BC as DeviceLayerEventDispatcher>::DequeueContext
type DequeueContext = <BC as DeviceLayerEventDispatcher>::DequeueContext
The context given to
send_frame
when dequeueing.source§fn parse_outgoing_frame<'a, 'b>(
buf: &'a [u8],
meta: &'b Self::Meta,
) -> Result<SentFrame<&'a [u8]>, ParseSentFrameError>
fn parse_outgoing_frame<'a, 'b>( buf: &'a [u8], meta: &'b Self::Meta, ) -> Result<SentFrame<&'a [u8]>, ParseSentFrameError>
Parses an outgoing frame for packet socket delivery.
source§impl<BC: BindingsContext, L: LockBefore<EthernetTxQueue>> TransmitQueueContext<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<EthernetTxQueue>> TransmitQueueContext<EthernetLinkDevice, BC> for CoreCtx<'_, BC, L>
source§fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls
cb
with mutable access to the queue state.source§fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &EthernetDeviceId<BC>,
cb: F,
) -> O
fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &EthernetDeviceId<BC>, cb: F, ) -> O
Calls
cb
with immutable access to the queue state.source§fn send_frame(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
dequeue_context: Option<&mut BC::DequeueContext>,
_meta: Self::Meta,
buf: Self::Buffer,
) -> Result<(), DeviceSendFrameError>
fn send_frame( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, dequeue_context: Option<&mut BC::DequeueContext>, _meta: Self::Meta, buf: Self::Buffer, ) -> Result<(), DeviceSendFrameError>
Send a frame out the device. Read more
source§impl<BC: BindingsContext, L: LockBefore<LoopbackTxQueue>> TransmitQueueContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<LoopbackTxQueue>> TransmitQueueContext<LoopbackDevice, BC> for CoreCtx<'_, BC, L>
source§fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &LoopbackDeviceId<BC>,
cb: F,
) -> O
fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &LoopbackDeviceId<BC>, cb: F, ) -> O
Calls
cb
with mutable access to the queue state.source§fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &LoopbackDeviceId<BC>,
cb: F,
) -> O
fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &LoopbackDeviceId<BC>, cb: F, ) -> O
Calls
cb
with immutable access to the queue state.source§impl<BC: BindingsContext, L: LockBefore<PureIpDeviceTxQueue>> TransmitQueueContext<PureIpDevice, BC> for CoreCtx<'_, BC, L>
impl<BC: BindingsContext, L: LockBefore<PureIpDeviceTxQueue>> TransmitQueueContext<PureIpDevice, BC> for CoreCtx<'_, BC, L>
source§fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls
cb
with mutable access to the queue state.source§fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls
cb
with immutable access to the queue state.source§fn send_frame(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
dequeue_context: Option<&mut BC::DequeueContext>,
meta: Self::Meta,
buf: Self::Buffer,
) -> Result<(), DeviceSendFrameError>
fn send_frame( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, dequeue_context: Option<&mut BC::DequeueContext>, meta: Self::Meta, buf: Self::Buffer, ) -> Result<(), DeviceSendFrameError>
Send a frame out the device. Read more