Struct netstack3_device::ArpNudCtx

source ·
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>,

§

type DeviceId = <CC as DeviceIdContext<D>>::DeviceId

The type of device IDs.
§

type WeakDeviceId = <CC as DeviceIdContext<D>>::WeakDeviceId

The type of weakly referenced device IDs.
source§

impl<CC: ArpConfigContext> NudConfigContext<Ipv4> for ArpNudCtx<CC>

source§

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

Calls the callback with an immutable reference to NUD configurations.
§

fn max_unicast_solicit(&mut self) -> NonZero<u16>

Returns the maximum number of unicast solicitations.
§

fn max_multicast_solicit(&mut self) -> NonZero<u16>

Returns the maximum number of multicast solicitations.
§

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>,

§

type ConfigCtx<'a> = ArpNudCtx<<CC as ArpContext<D, BC>>::ConfigCtx<'a>>

The inner configuration context.
§

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

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

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

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>, )

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>

Send an IP frame to the neighbor with the specified link address.
source§

impl<CC> RefCast for ArpNudCtx<CC>

§

type From = CC

source§

fn ref_cast(_from: &Self::From) -> &Self

source§

fn ref_cast_mut(_from: &mut Self::From) -> &mut Self

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<I, D, BC, CC> NudHandler<I, D, BC> for CC
where 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, )

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, )

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,

Send an IP packet to the neighbor. Read more
source§

impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CC
where Meta: ReceivableFrameMeta<CC, BC>,

source§

fn receive_frame<B>(&mut self, bindings_ctx: &mut BC, metadata: Meta, frame: B)
where B: BufferMut + Debug,

Receive a frame. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CC
where 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,

Send a frame. Read more
source§

impl<Id, CC, BC> TimerHandler<BC, Id> for CC
where BC: TimerBindingsTypes, Id: HandleableTimer<CC, BC>,

source§

fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )

Handle a timer firing. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<L, T> UnlockedAccess<L> for T
where L: UnlockedAccessMarkerFor<T>,

§

type Data = <L as UnlockedAccessMarkerFor<T>>::Data

The type of state being accessed.
§

type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l

A guard providing read access to the data.
§

fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>

How to access the state.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<B, A> LockBefore<B> for A
where B: LockAfter<A>,