Fix naming issues and includes in uip-ds6-nbr.h
This commit is contained in:
parent
5dc05e7913
commit
248301a041
48 changed files with 151 additions and 148 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <string.h>
|
||||
#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; i<MAX_NUM_TABLES; i++) {
|
||||
if(all_tables[i] != NULL && all_tables[i]->callback != 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.
|
|
@ -32,72 +32,72 @@
|
|||
* Joris Borms <joris.borms@vub.ac.be>
|
||||
*/
|
||||
|
||||
#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_ */
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 *
|
|
@ -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 {
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -255,7 +255,7 @@ PT_THREAD(generate_routes(struct httpd_state *s))
|
|||
|
||||
#if UIP_CONF_IPV6 //allow ip4 builds
|
||||
blen = 0;
|
||||
ADD("<h2>Neighbors [%u max]</h2>",NEIGHBOR_CONF_MAX_NEIGHBORS);
|
||||
ADD("<h2>Neighbors [%u max]</h2>",NBR_TABLE_CONF_MAX_NEIGHBORS);
|
||||
PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf);
|
||||
blen = 0;
|
||||
uip_ds6_nbr_t *nbr;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue