diff --git a/apps/webserver-nano/httpd-cgi.c b/apps/webserver-nano/httpd-cgi.c index 55cdafd8b..96b06f393 100644 --- a/apps/webserver-nano/httpd-cgi.c +++ b/apps/webserver-nano/httpd-cgi.c @@ -50,7 +50,7 @@ #include "httpd-fs.h" #include "httpd-fsdata.h" #include "lib/petsciiconv.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" #include "sensors.h" @@ -525,9 +525,9 @@ static const char httpd_cgi_nbrs5[] HTTPD_STRING_ATTR = " NBR_PROBE"; } } #if WEBSERVER_CONF_SHOW_ROOM - numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NEIGHBOR_TABLE_MAX_NEIGHBORS-j); + numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NBR_TABLE_MAX_NEIGHBORS-j); #else - if(NEIGHBOR_TABLE_MAX_NEIGHBORS == j) { + if(NBR_TABLE_MAX_NEIGHBORS == j) { numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf); } #endif diff --git a/apps/webserver/httpd-cgi.c b/apps/webserver/httpd-cgi.c index c11a8770a..909ceb762 100644 --- a/apps/webserver/httpd-cgi.c +++ b/apps/webserver/httpd-cgi.c @@ -289,7 +289,7 @@ uint16_t numprinted; numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrb); } //if (j==0) numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrn); - numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NEIGHBOR_TABLE_MAX_NEIGHBORS-j); + numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NBR_TABLE_MAX_NEIGHBORS-j); return numprinted; } /*---------------------------------------------------------------------------*/ diff --git a/core/contiki-default-conf.h b/core/contiki-default-conf.h index ded2df5ff..37422668a 100644 --- a/core/contiki-default-conf.h +++ b/core/contiki-default-conf.h @@ -174,11 +174,11 @@ #define UIP_CONF_TCP_SPLIT 0 #endif /* UIP_CONF_TCP_SPLIT */ -/* NEIGHBOR_CONF_MAX_NEIGHBORS specifies the maximum number of neighbors +/* NBR_TABLE_CONF_MAX_NEIGHBORS specifies the maximum number of neighbors that each node will be able to handle. */ -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 8 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 8 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ /*---------------------------------------------------------------------------*/ /* 6lowpan configuration options. diff --git a/core/net/Makefile.uip b/core/net/Makefile.uip index 6fb3facbd..bf1bb6b3e 100644 --- a/core/net/Makefile.uip +++ b/core/net/Makefile.uip @@ -1,7 +1,7 @@ NET = \ dhcpc.c \ hc.c \ -neighbor-table.c \ +nbr-table.c \ netstack.c \ packetbuf.c \ packetqueue.c \ @@ -16,7 +16,7 @@ uaodv-rt.c \ uaodv.c \ uip-debug.c \ uip-ds6-route.c \ -uip-ds6-neighbor.c \ +uip-ds6-nbr.c \ uip-ds6.c \ uip-fw-drv.c \ uip-fw.c \ diff --git a/core/net/mac/phase.c b/core/net/mac/phase.c index f7e48bcab..922322dc2 100644 --- a/core/net/mac/phase.c +++ b/core/net/mac/phase.c @@ -42,7 +42,7 @@ #include "sys/clock.h" #include "sys/ctimer.h" #include "net/queuebuf.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" #if PHASE_CONF_DRIFT_CORRECT #define PHASE_DRIFT_CORRECT PHASE_CONF_DRIFT_CORRECT @@ -75,7 +75,7 @@ struct phase_queueitem { #define MAX_NOACKS_TIME CLOCK_SECOND * 30 MEMB(queued_packets_memb, struct phase_queueitem, PHASE_QUEUESIZE); -NEIGHBOR_TABLE(struct phase, nbr_phase); +NBR_TABLE(struct phase, nbr_phase); #define DEBUG 0 #if DEBUG diff --git a/core/net/neighbor-table.c b/core/net/nbr-table.c similarity index 92% rename from core/net/neighbor-table.c rename to core/net/nbr-table.c index 194e996d5..74028d573 100644 --- a/core/net/neighbor-table.c +++ b/core/net/nbr-table.c @@ -38,7 +38,7 @@ #include #include "lib/memb.h" #include "lib/list.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" /* List of link-layer addresses of the neighbors, used as key in the tables */ typedef struct nbr_table_key { @@ -48,9 +48,9 @@ typedef struct nbr_table_key { /* For each neighbor, a map of the tables that use the neighbor. * As we are using uint8_t, we have a maximum of 8 tables in the system */ -static uint8_t used_map[NEIGHBOR_TABLE_MAX_NEIGHBORS]; +static uint8_t used_map[NBR_TABLE_MAX_NEIGHBORS]; /* For each neighbor, a map of the tables that lock the neighbor */ -static uint8_t locked_map[NEIGHBOR_TABLE_MAX_NEIGHBORS]; +static uint8_t locked_map[NBR_TABLE_MAX_NEIGHBORS]; /* The maximum number of tables */ #define MAX_NUM_TABLES 8 /* A list of pointers to tables in use */ @@ -59,7 +59,7 @@ static struct nbr_table *all_tables[MAX_NUM_TABLES]; static unsigned num_tables; /* The neighbor address table */ -MEMB(neighbor_addr_mem, nbr_table_key_t, NEIGHBOR_TABLE_MAX_NEIGHBORS); +MEMB(neighbor_addr_mem, nbr_table_key_t, NBR_TABLE_MAX_NEIGHBORS); LIST(nbr_table_keys); /*---------------------------------------------------------------------------*/ @@ -71,7 +71,7 @@ key_from_index(int index) } /*---------------------------------------------------------------------------*/ /* Get an item from its neighbor index */ -static item_t * +static nbr_table_item_t * item_from_index(nbr_table_t *table, int index) { return table != NULL && index != -1 ? (char *)table->data + index * table->item_size : NULL; @@ -86,13 +86,13 @@ index_from_key(nbr_table_key_t *key) /*---------------------------------------------------------------------------*/ /* Get the neighbor index of an item */ static int -index_from_item(nbr_table_t *table, item_t *item) +index_from_item(nbr_table_t *table, nbr_table_item_t *item) { return table != NULL && item != NULL ? ((int)((char *)item - (char *)table->data)) / table->item_size : -1; } /*---------------------------------------------------------------------------*/ /* Get an item from its key */ -static item_t * +static nbr_table_item_t * item_from_key(nbr_table_t *table, nbr_table_key_t *key) { return item_from_index(table, index_from_key(key)); @@ -100,7 +100,7 @@ item_from_key(nbr_table_t *table, nbr_table_key_t *key) /*---------------------------------------------------------------------------*/ /* Get the key af an item */ static nbr_table_key_t * -key_from_item(nbr_table_t *table, item_t *item) +key_from_item(nbr_table_t *table, nbr_table_item_t *item) { return key_from_index(index_from_item(table, item)); } @@ -127,7 +127,7 @@ index_from_lladdr(const rimeaddr_t *lladdr) /*---------------------------------------------------------------------------*/ /* Get bit from "used" or "locked" bitmap */ static int -nbr_get_bit(uint8_t *bitmap, nbr_table_t *table, item_t *item) +nbr_get_bit(uint8_t *bitmap, nbr_table_t *table, nbr_table_item_t *item) { int item_index = index_from_item(table, item); if(table != NULL && item_index != -1) { @@ -140,7 +140,7 @@ nbr_get_bit(uint8_t *bitmap, nbr_table_t *table, item_t *item) /*---------------------------------------------------------------------------*/ /* Set bit in "used" or "locked" bitmap */ static int -nbr_set_bit(uint8_t *bitmap, nbr_table_t *table, item_t *item, int value) +nbr_set_bit(uint8_t *bitmap, nbr_table_t *table, nbr_table_item_t *item, int value) { int item_index = index_from_item(table, item); if(table != NULL && item_index != -1) { @@ -208,7 +208,7 @@ nbr_table_allocate() for(i = 0; icallback != NULL) { /* Call table callback for each table that uses this item */ - item_t *removed_item = item_from_key(all_tables[i], least_used_key); + nbr_table_item_t *removed_item = item_from_key(all_tables[i], least_used_key); if(nbr_get_bit(used_map, all_tables[i], removed_item) == 1) { all_tables[i]->callback(removed_item); } @@ -227,7 +227,7 @@ nbr_table_allocate() /* Register a new neighbor table. To be used at initialization by modules * using a neighbor table */ int -nbr_table_register(nbr_table_t *table, remove_callback_func *callback) +nbr_table_register(nbr_table_t *table, nbr_table_callback *callback) { if(num_tables < MAX_NUM_TABLES) { table->index = num_tables++; @@ -241,11 +241,11 @@ nbr_table_register(nbr_table_t *table, remove_callback_func *callback) } /*---------------------------------------------------------------------------*/ /* Returns the first item of the current table */ -item_t * +nbr_table_item_t * nbr_table_head(nbr_table_t *table) { /* Get item from first key */ - item_t *item = item_from_key(table, list_head(nbr_table_keys)); + nbr_table_item_t *item = item_from_key(table, list_head(nbr_table_keys)); /* Item is the first neighbor, now check is it is in the current table */ if(nbr_get_bit(used_map, table, item)) { return item; @@ -255,8 +255,8 @@ nbr_table_head(nbr_table_t *table) } /*---------------------------------------------------------------------------*/ /* Iterates over the current table */ -item_t * -nbr_table_next(nbr_table_t *table, item_t *item) +nbr_table_item_t * +nbr_table_next(nbr_table_t *table, nbr_table_item_t *item) { do { void *key = key_from_item(table, item); @@ -268,11 +268,11 @@ nbr_table_next(nbr_table_t *table, item_t *item) } /*---------------------------------------------------------------------------*/ /* Add a neighbor indexed with its link-layer address */ -item_t * +nbr_table_item_t * nbr_table_add_lladdr(nbr_table_t *table, const rimeaddr_t *lladdr) { int index; - item_t *item; + nbr_table_item_t *item; nbr_table_key_t *key; /* Allow lladdr-free insertion, useful e.g. for IPv6 ND. diff --git a/core/net/neighbor-table.h b/core/net/nbr-table.h similarity index 63% rename from core/net/neighbor-table.h rename to core/net/nbr-table.h index f2b2f8034..113db94b6 100644 --- a/core/net/neighbor-table.h +++ b/core/net/nbr-table.h @@ -32,72 +32,72 @@ * Joris Borms */ -#ifndef _NEIGHBOR_TABLE_H_ -#define _NEIGHBOR_TABLE_H_ +#ifndef _NBR_TABLE_H_ +#define _NBR_TABLE_H_ #include "contiki.h" #include "net/rime/rimeaddr.h" #include "net/netstack.h" /* Neighbor table size */ -#ifdef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_TABLE_MAX_NEIGHBORS NEIGHBOR_CONF_MAX_NEIGHBORS -#else /* NEIGHBOR_CONF_MAX_NEIGHBORS */ -#define NEIGHBOR_TABLE_MAX_NEIGHBORS 8 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifdef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_MAX_NEIGHBORS NBR_TABLE_CONF_MAX_NEIGHBORS +#else /* NBR_TABLE_CONF_MAX_NEIGHBORS */ +#define NBR_TABLE_MAX_NEIGHBORS 8 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ /* An item in a neighbor table */ -typedef void item_t; +typedef void nbr_table_item_t; /* Callback function, called when removing an item from a table */ -typedef void(remove_callback_func)(item_t *item); +typedef void(nbr_table_callback)(nbr_table_item_t *item); /* A neighbor table */ typedef struct nbr_table { int index; int item_size; - remove_callback_func *callback; - item_t *data; + nbr_table_callback *callback; + nbr_table_item_t *data; } nbr_table_t; /** \brief A static neighbor table. To be initialized through nbr_table_register(name) */ -#define NEIGHBOR_TABLE(type, name) \ - static type _##name##_mem[NEIGHBOR_TABLE_MAX_NEIGHBORS]; \ - static nbr_table_t name##_struct = { 0, sizeof(type), NULL, (item_t *)_##name##_mem }; \ +#define NBR_TABLE(type, name) \ + static type _##name##_mem[NBR_TABLE_MAX_NEIGHBORS]; \ + static nbr_table_t name##_struct = { 0, sizeof(type), NULL, (nbr_table_item_t *)_##name##_mem }; \ static nbr_table_t *name = &name##_struct \ /** \brief A non-static neighbor table. To be initialized through nbr_table_register(name) */ -#define NEIGHBOR_TABLE_GLOBAL(type, name) \ - static type _##name##_mem[NEIGHBOR_TABLE_MAX_NEIGHBORS]; \ - static nbr_table_t name##_struct = { 0, sizeof(type), NULL, (item_t *)_##name##_mem }; \ +#define NBR_TABLE_GLOBAL(type, name) \ + static type _##name##_mem[NBR_TABLE_MAX_NEIGHBORS]; \ + static nbr_table_t name##_struct = { 0, sizeof(type), NULL, (nbr_table_item_t *)_##name##_mem }; \ nbr_table_t *name = &name##_struct \ /** \brief Declaration of non-static neighbor tables */ -#define NEIGHBOR_TABLE_DECLARE(name) extern nbr_table_t *name +#define NBR_TABLE_DECLARE(name) extern nbr_table_t *name /** \name Neighbor tables: register and loop through table elements */ /** @{ */ -int nbr_table_register(nbr_table_t *table, remove_callback_func *callback); -item_t *nbr_table_head(nbr_table_t *table); -item_t *nbr_table_next(nbr_table_t *table, item_t *item); +int nbr_table_register(nbr_table_t *table, nbr_table_callback *callback); +nbr_table_item_t *nbr_table_head(nbr_table_t *table); +nbr_table_item_t *nbr_table_next(nbr_table_t *table, nbr_table_item_t *item); /** @} */ /** \name Neighbor tables: add and get data */ /** @{ */ -item_t *nbr_table_add_lladdr(nbr_table_t *table, const rimeaddr_t *lladdr); -item_t *nbr_table_get_from_lladdr(nbr_table_t *table, const rimeaddr_t *lladdr); +nbr_table_item_t *nbr_table_add_lladdr(nbr_table_t *table, const rimeaddr_t *lladdr); +nbr_table_item_t *nbr_table_get_from_lladdr(nbr_table_t *table, const rimeaddr_t *lladdr); /** @} */ /** \name Neighbor tables: set flags (unused, locked, unlocked) */ /** @{ */ -int nbr_table_remove(nbr_table_t *table, item_t *item); -int nbr_table_lock(nbr_table_t *table, item_t *item); -int nbr_table_unlock(nbr_table_t *table, item_t *item); +int nbr_table_remove(nbr_table_t *table, nbr_table_item_t *item); +int nbr_table_lock(nbr_table_t *table, nbr_table_item_t *item); +int nbr_table_unlock(nbr_table_t *table, nbr_table_item_t *item); /** @} */ /** \name Neighbor tables: address manipulation */ /** @{ */ -rimeaddr_t *nbr_table_get_lladdr(nbr_table_t *table, item_t *item); +rimeaddr_t *nbr_table_get_lladdr(nbr_table_t *table, nbr_table_item_t *item); /** @} */ -#endif /* _NEIGHBOR_TABLE_H_ */ +#endif /* _NBR_TABLE_H_ */ diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 74f0d3cf0..0150e093a 100644 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -45,7 +45,7 @@ #include "net/rpl/rpl-private.h" #include "net/uip.h" #include "net/uip-nd6.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" #include "lib/list.h" #include "lib/memb.h" #include "sys/ctimer.h" @@ -72,7 +72,7 @@ static rpl_of_t * const objective_functions[] = {&RPL_OF}; /*---------------------------------------------------------------------------*/ /* Per-parent RPL information */ -NEIGHBOR_TABLE(rpl_parent_t, rpl_parents); +NBR_TABLE(rpl_parent_t, rpl_parents); /*---------------------------------------------------------------------------*/ /* Allocate instance table. */ rpl_instance_t instance_table[RPL_MAX_INSTANCES]; @@ -81,7 +81,7 @@ rpl_instance_t *default_instance; void rpl_dag_init() { - nbr_table_register(rpl_parents, (remove_callback_func *)rpl_remove_parent); + nbr_table_register(rpl_parents, (nbr_table_callback *)rpl_remove_parent); } /*---------------------------------------------------------------------------*/ rpl_rank_t diff --git a/core/net/rpl/rpl-mrhof.c b/core/net/rpl/rpl-mrhof.c index 5f7e85f42..c34ea0074 100644 --- a/core/net/rpl/rpl-mrhof.c +++ b/core/net/rpl/rpl-mrhof.c @@ -45,7 +45,7 @@ */ #include "net/rpl/rpl-private.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" #define DEBUG DEBUG_NONE #include "net/uip-debug.h" diff --git a/core/net/uip-ds6-neighbor.c b/core/net/uip-ds6-nbr.c similarity index 98% rename from core/net/uip-ds6-neighbor.c rename to core/net/uip-ds6-nbr.c index 89371baf4..1826285c1 100644 --- a/core/net/uip-ds6-neighbor.c +++ b/core/net/uip-ds6-nbr.c @@ -49,7 +49,7 @@ #include "lib/list.h" #include "net/rime/rimeaddr.h" #include "net/packetbuf.h" -#include "net/uip-ds6-neighbor.h" +#include "net/uip-ds6-nbr.h" #define DEBUG DEBUG_NONE #include "net/uip-debug.h" @@ -68,13 +68,13 @@ void LINK_NEIGHBOR_CALLBACK(const rimeaddr_t *addr, int status, int numtx); #define LINK_NEIGHBOR_CALLBACK(addr, status, numtx) #endif /* UIP_CONF_DS6_LINK_NEIGHBOR_CALLBACK */ -NEIGHBOR_TABLE_GLOBAL(uip_ds6_nbr_t, ds6_neighbors); +NBR_TABLE_GLOBAL(uip_ds6_nbr_t, ds6_neighbors); /*---------------------------------------------------------------------------*/ void uip_ds6_neighbors_init(void) { - nbr_table_register(ds6_neighbors, (remove_callback_func *)uip_ds6_nbr_rm); + nbr_table_register(ds6_neighbors, (nbr_table_callback *)uip_ds6_nbr_rm); } /*---------------------------------------------------------------------------*/ uip_ds6_nbr_t * diff --git a/core/net/uip-ds6-neighbor.h b/core/net/uip-ds6-nbr.h similarity index 90% rename from core/net/uip-ds6-neighbor.h rename to core/net/uip-ds6-nbr.h index 4de23cb03..9371255ff 100644 --- a/core/net/uip-ds6-neighbor.h +++ b/core/net/uip-ds6-nbr.h @@ -46,14 +46,25 @@ #ifndef __UIP_DS6_NEIGHBOR_H__ #define __UIP_DS6_NEIGHBOR_H__ +#include "net/uip.h" +#include "net/nbr-table.h" +#include "sys/stimer.h" #include "net/uip-ds6.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" #if UIP_CONF_IPV6_QUEUE_PKT #include "net/uip-packetqueue.h" #endif /*UIP_CONF_QUEUE_PKT */ -NEIGHBOR_TABLE_DECLARE(ds6_neighbors); +/*--------------------------------------------------*/ +/** \brief Possible states for the nbr cache entries */ +#define NBR_INCOMPLETE 0 +#define NBR_REACHABLE 1 +#define NBR_STALE 2 +#define NBR_DELAY 3 +#define NBR_PROBE 4 + +NBR_TABLE_DECLARE(ds6_neighbors); /** \brief An entry in the nbr cache */ typedef struct uip_ds6_nbr { diff --git a/core/net/uip-ds6-route.c b/core/net/uip-ds6-route.c index e5c6faaa3..3aefa14bf 100644 --- a/core/net/uip-ds6-route.c +++ b/core/net/uip-ds6-route.c @@ -34,7 +34,7 @@ #include "lib/list.h" #include "lib/memb.h" -#include "net/neighbor-table.h" +#include "net/nbr-table.h" #if UIP_CONF_IPV6 @@ -42,7 +42,7 @@ void uip_ds6_route_rm_routelist(list_t nbr_table_get_from_lladdr); -NEIGHBOR_TABLE(uip_ds6_route_t *, nbr_routes); +NBR_TABLE(uip_ds6_route_t *, nbr_routes); MEMB(routememb, uip_ds6_route_t, UIP_DS6_ROUTE_NB); LIST(defaultrouterlist); @@ -100,7 +100,7 @@ void uip_ds6_route_init(void) { memb_init(&routememb); - nbr_table_register(nbr_routes, (remove_callback_func *)uip_ds6_route_rm_routelist); + nbr_table_register(nbr_routes, (nbr_table_callback *)uip_ds6_route_rm_routelist); memb_init(&defaultroutermemb); list_init(defaultrouterlist); diff --git a/core/net/uip-ds6.c b/core/net/uip-ds6.c index 41e97bfd6..6e4b86f71 100644 --- a/core/net/uip-ds6.c +++ b/core/net/uip-ds6.c @@ -96,7 +96,7 @@ uip_ds6_init(void) PRINTF("Init of IPv6 data structures\n"); PRINTF("%u neighbors\n%u default routers\n%u prefixes\n%u routes\n%u unicast addresses\n%u multicast addresses\n%u anycast addresses\n", - NEIGHBOR_TABLE_MAX_NEIGHBORS, UIP_DS6_DEFRT_NB, UIP_DS6_PREFIX_NB, UIP_DS6_ROUTE_NB, + NBR_TABLE_MAX_NEIGHBORS, UIP_DS6_DEFRT_NB, UIP_DS6_PREFIX_NB, UIP_DS6_ROUTE_NB, UIP_DS6_ADDR_NB, UIP_DS6_MADDR_NB, UIP_DS6_AADDR_NB); memset(uip_ds6_prefix_list, 0, sizeof(uip_ds6_prefix_list)); memset(&uip_ds6_if, 0, sizeof(uip_ds6_if)); diff --git a/core/net/uip-ds6.h b/core/net/uip-ds6.h index 1ee6b176f..1d6c2e759 100644 --- a/core/net/uip-ds6.h +++ b/core/net/uip-ds6.h @@ -47,7 +47,7 @@ /* The size of uip_ds6_addr_t depends on UIP_ND6_DEF_MAXDADNS. Include uip-nd6.h to define it. */ #include "net/uip-nd6.h" #include "net/uip-ds6-route.h" -#include "net/uip-ds6-neighbor.h" +#include "net/uip-ds6-nbr.h" /*--------------------------------------------------*/ /** Configuration. For all tables (Neighbor cache, Prefix List, Routing Table, @@ -119,14 +119,6 @@ #define UIP_DS6_LL_NUD UIP_CONF_DS6_LL_NUD #endif -/*--------------------------------------------------*/ -/** \brief Possible states for the nbr cache entries */ -#define NBR_INCOMPLETE 0 -#define NBR_REACHABLE 1 -#define NBR_STALE 2 -#define NBR_DELAY 3 -#define NBR_PROBE 4 - /** \brief Possible states for the an address (RFC 4862) */ #define ADDR_TENTATIVE 0 #define ADDR_PREFERRED 1 diff --git a/examples/er-rest-example/project-conf.h b/examples/er-rest-example/project-conf.h index ff76fde14..8f6ddd062 100644 --- a/examples/er-rest-example/project-conf.h +++ b/examples/er-rest-example/project-conf.h @@ -73,8 +73,8 @@ */ /* Save some memory for the sky platform. */ -#undef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 10 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 10 #undef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 10 diff --git a/examples/ipv6/json-ws/project-conf.h b/examples/ipv6/json-ws/project-conf.h index d67f1bbba..38e5426a7 100644 --- a/examples/ipv6/json-ws/project-conf.h +++ b/examples/ipv6/json-ws/project-conf.h @@ -54,8 +54,8 @@ #undef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 4 -#undef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 7 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 7 #undef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 7 diff --git a/examples/udp-stream/project-conf.h b/examples/udp-stream/project-conf.h index f4357d5ca..d65e2d486 100644 --- a/examples/udp-stream/project-conf.h +++ b/examples/udp-stream/project-conf.h @@ -33,8 +33,8 @@ /* Free some code and RAM space */ #define UIP_CONF_TCP 0 -#undef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 8 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 8 #undef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 8 diff --git a/platform/avr-atmega128rfa1/apps/raven-webserver/httpd-cgi.c b/platform/avr-atmega128rfa1/apps/raven-webserver/httpd-cgi.c index 58c1f9649..5a11a52da 100644 --- a/platform/avr-atmega128rfa1/apps/raven-webserver/httpd-cgi.c +++ b/platform/avr-atmega128rfa1/apps/raven-webserver/httpd-cgi.c @@ -335,7 +335,7 @@ uint16_t numprinted; numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrb); } //if (j==0) numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrn); - numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NEIGHBOR_TABLE_MAX_NEIGHBORS-j); + numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NBR_TABLE_MAX_NEIGHBORS-j); return numprinted; } /*---------------------------------------------------------------------------*/ diff --git a/platform/avr-atmega128rfa1/contiki-conf.h b/platform/avr-atmega128rfa1/contiki-conf.h index 09c3f6679..ad5fc05c7 100644 --- a/platform/avr-atmega128rfa1/contiki-conf.h +++ b/platform/avr-atmega128rfa1/contiki-conf.h @@ -221,7 +221,7 @@ typedef unsigned short uip_stats_t; /* 25 bytes per UDP connection */ #define UIP_CONF_UDP_CONNS 10 /* See uip-ds6.h */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 20 @@ -266,7 +266,7 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_MAX_CONNECTIONS 2 #define UIP_CONF_MAX_LISTENPORTS 4 #define UIP_CONF_UDP_CONNS 5 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 4 @@ -302,7 +302,7 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_MAX_CONNECTIONS 2 #define UIP_CONF_MAX_LISTENPORTS 4 #define UIP_CONF_UDP_CONNS 5 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 4 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 4 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 4 diff --git a/platform/avr-atmega128rfa1/contiki-main.c b/platform/avr-atmega128rfa1/contiki-main.c index cecc176db..2bdf759ff 100644 --- a/platform/avr-atmega128rfa1/contiki-main.c +++ b/platform/avr-atmega128rfa1/contiki-main.c @@ -527,7 +527,7 @@ extern uip_ds6_netif_t uip_ds6_if; PRINTF("\n"); } } - PRINTF("\nNeighbors [%u max]\n",NEIGHBOR_TABLE_MAX_NEIGHBORS); + PRINTF("\nNeighbors [%u max]\n",NBR_TABLE_MAX_NEIGHBORS); for(nbr = nbr_table_head(ds6_neighbors); nbr != NULL; diff --git a/platform/avr-raven/apps/raven-webserver/httpd-cgi.c b/platform/avr-raven/apps/raven-webserver/httpd-cgi.c index d6961f17d..f085991bf 100644 --- a/platform/avr-raven/apps/raven-webserver/httpd-cgi.c +++ b/platform/avr-raven/apps/raven-webserver/httpd-cgi.c @@ -337,7 +337,7 @@ uip_ds6_nbr_t *nbr; numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrb); } //if (j==0) numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrn); - numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NEIGHBOR_TABLE_MAX_NEIGHBORS-j); + numprinted += httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_addrf,NBR_TABLE_MAX_NEIGHBORS-j); return numprinted; } /*---------------------------------------------------------------------------*/ diff --git a/platform/avr-raven/contiki-conf.h b/platform/avr-raven/contiki-conf.h index c1b58c75f..1ec239c18 100644 --- a/platform/avr-raven/contiki-conf.h +++ b/platform/avr-raven/contiki-conf.h @@ -238,7 +238,7 @@ typedef unsigned short uip_stats_t; /* 25 bytes per UDP connection */ #define UIP_CONF_UDP_CONNS 10 /* See uip-ds6.h */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 20 @@ -281,7 +281,7 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_MAX_CONNECTIONS 2 #define UIP_CONF_MAX_LISTENPORTS 2 #define UIP_CONF_UDP_CONNS 4 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 10 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 10 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 2 #define UIP_CONF_MAX_ROUTES 4 @@ -314,7 +314,7 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_MAX_CONNECTIONS 2 #define UIP_CONF_MAX_LISTENPORTS 4 #define UIP_CONF_UDP_CONNS 5 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 4 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 4 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 4 diff --git a/platform/avr-raven/contiki-raven-main.c b/platform/avr-raven/contiki-raven-main.c index 6294c68a2..7f7a4603e 100644 --- a/platform/avr-raven/contiki-raven-main.c +++ b/platform/avr-raven/contiki-raven-main.c @@ -523,7 +523,7 @@ extern uip_ds6_netif_t uip_ds6_if; PRINTF("\n"); } } - PRINTF("\nNeighbors [%u max]\n",NEIGHBOR_TABLE_MAX_NEIGHBORS); + PRINTF("\nNeighbors [%u max]\n",NBR_TABLE_MAX_NEIGHBORS); for(nbr = nbr_table_head(ds6_neighbors); nbr != NULL; nbr = nbr_table_next(ds6_neighbors, nbr)) { diff --git a/platform/avr-ravenusb/cdc_task.c b/platform/avr-ravenusb/cdc_task.c index 47da86baa..8456e9cf1 100644 --- a/platform/avr-ravenusb/cdc_task.c +++ b/platform/avr-ravenusb/cdc_task.c @@ -590,7 +590,7 @@ extern uip_ds6_netif_t uip_ds6_if; PRINTF_P(PSTR("\n\r")); } } - PRINTF_P(PSTR("\n\rNeighbors [%u max]\n\r"),NEIGHBOR_TABLE_MAX_NEIGHBORS); + PRINTF_P(PSTR("\n\rNeighbors [%u max]\n\r"),NBR_TABLE_MAX_NEIGHBORS); for(nbr = nbr_table_head(ds6_neighbors); nbr != NULL; diff --git a/platform/avr-ravenusb/contiki-conf.h b/platform/avr-ravenusb/contiki-conf.h index 26a1aebf4..459fc58e1 100644 --- a/platform/avr-ravenusb/contiki-conf.h +++ b/platform/avr-ravenusb/contiki-conf.h @@ -232,7 +232,7 @@ extern void mac_log_802_15_4_rx(const uint8_t* buffer, size_t total_len); #endif /* UIP_CONF_IPV6 */ /* See uip-ds6.h */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 2 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 2 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 2 @@ -360,8 +360,8 @@ typedef unsigned short uip_stats_t; #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8 #undef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 8 -#undef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 5 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 5 #undef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 5 @@ -409,7 +409,7 @@ typedef unsigned short uip_stats_t; #endif #define RPL_CONF_STATS 0 #define UIP_CONF_BUFFER_SIZE 1300 -//#define NEIGHBOR_CONF_MAX_NEIGHBORS 12 +//#define NBR_TABLE_CONF_MAX_NEIGHBORS 12 //#define UIP_CONF_MAX_ROUTES 12 #ifdef RPL_BORDER_ROUTER @@ -446,8 +446,8 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_TCP 1 #define UIP_CONF_TCP_MSS 48 #define UIP_CONF_RECEIVE_WINDOW 48 -#undef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 5 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 5 #undef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 5 #undef UIP_CONF_MAX_CONNECTIONS diff --git a/platform/avr-ravenusb/contiki-raven-main.c b/platform/avr-ravenusb/contiki-raven-main.c index 929ca56b6..212426498 100644 --- a/platform/avr-ravenusb/contiki-raven-main.c +++ b/platform/avr-ravenusb/contiki-raven-main.c @@ -665,7 +665,7 @@ extern uip_ds6_netif_t uip_ds6_if; PRINTA("\n"); } } - PRINTA("\nNeighbors [%u max]\n",NEIGHBOR_TABLE_MAX_NEIGHBORS); + PRINTA("\nNeighbors [%u max]\n",NBR_TABLE_MAX_NEIGHBORS); for(nbr = nbr_table_head(ds6_neighbors); nbr != NULL; diff --git a/platform/avr-ravenusb/httpd-simple-avr.c b/platform/avr-ravenusb/httpd-simple-avr.c index 7c2ac9b03..3d36076eb 100644 --- a/platform/avr-ravenusb/httpd-simple-avr.c +++ b/platform/avr-ravenusb/httpd-simple-avr.c @@ -255,7 +255,7 @@ PT_THREAD(generate_routes(struct httpd_state *s)) #if UIP_CONF_IPV6 //allow ip4 builds blen = 0; - ADD("

