third_party/lwip/repo/lwip/src/core/netif.c
/**
 * This function allows for the removal of an IPv6 address from an interface
 * as well as any routes associated with it.
 *
 * @param netif netif on which the address is assigned
 * @param ip6addr address to remove
 * @prefix_len the prefix length for the route corresponding to the address
 */
This function allows for the removal of an IPv6 address from an interface
as well as any routes associated with it.

@param netif netif on which the address is assigned
@param ip6addr address to remove
@prefix_len the prefix length for the route corresponding to the address
This function allows for the removal of an IPv6 address from an interface as well as any routes associated with it . @param netif netif on which the address is assigned @param ip6addr address to remove @prefix_len the prefix length for the route corresponding to the address
err_t
netif_remove_ip6_address_with_route(struct netif *netif, ip6_addr_t *ip6addr, 
                                    u8_t prefix_len)
{
  s8_t retval = ERR_OK;
#if LWIP_IPV6_ROUTE_TABLE_SUPPORT
  struct ip6_prefix ip6_pref;
  if (!ip6_prefix_valid(prefix_len)) {
    retval = ERR_ARG;
    goto fail;
  }
#else
  if (prefix_len != 64 && prefix_len != 128) {
    retval = ERR_ARG;
    goto fail;
  }
#endif 
  if ((retval = netif_remove_ip6_address(netif, ip6addr)) != ERR_OK) {
      goto fail;
  }
#if LWIP_IPV6_ROUTE_TABLE_SUPPORT
  ip6_addr_copy(ip6_pref.addr, *ip6addr);
  ip6_pref.prefix_len = prefix_len;
  ip6_remove_route_entry(&ip6_pref);
#endif 
fail:
  return retval;
}
err_t netif_remove_ip6_address_with_route ( struct netif * netif , ip6_addr_t * ip6addr , u8_t prefix_len ) { s8_t retval = ERR_OK ; #if LWIP_IPV6_ROUTE_TABLE_SUPPORT struct ip6_prefix ip6_pref ; if ( ! ip6_prefix_valid ( prefix_len ) ) { retval = ERR_ARG ; goto fail ; } #else if ( prefix_len != 64 && prefix_len != 128 ) { retval = ERR_ARG ; goto fail ; } #endif if ( ( retval = netif_remove_ip6_address ( netif , ip6addr ) ) != ERR_OK ) { goto fail ; } #if LWIP_IPV6_ROUTE_TABLE_SUPPORT ip6_addr_copy ( ip6_pref . addr , * ip6addr ) ; ip6_pref . prefix_len = prefix_len ; ip6_remove_route_entry ( & ip6_pref ) ; #endif fail : return retval ; }
This function allows for the removal of an IPv6 address from an interface
 as well as any routes associated with it.
This function allows for the removal of an IPv6 address from an interface as well as any routes associated with it .
/* LWIP_IPV6_ROUTE_TABLE_SUPPORT */ /* Remove the route in routing table for the prefix len */ /* LWIP_IPV6_ROUTE_TABLE_SUPPORT */