Added missing forwarding function
This commit is contained in:
parent
bfd5db667a
commit
36b7c7e782
@ -33,7 +33,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: mesh.c,v 1.8 2007/05/15 08:09:21 adamdunkels Exp $
|
||||
* $Id: mesh.c,v 1.9 2007/12/05 13:26:13 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -78,6 +78,16 @@ data_packet_received(struct mh_conn *mh, rimeaddr_t *from)
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static rimeaddr_t *
|
||||
data_packet_forward(struct mh_conn *mh, rimeaddr_t *originator,
|
||||
rimeaddr_t *dest, rimeaddr_t *prevhop, u8_t hops)
|
||||
{
|
||||
struct mesh_conn *c = (struct mesh_conn *)
|
||||
((char *)mh - offsetof(struct mesh_conn, mh));
|
||||
|
||||
return route_lookup(dest);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
found_route(struct route_discovery_conn *rdc, rimeaddr_t *dest)
|
||||
{
|
||||
@ -109,7 +119,8 @@ route_timed_out(struct route_discovery_conn *rdc)
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static const struct mh_callbacks data_callbacks = { data_packet_received, NULL };
|
||||
static const struct mh_callbacks data_callbacks = { data_packet_received,
|
||||
data_packet_forward };
|
||||
static const struct route_discovery_callbacks route_discovery_callbacks =
|
||||
{ found_route, route_timed_out };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user