Trait netstack3_ip::nud::NudContext
source · pub trait NudContext<I: Ip, D: LinkDevice, BC: NudBindingsTypes<D>>: DeviceIdContext<D> {
type ConfigCtx<'a>: NudConfigContext<I>;
type SenderCtx<'a>: NudSenderContext<I, D, BC, DeviceId = Self::DeviceId>;
// Required methods
fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::SenderCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn with_nud_state_mut<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::ConfigCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn with_nud_state<O, F: FnOnce(&NudState<I, D, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn send_neighbor_solicitation(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
lookup_addr: SpecifiedAddr<I::Addr>,
remote_link_addr: Option<D::Address>,
);
}
Expand description
The execution context for NUD for a link device.
Required Associated Types§
sourcetype ConfigCtx<'a>: NudConfigContext<I>
type ConfigCtx<'a>: NudConfigContext<I>
The inner configuration context.
sourcetype SenderCtx<'a>: NudSenderContext<I, D, BC, DeviceId = Self::DeviceId>
type SenderCtx<'a>: NudSenderContext<I, D, BC, DeviceId = Self::DeviceId>
The inner send context.
Required Methods§
sourcefn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<I, 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<I, 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.
sourcefn with_nud_state_mut<O, F: FnOnce(&mut NudState<I, 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<I, 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.
sourcefn with_nud_state<O, F: FnOnce(&NudState<I, D, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state<O, F: FnOnce(&NudState<I, D, BC>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the NUD state.
sourcefn send_neighbor_solicitation(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
lookup_addr: SpecifiedAddr<I::Addr>,
remote_link_addr: Option<D::Address>,
)
fn send_neighbor_solicitation( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, lookup_addr: SpecifiedAddr<I::Addr>, remote_link_addr: Option<D::Address>, )
Sends a neighbor probe/solicitation message.
If remote_link_addr
is provided, the message will be unicasted to that
address; if it is None
, the message will be multicast.
Object Safety§
This trait is not object safe.