Trait netstack3_ip::nud::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.

Object Safety§

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