pub trait IcmpErrorHandler<I: IcmpHandlerIpExt, BC>: DeviceIdContext<AnyDevice> {
// Required method
fn send_icmp_error_message<B: BufferMut>(
&mut self,
bindings_ctx: &mut BC,
device: Option<&Self::DeviceId>,
frame_dst: Option<FrameDestination>,
src_ip: SocketIpAddr<I::Addr>,
dst_ip: SocketIpAddr<I::Addr>,
original_packet: B,
error: I::IcmpError,
header_len: usize,
proto: I::Proto,
marks: &Marks,
);
}Expand description
The handler exposed by ICMP.
Required Methods§
Sourcefn send_icmp_error_message<B: BufferMut>(
&mut self,
bindings_ctx: &mut BC,
device: Option<&Self::DeviceId>,
frame_dst: Option<FrameDestination>,
src_ip: SocketIpAddr<I::Addr>,
dst_ip: SocketIpAddr<I::Addr>,
original_packet: B,
error: I::IcmpError,
header_len: usize,
proto: I::Proto,
marks: &Marks,
)
fn send_icmp_error_message<B: BufferMut>( &mut self, bindings_ctx: &mut BC, device: Option<&Self::DeviceId>, frame_dst: Option<FrameDestination>, src_ip: SocketIpAddr<I::Addr>, dst_ip: SocketIpAddr<I::Addr>, original_packet: B, error: I::IcmpError, header_len: usize, proto: I::Proto, marks: &Marks, )
Sends an error message in response to an incoming packet.
src_ip and dst_ip are the source and destination addresses of the
incoming packet.
original_packet contains the contents of the entire original packet,
including the IP header. This must be a whole packet, not a packet fragment.
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.