Made rimeaddr_t pointers const where they should be.
This commit is contained in:
parent
8c040be133
commit
56218aba3b
32 changed files with 108 additions and 97 deletions
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: announcement.c,v 1.1 2009/02/05 19:32:01 adamdunkels Exp $
|
* $Id: announcement.c,v 1.2 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -123,7 +123,7 @@ announcement_list(void)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
announcement_heard(rimeaddr_t *from, uint16_t id, uint16_t value)
|
announcement_heard(const rimeaddr_t *from, uint16_t id, uint16_t value)
|
||||||
{
|
{
|
||||||
struct announcement *a;
|
struct announcement *a;
|
||||||
for(a = list_head(announcements); a != NULL; a = a->next) {
|
for(a = list_head(announcements); a != NULL; a = a->next) {
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: announcement.h,v 1.4 2009/05/26 13:58:53 nvt-se Exp $
|
* $Id: announcement.h,v 1.5 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
struct announcement;
|
struct announcement;
|
||||||
|
|
||||||
typedef void (*announcement_callback_t)(struct announcement *a,
|
typedef void (*announcement_callback_t)(struct announcement *a,
|
||||||
rimeaddr_t *from,
|
const rimeaddr_t *from,
|
||||||
uint16_t id, uint16_t val);
|
uint16_t id, uint16_t val);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -211,7 +211,7 @@ struct announcement *announcement_list(void);
|
||||||
* neighbor has been heard.
|
* neighbor has been heard.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void announcement_heard(rimeaddr_t *from, uint16_t id, uint16_t value);
|
void announcement_heard(const rimeaddr_t *from, uint16_t id, uint16_t value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Register a listen callback with the announcement module
|
* \brief Register a listen callback with the announcement module
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: broadcast.h,v 1.3 2009/03/12 21:58:20 adamdunkels Exp $
|
* $Id: broadcast.h,v 1.4 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +80,7 @@ struct broadcast_conn;
|
||||||
*/
|
*/
|
||||||
struct broadcast_callbacks {
|
struct broadcast_callbacks {
|
||||||
/** Called when a packet has been received by the broadcast module. */
|
/** Called when a packet has been received by the broadcast module. */
|
||||||
void (* recv)(struct broadcast_conn *ptr, rimeaddr_t *sender);
|
void (* recv)(struct broadcast_conn *ptr, const rimeaddr_t *sender);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct broadcast_conn {
|
struct broadcast_conn {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: collect.c,v 1.28 2009/05/30 19:54:05 nvt-se Exp $
|
* $Id: collect.c,v 1.29 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -227,7 +227,8 @@ update_rtmetric(struct collect_conn *tc)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
node_packet_received(struct runicast_conn *c, rimeaddr_t *from, uint8_t seqno)
|
node_packet_received(struct runicast_conn *c, const rimeaddr_t *from,
|
||||||
|
uint8_t seqno)
|
||||||
{
|
{
|
||||||
struct collect_conn *tc = (struct collect_conn *)
|
struct collect_conn *tc = (struct collect_conn *)
|
||||||
((char *)c - offsetof(struct collect_conn, runicast_conn));
|
((char *)c - offsetof(struct collect_conn, runicast_conn));
|
||||||
|
@ -295,7 +296,8 @@ node_packet_received(struct runicast_conn *c, rimeaddr_t *from, uint8_t seqno)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
node_packet_sent(struct runicast_conn *c, rimeaddr_t *to, uint8_t transmissions)
|
node_packet_sent(struct runicast_conn *c, const rimeaddr_t *to,
|
||||||
|
uint8_t transmissions)
|
||||||
{
|
{
|
||||||
struct collect_conn *tc = (struct collect_conn *)
|
struct collect_conn *tc = (struct collect_conn *)
|
||||||
((char *)c - offsetof(struct collect_conn, runicast_conn));
|
((char *)c - offsetof(struct collect_conn, runicast_conn));
|
||||||
|
@ -318,7 +320,8 @@ node_packet_sent(struct runicast_conn *c, rimeaddr_t *to, uint8_t transmissions)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
node_packet_timedout(struct runicast_conn *c, rimeaddr_t *to, uint8_t transmissions)
|
node_packet_timedout(struct runicast_conn *c, const rimeaddr_t *to,
|
||||||
|
uint8_t transmissions)
|
||||||
{
|
{
|
||||||
struct collect_conn *tc = (struct collect_conn *)
|
struct collect_conn *tc = (struct collect_conn *)
|
||||||
((char *)c - offsetof(struct collect_conn, runicast_conn));
|
((char *)c - offsetof(struct collect_conn, runicast_conn));
|
||||||
|
@ -339,7 +342,8 @@ node_packet_timedout(struct runicast_conn *c, rimeaddr_t *to, uint8_t transmissi
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#if !COLLECT_ANNOUNCEMENTS
|
#if !COLLECT_ANNOUNCEMENTS
|
||||||
static void
|
static void
|
||||||
adv_received(struct neighbor_discovery_conn *c, rimeaddr_t *from, uint16_t rtmetric)
|
adv_received(struct neighbor_discovery_conn *c, const rimeaddr_t *from,
|
||||||
|
uint16_t rtmetric)
|
||||||
{
|
{
|
||||||
struct collect_conn *tc = (struct collect_conn *)
|
struct collect_conn *tc = (struct collect_conn *)
|
||||||
((char *)c - offsetof(struct collect_conn, neighbor_discovery_conn));
|
((char *)c - offsetof(struct collect_conn, neighbor_discovery_conn));
|
||||||
|
@ -360,7 +364,7 @@ adv_received(struct neighbor_discovery_conn *c, rimeaddr_t *from, uint16_t rtmet
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void
|
static void
|
||||||
received_announcement(struct announcement *a, rimeaddr_t *from,
|
received_announcement(struct announcement *a, const rimeaddr_t *from,
|
||||||
uint16_t id, uint16_t value)
|
uint16_t id, uint16_t value)
|
||||||
{
|
{
|
||||||
struct collect_conn *tc = (struct collect_conn *)
|
struct collect_conn *tc = (struct collect_conn *)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: ipolite.c,v 1.14 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: ipolite.c,v 1.15 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv(struct broadcast_conn *broadcast, rimeaddr_t *from)
|
recv(struct broadcast_conn *broadcast, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct ipolite_conn *c = (struct ipolite_conn *)broadcast;
|
struct ipolite_conn *c = (struct ipolite_conn *)broadcast;
|
||||||
if(c->q != NULL &&
|
if(c->q != NULL &&
|
||||||
|
@ -116,6 +116,7 @@ ipolite_open(struct ipolite_conn *c, uint16_t channel,
|
||||||
{
|
{
|
||||||
broadcast_open(&c->c, channel, &broadcast);
|
broadcast_open(&c->c, channel, &broadcast);
|
||||||
c->cb = cb;
|
c->cb = cb;
|
||||||
|
PRINTF("ipolite open channel %d\n", channel);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: ipolite.h,v 1.8 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: ipolite.h,v 1.9 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -114,7 +114,7 @@ struct ipolite_callbacks {
|
||||||
/**
|
/**
|
||||||
* Called when a packet is received on the connection.
|
* Called when a packet is received on the connection.
|
||||||
*/
|
*/
|
||||||
void (* recv)(struct ipolite_conn *c, rimeaddr_t *from);
|
void (* recv)(struct ipolite_conn *c, const rimeaddr_t *from);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a packet is sent on the connection.
|
* Called when a packet is sent on the connection.
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: mesh.c,v 1.18 2009/09/09 21:10:21 adamdunkels Exp $
|
* $Id: mesh.c,v 1.19 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,7 +99,7 @@ data_packet_forward(struct multihop_conn *multihop,
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
found_route(struct route_discovery_conn *rdc, rimeaddr_t *dest)
|
found_route(struct route_discovery_conn *rdc, const rimeaddr_t *dest)
|
||||||
{
|
{
|
||||||
struct mesh_conn *c = (struct mesh_conn *)
|
struct mesh_conn *c = (struct mesh_conn *)
|
||||||
((char *)rdc - offsetof(struct mesh_conn, route_discovery_conn));
|
((char *)rdc - offsetof(struct mesh_conn, route_discovery_conn));
|
||||||
|
@ -138,6 +138,7 @@ void
|
||||||
mesh_open(struct mesh_conn *c, uint16_t channels,
|
mesh_open(struct mesh_conn *c, uint16_t channels,
|
||||||
const struct mesh_callbacks *callbacks)
|
const struct mesh_callbacks *callbacks)
|
||||||
{
|
{
|
||||||
|
route_init();
|
||||||
multihop_open(&c->multihop, channels, &data_callbacks);
|
multihop_open(&c->multihop, channels, &data_callbacks);
|
||||||
route_discovery_open(&c->route_discovery_conn,
|
route_discovery_open(&c->route_discovery_conn,
|
||||||
CLOCK_SECOND * 2,
|
CLOCK_SECOND * 2,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: multihop.c,v 1.6 2009/05/10 21:10:02 adamdunkels Exp $
|
* $Id: multihop.c,v 1.7 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,7 +66,7 @@ static const struct packetbuf_attrlist attributes[] =
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
data_packet_received(struct unicast_conn *uc, rimeaddr_t *from)
|
data_packet_received(struct unicast_conn *uc, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct multihop_conn *c = (struct multihop_conn *)uc;
|
struct multihop_conn *c = (struct multihop_conn *)uc;
|
||||||
rimeaddr_t *nexthop;
|
rimeaddr_t *nexthop;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: neighbor-discovery.c,v 1.14 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: neighbor-discovery.c,v 1.15 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +103,7 @@ send_adv(void *ptr)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
adv_packet_received(struct broadcast_conn *ibc, rimeaddr_t *from)
|
adv_packet_received(struct broadcast_conn *ibc, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct neighbor_discovery_conn *c = (struct neighbor_discovery_conn *)ibc;
|
struct neighbor_discovery_conn *c = (struct neighbor_discovery_conn *)ibc;
|
||||||
struct adv_msg *msg = packetbuf_dataptr();
|
struct adv_msg *msg = packetbuf_dataptr();
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: neighbor-discovery.h,v 1.8 2009/05/30 19:40:39 nvt-se Exp $
|
* $Id: neighbor-discovery.h,v 1.9 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +67,7 @@ struct neighbor_discovery_conn;
|
||||||
|
|
||||||
struct neighbor_discovery_callbacks {
|
struct neighbor_discovery_callbacks {
|
||||||
void (* recv)(struct neighbor_discovery_conn *c,
|
void (* recv)(struct neighbor_discovery_conn *c,
|
||||||
rimeaddr_t *from, uint16_t val);
|
const rimeaddr_t *from, uint16_t val);
|
||||||
void (* sent)(struct neighbor_discovery_conn *c);
|
void (* sent)(struct neighbor_discovery_conn *c);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: neighbor.c,v 1.20 2009/10/22 13:11:20 zhitao Exp $
|
* $Id: neighbor.c,v 1.21 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,7 +125,7 @@ neighbor_init(void)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
struct neighbor *
|
struct neighbor *
|
||||||
neighbor_find(rimeaddr_t *addr)
|
neighbor_find(const rimeaddr_t *addr)
|
||||||
{
|
{
|
||||||
struct neighbor *n;
|
struct neighbor *n;
|
||||||
for(n = list_head(neighbors_list); n != NULL; n = n->next) {
|
for(n = list_head(neighbors_list); n != NULL; n = n->next) {
|
||||||
|
@ -180,7 +180,7 @@ neighbor_etx(struct neighbor *n)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
neighbor_add(rimeaddr_t *addr, uint8_t nrtmetric, uint8_t netx)
|
neighbor_add(const rimeaddr_t *addr, uint8_t nrtmetric, uint8_t netx)
|
||||||
{
|
{
|
||||||
uint16_t rtmetric;
|
uint16_t rtmetric;
|
||||||
uint16_t etx;
|
uint16_t etx;
|
||||||
|
@ -253,7 +253,7 @@ neighbor_add(rimeaddr_t *addr, uint8_t nrtmetric, uint8_t netx)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
neighbor_remove(rimeaddr_t *addr)
|
neighbor_remove(const rimeaddr_t *addr)
|
||||||
{
|
{
|
||||||
struct neighbor *n;
|
struct neighbor *n;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: neighbor.h,v 1.11 2008/02/24 22:05:27 adamdunkels Exp $
|
* $Id: neighbor.h,v 1.12 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,12 +68,12 @@ struct neighbor {
|
||||||
void neighbor_init(void);
|
void neighbor_init(void);
|
||||||
/*void neighbor_periodic(int max_time);*/
|
/*void neighbor_periodic(int max_time);*/
|
||||||
|
|
||||||
void neighbor_add(rimeaddr_t *addr, uint8_t rtmetric, uint8_t etx);
|
void neighbor_add(const rimeaddr_t *addr, uint8_t rtmetric, uint8_t etx);
|
||||||
void neighbor_update(struct neighbor *n, uint8_t rtmetric);
|
void neighbor_update(struct neighbor *n, uint8_t rtmetric);
|
||||||
void neighbor_update_etx(struct neighbor *n, uint8_t etx);
|
void neighbor_update_etx(struct neighbor *n, uint8_t etx);
|
||||||
void neighbor_timedout_etx(struct neighbor *n, uint8_t etx);
|
void neighbor_timedout_etx(struct neighbor *n, uint8_t etx);
|
||||||
void neighbor_remove(rimeaddr_t *addr);
|
void neighbor_remove(const rimeaddr_t *addr);
|
||||||
struct neighbor *neighbor_find(rimeaddr_t *addr);
|
struct neighbor *neighbor_find(const rimeaddr_t *addr);
|
||||||
struct neighbor *neighbor_best(void);
|
struct neighbor *neighbor_best(void);
|
||||||
void neighbor_set_lifetime(int seconds);
|
void neighbor_set_lifetime(int seconds);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: netflood.c,v 1.3 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: netflood.c,v 1.4 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,7 +73,7 @@ send(struct netflood_conn *c)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_from_ipolite(struct ipolite_conn *ipolite, rimeaddr_t *from)
|
recv_from_ipolite(struct ipolite_conn *ipolite, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct netflood_conn *c = (struct netflood_conn *)ipolite;
|
struct netflood_conn *c = (struct netflood_conn *)ipolite;
|
||||||
struct netflood_hdr *hdr = packetbuf_dataptr();
|
struct netflood_hdr *hdr = packetbuf_dataptr();
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: netflood.h,v 1.4 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: netflood.h,v 1.5 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,8 +88,8 @@ struct netflood_conn;
|
||||||
IPOLITE_ATTRIBUTES
|
IPOLITE_ATTRIBUTES
|
||||||
|
|
||||||
struct netflood_callbacks {
|
struct netflood_callbacks {
|
||||||
int (* recv)(struct netflood_conn *c, rimeaddr_t *from,
|
int (* recv)(struct netflood_conn *c, const rimeaddr_t *from,
|
||||||
rimeaddr_t *originator, uint8_t seqno, uint8_t hops);
|
const rimeaddr_t *originator, uint8_t seqno, uint8_t hops);
|
||||||
void (* sent)(struct netflood_conn *c);
|
void (* sent)(struct netflood_conn *c);
|
||||||
void (* dropped)(struct netflood_conn *c);
|
void (* dropped)(struct netflood_conn *c);
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: polite-announcement.c,v 1.5 2009/05/08 08:52:55 adamdunkels Exp $
|
* $Id: polite-announcement.c,v 1.6 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -115,7 +115,7 @@ send_adv(clock_time_t interval)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
adv_packet_received(struct ipolite_conn *ipolite, rimeaddr_t *from)
|
adv_packet_received(struct ipolite_conn *ipolite, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct announcement_msg *adata = packetbuf_dataptr();
|
struct announcement_msg *adata = packetbuf_dataptr();
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: rmh.c,v 1.9 2009/03/21 20:53:06 nvt-se Exp $
|
* $Id: rmh.c,v 1.10 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +64,7 @@ struct data_hdr {
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
received(struct runicast_conn *uc, rimeaddr_t *from, uint8_t seqno)
|
received(struct runicast_conn *uc, const rimeaddr_t *from, uint8_t seqno)
|
||||||
{
|
{
|
||||||
struct rmh_conn *c = (struct rmh_conn *)uc;
|
struct rmh_conn *c = (struct rmh_conn *)uc;
|
||||||
struct data_hdr *msg = packetbuf_dataptr();
|
struct data_hdr *msg = packetbuf_dataptr();
|
||||||
|
@ -96,13 +96,13 @@ received(struct runicast_conn *uc, rimeaddr_t *from, uint8_t seqno)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
sent(struct runicast_conn *c, rimeaddr_t *to, uint8_t retransmissions)
|
sent(struct runicast_conn *c, const rimeaddr_t *to, uint8_t retransmissions)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
timedout(struct runicast_conn *c, rimeaddr_t *to, uint8_t retransmissions)
|
timedout(struct runicast_conn *c, const rimeaddr_t *to, uint8_t retransmissions)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: rmh.h,v 1.7 2009/03/08 21:43:25 adamdunkels Exp $
|
* $Id: rmh.h,v 1.8 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,9 +80,9 @@ struct rmh_conn;
|
||||||
struct rmh_callbacks {
|
struct rmh_callbacks {
|
||||||
void (* recv)(struct rmh_conn *ptr, rimeaddr_t *sender, uint8_t hops);
|
void (* recv)(struct rmh_conn *ptr, rimeaddr_t *sender, uint8_t hops);
|
||||||
rimeaddr_t *(* forward)(struct rmh_conn *ptr,
|
rimeaddr_t *(* forward)(struct rmh_conn *ptr,
|
||||||
rimeaddr_t *originator,
|
const rimeaddr_t *originator,
|
||||||
rimeaddr_t *dest,
|
const rimeaddr_t *dest,
|
||||||
rimeaddr_t *prevhop,
|
const rimeaddr_t *prevhop,
|
||||||
uint8_t hops);
|
uint8_t hops);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: route-discovery.c,v 1.18 2009/10/08 16:30:26 nvt-se Exp $
|
* $Id: route-discovery.c,v 1.19 2009/11/08 19:40:17 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -102,7 +102,7 @@ send_rreq(struct route_discovery_conn *c, const rimeaddr_t *dest)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
send_rrep(struct route_discovery_conn *c, rimeaddr_t *dest)
|
send_rrep(struct route_discovery_conn *c, const rimeaddr_t *dest)
|
||||||
{
|
{
|
||||||
struct rrep_hdr *rrepmsg;
|
struct rrep_hdr *rrepmsg;
|
||||||
struct route_entry *rt;
|
struct route_entry *rt;
|
||||||
|
@ -132,7 +132,8 @@ send_rrep(struct route_discovery_conn *c, rimeaddr_t *dest)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
insert_route(rimeaddr_t *originator, rimeaddr_t *last_hop, uint8_t hops)
|
insert_route(const rimeaddr_t *originator, const rimeaddr_t *last_hop,
|
||||||
|
uint8_t hops)
|
||||||
{
|
{
|
||||||
PRINTF("%d.%d: Inserting %d.%d into routing table, next hop %d.%d, hop count %d\n",
|
PRINTF("%d.%d: Inserting %d.%d into routing table, next hop %d.%d, hop count %d\n",
|
||||||
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
||||||
|
@ -160,7 +161,7 @@ insert_route(rimeaddr_t *originator, rimeaddr_t *last_hop, uint8_t hops)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
rrep_packet_received(struct unicast_conn *uc, rimeaddr_t *from)
|
rrep_packet_received(struct unicast_conn *uc, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct rrep_hdr *msg = packetbuf_dataptr();
|
struct rrep_hdr *msg = packetbuf_dataptr();
|
||||||
struct route_entry *rt;
|
struct route_entry *rt;
|
||||||
|
@ -205,8 +206,8 @@ rrep_packet_received(struct unicast_conn *uc, rimeaddr_t *from)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static int
|
static int
|
||||||
rreq_packet_received(struct netflood_conn *nf, rimeaddr_t *from,
|
rreq_packet_received(struct netflood_conn *nf, const rimeaddr_t *from,
|
||||||
rimeaddr_t *originator, uint8_t seqno, uint8_t hops)
|
const rimeaddr_t *originator, uint8_t seqno, uint8_t hops)
|
||||||
{
|
{
|
||||||
struct route_msg *msg = packetbuf_dataptr();
|
struct route_msg *msg = packetbuf_dataptr();
|
||||||
struct route_discovery_conn *c = (struct route_discovery_conn *)
|
struct route_discovery_conn *c = (struct route_discovery_conn *)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: route-discovery.h,v 1.9 2009/10/08 16:30:26 nvt-se Exp $
|
* $Id: route-discovery.h,v 1.10 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
struct route_discovery_conn;
|
struct route_discovery_conn;
|
||||||
|
|
||||||
struct route_discovery_callbacks {
|
struct route_discovery_callbacks {
|
||||||
void (* new_route)(struct route_discovery_conn *c, rimeaddr_t *to);
|
void (* new_route)(struct route_discovery_conn *c, const rimeaddr_t *to);
|
||||||
void (* timedout)(struct route_discovery_conn *c);
|
void (* timedout)(struct route_discovery_conn *c);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: rucb.c,v 1.10 2009/04/16 14:32:01 fros4943 Exp $
|
* $Id: rucb.c,v 1.11 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,7 @@ read_data(struct rucb_conn *c)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
acked(struct runicast_conn *ruc, rimeaddr_t *to, uint8_t retransmissions)
|
acked(struct runicast_conn *ruc, const rimeaddr_t *to, uint8_t retransmissions)
|
||||||
{
|
{
|
||||||
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
||||||
PRINTF("%d.%d: rucb acked\n",
|
PRINTF("%d.%d: rucb acked\n",
|
||||||
|
@ -84,7 +84,7 @@ acked(struct runicast_conn *ruc, rimeaddr_t *to, uint8_t retransmissions)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
timedout(struct runicast_conn *ruc, rimeaddr_t *to, uint8_t retransmissions)
|
timedout(struct runicast_conn *ruc, const rimeaddr_t *to, uint8_t retransmissions)
|
||||||
{
|
{
|
||||||
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
||||||
PRINTF("%d.%d: rucb timedout\n",
|
PRINTF("%d.%d: rucb timedout\n",
|
||||||
|
@ -95,7 +95,7 @@ timedout(struct runicast_conn *ruc, rimeaddr_t *to, uint8_t retransmissions)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv(struct runicast_conn *ruc, rimeaddr_t *from, uint8_t seqno)
|
recv(struct runicast_conn *ruc, const rimeaddr_t *from, uint8_t seqno)
|
||||||
{
|
{
|
||||||
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ rucb_close(struct rucb_conn *c)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
rucb_send(struct rucb_conn *c, rimeaddr_t *receiver)
|
rucb_send(struct rucb_conn *c, const rimeaddr_t *receiver)
|
||||||
{
|
{
|
||||||
c->chunk = 0;
|
c->chunk = 0;
|
||||||
read_data(c);
|
read_data(c);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: rucb.h,v 1.3 2008/07/03 21:52:25 adamdunkels Exp $
|
* $Id: rucb.h,v 1.4 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,7 +73,7 @@ void rucb_open(struct rucb_conn *c, uint16_t channel,
|
||||||
const struct rucb_callbacks *u);
|
const struct rucb_callbacks *u);
|
||||||
void rucb_close(struct rucb_conn *c);
|
void rucb_close(struct rucb_conn *c);
|
||||||
|
|
||||||
int rucb_send(struct rucb_conn *c, rimeaddr_t *receiver);
|
int rucb_send(struct rucb_conn *c, const rimeaddr_t *receiver);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __RUCB_H__ */
|
#endif /* __RUCB_H__ */
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: rudolph1.c,v 1.12 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: rudolph1.c,v 1.13 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -232,7 +232,7 @@ dropped_ipolite(struct ipolite_conn *ipolite)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_ipolite(struct ipolite_conn *ipolite, rimeaddr_t *from)
|
recv_ipolite(struct ipolite_conn *ipolite, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct rudolph1_conn *c = (struct rudolph1_conn *)
|
struct rudolph1_conn *c = (struct rudolph1_conn *)
|
||||||
((char *)ipolite - offsetof(struct rudolph1_conn, ipolite));
|
((char *)ipolite - offsetof(struct rudolph1_conn, ipolite));
|
||||||
|
@ -295,7 +295,8 @@ send_next_packet(void *ptr)
|
||||||
c->nacks = 0;
|
c->nacks = 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static const struct ipolite_callbacks ipolite = { recv_ipolite, sent_ipolite, dropped_ipolite };
|
static const struct ipolite_callbacks ipolite = { recv_ipolite, sent_ipolite,
|
||||||
|
dropped_ipolite };
|
||||||
static const struct trickle_callbacks trickle = { recv_trickle };
|
static const struct trickle_callbacks trickle = { recv_trickle };
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: runicast.c,v 1.6 2009/04/06 21:19:34 adamdunkels Exp $
|
* $Id: runicast.c,v 1.7 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +100,7 @@ sent_by_stunicast(struct stunicast_conn *stunicast)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_from_stunicast(struct stunicast_conn *stunicast, rimeaddr_t *from)
|
recv_from_stunicast(struct stunicast_conn *stunicast, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct runicast_conn *c = (struct runicast_conn *)stunicast;
|
struct runicast_conn *c = (struct runicast_conn *)stunicast;
|
||||||
/* struct runicast_hdr *hdr = packetbuf_dataptr();*/
|
/* struct runicast_hdr *hdr = packetbuf_dataptr();*/
|
||||||
|
@ -182,7 +182,8 @@ recv_from_stunicast(struct stunicast_conn *stunicast, rimeaddr_t *from)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static const struct stunicast_callbacks runicast = {recv_from_stunicast, sent_by_stunicast};
|
static const struct stunicast_callbacks runicast = {recv_from_stunicast,
|
||||||
|
sent_by_stunicast};
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
runicast_open(struct runicast_conn *c, uint16_t channel,
|
runicast_open(struct runicast_conn *c, uint16_t channel,
|
||||||
|
@ -209,7 +210,8 @@ runicast_is_transmitting(struct runicast_conn *c)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
runicast_send(struct runicast_conn *c, rimeaddr_t *receiver, uint8_t max_retransmissions)
|
runicast_send(struct runicast_conn *c, const rimeaddr_t *receiver,
|
||||||
|
uint8_t max_retransmissions)
|
||||||
{
|
{
|
||||||
if (runicast_is_transmitting(c)) {
|
if (runicast_is_transmitting(c)) {
|
||||||
PRINTF("%d.%d: runicast: already transmitting\n",
|
PRINTF("%d.%d: runicast: already transmitting\n",
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: runicast.h,v 1.5 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: runicast.h,v 1.6 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,9 +87,9 @@ struct runicast_conn;
|
||||||
{ PACKETBUF_ATTR_PACKET_ID, PACKETBUF_ATTR_BIT * 2 }, \
|
{ PACKETBUF_ATTR_PACKET_ID, PACKETBUF_ATTR_BIT * 2 }, \
|
||||||
STUNICAST_ATTRIBUTES
|
STUNICAST_ATTRIBUTES
|
||||||
struct runicast_callbacks {
|
struct runicast_callbacks {
|
||||||
void (* recv)(struct runicast_conn *c, rimeaddr_t *from, uint8_t seqno);
|
void (* recv)(struct runicast_conn *c, const rimeaddr_t *from, uint8_t seqno);
|
||||||
void (* sent)(struct runicast_conn *c, rimeaddr_t *to, uint8_t retransmissions);
|
void (* sent)(struct runicast_conn *c, const rimeaddr_t *to, uint8_t retransmissions);
|
||||||
void (* timedout)(struct runicast_conn *c, rimeaddr_t *to, uint8_t retransmissions);
|
void (* timedout)(struct runicast_conn *c, const rimeaddr_t *to, uint8_t retransmissions);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct runicast_conn {
|
struct runicast_conn {
|
||||||
|
@ -105,7 +105,8 @@ void runicast_open(struct runicast_conn *c, uint16_t channel,
|
||||||
const struct runicast_callbacks *u);
|
const struct runicast_callbacks *u);
|
||||||
void runicast_close(struct runicast_conn *c);
|
void runicast_close(struct runicast_conn *c);
|
||||||
|
|
||||||
int runicast_send(struct runicast_conn *c, rimeaddr_t *receiver, uint8_t max_retransmissions);
|
int runicast_send(struct runicast_conn *c, const rimeaddr_t *receiver,
|
||||||
|
uint8_t max_retransmissions);
|
||||||
|
|
||||||
uint8_t runicast_is_transmitting(struct runicast_conn *c);
|
uint8_t runicast_is_transmitting(struct runicast_conn *c);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: stbroadcast.c,v 1.2 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: stbroadcast.c,v 1.3 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_from_broadcast(struct broadcast_conn *broadcast, rimeaddr_t *sender)
|
recv_from_broadcast(struct broadcast_conn *broadcast, const rimeaddr_t *sender)
|
||||||
{
|
{
|
||||||
register struct stbroadcast_conn *c = (struct stbroadcast_conn *)broadcast;
|
register struct stbroadcast_conn *c = (struct stbroadcast_conn *)broadcast;
|
||||||
/* DEBUGF(3, "stbroadcast: recv_from_broadcast from %d\n", from_id);*/
|
/* DEBUGF(3, "stbroadcast: recv_from_broadcast from %d\n", from_id);*/
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: stunicast.c,v 1.2 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: stunicast.c,v 1.3 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_from_uc(struct unicast_conn *uc, rimeaddr_t *from)
|
recv_from_uc(struct unicast_conn *uc, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
register struct stunicast_conn *c = (struct stunicast_conn *)uc;
|
register struct stunicast_conn *c = (struct stunicast_conn *)uc;
|
||||||
PRINTF("%d.%d: stunicast: recv_from_uc from %d.%d\n",
|
PRINTF("%d.%d: stunicast: recv_from_uc from %d.%d\n",
|
||||||
|
@ -117,7 +117,7 @@ stunicast_set_timer(struct stunicast_conn *c, clock_time_t t)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
stunicast_send_stubborn(struct stunicast_conn *c, rimeaddr_t *receiver,
|
stunicast_send_stubborn(struct stunicast_conn *c, const rimeaddr_t *receiver,
|
||||||
clock_time_t rxmittime)
|
clock_time_t rxmittime)
|
||||||
{
|
{
|
||||||
if(c->buf != NULL) {
|
if(c->buf != NULL) {
|
||||||
|
@ -143,7 +143,7 @@ stunicast_send_stubborn(struct stunicast_conn *c, rimeaddr_t *receiver,
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
stunicast_send(struct stunicast_conn *c, rimeaddr_t *receiver)
|
stunicast_send(struct stunicast_conn *c, const rimeaddr_t *receiver)
|
||||||
{
|
{
|
||||||
PRINTF("%d.%d: stunicast_send to %d.%d\n",
|
PRINTF("%d.%d: stunicast_send to %d.%d\n",
|
||||||
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: stunicast.h,v 1.3 2009/05/26 13:58:53 nvt-se Exp $
|
* $Id: stunicast.h,v 1.4 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,7 +82,7 @@ struct stunicast_conn;
|
||||||
#define STUNICAST_ATTRIBUTES UNICAST_ATTRIBUTES
|
#define STUNICAST_ATTRIBUTES UNICAST_ATTRIBUTES
|
||||||
|
|
||||||
struct stunicast_callbacks {
|
struct stunicast_callbacks {
|
||||||
void (* recv)(struct stunicast_conn *c, rimeaddr_t *from);
|
void (* recv)(struct stunicast_conn *c, const rimeaddr_t *from);
|
||||||
void (* sent)(struct stunicast_conn *c);
|
void (* sent)(struct stunicast_conn *c);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,11 +98,11 @@ void stunicast_open(struct stunicast_conn *c, uint16_t channel,
|
||||||
const struct stunicast_callbacks *u);
|
const struct stunicast_callbacks *u);
|
||||||
void stunicast_close(struct stunicast_conn *c);
|
void stunicast_close(struct stunicast_conn *c);
|
||||||
|
|
||||||
int stunicast_send_stubborn(struct stunicast_conn *c, rimeaddr_t *receiver,
|
int stunicast_send_stubborn(struct stunicast_conn *c, const rimeaddr_t *receiver,
|
||||||
clock_time_t rxmittime);
|
clock_time_t rxmittime);
|
||||||
void stunicast_cancel(struct stunicast_conn *c);
|
void stunicast_cancel(struct stunicast_conn *c);
|
||||||
|
|
||||||
int stunicast_send(struct stunicast_conn *c, rimeaddr_t *receiver);
|
int stunicast_send(struct stunicast_conn *c, const rimeaddr_t *receiver);
|
||||||
|
|
||||||
void stunicast_set_timer(struct stunicast_conn *c, clock_time_t t);
|
void stunicast_set_timer(struct stunicast_conn *c, clock_time_t t);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: trickle.c,v 1.17 2009/04/06 21:20:35 adamdunkels Exp $
|
* $Id: trickle.c,v 1.18 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,7 +133,7 @@ run_trickle(struct trickle_conn *c)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv(struct broadcast_conn *bc, rimeaddr_t *from)
|
recv(struct broadcast_conn *bc, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct trickle_conn *c = (struct trickle_conn *)bc;
|
struct trickle_conn *c = (struct trickle_conn *)bc;
|
||||||
uint16_t seqno = packetbuf_attr(PACKETBUF_ATTR_EPACKET_ID);
|
uint16_t seqno = packetbuf_attr(PACKETBUF_ATTR_EPACKET_ID);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: unicast.c,v 1.2 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: unicast.c,v 1.3 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +64,7 @@ static const struct packetbuf_attrlist attributes[] =
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_from_broadcast(struct broadcast_conn *broadcast, rimeaddr_t *from)
|
recv_from_broadcast(struct broadcast_conn *broadcast, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct unicast_conn *c = (struct unicast_conn *)broadcast;
|
struct unicast_conn *c = (struct unicast_conn *)broadcast;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: unicast.h,v 1.4 2009/03/12 21:58:21 adamdunkels Exp $
|
* $Id: unicast.h,v 1.5 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,7 +71,7 @@ struct unicast_conn;
|
||||||
BROADCAST_ATTRIBUTES
|
BROADCAST_ATTRIBUTES
|
||||||
|
|
||||||
struct unicast_callbacks {
|
struct unicast_callbacks {
|
||||||
void (* recv)(struct unicast_conn *c, rimeaddr_t *from);
|
void (* recv)(struct unicast_conn *c, const rimeaddr_t *from);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct unicast_conn {
|
struct unicast_conn {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: rimeroute.c,v 1.2 2009/09/29 16:02:28 nvt-se Exp $
|
* $Id: rimeroute.c,v 1.3 2009/11/08 19:40:18 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
|
@ -80,7 +80,7 @@ void uip_log(char *msg);
|
||||||
#define PACKET_TIMEOUT (CLOCK_SECOND * RIMEROUTE_CONF_DISCOVERY_TIMEOUT)
|
#define PACKET_TIMEOUT (CLOCK_SECOND * RIMEROUTE_CONF_DISCOVERY_TIMEOUT)
|
||||||
#endif /* RIMEROUTE_CONF_DISCOVERY_TIMEOUT */
|
#endif /* RIMEROUTE_CONF_DISCOVERY_TIMEOUT */
|
||||||
|
|
||||||
static void found_route(struct route_discovery_conn *, rimeaddr_t *);
|
static void found_route(struct route_discovery_conn *, const rimeaddr_t *);
|
||||||
static void route_timed_out(struct route_discovery_conn *);
|
static void route_timed_out(struct route_discovery_conn *);
|
||||||
|
|
||||||
static int activate(void);
|
static int activate(void);
|
||||||
|
@ -123,7 +123,7 @@ PROCESS_THREAD(rimeroute_process, ev, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
found_route(struct route_discovery_conn *rdc, rimeaddr_t *dest)
|
found_route(struct route_discovery_conn *rdc, const rimeaddr_t *dest)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: uip-over-mesh.c,v 1.14 2009/05/10 21:08:01 adamdunkels Exp $
|
* $Id: uip-over-mesh.c,v 1.15 2009/11/08 19:40:16 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -78,7 +78,7 @@ static uip_ipaddr_t netaddr, netmask;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
recv_data(struct unicast_conn *c, rimeaddr_t *from)
|
recv_data(struct unicast_conn *c, const rimeaddr_t *from)
|
||||||
{
|
{
|
||||||
struct route_entry *e;
|
struct route_entry *e;
|
||||||
rimeaddr_t source;
|
rimeaddr_t source;
|
||||||
|
@ -112,7 +112,7 @@ send_data(rimeaddr_t *next)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
new_route(struct route_discovery_conn *c, rimeaddr_t *to)
|
new_route(struct route_discovery_conn *c, const rimeaddr_t *to)
|
||||||
{
|
{
|
||||||
struct route_entry *rt;
|
struct route_entry *rt;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue