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.
§fn max_unicast_solicit(&mut self) -> NonZero<u16>
fn max_unicast_solicit(&mut self) -> NonZero<u16>
Returns the maximum number of unicast solicitations.
§fn max_multicast_solicit(&mut self) -> NonZero<u16>
fn max_multicast_solicit(&mut self) -> NonZero<u16>
Returns the maximum number of multicast solicitations.
§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,
) -> Result<(), SendFrameError<S>>where
S: Serializer,
S::Buffer: BufferMut,
fn send_ip_packet_to_neighbor_link_addr<S>(
&mut self,
bindings_ctx: &mut BC,
dst_mac: D::Address,
body: S,
) -> Result<(), SendFrameError<S>>where
S: Serializer,
S::Buffer: BufferMut,
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<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>,
§fn handle_neighbor_update(
&mut self,
bindings_ctx: &mut BC,
device_id: &<CC as DeviceIdContext<D>>::DeviceId,
neighbor: SpecifiedAddr<<I as Ip>::Addr>,
link_address: <D as LinkDevice>::Address,
source: DynamicNeighborUpdateSource,
)
fn handle_neighbor_update( &mut self, bindings_ctx: &mut BC, device_id: &<CC as DeviceIdContext<D>>::DeviceId, neighbor: SpecifiedAddr<<I as Ip>::Addr>, link_address: <D as LinkDevice>::Address, source: DynamicNeighborUpdateSource, )
Sets a dynamic neighbor’s entry state to the specified values in
response to the source packet.
§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.
§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,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
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,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send an IP packet to the neighbor. Read more
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>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
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