58 #ifndef __ROUTE_DISCOVERY_H__
59 #define __ROUTE_DISCOVERY_H__
65 struct route_discovery_conn;
67 struct route_discovery_callbacks {
68 void (* new_route)(
struct route_discovery_conn *c,
const rimeaddr_t *to);
69 void (* timedout)(
struct route_discovery_conn *c);
72 #define ROUTE_DISCOVERY_ENTRIES 8
74 struct route_discovery_conn {
75 struct netflood_conn rreqconn;
76 struct unicast_conn rrepconn;
78 rimeaddr_t last_rreq_originator;
79 uint16_t last_rreq_id;
81 const struct route_discovery_callbacks *cb;
84 void route_discovery_open(
struct route_discovery_conn *c, clock_time_t time,
86 const struct route_discovery_callbacks *callbacks);
87 int route_discovery_discover(
struct route_discovery_conn *c,
const rimeaddr_t *dest,
88 clock_time_t timeout);
90 void route_discovery_close(
struct route_discovery_conn *c);