netstack3_ip

Trait IpTransportDispatchContext

Source
pub trait IpTransportDispatchContext<I: IpLayerIpExt, BC>: DeviceIdContext<AnyDevice> {
    // Required method
    fn dispatch_receive_ip_packet<B: BufferMut>(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
        src_ip: I::RecvSrcAddr,
        dst_ip: SpecifiedAddr<I::Addr>,
        proto: I::Proto,
        body: B,
        meta: ReceiveIpPacketMeta<I>,
    ) -> Result<(), TransportReceiveError>;
}
Expand description

The IP context providing dispatch to the available transport protocols.

This trait acts like a demux on the transport protocol for ingress IP packets.

Required Methods§

Source

fn dispatch_receive_ip_packet<B: BufferMut>( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, src_ip: I::RecvSrcAddr, dst_ip: SpecifiedAddr<I::Addr>, proto: I::Proto, body: B, meta: ReceiveIpPacketMeta<I>, ) -> Result<(), TransportReceiveError>

Dispatches a received incoming IP packet to the appropriate protocol.

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.

Implementors§