Add route_discovery_explicit_open()

For route discovery connections, 2 logical channels are used:
One channel for netflood messages, and one for unicast.
When opening a route discovery connection using
route_discovery_open(), only the netflood channel number is
specified, and the unicast channel number is hard-coded to be the
next channel (+1).
This commit adds an alternative function for opening
route-discovery connections, allowing the user to specify both
channels independently, to gain improved control and readability.
This commit is contained in:
Amit Geron 2015-11-30 00:18:16 +02:00
parent f0c3d29e8a
commit 1b8c889e41
2 changed files with 17 additions and 3 deletions

View file

@ -83,6 +83,10 @@ struct route_discovery_conn {
void route_discovery_open(struct route_discovery_conn *c, clock_time_t time,
uint16_t channels,
const struct route_discovery_callbacks *callbacks);
void route_discovery_explicit_open(struct route_discovery_conn *c, clock_time_t time,
uint16_t netflood_channel,
uint16_t unicast_channel,
const struct route_discovery_callbacks *callbacks);
int route_discovery_discover(struct route_discovery_conn *c, const linkaddr_t *dest,
clock_time_t timeout);