pub struct ArpNudCtx<CC>(/* private fields */);Expand description
Provides a NudContext IPv4 implementation for a core context that
implements ArpContext.
Trait Implementations§
Source§impl<D, CC> DeviceIdContext<D> for ArpNudCtx<CC>where
D: ArpDevice,
CC: DeviceIdContext<D>,
impl<D, CC> DeviceIdContext<D> for ArpNudCtx<CC>where
D: ArpDevice,
CC: DeviceIdContext<D>,
Source§type DeviceId = <CC as DeviceIdContext<D>>::DeviceId
type DeviceId = <CC as DeviceIdContext<D>>::DeviceId
The type of device IDs.
Source§type WeakDeviceId = <CC as DeviceIdContext<D>>::WeakDeviceId
type WeakDeviceId = <CC as DeviceIdContext<D>>::WeakDeviceId
The type of weakly referenced device IDs.
Source§impl<CC: ArpConfigContext> NudConfigContext<Ipv4> for ArpNudCtx<CC>
impl<CC: ArpConfigContext> NudConfigContext<Ipv4> for ArpNudCtx<CC>
Source§fn retransmit_timeout(&mut self) -> NonZeroDuration
fn retransmit_timeout(&mut self) -> NonZeroDuration
The amount of time between retransmissions of neighbor probe messages. Read more
Source§fn with_nud_user_config<O, F: FnOnce(&NudUserConfig) -> O>(
&mut self,
cb: F,
) -> O
fn with_nud_user_config<O, F: FnOnce(&NudUserConfig) -> O>( &mut self, cb: F, ) -> O
Calls the callback with an immutable reference to NUD configurations.
Source§fn max_unicast_solicit(&mut self) -> NonZero<u16>
fn max_unicast_solicit(&mut self) -> NonZero<u16>
Returns the maximum number of unicast solicitations.
Source§fn max_multicast_solicit(&mut self) -> NonZero<u16>
fn max_multicast_solicit(&mut self) -> NonZero<u16>
Returns the maximum number of multicast solicitations.
Source§fn base_reachable_time(&mut self) -> NonZeroDuration
fn base_reachable_time(&mut self) -> NonZeroDuration
Returns the base reachable time, the duration a neighbor is considered
reachable after receiving a reachability confirmation.
Source§impl<D, CC, BC> NudContext<Ipv4, D, BC> for ArpNudCtx<CC>where
D: ArpDevice,
BC: ArpBindingsContext<D, CC::DeviceId>,
CC: ArpContext<D, BC>,
impl<D, CC, BC> NudContext<Ipv4, D, BC> for ArpNudCtx<CC>where
D: ArpDevice,
BC: ArpBindingsContext<D, CC::DeviceId>,
CC: ArpContext<D, BC>,
Source§type ConfigCtx<'a> = ArpNudCtx<<CC as ArpContext<D, BC>>::ConfigCtx<'a>>
type ConfigCtx<'a> = ArpNudCtx<<CC as ArpContext<D, BC>>::ConfigCtx<'a>>
The inner configuration context.
Source§type SenderCtx<'a> = ArpNudCtx<<CC as ArpContext<D, BC>>::ArpSenderCtx<'a>>
type SenderCtx<'a> = ArpNudCtx<<CC as ArpContext<D, BC>>::ArpSenderCtx<'a>>
The inner send context.
Source§fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<Ipv4, D, BC>, &mut Self::SenderCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<Ipv4, D, BC>, &mut Self::SenderCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, 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<Ipv4, D, BC>, &mut Self::ConfigCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state_mut<O, F: FnOnce(&mut NudState<Ipv4, D, BC>, &mut Self::ConfigCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, 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<Ipv4, D, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state<O, F: FnOnce(&NudState<Ipv4, D, BC>) -> O>( &mut self, device_id: &Self::DeviceId, 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: &Self::DeviceId,
lookup_addr: SpecifiedAddr<<Ipv4 as Ip>::Addr>,
remote_link_addr: Option<<D as LinkDevice>::Address>,
)
fn send_neighbor_solicitation( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, lookup_addr: SpecifiedAddr<<Ipv4 as Ip>::Addr>, remote_link_addr: Option<<D as LinkDevice>::Address>, )
Sends a neighbor probe/solicitation message. Read more
Source§impl<D: ArpDevice, BC: ArpBindingsContext<D, CC::DeviceId>, CC: ArpSenderContext<D, BC>> NudSenderContext<Ipv4, D, BC> for ArpNudCtx<CC>
impl<D: ArpDevice, BC: ArpBindingsContext<D, CC::DeviceId>, CC: ArpSenderContext<D, BC>> NudSenderContext<Ipv4, D, BC> for ArpNudCtx<CC>
Source§fn send_ip_packet_to_neighbor_link_addr<S>(
&mut self,
bindings_ctx: &mut BC,
dst_mac: D::Address,
body: S,
meta: BC::TxMetadata,
) -> Result<(), SendFrameError<S>>
fn send_ip_packet_to_neighbor_link_addr<S>( &mut self, bindings_ctx: &mut BC, dst_mac: D::Address, body: S, meta: BC::TxMetadata, ) -> Result<(), SendFrameError<S>>
Send an IP frame to the neighbor with the specified link address.
Auto Trait Implementations§
impl<CC> Freeze for ArpNudCtx<CC>where
CC: Freeze,
impl<CC> RefUnwindSafe for ArpNudCtx<CC>where
CC: RefUnwindSafe,
impl<CC> Send for ArpNudCtx<CC>where
CC: Send,
impl<CC> Sync for ArpNudCtx<CC>where
CC: Sync,
impl<CC> Unpin for ArpNudCtx<CC>where
CC: Unpin,
impl<CC> UnwindSafe for ArpNudCtx<CC>where
CC: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<I, D, BC, CC> NudHandler<I, D, BC> for CCwhere
I: Ip,
D: LinkDevice,
BC: NudBindingsContext<I, D, <CC as DeviceIdContext<D>>::DeviceId>,
CC: NudContext<I, D, BC>,
impl<I, D, BC, CC> NudHandler<I, D, BC> for CCwhere
I: Ip,
D: LinkDevice,
BC: NudBindingsContext<I, D, <CC as DeviceIdContext<D>>::DeviceId>,
CC: NudContext<I, D, BC>,
Source§fn handle_neighbor_update(
&mut self,
bindings_ctx: &mut BC,
device_id: &<CC as DeviceIdContext<D>>::DeviceId,
neighbor: SpecifiedAddr<<I as Ip>::Addr>,
source: DynamicNeighborUpdateSource<<D as LinkDevice>::Address>,
)
fn handle_neighbor_update( &mut self, bindings_ctx: &mut BC, device_id: &<CC as DeviceIdContext<D>>::DeviceId, neighbor: SpecifiedAddr<<I as Ip>::Addr>, source: DynamicNeighborUpdateSource<<D as LinkDevice>::Address>, )
Sets a dynamic neighbor’s entry state to the specified values in
response to the source packet.
Source§fn flush(
&mut self,
bindings_ctx: &mut BC,
device_id: &<CC as DeviceIdContext<D>>::DeviceId,
)
fn flush( &mut self, bindings_ctx: &mut BC, device_id: &<CC as DeviceIdContext<D>>::DeviceId, )
Clears the neighbor table.
Source§fn send_ip_packet_to_neighbor<S>(
&mut self,
bindings_ctx: &mut BC,
device_id: &<CC as DeviceIdContext<D>>::DeviceId,
lookup_addr: SpecifiedAddr<<I as Ip>::Addr>,
body: S,
meta: <BC as TxMetadataBindingsTypes>::TxMetadata,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
fn send_ip_packet_to_neighbor<S>( &mut self, bindings_ctx: &mut BC, device_id: &<CC as DeviceIdContext<D>>::DeviceId, lookup_addr: SpecifiedAddr<<I as Ip>::Addr>, body: S, meta: <BC as TxMetadataBindingsTypes>::TxMetadata, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Send an IP packet to the neighbor. Read more
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
fn send_frame<S>( &mut self, bindings_ctx: &mut BC, metadata: Meta, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Send a frame. Read more
Source§impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta
impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta
Source§fn send_meta<SS>(
self,
core_ctx: &mut FakeCoreCtx<S, Meta, DeviceId>,
bindings_ctx: &mut BC,
frame: SS,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, SS>>
fn send_meta<SS>( self, core_ctx: &mut FakeCoreCtx<S, Meta, DeviceId>, bindings_ctx: &mut BC, frame: SS, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, SS>>
Sends this frame metadata to the provided contexts.
Source§impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
Source§fn send_meta<S>(
self,
core_ctx: &mut FakeFrameCtx<Meta>,
_bindings_ctx: &mut BC,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
fn send_meta<S>( self, core_ctx: &mut FakeFrameCtx<Meta>, _bindings_ctx: &mut BC, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Sends this frame metadata to the provided contexts.
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more
Source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
Source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.