mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-04 13:06:38 +00:00
Merge pull request #1404 from amitgeron/route_discovery_channels
Add route_discovery_explicit_open()
This commit is contained in:
commit
daa83ee3ef
@ -271,14 +271,24 @@ static const struct unicast_callbacks rrep_callbacks = {rrep_packet_received};
|
||||
static const struct netflood_callbacks rreq_callbacks = {rreq_packet_received, NULL, NULL};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
route_discovery_expicit_open(struct route_discovery_conn *c,
|
||||
clock_time_t time,
|
||||
uint16_t netflood_channel,
|
||||
uint16_t unicast_channel,
|
||||
const struct route_discovery_callbacks *callbacks)
|
||||
{
|
||||
netflood_open(&c->rreqconn, time, netflood_channel, &rreq_callbacks);
|
||||
unicast_open(&c->rrepconn, unicast_channel, &rrep_callbacks);
|
||||
c->cb = callbacks;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
route_discovery_open(struct route_discovery_conn *c,
|
||||
clock_time_t time,
|
||||
uint16_t channels,
|
||||
const struct route_discovery_callbacks *callbacks)
|
||||
{
|
||||
netflood_open(&c->rreqconn, time, channels + 0, &rreq_callbacks);
|
||||
unicast_open(&c->rrepconn, channels + 1, &rrep_callbacks);
|
||||
c->cb = callbacks;
|
||||
route_discovery_expicit_open(c, time, channels + 0, channels + 1, callbacks);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user