Trait Ipv6DeviceHandler

Source
pub trait Ipv6DeviceHandler<BC>: IpDeviceHandler<Ipv6, BC> {
    type LinkLayerAddr: Ipv6LinkLayerAddr;

    // Required methods
    fn get_link_layer_addr(
        &mut self,
        device_id: &Self::DeviceId,
    ) -> Option<Self::LinkLayerAddr>;
    fn set_discovered_retrans_timer(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        retrans_timer: NonZeroDuration,
    );
    fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu);
    fn update_discovered_ipv6_route(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        route: Ipv6DiscoveredRoute,
        lifetime: Option<NonZeroNdpLifetime>,
    );
    fn apply_slaac_update(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        prefix: Subnet<Ipv6Addr>,
        preferred_lifetime: Option<NonZeroNdpLifetime>,
        valid_lifetime: Option<NonZeroNdpLifetime>,
    );
    fn receive_mld_packet<B: SplitByteSlice, H: IpHeaderInfo<Ipv6>>(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
        src_ip: Ipv6SourceAddr,
        dst_ip: SpecifiedAddr<Ipv6Addr>,
        packet: MldPacket<B>,
        header_info: &H,
    );
}
Expand description

An implementation of an IPv6 device.

Required Associated Types§

Source

type LinkLayerAddr: Ipv6LinkLayerAddr

A link-layer address.

Required Methods§

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

Source

fn set_discovered_retrans_timer( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, retrans_timer: NonZeroDuration, )

Sets the discovered retransmit timer for the device.

Sets the link MTU for the device.

Source

fn update_discovered_ipv6_route( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, route: Ipv6DiscoveredRoute, lifetime: Option<NonZeroNdpLifetime>, )

Updates a discovered IPv6 route.

Source

fn apply_slaac_update( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, prefix: Subnet<Ipv6Addr>, preferred_lifetime: Option<NonZeroNdpLifetime>, valid_lifetime: Option<NonZeroNdpLifetime>, )

Applies a SLAAC update.

Source

fn receive_mld_packet<B: SplitByteSlice, H: IpHeaderInfo<Ipv6>>( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, src_ip: Ipv6SourceAddr, dst_ip: SpecifiedAddr<Ipv6Addr>, packet: MldPacket<B>, header_info: &H, )

Receives an MLD packet for processing.

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§