예제 #1
0
/*---------------------------------------------------------------------------*/
void
uip_ds6_addr_rm(uip_ds6_addr_t *addr)
{
  if(addr != NULL) {
    uip_create_solicited_node(&addr->ipaddr, &loc_fipaddr);
    if((locmaddr = uip_ds6_maddr_lookup(&loc_fipaddr)) != NULL) {
      uip_ds6_maddr_rm(locmaddr);
    }
    addr->isused = 0;
  }
  return;
}
예제 #2
0
/**
 * Remove a multicast address from the list.
 */
ule6lo_status_t ule6loGI_removeMulticastAddr(ule6lo_ip6addr_t* ipaddress) {
  ule6lo_status_t status = STATUS_NO_DEVICE;
#if UIP_CONF_MLD
  uip_ds6_maddr_t *locmaddr;
  if(uip_ds6_list_loop
      ((uip_ds6_element_t *)uip_ds6_if.maddr_list, UIP_DS6_MADDR_NB,
       sizeof(uip_ds6_maddr_t), (void*)ipaddress, 128,
       (uip_ds6_element_t **)&locmaddr) == FOUND) {
    locmaddr->isused = 0;
    locmaddr->report_count = 0;
    stimer_set(&(locmaddr->report_timeout), 0);
    uip_ds6_maddr_rm(locmaddr);
    memset(&locmaddr->ipaddr, 0x00, sizeof(uip_ipaddr_t));
    status = STATUS_SUCCESS;
  }
#endif
  return status;
}