52 #ifndef __COLLECT_NEIGHBOR_H__
53 #define __COLLECT_NEIGHBOR_H__
59 struct collect_neighbor_list {
61 struct ctimer periodic;
64 struct collect_neighbor {
65 struct collect_neighbor *
next;
71 struct timer congested_timer;
74 void collect_neighbor_init(
void);
76 list_t collect_neighbor_list(
struct collect_neighbor_list *neighbor_list);
78 void collect_neighbor_list_new(
struct collect_neighbor_list *neighbor_list);
80 int collect_neighbor_list_add(
struct collect_neighbor_list *neighbor_list,
81 const rimeaddr_t *addr, uint16_t rtmetric);
82 void collect_neighbor_list_remove(
struct collect_neighbor_list *neighbor_list,
83 const rimeaddr_t *addr);
84 struct collect_neighbor *collect_neighbor_list_find(
struct collect_neighbor_list *neighbor_list,
85 const rimeaddr_t *addr);
86 struct collect_neighbor *collect_neighbor_list_best(
struct collect_neighbor_list *neighbor_list);
87 int collect_neighbor_list_num(
struct collect_neighbor_list *neighbor_list);
88 struct collect_neighbor *collect_neighbor_list_get(
struct collect_neighbor_list *neighbor_list,
int num);
89 void collect_neighbor_list_purge(
struct collect_neighbor_list *neighbor_list);
91 void collect_neighbor_update_rtmetric(
struct collect_neighbor *n,
93 void collect_neighbor_tx(
struct collect_neighbor *n, uint16_t num_tx);
94 void collect_neighbor_rx(
struct collect_neighbor *n);
95 void collect_neighbor_tx_fail(
struct collect_neighbor *n, uint16_t num_tx);
96 void collect_neighbor_set_congested(
struct collect_neighbor *n);
97 int collect_neighbor_is_congested(
struct collect_neighbor *n);
99 uint16_t collect_neighbor_link_estimate(
struct collect_neighbor *n);
100 uint16_t collect_neighbor_rtmetric_link_estimate(
struct collect_neighbor *n);
101 uint16_t collect_neighbor_rtmetric(
struct collect_neighbor *n);