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,
properties: Ipv6DiscoveredRouteProperties,
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§
Sourcetype LinkLayerAddr: Ipv6LinkLayerAddr
type LinkLayerAddr: Ipv6LinkLayerAddr
A link-layer address.
Required Methods§
Sourcefn get_link_layer_addr(
&mut self,
device_id: &Self::DeviceId,
) -> Option<Self::LinkLayerAddr>
fn get_link_layer_addr( &mut self, device_id: &Self::DeviceId, ) -> Option<Self::LinkLayerAddr>
Gets the device’s link-layer address, if the device supports link-layer addressing.
Sourcefn set_discovered_retrans_timer(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
retrans_timer: NonZeroDuration,
)
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.
Sourcefn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu)
fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu)
Sets the link MTU for the device.
Sourcefn update_discovered_ipv6_route(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
route: Ipv6DiscoveredRoute,
properties: Ipv6DiscoveredRouteProperties,
lifetime: Option<NonZeroNdpLifetime>,
)
fn update_discovered_ipv6_route( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, route: Ipv6DiscoveredRoute, properties: Ipv6DiscoveredRouteProperties, lifetime: Option<NonZeroNdpLifetime>, )
Updates a discovered IPv6 route.
Sourcefn 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 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.
Sourcefn 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,
)
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".