pub struct NeighborApi<I: Ip, D, C>(/* private fields */);
Expand description
The neighbor API.
Implementations§
Source§impl<I: Ip, D, C> NeighborApi<I, D, C>
impl<I: Ip, D, C> NeighborApi<I, D, C>
Source§impl<I, D, C> NeighborApi<I, D, C>where
I: Ip,
D: LinkDevice,
C: ContextPair,
C::CoreContext: NudContext<I, D, C::BindingsContext>,
C::BindingsContext: NudBindingsContext<I, D, <C::CoreContext as DeviceIdContext<D>>::DeviceId>,
impl<I, D, C> NeighborApi<I, D, C>where
I: Ip,
D: LinkDevice,
C: ContextPair,
C::CoreContext: NudContext<I, D, C::BindingsContext>,
C::BindingsContext: NudBindingsContext<I, D, <C::CoreContext as DeviceIdContext<D>>::DeviceId>,
Sourcepub fn resolve_link_addr(
&mut self,
device_id: &<C::CoreContext as DeviceIdContext<D>>::DeviceId,
dst: &SpecifiedAddr<I::Addr>,
) -> LinkResolutionResult<D::Address, <<C::BindingsContext as LinkResolutionContext<D>>::Notifier as LinkResolutionNotifier<D>>::Observer>
pub fn resolve_link_addr( &mut self, device_id: &<C::CoreContext as DeviceIdContext<D>>::DeviceId, dst: &SpecifiedAddr<I::Addr>, ) -> LinkResolutionResult<D::Address, <<C::BindingsContext as LinkResolutionContext<D>>::Notifier as LinkResolutionNotifier<D>>::Observer>
Resolve the link-address for a given device’s neighbor.
Lookup the given destination IP address in the neighbor table for given device, returning either the associated link-address if it is available, or an observer that can be used to wait for link address resolution to complete.
Sourcepub fn flush_table(
&mut self,
device: &<C::CoreContext as DeviceIdContext<D>>::DeviceId,
)
pub fn flush_table( &mut self, device: &<C::CoreContext as DeviceIdContext<D>>::DeviceId, )
Flush neighbor table entries.
Sourcepub fn insert_static_entry(
&mut self,
device_id: &<C::CoreContext as DeviceIdContext<D>>::DeviceId,
neighbor: I::Addr,
link_address: D::Address,
) -> Result<(), StaticNeighborInsertionError>
pub fn insert_static_entry( &mut self, device_id: &<C::CoreContext as DeviceIdContext<D>>::DeviceId, neighbor: I::Addr, link_address: D::Address, ) -> Result<(), StaticNeighborInsertionError>
Sets a static neighbor entry for the neighbor.
If no entry exists, a new one may be created. If an entry already exists, it will be updated with the provided link address and set to be a static entry.
Dynamic updates for the neighbor will be ignored for static entries.
Sourcepub fn remove_entry(
&mut self,
device_id: &<C::CoreContext as DeviceIdContext<D>>::DeviceId,
neighbor: I::Addr,
) -> Result<(), NeighborRemovalError>
pub fn remove_entry( &mut self, device_id: &<C::CoreContext as DeviceIdContext<D>>::DeviceId, neighbor: I::Addr, ) -> Result<(), NeighborRemovalError>
Remove a static or dynamic neighbor table entry.
Sourcepub fn inspect_neighbors<N: Inspector>(
&mut self,
device: &<C::CoreContext as DeviceIdContext<D>>::DeviceId,
inspector: &mut N,
)
pub fn inspect_neighbors<N: Inspector>( &mut self, device: &<C::CoreContext as DeviceIdContext<D>>::DeviceId, inspector: &mut N, )
Writes device
’s neighbor state information into inspector
.
Auto Trait Implementations§
impl<I, D, C> Freeze for NeighborApi<I, D, C>where
C: Freeze,
impl<I, D, C> RefUnwindSafe for NeighborApi<I, D, C>
impl<I, D, C> Send for NeighborApi<I, D, C>
impl<I, D, C> Sync for NeighborApi<I, D, C>
impl<I, D, C> Unpin for NeighborApi<I, D, C>
impl<I, D, C> UnwindSafe for NeighborApi<I, D, C>
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
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