diff --git a/core/net/rime/mesh.c b/core/net/rime/mesh.c index 28086a121..be04e2b77 100644 --- a/core/net/rime/mesh.c +++ b/core/net/rime/mesh.c @@ -33,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: mesh.c,v 1.15 2009/03/12 21:58:21 adamdunkels Exp $ + * $Id: mesh.c,v 1.16 2009/03/23 16:22:02 adamdunkels Exp $ */ /** @@ -62,8 +62,9 @@ /*---------------------------------------------------------------------------*/ static void -data_packet_received(struct multihop_conn *multihop, rimeaddr_t *from, - rimeaddr_t *prevhop, uint8_t hops) +data_packet_received(struct multihop_conn *multihop, + const rimeaddr_t *from, + const rimeaddr_t *prevhop, uint8_t hops) { struct mesh_conn *c = (struct mesh_conn *) ((char *)multihop - offsetof(struct mesh_conn, multihop)); @@ -74,8 +75,10 @@ data_packet_received(struct multihop_conn *multihop, rimeaddr_t *from, } /*---------------------------------------------------------------------------*/ static rimeaddr_t * -data_packet_forward(struct multihop_conn *multihop, rimeaddr_t *originator, - rimeaddr_t *dest, rimeaddr_t *prevhop, uint8_t hops) +data_packet_forward(struct multihop_conn *multihop, + const rimeaddr_t *originator, + const rimeaddr_t *dest, + const rimeaddr_t *prevhop, uint8_t hops) { struct route_entry *rt; diff --git a/core/net/rime/mesh.h b/core/net/rime/mesh.h index e9a3ee47e..aac700a60 100644 --- a/core/net/rime/mesh.h +++ b/core/net/rime/mesh.h @@ -49,7 +49,7 @@ * * This file is part of the Contiki operating system. * - * $Id: mesh.h,v 1.13 2009/03/12 21:58:21 adamdunkels Exp $ + * $Id: mesh.h,v 1.14 2009/03/23 16:22:02 adamdunkels Exp $ */ /** @@ -73,7 +73,7 @@ struct mesh_conn; */ struct mesh_callbacks { /** Called when a packet is received. */ - void (* recv)(struct mesh_conn *c, rimeaddr_t *from, uint8_t hops); + void (* recv)(struct mesh_conn *c, const rimeaddr_t *from, uint8_t hops); /** Called when a packet, sent with mesh_send(), is actually transmitted. */ void (* sent)(struct mesh_conn *c); /** Called when a packet, sent with mesh_send(), times out and is dropped. */ diff --git a/core/net/rime/route.c b/core/net/rime/route.c index f90227168..bd4b4b999 100644 --- a/core/net/rime/route.c +++ b/core/net/rime/route.c @@ -33,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: route.c,v 1.12 2008/02/24 22:05:27 adamdunkels Exp $ + * $Id: route.c,v 1.13 2009/03/23 16:22:02 adamdunkels Exp $ */ /** @@ -96,7 +96,7 @@ route_init(void) } /*---------------------------------------------------------------------------*/ int -route_add(rimeaddr_t *dest, rimeaddr_t *nexthop, +route_add(const rimeaddr_t *dest, const rimeaddr_t *nexthop, uint8_t hop_count, uint8_t seqno) { struct route_entry *e; @@ -126,7 +126,7 @@ route_add(rimeaddr_t *dest, rimeaddr_t *nexthop, } /*---------------------------------------------------------------------------*/ struct route_entry * -route_lookup(rimeaddr_t *dest) +route_lookup(const rimeaddr_t *dest) { struct route_entry *e; diff --git a/core/net/rime/route.h b/core/net/rime/route.h index 56c6fbef6..52f02e172 100644 --- a/core/net/rime/route.h +++ b/core/net/rime/route.h @@ -39,7 +39,7 @@ * * This file is part of the Contiki operating system. * - * $Id: route.h,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $ + * $Id: route.h,v 1.9 2009/03/23 16:22:02 adamdunkels Exp $ */ /** @@ -64,9 +64,9 @@ struct route_entry { }; void route_init(void); -int route_add(rimeaddr_t *dest, rimeaddr_t *nexthop, +int route_add(const rimeaddr_t *dest, const rimeaddr_t *nexthop, uint8_t hop_count, uint8_t seqno); -struct route_entry *route_lookup(rimeaddr_t *dest); +struct route_entry *route_lookup(const rimeaddr_t *dest); void route_remove(struct route_entry *e); void route_flush_all(void); void route_set_lifetime(int seconds);