/// Adds an IPv6 address (with duplicate address detection) and associated
/// subnet to this device and joins the address's solicited-node multicast
/// group.
///
/// `config` is the way this address is being configured. See [`AddrConfig`]
/// for more details.
Adds an IPv6 address (with duplicate address detection) and associated
subnet to this device and joins the address's solicited-node multicast
group.

`config` is the way this address is being configured. See [`AddrConfig`]
for more details.
Adds an IPv6 address ( with duplicate address detection ) and associated subnet to this device and joins the address ' s solicited - node multicast group . ` config ` is the way this address is being configured . See [ ` AddrConfig ` ] for more details .
pub(crate) fn add_ipv6_addr_subnet<C: Ipv6DeviceContext + BufferIpDeviceContext<Ipv6, EmptyBuf>>(
    ctx: &mut C,
    device_id: C::DeviceId,
    addr_sub: AddrSubnet<Ipv6Addr>,
    config: AddrConfig<C::Instant>,
) -> Result<(), ExistsError> {
    let Ipv6DeviceState {
        ref mut ip_state,
        config:
            Ipv6DeviceConfiguration {
                dad_transmits,
                ip_config: IpDeviceConfiguration { gmp_enabled: _ },
            },
    } = ctx.get_ip_device_state_mut(device_id);
    let addr_sub = addr_sub.to_unicast();
    ip_state
        .add_addr(Ipv6AddressEntry::new(
            addr_sub,
            AddressState::Tentative { dad_transmits_remaining: *dad_transmits },
            config,
        ))
        .map(|()| {
            join_ip_multicast(ctx, device_id, addr_sub.addr().to_solicited_node_address());
            ctx.start_duplicate_address_detection(device_id, addr_sub.addr());
        })
}
pub ( crate ) fn add_ipv6_addr_subnet < C : Ipv6DeviceContext + BufferIpDeviceContext < Ipv6 , EmptyBuf > > ( ctx : & mut C , device_id : C :: DeviceId , addr_sub : AddrSubnet < Ipv6Addr > , config : AddrConfig < C :: Instant > , ) -> Result < ( ) , ExistsError > { let Ipv6DeviceState { ref mut ip_state , config : Ipv6DeviceConfiguration { dad_transmits , ip_config : IpDeviceConfiguration { gmp_enabled : _ } , } , } = ctx . get_ip_device_state_mut ( device_id ) ; let addr_sub = addr_sub . to_unicast ( ) ; ip_state . add_addr ( Ipv6AddressEntry :: new ( addr_sub , AddressState :: Tentative { dad_transmits_remaining : * dad_transmits } , config , ) ) . map ( | ( ) | { join_ip_multicast ( ctx , device_id , addr_sub . addr ( ) . to_solicited_node_address ( ) ) ; ctx . start_duplicate_address_detection ( device_id , addr_sub . addr ( ) ) ; } ) }
Adds an IPv6 address (with duplicate address detection) and associated
subnet to this device and joins the address's solicited-node multicast
group.
Adds an IPv6 address ( with duplicate address detection ) and associated subnet to this device and joins the address ' s solicited - node multicast group .
ctx
&mut C
device_id
C::DeviceId
addr_sub
AddrSubnet<Ipv6Addr>
config
AddrConfig<C::Instant>