Trait netstack3_ip::device::DadHandler

source ·
pub trait DadHandler<I: IpDeviceIpExt, BC>: DeviceIdContext<AnyDevice> + IpDeviceAddressIdContext<I> {
    const INITIAL_ADDRESS_STATE: IpAddressState;

    // Required methods
    fn start_duplicate_address_detection(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        addr: &Self::AddressId,
    );
    fn stop_duplicate_address_detection(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        addr: &Self::AddressId,
    );
    fn handle_incoming_dad_neighbor_solicitation(
        &mut self,
        bindings_ctx: &mut BC,
        device_id: &Self::DeviceId,
        addr: &Self::AddressId,
        nonce: Option<NdpNonce<&[u8]>>,
    ) -> DadAddressStateLookupResult;
}
Expand description

An implementation for Duplicate Address Detection.

Required Associated Constants§

source

const INITIAL_ADDRESS_STATE: IpAddressState

The initial address state for newly added addresses.

Required Methods§

source

fn start_duplicate_address_detection( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, addr: &Self::AddressId, )

Starts duplicate address detection.

§Panics

Panics if tentative state for the address is not found.

source

fn stop_duplicate_address_detection( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, addr: &Self::AddressId, )

Stops duplicate address detection.

Does nothing if DAD is not being performed on the address.

source

fn handle_incoming_dad_neighbor_solicitation( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, addr: &Self::AddressId, nonce: Option<NdpNonce<&[u8]>>, ) -> DadAddressStateLookupResult

Handles an incoming neighbor solicitation that was determined to be sent as part of a node (possibly ourselves) performing duplicate address detection.

If the incoming solicitation is determined to be a looped-back probe that we ourselves sent, updates DAD state accordingly to send additional probes.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<BC, CC> DadHandler<Ipv4, BC> for CC

source§

const INITIAL_ADDRESS_STATE: IpAddressState = IpAddressState::Assigned

source§

impl<BC: DadBindingsContext<CC::OuterEvent>, CC: DadContext<BC>> DadHandler<Ipv6, BC> for CC

source§

const INITIAL_ADDRESS_STATE: IpAddressState = IpAddressState::Tentative