Data Structures | |
struct | nbr_table |
Macros | |
#define | NBR_TABLE(type, name) |
A static neighbor table. More... | |
#define | NBR_TABLE_DECLARE(name) extern nbr_table_t *name |
Declaration of non-static neighbor tables. More... | |
#define | NBR_TABLE_GLOBAL(type, name) |
A non-static neighbor table. More... | |
#define | NBR_TABLE_MAX_NEIGHBORS 8 |
Typedefs | |
typedef void( | nbr_table_callback )(nbr_table_item_t *item) |
typedef void | nbr_table_item_t |
typedef struct nbr_table | nbr_table_t |
Functions | |
Neighbor tables: register and loop through table elements | |
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) |
Neighbor tables: add and get data | |
nbr_table_item_t * | nbr_table_add_lladdr (nbr_table_t *table, const linkaddr_t *lladdr) |
nbr_table_item_t * | nbr_table_get_from_lladdr (nbr_table_t *table, const linkaddr_t *lladdr) |
Neighbor tables: set flags (unused, locked, unlocked) | |
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) |
Neighbor tables: address manipulation | |
linkaddr_t * | nbr_table_get_lladdr (nbr_table_t *table, const nbr_table_item_t *item) |
#define NBR_TABLE | ( | type, | |
name | |||
) |
A static neighbor table.
To be initialized through nbr_table_register(name)
#define NBR_TABLE_DECLARE | ( | name | ) | extern nbr_table_t *name |
Declaration of non-static neighbor tables.
#define NBR_TABLE_GLOBAL | ( | type, | |
name | |||
) |
A non-static neighbor table.
To be initialized through nbr_table_register(name)
#define NBR_TABLE_MAX_NEIGHBORS 8 |
Referenced by uip_ds6_init().
typedef void( nbr_table_callback)(nbr_table_item_t *item) |
typedef void nbr_table_item_t |
typedef struct nbr_table nbr_table_t |
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().
nbr_table_item_t* nbr_table_get_from_lladdr | ( | nbr_table_t * | table, |
const linkaddr_t * | lladdr | ||
) |
linkaddr_t* nbr_table_get_lladdr | ( | nbr_table_t * | table, |
const nbr_table_item_t * | 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, |
nbr_table_item_t * | 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, |
nbr_table_item_t * | 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, |
nbr_table_item_t * | item | ||
) |
References locked_map, and nbr_set_bit().
Referenced by rpl_set_preferred_parent().