Neighbors [%u max]

",NEIGHBOR_CONF_MAX_NEIGHBORS); + ADD("

Neighbors [%u max]

",NBR_TABLE_CONF_MAX_NEIGHBORS); PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf); blen = 0; uip_ds6_nbr_t *nbr; diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index 51a0faa9f..313fd669f 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -232,8 +232,8 @@ #define UIP_CONF_ND6_REACHABLE_TIME 600000 #define UIP_CONF_ND6_RETRANS_TIMER 10000 -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 4 /* Handle n Neighbors */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 4 /* Handle n Neighbors */ #endif #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 4 /* Handle n Routes */ diff --git a/platform/cc2538dk/contiki-conf.h b/platform/cc2538dk/contiki-conf.h index 779f32904..1d0d6c226 100644 --- a/platform/cc2538dk/contiki-conf.h +++ b/platform/cc2538dk/contiki-conf.h @@ -341,8 +341,8 @@ typedef uint32_t rtimer_clock_t; #define UIP_CONF_ND6_REACHABLE_TIME 600000 #define UIP_CONF_ND6_RETRANS_TIMER 10000 -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 #endif #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 20 diff --git a/platform/cooja/contiki-conf.h b/platform/cooja/contiki-conf.h index 07141aa13..217432c18 100644 --- a/platform/cooja/contiki-conf.h +++ b/platform/cooja/contiki-conf.h @@ -129,9 +129,9 @@ #endif /* UIP_CONF_IPV6_RPL */ /* configure number of neighbors and routes */ -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 300 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 300 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 300 #endif /* UIP_CONF_MAX_ROUTES */ diff --git a/platform/econotag/contiki-conf.h b/platform/econotag/contiki-conf.h index a9d5d00d5..3d3019113 100644 --- a/platform/econotag/contiki-conf.h +++ b/platform/econotag/contiki-conf.h @@ -142,7 +142,7 @@ #define XMAC_CONF_COMPOWER 0 #define CXMAC_CONF_COMPOWER 0 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #endif /* WITH_UIP6 */ @@ -184,7 +184,7 @@ #define UIP_CONF_IPV6_RPL 1 #endif -#define NEIGHBOR_CONF_MAX_NEIGHBORS 30 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 30 #define UIP_CONF_MAX_ROUTES 30 #define UIP_CONF_ND6_SEND_RA 0 diff --git a/platform/exp5438/contiki-conf.h b/platform/exp5438/contiki-conf.h index af0e60624..fc7eb8133 100644 --- a/platform/exp5438/contiki-conf.h +++ b/platform/exp5438/contiki-conf.h @@ -137,9 +137,9 @@ #endif /* UIP_CONF_IPV6_RPL */ /* configure number of neighbors and routes */ -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 30 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 30 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 30 #endif /* UIP_CONF_MAX_ROUTES */ diff --git a/platform/iris/contiki-conf.h b/platform/iris/contiki-conf.h index 267173de1..7adf62a6d 100644 --- a/platform/iris/contiki-conf.h +++ b/platform/iris/contiki-conf.h @@ -79,7 +79,7 @@ #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0 #define CONTIKIMAC_CONF_COMPOWER 1 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #endif /* WITH_UIP6 */ @@ -113,11 +113,11 @@ #define UIP_CONF_IPV6_RPL 1 /* configure number of neighbors and routes */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 5 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 5 #define UIP_CONF_MAX_ROUTES 5 #define RPL_CONF_MAX_PARENTS 4 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 8 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 8 #define UIP_CONF_ND6_SEND_RA 0 #define UIP_CONF_ND6_REACHABLE_TIME 600000 diff --git a/platform/mbxxx/contiki-conf.h b/platform/mbxxx/contiki-conf.h index 3a2513c19..60f4c3b5b 100644 --- a/platform/mbxxx/contiki-conf.h +++ b/platform/mbxxx/contiki-conf.h @@ -108,7 +108,7 @@ #define ENERGEST_CONF_ON 0 #define QUEUEBUF_CONF_NUM 2 #define QUEUEBUF_CONF_REF_NUM 0 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 4 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 4 #define UIP_CONF_DS6_ROUTE_NBU 4 #define RPL_CONF_MAX_PARENTS_PER_DAG 4 #define RPL_CONF_MAX_INSTANCES 1 diff --git a/platform/micaz/contiki-conf.h b/platform/micaz/contiki-conf.h index 19294e518..b4aadf206 100644 --- a/platform/micaz/contiki-conf.h +++ b/platform/micaz/contiki-conf.h @@ -84,7 +84,7 @@ #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0 #define CONTIKIMAC_CONF_COMPOWER 1 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #endif /* WITH_UIP6 */ @@ -118,11 +118,11 @@ #define UIP_CONF_IPV6_RPL 1 /* configure number of neighbors and routes */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 5 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 5 #define UIP_CONF_MAX_ROUTES 5 #define RPL_CONF_MAX_PARENTS 4 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 8 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 8 #define UIP_CONF_ND6_SEND_RA 0 #define UIP_CONF_ND6_REACHABLE_TIME 600000 diff --git a/platform/minimal-net/contiki-conf.h b/platform/minimal-net/contiki-conf.h index fb78993bd..7fc897886 100644 --- a/platform/minimal-net/contiki-conf.h +++ b/platform/minimal-net/contiki-conf.h @@ -161,7 +161,7 @@ typedef unsigned short uip_stats_t; //#define UIP_CONF_NETIF_MAX_ADDRESSES 5 //#define UIP_CONF_ND6_MAX_PREFIXES 3 //#define UIP_CONF_ND6_MAX_DEFROUTERS 2 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 100 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 100 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 5 #define UIP_CONF_MAX_ROUTES 100 diff --git a/platform/native/contiki-conf.h b/platform/native/contiki-conf.h index 763fffe6b..4b425097c 100644 --- a/platform/native/contiki-conf.h +++ b/platform/native/contiki-conf.h @@ -129,9 +129,9 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_ICMP6 1 /* configure number of neighbors and routes */ -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 30 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 30 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 30 #endif /* UIP_CONF_MAX_ROUTES */ diff --git a/platform/redbee-dev/contiki-conf.h b/platform/redbee-dev/contiki-conf.h index a25669a30..dceb1490d 100644 --- a/platform/redbee-dev/contiki-conf.h +++ b/platform/redbee-dev/contiki-conf.h @@ -141,7 +141,7 @@ typedef unsigned long rtimer_clock_t; #define XMAC_CONF_COMPOWER 0 #define CXMAC_CONF_COMPOWER 0 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #endif /* WITH_UIP6 */ @@ -178,7 +178,7 @@ typedef unsigned long rtimer_clock_t; #define UIP_CONF_ROUTER 1 #define UIP_CONF_IPV6_RPL 1 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 30 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 30 #define UIP_CONF_MAX_ROUTES 30 #define UIP_CONF_ND6_SEND_RA 0 diff --git a/platform/redbee-econotag/contiki-conf.h b/platform/redbee-econotag/contiki-conf.h index 08eab1282..5cd8295dc 100644 --- a/platform/redbee-econotag/contiki-conf.h +++ b/platform/redbee-econotag/contiki-conf.h @@ -159,7 +159,7 @@ typedef unsigned long rtimer_clock_t; #define XMAC_CONF_COMPOWER 0 #define CXMAC_CONF_COMPOWER 0 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #endif /* WITH_UIP6 */ @@ -196,7 +196,7 @@ typedef unsigned long rtimer_clock_t; #define UIP_CONF_ROUTER 1 #define UIP_CONF_IPV6_RPL 1 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 30 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 30 #define UIP_CONF_MAX_ROUTES 30 #define UIP_CONF_ND6_SEND_RA 0 diff --git a/platform/redbee-econotag/contiki-mc1322x-main.c b/platform/redbee-econotag/contiki-mc1322x-main.c index 9ad210ef2..611d7f998 100644 --- a/platform/redbee-econotag/contiki-mc1322x-main.c +++ b/platform/redbee-econotag/contiki-mc1322x-main.c @@ -603,7 +603,7 @@ extern uip_ds6_netif_t uip_ds6_if; printf("\n"); } } - printf("\nNeighbors [%u max]\n",NEIGHBOR_TABLE_MAX_NEIGHBORS); + printf("\nNeighbors [%u max]\n",NBR_TABLE_MAX_NEIGHBORS); uip_ds6_nbr_t *nbr; for(nbr = nbr_table_head(ds6_neighbors); nbr != NULL; diff --git a/platform/seedeye/contiki-conf.h b/platform/seedeye/contiki-conf.h index 2bb2db3d7..02d37128f 100644 --- a/platform/seedeye/contiki-conf.h +++ b/platform/seedeye/contiki-conf.h @@ -97,7 +97,7 @@ typedef uint32_t rtimer_clock_t; /* IPv6 configuration options */ #define UIP_CONF_IPV6 1 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 /* number of neighbors */ +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 /* number of neighbors */ #define UIP_CONF_DS6_ROUTE_NBU 20 /* number of routes */ #define UIP_CONF_ND6_SEND_RA 0 #define UIP_CONF_ND6_REACHABLE_TIME 600000 diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index d176284a7..f3a2a468e 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -230,8 +230,8 @@ #define UIP_CONF_ND6_REACHABLE_TIME 600000 #define UIP_CONF_ND6_RETRANS_TIMER 10000 -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 4 /* Handle n Neighbors */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 4 /* Handle n Neighbors */ #endif #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 4 /* Handle n Routes */ diff --git a/platform/sky/contiki-conf.h b/platform/sky/contiki-conf.h index 9c3bd202e..b151f9c51 100644 --- a/platform/sky/contiki-conf.h +++ b/platform/sky/contiki-conf.h @@ -137,9 +137,9 @@ #endif /* UIP_CONF_IPV6_RPL */ /* configure number of neighbors and routes */ -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 20 #endif /* UIP_CONF_MAX_ROUTES */ diff --git a/platform/stk500/contiki-conf.h b/platform/stk500/contiki-conf.h index 46491d44e..6bb4a00a8 100644 --- a/platform/stk500/contiki-conf.h +++ b/platform/stk500/contiki-conf.h @@ -45,7 +45,7 @@ void clock_adjust_ticks(clock_time_t howmany); //#define UIP_CONF_IPV6_RPL 0 /* See uip-ds6.h */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 20 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 20 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 3 #define UIP_CONF_MAX_ROUTES 20 diff --git a/platform/win32/contiki-conf.h b/platform/win32/contiki-conf.h index 66af5f47c..d145d6b00 100644 --- a/platform/win32/contiki-conf.h +++ b/platform/win32/contiki-conf.h @@ -63,7 +63,7 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_TCP_SPLIT 1 #if UIP_CONF_IPV6 #define UIP_CONF_IP_FORWARD 0 -#define NEIGHBOR_CONF_MAX_NEIGHBORS 100 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 100 #define UIP_CONF_DS6_DEFRT_NBU 2 #define UIP_CONF_DS6_PREFIX_NBU 5 #define UIP_CONF_MAX_ROUTES 100 diff --git a/platform/wismote/contiki-conf.h b/platform/wismote/contiki-conf.h index 9678b9d24..f0491ef00 100644 --- a/platform/wismote/contiki-conf.h +++ b/platform/wismote/contiki-conf.h @@ -133,9 +133,9 @@ #endif /* UIP_CONF_IPV6_RPL */ /* configure number of neighbors and routes */ -#ifndef NEIGHBOR_CONF_MAX_NEIGHBORS -#define NEIGHBOR_CONF_MAX_NEIGHBORS 30 -#endif /* NEIGHBOR_CONF_MAX_NEIGHBORS */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 30 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #ifndef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 30 #endif /* UIP_CONF_MAX_ROUTES */ diff --git a/platform/z1/contiki-conf.h b/platform/z1/contiki-conf.h index 44a7f1f71..b5a9d57b2 100644 --- a/platform/z1/contiki-conf.h +++ b/platform/z1/contiki-conf.h @@ -84,7 +84,7 @@ #define XMAC_CONF_COMPOWER 1 #define CXMAC_CONF_COMPOWER 1 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #define QUEUEBUF_CONF_NUM 8 @@ -134,7 +134,7 @@ #define UIP_CONF_IPV6_RPL 1 /* Handle 10 neighbors */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 15 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 15 /* Handle 10 routes */ #define UIP_CONF_MAX_ROUTES 15 diff --git a/platform/z1sp/contiki-conf.h b/platform/z1sp/contiki-conf.h index ca818c212..0e4fa7b06 100644 --- a/platform/z1sp/contiki-conf.h +++ b/platform/z1sp/contiki-conf.h @@ -78,7 +78,7 @@ #define XMAC_CONF_COMPOWER 1 #define CXMAC_CONF_COMPOWER 1 -#define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 +#define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32 #define QUEUEBUF_CONF_NUM 8 @@ -133,7 +133,7 @@ #define UIP_CONF_IPV6_RPL 1 /* Handle 10 neighbors */ -#define NEIGHBOR_CONF_MAX_NEIGHBORS 15 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 15 /* Handle 10 routes */ #define UIP_CONF_MAX_ROUTES 15