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