mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Print an entry for the root node as well as other entries
This commit is contained in:
parent
651147df57
commit
2d44b47050
@ -120,17 +120,20 @@ print_network_status(void)
|
||||
PRINTF("- Routing links (%u in total):\n", rpl_ns_num_nodes());
|
||||
link = rpl_ns_node_head();
|
||||
while(link != NULL) {
|
||||
if(link->parent != NULL) {
|
||||
uip_ipaddr_t child_ipaddr;
|
||||
uip_ipaddr_t parent_ipaddr;
|
||||
rpl_ns_get_node_global_addr(&child_ipaddr, link);
|
||||
rpl_ns_get_node_global_addr(&parent_ipaddr, link->parent);
|
||||
PRINTF("-- ");
|
||||
PRINT6ADDR(&child_ipaddr);
|
||||
uip_ipaddr_t child_ipaddr;
|
||||
uip_ipaddr_t parent_ipaddr;
|
||||
rpl_ns_get_node_global_addr(&child_ipaddr, link);
|
||||
rpl_ns_get_node_global_addr(&parent_ipaddr, link->parent);
|
||||
PRINTF("-- ");
|
||||
PRINT6ADDR(&child_ipaddr);
|
||||
if(link->parent == NULL) {
|
||||
memset(&parent_ipaddr, 0, sizeof(parent_ipaddr));
|
||||
PRINTF(" --- DODAG root ");
|
||||
} else {
|
||||
PRINTF(" to ");
|
||||
PRINT6ADDR(&parent_ipaddr);
|
||||
PRINTF(" (lifetime: %lu seconds)\n", (unsigned long)link->lifetime);
|
||||
}
|
||||
PRINTF(" (lifetime: %lu seconds)\n", (unsigned long)link->lifetime);
|
||||
link = rpl_ns_node_next(link);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user