/*---------------------------------------------------------------------------*/ static int add_nbr_from_dio(uip_ipaddr_t *from, rpl_dio_t *dio) { /* add this to the neighbor cache if not already there */ if(rpl_icmp6_update_nbr_table(from, NBR_TABLE_REASON_RPL_DIO, dio) == NULL) { PRINTF("RPL: Out of memory, dropping DIO from "); PRINT6ADDR(from); PRINTF("\n"); return 0; } return 1; }
/*---------------------------------------------------------------------------*/ static int add_nbr_from_dio(uip_ipaddr_t *from, rpl_dio_t *dio) { /* check if it is ok to add this nbr based on this DIO */ if(RPL_NBR_POLICY.check_add_from_dio(from, dio)) { /* add this to the neighbor cache if not already there */ if(rpl_icmp6_update_nbr_table(from) == NULL) { PRINTF("RPL: Out of memory, dropping DIO from "); PRINT6ADDR(from); PRINTF("\n"); return 0; } return 1; } return 0; }