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§
sourcefn 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>
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.
Object Safety§
This trait is not object safe.