Trait netstack3_ip::nud::NudIcmpContext

source ·
pub trait NudIcmpContext<I: NudIcmpIpExt, D: LinkDevice, BC>: DeviceIdContext<D> {
    // Required method
    fn send_icmp_dest_unreachable(
        &mut self,
        bindings_ctx: &mut BC,
        frame: Buf<Vec<u8>>,
        device_id: Option<&Self::DeviceId>,
        original_src_ip: SocketIpAddr<I::Addr>,
        original_dst_ip: SocketIpAddr<I::Addr>,
        metadata: I::Metadata,
    );
}
Expand description

The execution context which allows sending ICMP destination unreachable errors, which needs to happen when address resolution fails.

Required Methods§

source

fn send_icmp_dest_unreachable( &mut self, bindings_ctx: &mut BC, frame: Buf<Vec<u8>>, device_id: Option<&Self::DeviceId>, original_src_ip: SocketIpAddr<I::Addr>, original_dst_ip: SocketIpAddr<I::Addr>, metadata: I::Metadata, )

Send an ICMP destination unreachable error to original_src_ip as a result of frame being unable to be sent/forwarded due to link layer address resolution failure.

original_src_ip, original_dst_ip, and header_len are all IP header fields from frame.

Implementors§