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§
sourcefn handle_neighbor_update(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
neighbor: SpecifiedAddr<I::Addr>,
link_addr: D::Address,
source: DynamicNeighborUpdateSource,
)
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.
sourcefn flush(&mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId)
fn flush(&mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId)
Clears the neighbor table.
sourcefn 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,
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.