Trait netstack3_ip::device::DadContext
source · pub trait DadContext<BC: DadBindingsTypes>: IpDeviceAddressIdContext<Ipv6> + DeviceIdContext<AnyDevice> + CoreTimerContext<DadTimerId<Self::WeakDeviceId, Self::WeakAddressId>, BC> + CoreEventContext<DadEvent<Self::DeviceId>> {
type DadAddressCtx<'a>: DadAddressContext<BC, DeviceId = Self::DeviceId, AddressId = Self::AddressId>;
// Required methods
fn with_dad_state<O, F: FnOnce(DadStateRef<'_, Self::DadAddressCtx<'_>, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
addr: &Self::AddressId,
cb: F,
) -> O;
fn send_dad_packet(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
dst_ip: MulticastAddr<Ipv6Addr>,
message: NeighborSolicitation,
nonce: NdpNonce<&[u8]>,
) -> Result<(), ()>;
}
Expand description
The execution context for DAD.
Required Associated Types§
sourcetype DadAddressCtx<'a>: DadAddressContext<BC, DeviceId = Self::DeviceId, AddressId = Self::AddressId>
type DadAddressCtx<'a>: DadAddressContext<BC, DeviceId = Self::DeviceId, AddressId = Self::AddressId>
The inner address context.
Required Methods§
sourcefn with_dad_state<O, F: FnOnce(DadStateRef<'_, Self::DadAddressCtx<'_>, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
addr: &Self::AddressId,
cb: F,
) -> O
fn with_dad_state<O, F: FnOnce(DadStateRef<'_, Self::DadAddressCtx<'_>, BC>) -> O>( &mut self, device_id: &Self::DeviceId, addr: &Self::AddressId, cb: F, ) -> O
Calls the function with the DAD state associated with the address.
sourcefn send_dad_packet(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
dst_ip: MulticastAddr<Ipv6Addr>,
message: NeighborSolicitation,
nonce: NdpNonce<&[u8]>,
) -> Result<(), ()>
fn send_dad_packet( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, dst_ip: MulticastAddr<Ipv6Addr>, message: NeighborSolicitation, nonce: NdpNonce<&[u8]>, ) -> Result<(), ()>
Sends an NDP Neighbor Solicitation message for DAD to the local-link.
The message will be sent with the unspecified (all-zeroes) source address.
Object Safety§
This trait is not object safe.