netstack3_ip::socket

Trait DeviceIpSocketHandler

Source
pub trait DeviceIpSocketHandler<I: IpExt, BC>: DeviceIdContext<AnyDevice> {
    // Required method
    fn get_mms<O: RouteResolutionOptions<I>>(
        &mut self,
        bindings_ctx: &mut BC,
        ip_sock: &IpSock<I, Self::WeakDeviceId>,
        options: &O,
    ) -> Result<Mms, MmsError>;
}
Expand description

Gets device related information of an IP socket.

Required Methods§

Source

fn get_mms<O: RouteResolutionOptions<I>>( &mut self, bindings_ctx: &mut BC, ip_sock: &IpSock<I, Self::WeakDeviceId>, options: &O, ) -> Result<Mms, MmsError>

Gets the maximum message size for the transport layer, it equals the device MTU minus the IP header size.

This corresponds to the GET_MAXSIZES call described in: https://www.rfc-editor.org/rfc/rfc1122#section-3.4

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.

Implementations on Foreign Types§

Source§

impl<I: IpLayerIpExt, C, P: DeviceIpSocketHandler<I, C>> DeviceIpSocketHandler<I, C> for UninstantiableWrapper<P>

Source§

fn get_mms<O: RouteResolutionOptions<I>>( &mut self, _bindings_ctx: &mut C, _ip_sock: &IpSock<I, Self::WeakDeviceId>, _options: &O, ) -> Result<Mms, MmsError>

Implementors§