51 #ifndef COLLECT_NEIGHBOR_H_
52 #define COLLECT_NEIGHBOR_H_
58 struct collect_neighbor_list {
60 struct ctimer periodic;
63 struct collect_neighbor {
64 struct collect_neighbor *next;
70 struct timer congested_timer;
73 void collect_neighbor_init(
void);
75 list_t collect_neighbor_list(
struct collect_neighbor_list *neighbor_list);
77 void collect_neighbor_list_new(
struct collect_neighbor_list *neighbor_list);
79 int collect_neighbor_list_add(
struct collect_neighbor_list *neighbor_list,
80 const linkaddr_t *addr, uint16_t rtmetric);
81 void collect_neighbor_list_remove(
struct collect_neighbor_list *neighbor_list,
82 const linkaddr_t *addr);
83 struct collect_neighbor *collect_neighbor_list_find(
struct collect_neighbor_list *neighbor_list,
84 const linkaddr_t *addr);
85 struct collect_neighbor *collect_neighbor_list_best(
struct collect_neighbor_list *neighbor_list);
86 int collect_neighbor_list_num(
struct collect_neighbor_list *neighbor_list);
87 struct collect_neighbor *collect_neighbor_list_get(
struct collect_neighbor_list *neighbor_list,
int num);
88 void collect_neighbor_list_purge(
struct collect_neighbor_list *neighbor_list);
90 void collect_neighbor_update_rtmetric(
struct collect_neighbor *n,
92 void collect_neighbor_tx(
struct collect_neighbor *n, uint16_t num_tx);
93 void collect_neighbor_rx(
struct collect_neighbor *n);
94 void collect_neighbor_tx_fail(
struct collect_neighbor *n, uint16_t num_tx);
95 void collect_neighbor_set_congested(
struct collect_neighbor *n);
96 int collect_neighbor_is_congested(
struct collect_neighbor *n);
98 uint16_t collect_neighbor_link_estimate(
struct collect_neighbor *n);
99 uint16_t collect_neighbor_rtmetric_link_estimate(
struct collect_neighbor *n);
100 uint16_t collect_neighbor_rtmetric(
struct collect_neighbor *n);