Port apps, examples, platforms and tools so they use the new neighbor and route API.
This commit is contained in:
parent
ff093a2b50
commit
5dc05e7913
21 changed files with 262 additions and 257 deletions
|
@ -579,11 +579,10 @@ void menu_process(char c)
|
|||
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
#include "rpl.h"
|
||||
extern uip_ds6_nbr_t uip_ds6_nbr_cache[];
|
||||
extern uip_ds6_route_t uip_ds6_routing_table[];
|
||||
extern uip_ds6_netif_t uip_ds6_if;
|
||||
case 'N':
|
||||
{ uint8_t i,j;
|
||||
uip_ds6_nbr_t *nbr;
|
||||
PRINTF_P(PSTR("\n\rAddresses [%u max]\n\r"),UIP_DS6_ADDR_NB);
|
||||
for (i=0;i<UIP_DS6_ADDR_NB;i++) {
|
||||
if (uip_ds6_if.addr_list[i].isused) {
|
||||
|
@ -591,21 +590,24 @@ extern uip_ds6_netif_t uip_ds6_if;
|
|||
PRINTF_P(PSTR("\n\r"));
|
||||
}
|
||||
}
|
||||
PRINTF_P(PSTR("\n\rNeighbors [%u max]\n\r"),UIP_DS6_NBR_NB);
|
||||
for(i = 0,j=1; i < UIP_DS6_NBR_NB; i++) {
|
||||
if(uip_ds6_nbr_cache[i].isused) {
|
||||
ipaddr_add(&uip_ds6_nbr_cache[i].ipaddr);
|
||||
PRINTF_P(PSTR("\n\r"));
|
||||
j=0;
|
||||
}
|
||||
PRINTF_P(PSTR("\n\rNeighbors [%u max]\n\r"),NEIGHBOR_TABLE_MAX_NEIGHBORS);
|
||||
|
||||
for(nbr = nbr_table_head(ds6_neighbors);
|
||||
nbr != NULL;
|
||||
nbr = nbr_table_next(ds6_neighbors, nbr)) {
|
||||
ipaddr_add(&nbr->ipaddr);
|
||||
PRINTF_P(PSTR("\n\r"));
|
||||
j=0;
|
||||
}
|
||||
if (j) PRINTF_P(PSTR(" <none>"));
|
||||
PRINTF_P(PSTR("\n\rRoutes [%u max]\n\r"),UIP_DS6_ROUTE_NB);
|
||||
uip_ds6_route_t *route;
|
||||
for(route = uip_ds6_route_list_head(),j=1; route != NULL; route = list_item_next(route)) {
|
||||
for(route = uip_ds6_route_head();
|
||||
route != NULL;
|
||||
route = uip_ds6_route_next(r)) {
|
||||
ipaddr_add(&route->ipaddr);
|
||||
PRINTF_P(PSTR("/%u (via "), route->length);
|
||||
ipaddr_add(&route->nexthop);
|
||||
ipaddr_add(uip_ds6_route_nexthop(route));
|
||||
if(route->state.lifetime < 600) {
|
||||
PRINTF_P(PSTR(") %lus\n\r"), route->state.lifetime);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue