added return value so that caller know if a nbr was removed or not
This commit is contained in:
parent
946be77248
commit
513393db54
|
@ -115,7 +115,7 @@ uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
int
|
||||||
uip_ds6_nbr_rm(uip_ds6_nbr_t *nbr)
|
uip_ds6_nbr_rm(uip_ds6_nbr_t *nbr)
|
||||||
{
|
{
|
||||||
if(nbr != NULL) {
|
if(nbr != NULL) {
|
||||||
|
@ -123,9 +123,9 @@ uip_ds6_nbr_rm(uip_ds6_nbr_t *nbr)
|
||||||
uip_packetqueue_free(&nbr->packethandle);
|
uip_packetqueue_free(&nbr->packethandle);
|
||||||
#endif /* UIP_CONF_IPV6_QUEUE_PKT */
|
#endif /* UIP_CONF_IPV6_QUEUE_PKT */
|
||||||
NEIGHBOR_STATE_CHANGED(nbr);
|
NEIGHBOR_STATE_CHANGED(nbr);
|
||||||
nbr_table_remove(ds6_neighbors, nbr);
|
return nbr_table_remove(ds6_neighbors, nbr);
|
||||||
}
|
}
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -88,7 +88,7 @@ void uip_ds6_neighbors_init(void);
|
||||||
/** \brief Neighbor Cache basic routines */
|
/** \brief Neighbor Cache basic routines */
|
||||||
uip_ds6_nbr_t *uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr,
|
uip_ds6_nbr_t *uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr,
|
||||||
uint8_t isrouter, uint8_t state);
|
uint8_t isrouter, uint8_t state);
|
||||||
void uip_ds6_nbr_rm(uip_ds6_nbr_t *nbr);
|
int uip_ds6_nbr_rm(uip_ds6_nbr_t *nbr);
|
||||||
const uip_lladdr_t *uip_ds6_nbr_get_ll(const uip_ds6_nbr_t *nbr);
|
const uip_lladdr_t *uip_ds6_nbr_get_ll(const uip_ds6_nbr_t *nbr);
|
||||||
const uip_ipaddr_t *uip_ds6_nbr_get_ipaddr(const uip_ds6_nbr_t *nbr);
|
const uip_ipaddr_t *uip_ds6_nbr_get_ipaddr(const uip_ds6_nbr_t *nbr);
|
||||||
uip_ds6_nbr_t *uip_ds6_nbr_lookup(const uip_ipaddr_t *ipaddr);
|
uip_ds6_nbr_t *uip_ds6_nbr_lookup(const uip_ipaddr_t *ipaddr);
|
||||||
|
|
Loading…
Reference in a new issue