#include "contiki.h"
#include <stddef.h>
#include <string.h>
#include "lib/memb.h"
#include "lib/list.h"
#include "net/nbr-table.h"
Data Structures | |
struct | nbr_table_key |
Macros | |
#define | MAX_NUM_TABLES 8 |
Typedefs | |
typedef struct nbr_table_key | nbr_table_key_t |
Variables | |
static struct nbr_table * | all_tables [MAX_NUM_TABLES] |
static uint8_t | locked_map [NBR_TABLE_MAX_NEIGHBORS] |
static unsigned | num_tables |
static uint8_t | used_map [NBR_TABLE_MAX_NEIGHBORS] |
#define MAX_NUM_TABLES 8 |
Referenced by nbr_table_allocate(), and nbr_table_register().
typedef struct nbr_table_key nbr_table_key_t |
|
static |
References nbr_table::data, nbr_table::item_size, and NULL.
Referenced by key_from_item(), nbr_get_bit(), and nbr_set_bit().
|
static |
References NULL.
Referenced by index_from_lladdr(), item_from_key(), nbr_table_add_lladdr(), and nbr_table_allocate().
|
static |
References index_from_key(), key, linkaddr_cmp(), linkaddr_null, list_head(), list_item_next(), nbr_table_key::lladdr, and NULL.
Referenced by nbr_table_add_lladdr(), and nbr_table_get_from_lladdr().
|
static |
References nbr_table::data, nbr_table::item_size, and NULL.
Referenced by item_from_key(), nbr_table_add_lladdr(), and nbr_table_get_from_lladdr().
|
static |
References index_from_key(), and item_from_index().
Referenced by nbr_table_allocate(), nbr_table_head(), and nbr_table_next().
|
static |
References nbr_table::index, and NULL.
Referenced by key_from_item().
|
static |
References index_from_item(), and key_from_index().
Referenced by nbr_table_get_lladdr(), and nbr_table_next().
LIST | ( | nbr_table_keys | ) |
MEMB | ( | neighbor_addr_mem | , |
nbr_table_key_t | , | ||
NBR_TABLE_MAX_NEIGHBORS | |||
) |
|
static |
References nbr_table::index, index_from_item(), and NULL.
Referenced by nbr_table_allocate(), nbr_table_get_from_lladdr(), nbr_table_head(), and nbr_table_next().
|
static |
References nbr_table::index, index_from_item(), and NULL.
Referenced by nbr_table_add_lladdr(), nbr_table_lock(), nbr_table_remove(), and nbr_table_unlock().
nbr_table_item_t* nbr_table_add_lladdr | ( | nbr_table_t * | table, |
const linkaddr_t * | lladdr | ||
) |
References nbr_table::index, index_from_key(), index_from_lladdr(), item_from_index(), nbr_table::item_size, key, linkaddr_copy(), linkaddr_null, list_add(), nbr_table_key::lladdr, nbr_set_bit(), nbr_table_allocate(), NULL, and used_map.
Referenced by phase_update(), rpl_add_parent(), uip_ds6_nbr_add(), and uip_ds6_route_add().
|
static |
References nbr_table::callback, callback, i, index_from_key(), item_from_key(), key, list_head(), list_item_next(), list_remove(), locked_map, MAX_NUM_TABLES, memb_alloc(), nbr_get_bit(), NULL, and used_map.
Referenced by nbr_table_add_lladdr().
void* nbr_table_get_from_lladdr | ( | nbr_table_t * | table, |
const linkaddr_t * | lladdr | ||
) |
linkaddr_t* nbr_table_get_lladdr | ( | nbr_table_t * | table, |
const void * | item | ||
) |
References key, key_from_item(), nbr_table_key::lladdr, and NULL.
Referenced by rpl_get_parent_ipaddr(), uip_ds6_nbr_get_ll(), and uip_ds6_route_nexthop_lladdr().
nbr_table_item_t* nbr_table_head | ( | nbr_table_t * | table | ) |
References item_from_key(), list_head(), nbr_get_bit(), nbr_table_next(), and used_map.
Referenced by best_parent(), make_neighbor_roomfor(), nullify_parents(), remove_parents(), rpl_recalculate_ranks(), uip_ds6_get_least_lifetime_neighbor(), uip_ds6_nbr_lookup(), uip_ds6_nbr_num(), and uip_ds6_neighbor_periodic().
int nbr_table_lock | ( | nbr_table_t * | table, |
void * | item | ||
) |
References locked_map, and nbr_set_bit().
Referenced by rpl_lock_parent(), and rpl_set_preferred_parent().
nbr_table_item_t* nbr_table_next | ( | nbr_table_t * | table, |
nbr_table_item_t * | item | ||
) |
References item_from_key(), key, key_from_item(), list_item_next(), nbr_get_bit(), and used_map.
Referenced by best_parent(), make_neighbor_roomfor(), nbr_table_head(), nullify_parents(), remove_parents(), rpl_recalculate_ranks(), uip_ds6_get_least_lifetime_neighbor(), uip_ds6_nbr_lookup(), uip_ds6_nbr_num(), and uip_ds6_neighbor_periodic().
int nbr_table_register | ( | nbr_table_t * | table, |
nbr_table_callback * | callback | ||
) |
References nbr_table::callback, callback, nbr_table::index, MAX_NUM_TABLES, and num_tables.
Referenced by phase_init(), rpl_dag_init(), uip_ds6_neighbors_init(), and uip_ds6_route_init().
int nbr_table_remove | ( | nbr_table_t * | table, |
void * | item | ||
) |
References locked_map, nbr_set_bit(), ret, and used_map.
Referenced by phase_update(), rm_routelist(), rpl_remove_parent(), uip_ds6_nbr_rm(), and uip_ds6_route_rm().
int nbr_table_unlock | ( | nbr_table_t * | table, |
void * | item | ||
) |
References locked_map, and nbr_set_bit().
Referenced by rpl_set_preferred_parent().
|
static |
|
static |
Referenced by nbr_table_allocate(), nbr_table_lock(), nbr_table_remove(), and nbr_table_unlock().
|
static |
Referenced by nbr_table_register().
|
static |