netstack3_ip::nud

Trait NudHandler

Source
pub trait NudHandler<I: Ip, D: LinkDevice, BC: LinkResolutionContext<D>>: DeviceIdContext<D> {
    // Required methods
    fn handle_neighbor_update(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        neighbor: SpecifiedAddr<I::Addr>,
        link_addr: D::Address,
        source: DynamicNeighborUpdateSource,
    );
    fn flush(&mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId);
    fn send_ip_packet_to_neighbor<S>(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        neighbor: SpecifiedAddr<I::Addr>,
        body: S,
    ) -> Result<(), SendFrameError<S>>
       where S: Serializer,
             S::Buffer: BufferMut;
}
Expand description

An implementation of NUD for a link device.

Required Methods§

Source

fn handle_neighbor_update( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, neighbor: SpecifiedAddr<I::Addr>, link_addr: D::Address, source: DynamicNeighborUpdateSource, )

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: &Self::DeviceId)

Clears the neighbor table.

Source

fn send_ip_packet_to_neighbor<S>( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, neighbor: SpecifiedAddr<I::Addr>, body: S, ) -> Result<(), SendFrameError<S>>
where S: Serializer, S::Buffer: BufferMut,

Send an IP packet to the neighbor.

If the neighbor’s link address is not known, link address resolution is performed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I: Ip, D: LinkDevice, BC: NudBindingsContext<I, D, CC::DeviceId>, CC: NudContext<I, D, BC>> NudHandler<I, D, BC> for CC