Updated to the latest uip-ds6-route API

This commit is contained in:
Adam Dunkels 2012-11-26 21:30:01 +01:00
parent 4218a733c9
commit 99f541e8fd
7 changed files with 101 additions and 83 deletions

View file

@ -70,7 +70,8 @@ void
collect_common_net_print(void)
{
rpl_dag_t *dag;
int i;
uip_ds6_route_t *r;
/* Let's suppose we have only one instance */
dag = rpl_get_any_dag();
if(dag->preferred_parent != NULL) {
@ -78,12 +79,10 @@ collect_common_net_print(void)
PRINT6ADDR(&dag->preferred_parent->addr);
PRINTF("\n");
}
PRINTF("Route entries:\n");
for(i = 0; i < UIP_DS6_ROUTE_NB; i++) {
if(uip_ds6_routing_table[i].isused) {
PRINT6ADDR(&uip_ds6_routing_table[i].ipaddr);
PRINTF("\n");
}
for(r = uip_ds6_route_list_head();
r != NULL;
r = list_item_next(r)) {
PRINT6ADDR(&r->ipaddr);
}
PRINTF("---\n");
}