pub(crate) fn del_ipv6_addr<C: Ipv6DeviceContext + BufferIpDeviceContext<Ipv6, EmptyBuf>>(
    ctx: &mut C,
    device_id: C::DeviceId,
    addr: &SpecifiedAddr<Ipv6Addr>,
) -> Result<(), NotFoundError> {
    ctx.get_ip_device_state_mut(device_id).ip_state.remove_addr(&addr).map(|()| {
        // TODO(https://fxbug.dev/69196): Give `addr` the type
        // `UnicastAddr<Ipv6Addr>` for IPv6 instead of doing this
        // dynamic check here and statically guarantee only unicast
        // addresses are added for IPv6.
        if let Some(addr) = UnicastAddr::new(addr.get()) {
            // Leave the the solicited-node multicast group.
            leave_ip_multicast(ctx, device_id, addr.to_solicited_node_address());
            ctx.stop_duplicate_address_detection(device_id, addr);
        }
    })
}
/// Removes an IPv6 address and associated subnet from this device.
Removes an IPv6 address and associated subnet from this device.
Removes an IPv6 address and associated subnet from this device .
pub(crate) fn del_ipv6_addr<C: Ipv6DeviceContext + BufferIpDeviceContext<Ipv6, EmptyBuf>>(
    ctx: &mut C,
    device_id: C::DeviceId,
    addr: &SpecifiedAddr<Ipv6Addr>,
) -> Result<(), NotFoundError> {
    ctx.get_ip_device_state_mut(device_id).ip_state.remove_addr(&addr).map(|()| {
        // TODO(https://fxbug.dev/69196): Give `addr` the type
        // `UnicastAddr<Ipv6Addr>` for IPv6 instead of doing this
        // dynamic check here and statically guarantee only unicast
        // addresses are added for IPv6.
        if let Some(addr) = UnicastAddr::new(addr.get()) {
            // Leave the the solicited-node multicast group.
            leave_ip_multicast(ctx, device_id, addr.to_solicited_node_address());
            ctx.stop_duplicate_address_detection(device_id, addr);
        }
    })
}
pub ( crate ) fn del_ipv6_addr < C : Ipv6DeviceContext + BufferIpDeviceContext < Ipv6 , EmptyBuf > > ( ctx : & mut C , device_id : C :: DeviceId , addr : & SpecifiedAddr < Ipv6Addr > , ) -> Result < ( ) , NotFoundError > { ctx . get_ip_device_state_mut ( device_id ) . ip_state . remove_addr ( & addr ) . map ( | ( ) | { // TODO(https://fxbug.dev/69196): Give `addr` the type // `UnicastAddr<Ipv6Addr>` for IPv6 instead of doing this // dynamic check here and statically guarantee only unicast // addresses are added for IPv6. if let Some ( addr ) = UnicastAddr :: new ( addr . get ( ) ) { // Leave the the solicited-node multicast group. leave_ip_multicast ( ctx , device_id , addr . to_solicited_node_address ( ) ) ; ctx . stop_duplicate_address_detection ( device_id , addr ) ; } } ) }
Removes an IPv6 address and associated subnet from this device.
Removes an IPv6 address and associated subnet from this device .
ctx
&mut C
device_id
C::DeviceId
addr
&SpecifiedAddr<Ipv6Addr>
ctx
&mut C
device_id
C::DeviceId
addr
&SpecifiedAddr<Ipv6Addr>