Trait netstack3_ip::device::Ipv6DeviceContext

source ·
pub trait Ipv6DeviceContext<BC: IpDeviceBindingsContext<Ipv6, Self::DeviceId>>: IpDeviceStateContext<Ipv6, BC> {
    type LinkLayerAddr: AsRef<[u8]>;

    // Required methods
    fn get_link_layer_addr_bytes(
        &mut self,
        device_id: &Self::DeviceId,
    ) -> Option<Self::LinkLayerAddr>;
    fn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>;
    fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu);
    fn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        cb: F,
    ) -> O;
    fn with_network_learned_parameters_mut<O, F: FnOnce(&mut Ipv6NetworkLearnedParameters) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        cb: F,
    ) -> O;
}
Expand description

The execution context for an IPv6 device.

Required Associated Types§

source

type LinkLayerAddr: AsRef<[u8]>

A link-layer address.

Required Methods§

Gets the device’s link-layer address bytes, if the device supports link-layer addressing.

source

fn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>

Gets the device’s EUI-64 based interface identifier.

A None value indicates the device does not have an EUI-64 based interface identifier.

Sets the link MTU for the device.

source

fn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O

Calls the function with an immutable reference to the retransmit timer.

source

fn with_network_learned_parameters_mut<O, F: FnOnce(&mut Ipv6NetworkLearnedParameters) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O

Calls the function with a mutable reference to the retransmit timer.

Object Safety§

This trait is not object safe.

Implementors§