60 #ifndef __NEIGHBOR_DISCOVERY_H__
61 #define __NEIGHBOR_DISCOVERY_H__
66 struct neighbor_discovery_conn;
68 struct neighbor_discovery_callbacks {
69 void (* recv)(
struct neighbor_discovery_conn *c,
70 const rimeaddr_t *from, uint16_t val);
71 void (* sent)(
struct neighbor_discovery_conn *c);
74 struct neighbor_discovery_conn {
75 struct broadcast_conn c;
76 const struct neighbor_discovery_callbacks *u;
77 struct ctimer send_timer, interval_timer;
78 clock_time_t initial_interval, min_interval, max_interval;
79 clock_time_t current_interval;
83 void neighbor_discovery_open(
struct neighbor_discovery_conn *c,
88 const struct neighbor_discovery_callbacks *u);
89 void neighbor_discovery_close(
struct neighbor_discovery_conn *c);
90 void neighbor_discovery_set_val(
struct neighbor_discovery_conn *c, uint16_t val);
92 void neighbor_discovery_start(
struct neighbor_discovery_conn *c, uint16_t val);