Changed all occurences of u8_t and u16_t to uint8_t and uint16_t
This commit is contained in:
parent
17f13e38e8
commit
d99ca27820
|
@ -36,7 +36,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: abc.c,v 1.16 2008/01/23 16:10:10 adamdunkels Exp $
|
||||
* $Id: abc.c,v 1.17 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@
|
|||
#include "net/rime.h"
|
||||
|
||||
struct abc_hdr {
|
||||
u16_t channel;
|
||||
uint16_t channel;
|
||||
};
|
||||
|
||||
LIST(channels);
|
||||
|
@ -65,7 +65,7 @@ LIST(channels);
|
|||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
abc_open(struct abc_conn *c, u16_t channel,
|
||||
abc_open(struct abc_conn *c, uint16_t channel,
|
||||
const struct abc_callbacks *callbacks)
|
||||
{
|
||||
c->channel = channel;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: abc.h,v 1.12 2007/05/15 08:09:21 adamdunkels Exp $
|
||||
* $Id: abc.h,v 1.13 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
|
@ -80,7 +80,7 @@ struct abc_conn {
|
|||
struct chameleon_channel channel;
|
||||
#else /* CHAMELEON */
|
||||
struct abc_conn *next;
|
||||
u16_t channel;
|
||||
uint16_t channel;
|
||||
#endif /* CHAMELEON */
|
||||
const struct abc_callbacks *u;
|
||||
};
|
||||
|
@ -101,7 +101,7 @@ struct abc_conn {
|
|||
* when a packet arrives on the channel.
|
||||
*
|
||||
*/
|
||||
void abc_open(struct abc_conn *c, u16_t channel,
|
||||
void abc_open(struct abc_conn *c, uint16_t channel,
|
||||
const struct abc_callbacks *u);
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: collect.c,v 1.7 2008/02/24 21:08:37 adamdunkels Exp $
|
||||
* $Id: collect.c,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -65,10 +65,10 @@
|
|||
|
||||
struct hdr {
|
||||
rimeaddr_t originator;
|
||||
u8_t originator_seqno;
|
||||
u8_t hops;
|
||||
u8_t hoplim;
|
||||
u8_t rexmits;
|
||||
uint8_t originator_seqno;
|
||||
uint8_t hops;
|
||||
uint8_t hoplim;
|
||||
uint8_t rexmits;
|
||||
};
|
||||
|
||||
#define NUM_RECENT_PACKETS 4
|
||||
|
@ -146,7 +146,7 @@ update_rtmetric(struct collect_conn *tc)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
node_packet_received(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno)
|
||||
node_packet_received(struct ruc_conn *c, rimeaddr_t *from, uint8_t seqno)
|
||||
{
|
||||
struct collect_conn *tc = (struct collect_conn *)
|
||||
((char *)c - offsetof(struct collect_conn, ruc_conn));
|
||||
|
@ -220,7 +220,7 @@ node_packet_received(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
node_packet_sent(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions)
|
||||
node_packet_sent(struct ruc_conn *c, rimeaddr_t *to, uint8_t retransmissions)
|
||||
{
|
||||
struct collect_conn *tc = (struct collect_conn *)
|
||||
((char *)c - offsetof(struct collect_conn, ruc_conn));
|
||||
|
@ -231,7 +231,7 @@ node_packet_sent(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
node_packet_timedout(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions)
|
||||
node_packet_timedout(struct ruc_conn *c, rimeaddr_t *to, uint8_t retransmissions)
|
||||
{
|
||||
struct collect_conn *tc = (struct collect_conn *)
|
||||
((char *)c - offsetof(struct collect_conn, ruc_conn));
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: collect.h,v 1.3 2008/01/08 07:55:00 adamdunkels Exp $
|
||||
* $Id: collect.h,v 1.4 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -65,8 +65,8 @@
|
|||
#include "net/rime/neighbor-discovery.h"
|
||||
|
||||
struct collect_callbacks {
|
||||
void (* recv)(rimeaddr_t *originator, u8_t seqno,
|
||||
u8_t hops);
|
||||
void (* recv)(rimeaddr_t *originator, uint8_t seqno,
|
||||
uint8_t hops);
|
||||
};
|
||||
|
||||
struct collect_conn {
|
||||
|
@ -74,9 +74,9 @@ struct collect_conn {
|
|||
struct ruc_conn ruc_conn;
|
||||
const struct collect_callbacks *cb;
|
||||
struct ctimer t;
|
||||
u16_t rtmetric;
|
||||
u8_t forwarding;
|
||||
u8_t seqno;
|
||||
uint16_t rtmetric;
|
||||
uint8_t forwarding;
|
||||
uint8_t seqno;
|
||||
};
|
||||
|
||||
void collect_open(struct collect_conn *c, uint16_t channels,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ibc.c,v 1.12 2008/01/23 16:10:10 adamdunkels Exp $
|
||||
* $Id: ibc.c,v 1.13 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -78,7 +78,7 @@ recv_from_abc(struct abc_conn *bc)
|
|||
static const struct abc_callbacks ibc = {recv_from_abc};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
ibc_open(struct ibc_conn *c, u16_t channel,
|
||||
ibc_open(struct ibc_conn *c, uint16_t channel,
|
||||
const struct ibc_callbacks *u)
|
||||
{
|
||||
abc_open(&c->c, channel, &ibc);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ibc.h,v 1.9 2007/11/12 12:34:29 nvt-se Exp $
|
||||
* $Id: ibc.h,v 1.10 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@ struct ibc_conn {
|
|||
* when a packet arrives on the channel.
|
||||
*
|
||||
*/
|
||||
void ibc_open(struct ibc_conn *c, u16_t channel,
|
||||
void ibc_open(struct ibc_conn *c, uint16_t channel,
|
||||
const struct ibc_callbacks *u);
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ipolite.c,v 1.6 2008/01/25 01:06:25 adamdunkels Exp $
|
||||
* $Id: ipolite.c,v 1.7 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -107,7 +107,7 @@ send(void *ptr)
|
|||
static const struct ibc_callbacks ibc = { recv };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
ipolite_open(struct ipolite_conn *c, u16_t channel,
|
||||
ipolite_open(struct ipolite_conn *c, uint16_t channel,
|
||||
const struct ipolite_callbacks *cb)
|
||||
{
|
||||
ibc_open(&c->c, channel, &ibc);
|
||||
|
@ -126,7 +126,7 @@ ipolite_close(struct ipolite_conn *c)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
ipolite_send(struct ipolite_conn *c, clock_time_t interval, u8_t hdrsize)
|
||||
ipolite_send(struct ipolite_conn *c, clock_time_t interval, uint8_t hdrsize)
|
||||
{
|
||||
if(c->q != NULL) {
|
||||
/* If we are already about to send a packet, we cancel the old one. */
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ipolite.h,v 1.2 2007/12/17 09:14:08 adamdunkels Exp $
|
||||
* $Id: ipolite.h,v 1.3 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -76,13 +76,13 @@ struct ipolite_conn {
|
|||
const struct ipolite_callbacks *cb;
|
||||
struct ctimer t;
|
||||
struct queuebuf *q;
|
||||
u8_t hdrsize;
|
||||
uint8_t hdrsize;
|
||||
};
|
||||
|
||||
void ipolite_open(struct ipolite_conn *c, u16_t channel,
|
||||
void ipolite_open(struct ipolite_conn *c, uint16_t channel,
|
||||
const struct ipolite_callbacks *cb);
|
||||
void ipolite_close(struct ipolite_conn *c);
|
||||
int ipolite_send(struct ipolite_conn *c, clock_time_t interval, u8_t hdrsize);
|
||||
int ipolite_send(struct ipolite_conn *c, clock_time_t interval, uint8_t hdrsize);
|
||||
void ipolite_cancel(struct ipolite_conn *c);
|
||||
|
||||
#endif /* __IPOLITE_H__ */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: mesh.c,v 1.12 2008/02/05 20:16:48 adamdunkels Exp $
|
||||
* $Id: mesh.c,v 1.13 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@
|
|||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
data_packet_received(struct mh_conn *mh, rimeaddr_t *from,
|
||||
rimeaddr_t *prevhop, u8_t hops)
|
||||
rimeaddr_t *prevhop, uint8_t hops)
|
||||
{
|
||||
struct mesh_conn *c = (struct mesh_conn *)
|
||||
((char *)mh - offsetof(struct mesh_conn, mh));
|
||||
|
@ -75,7 +75,7 @@ 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)
|
||||
rimeaddr_t *dest, rimeaddr_t *prevhop, uint8_t hops)
|
||||
{
|
||||
struct route_entry *rt;
|
||||
|
||||
|
@ -125,7 +125,7 @@ static const struct route_discovery_callbacks route_discovery_callbacks =
|
|||
{ found_route, route_timed_out };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
mesh_open(struct mesh_conn *c, u16_t channels,
|
||||
mesh_open(struct mesh_conn *c, uint16_t channels,
|
||||
const struct mesh_callbacks *callbacks)
|
||||
{
|
||||
mh_open(&c->mh, channels, &data_callbacks);
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: mesh.h,v 1.10 2008/01/08 07:55:56 adamdunkels Exp $
|
||||
* $Id: mesh.h,v 1.11 2008/02/24 22:05:27 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, u8_t hops);
|
||||
void (* recv)(struct mesh_conn *c, 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. */
|
||||
|
@ -104,7 +104,7 @@ struct mesh_conn {
|
|||
* when a packet arrives on the channel.
|
||||
*
|
||||
*/
|
||||
void mesh_open(struct mesh_conn *c, u16_t channels,
|
||||
void mesh_open(struct mesh_conn *c, uint16_t channels,
|
||||
const struct mesh_callbacks *callbacks);
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: mh.c,v 1.9 2008/02/24 21:09:08 adamdunkels Exp $
|
||||
* $Id: mh.c,v 1.10 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,8 @@
|
|||
struct data_hdr {
|
||||
rimeaddr_t dest;
|
||||
rimeaddr_t originator;
|
||||
u8_t hops;
|
||||
u8_t pad;
|
||||
uint8_t hops;
|
||||
uint8_t pad;
|
||||
};
|
||||
|
||||
#define DEBUG 0
|
||||
|
@ -106,7 +106,7 @@ data_packet_received(struct uc_conn *uc, rimeaddr_t *from)
|
|||
static const struct uc_callbacks data_callbacks = { data_packet_received };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
mh_open(struct mh_conn *c, u16_t channel,
|
||||
mh_open(struct mh_conn *c, uint16_t channel,
|
||||
const struct mh_callbacks *callbacks)
|
||||
{
|
||||
uc_open(&c->c, channel, &data_callbacks);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: mh.h,v 1.5 2008/02/05 20:17:43 adamdunkels Exp $
|
||||
* $Id: mh.h,v 1.6 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -70,12 +70,12 @@ struct mh_callbacks {
|
|||
void (* recv)(struct mh_conn *ptr,
|
||||
rimeaddr_t *sender,
|
||||
rimeaddr_t *prevhop,
|
||||
u8_t hops);
|
||||
uint8_t hops);
|
||||
rimeaddr_t *(* forward)(struct mh_conn *ptr,
|
||||
rimeaddr_t *originator,
|
||||
rimeaddr_t *dest,
|
||||
rimeaddr_t *prevhop,
|
||||
u8_t hops);
|
||||
uint8_t hops);
|
||||
};
|
||||
|
||||
struct mh_conn {
|
||||
|
@ -83,7 +83,7 @@ struct mh_conn {
|
|||
const struct mh_callbacks *cb;
|
||||
};
|
||||
|
||||
void mh_open(struct mh_conn *c, u16_t channel,
|
||||
void mh_open(struct mh_conn *c, uint16_t channel,
|
||||
const struct mh_callbacks *u);
|
||||
void mh_close(struct mh_conn *c);
|
||||
int mh_send(struct mh_conn *c, rimeaddr_t *to);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: neighbor-discovery.c,v 1.3 2008/01/14 09:34:00 adamdunkels Exp $
|
||||
* $Id: neighbor-discovery.c,v 1.4 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@
|
|||
#include <stddef.h>
|
||||
|
||||
struct adv_msg {
|
||||
u16_t val;
|
||||
uint16_t val;
|
||||
};
|
||||
|
||||
#define SINK 0
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: neighbor.c,v 1.14 2008/02/03 20:44:11 adamdunkels Exp $
|
||||
* $Id: neighbor.c,v 1.15 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -133,7 +133,7 @@ neighbor_find(rimeaddr_t *addr)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
neighbor_update(struct neighbor *n, u8_t rtmetric)
|
||||
neighbor_update(struct neighbor *n, uint8_t rtmetric)
|
||||
{
|
||||
if(n != NULL) {
|
||||
n->rtmetric = rtmetric;
|
||||
|
@ -142,7 +142,7 @@ neighbor_update(struct neighbor *n, u8_t rtmetric)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
neighbor_timedout_etx(struct neighbor *n, u8_t etx)
|
||||
neighbor_timedout_etx(struct neighbor *n, uint8_t etx)
|
||||
{
|
||||
if(n != NULL) {
|
||||
n->etxs[n->etxptr] = etx;
|
||||
|
@ -151,7 +151,7 @@ neighbor_timedout_etx(struct neighbor *n, u8_t etx)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
neighbor_update_etx(struct neighbor *n, u8_t etx)
|
||||
neighbor_update_etx(struct neighbor *n, uint8_t etx)
|
||||
{
|
||||
if(n != NULL) {
|
||||
n->etxs[n->etxptr] = etx;
|
||||
|
@ -173,7 +173,7 @@ neighbor_etx(struct neighbor *n)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
neighbor_add(rimeaddr_t *addr, u8_t nrtmetric, u8_t netx)
|
||||
neighbor_add(rimeaddr_t *addr, uint8_t nrtmetric, uint8_t netx)
|
||||
{
|
||||
uint16_t rtmetric;
|
||||
uint16_t etx;
|
||||
|
@ -278,8 +278,8 @@ neighbor_best(void)
|
|||
int found;
|
||||
/* int lowest, best;*/
|
||||
struct neighbor *n, *lowest, *best;
|
||||
u8_t rtmetric;
|
||||
u8_t etx;
|
||||
uint8_t rtmetric;
|
||||
uint8_t etx;
|
||||
|
||||
rtmetric = RTMETRIC_MAX;
|
||||
lowest = best = NULL;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: neighbor.h,v 1.10 2008/02/03 20:44:11 adamdunkels Exp $
|
||||
* $Id: neighbor.h,v 1.11 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -68,10 +68,10 @@ struct neighbor {
|
|||
void neighbor_init(void);
|
||||
/*void neighbor_periodic(int max_time);*/
|
||||
|
||||
void neighbor_add(rimeaddr_t *addr, u8_t rtmetric, u8_t etx);
|
||||
void neighbor_update(struct neighbor *n, u8_t rtmetric);
|
||||
void neighbor_update_etx(struct neighbor *n, u8_t etx);
|
||||
void neighbor_timedout_etx(struct neighbor *n, u8_t etx);
|
||||
void neighbor_add(rimeaddr_t *addr, uint8_t rtmetric, uint8_t etx);
|
||||
void neighbor_update(struct neighbor *n, uint8_t rtmetric);
|
||||
void neighbor_update_etx(struct neighbor *n, uint8_t etx);
|
||||
void neighbor_timedout_etx(struct neighbor *n, uint8_t etx);
|
||||
void neighbor_remove(rimeaddr_t *addr);
|
||||
struct neighbor *neighbor_find(rimeaddr_t *addr);
|
||||
struct neighbor *neighbor_best(void);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: nf.c,v 1.15 2008/01/08 08:26:48 adamdunkels Exp $
|
||||
* $Id: nf.c,v 1.16 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -50,9 +50,9 @@
|
|||
#define HOPS_MAX 16
|
||||
|
||||
struct nf_hdr {
|
||||
u16_t originator_seqno;
|
||||
uint16_t originator_seqno;
|
||||
rimeaddr_t originator;
|
||||
u16_t hops;
|
||||
uint16_t hops;
|
||||
};
|
||||
|
||||
#define DEBUG 0
|
||||
|
@ -77,7 +77,7 @@ recv_from_ipolite(struct ipolite_conn *ipolite, rimeaddr_t *from)
|
|||
{
|
||||
struct nf_conn *c = (struct nf_conn *)ipolite;
|
||||
struct nf_hdr *hdr = rimebuf_dataptr();
|
||||
u8_t hops;
|
||||
uint8_t hops;
|
||||
struct queuebuf *queuebuf;
|
||||
|
||||
hops = hdr->hops;
|
||||
|
@ -144,7 +144,7 @@ static const struct ipolite_callbacks nf = {recv_from_ipolite, sent, dropped};
|
|||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
nf_open(struct nf_conn *c, clock_time_t queue_time,
|
||||
u16_t channel, const struct nf_callbacks *u)
|
||||
uint16_t channel, const struct nf_callbacks *u)
|
||||
{
|
||||
ipolite_open(&c->c, channel, &nf);
|
||||
c->u = u;
|
||||
|
@ -158,7 +158,7 @@ nf_close(struct nf_conn *c)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
nf_send(struct nf_conn *c, u8_t seqno)
|
||||
nf_send(struct nf_conn *c, uint8_t seqno)
|
||||
{
|
||||
if(rimebuf_hdralloc(sizeof(struct nf_hdr))) {
|
||||
struct nf_hdr *hdr = rimebuf_hdrptr();
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: nf.h,v 1.10 2007/05/15 08:09:21 adamdunkels Exp $
|
||||
* $Id: nf.h,v 1.11 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ struct nf_conn;
|
|||
|
||||
struct nf_callbacks {
|
||||
int (* recv)(struct nf_conn *c, rimeaddr_t *from,
|
||||
rimeaddr_t *originator, u8_t seqno, u8_t hops);
|
||||
rimeaddr_t *originator, uint8_t seqno, uint8_t hops);
|
||||
void (* sent)(struct nf_conn *c);
|
||||
void (* dropped)(struct nf_conn *c);
|
||||
};
|
||||
|
@ -77,14 +77,14 @@ struct nf_conn {
|
|||
const struct nf_callbacks *u;
|
||||
clock_time_t queue_time;
|
||||
rimeaddr_t last_originator;
|
||||
u8_t last_originator_seqno;
|
||||
uint8_t last_originator_seqno;
|
||||
};
|
||||
|
||||
void nf_open(struct nf_conn *c, clock_time_t queue_time,
|
||||
u16_t channel, const struct nf_callbacks *u);
|
||||
uint16_t channel, const struct nf_callbacks *u);
|
||||
void nf_close(struct nf_conn *c);
|
||||
|
||||
int nf_send(struct nf_conn *c, u8_t seqno);
|
||||
int nf_send(struct nf_conn *c, uint8_t seqno);
|
||||
|
||||
#endif /* __SIBC_H__ */
|
||||
/** @} */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: polite.c,v 1.3 2007/11/26 23:22:41 adamdunkels Exp $
|
||||
* $Id: polite.c,v 1.4 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -95,7 +95,7 @@ send(void *ptr)
|
|||
static const struct abc_callbacks abc = { recv };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
polite_open(struct polite_conn *c, u16_t channel,
|
||||
polite_open(struct polite_conn *c, uint16_t channel,
|
||||
const struct polite_callbacks *cb)
|
||||
{
|
||||
abc_open(&c->c, channel, &abc);
|
||||
|
@ -114,7 +114,7 @@ polite_close(struct polite_conn *c)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
polite_send(struct polite_conn *c, clock_time_t interval, u8_t hdrsize)
|
||||
polite_send(struct polite_conn *c, clock_time_t interval, uint8_t hdrsize)
|
||||
{
|
||||
if(c->q != NULL) {
|
||||
/* If we are already about to send a packet, we cancel the old one. */
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: polite.h,v 1.2 2007/12/17 09:14:08 adamdunkels Exp $
|
||||
* $Id: polite.h,v 1.3 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -76,13 +76,13 @@ struct polite_conn {
|
|||
const struct polite_callbacks *cb;
|
||||
struct ctimer t;
|
||||
struct queuebuf *q;
|
||||
u8_t hdrsize;
|
||||
uint8_t hdrsize;
|
||||
};
|
||||
|
||||
void polite_open(struct polite_conn *c, u16_t channel,
|
||||
void polite_open(struct polite_conn *c, uint16_t channel,
|
||||
const struct polite_callbacks *cb);
|
||||
void polite_close(struct polite_conn *c);
|
||||
int polite_send(struct polite_conn *c, clock_time_t interval, u8_t hdrsize);
|
||||
int polite_send(struct polite_conn *c, clock_time_t interval, uint8_t hdrsize);
|
||||
void polite_cancel(struct polite_conn *c);
|
||||
|
||||
#endif /* __POLITE_H__ */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: queuebuf.c,v 1.10 2007/11/17 18:05:21 adamdunkels Exp $
|
||||
* $Id: queuebuf.c,v 1.11 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -60,15 +60,15 @@
|
|||
#endif
|
||||
|
||||
struct queuebuf {
|
||||
u16_t len;
|
||||
u8_t data[RIMEBUF_SIZE + RIMEBUF_HDR_SIZE];
|
||||
uint16_t len;
|
||||
uint8_t data[RIMEBUF_SIZE + RIMEBUF_HDR_SIZE];
|
||||
};
|
||||
|
||||
struct queuebuf_ref {
|
||||
u16_t len;
|
||||
u8_t *ref;
|
||||
u8_t hdr[RIMEBUF_HDR_SIZE];
|
||||
u8_t hdrlen;
|
||||
uint16_t len;
|
||||
uint8_t *ref;
|
||||
uint8_t hdr[RIMEBUF_HDR_SIZE];
|
||||
uint8_t hdrlen;
|
||||
};
|
||||
|
||||
MEMB(bufmem, struct queuebuf, QUEUEBUF_NUM);
|
||||
|
@ -84,7 +84,7 @@ MEMB(refbufmem, struct queuebuf_ref, QUEUEBUF_REF_NUM);
|
|||
|
||||
#define QUEUEBUF_STATS 1
|
||||
#if QUEUEBUF_STATS
|
||||
u8_t queuebuf_len, queuebuf_ref_len, queuebuf_max_len;
|
||||
uint8_t queuebuf_len, queuebuf_ref_len, queuebuf_max_len;
|
||||
#endif /* QUEUEBUF_STATS */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rimebuf.c,v 1.10 2007/11/17 18:05:21 adamdunkels Exp $
|
||||
* $Id: rimebuf.c,v 1.11 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -50,11 +50,11 @@
|
|||
#include "net/rime.h"
|
||||
|
||||
|
||||
static u16_t buflen, bufptr;
|
||||
static u8_t hdrptr;
|
||||
static u8_t rimebuf[RIMEBUF_SIZE + RIMEBUF_HDR_SIZE];
|
||||
static uint16_t buflen, bufptr;
|
||||
static uint8_t hdrptr;
|
||||
static uint8_t rimebuf[RIMEBUF_SIZE + RIMEBUF_HDR_SIZE];
|
||||
|
||||
static u8_t *rimebufptr;
|
||||
static uint8_t *rimebufptr;
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
|
@ -75,9 +75,9 @@ rimebuf_clear(void)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
rimebuf_copyfrom(const void *from, u16_t len)
|
||||
rimebuf_copyfrom(const void *from, uint16_t len)
|
||||
{
|
||||
u16_t l;
|
||||
uint16_t l;
|
||||
|
||||
rimebuf_clear();
|
||||
l = len > RIMEBUF_SIZE? RIMEBUF_SIZE: len;
|
||||
|
@ -100,7 +100,7 @@ rimebuf_compact(void)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
rimebuf_copyto_hdr(u8_t *to)
|
||||
rimebuf_copyto_hdr(uint8_t *to)
|
||||
{
|
||||
#if DEBUG_LEVEL > 0
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ rimebuf_copyto(void *to)
|
|||
}
|
||||
#endif /* DEBUG_LEVEL */
|
||||
memcpy(to, rimebuf + hdrptr, RIMEBUF_HDR_SIZE - hdrptr);
|
||||
memcpy((u8_t *)to + RIMEBUF_HDR_SIZE - hdrptr, rimebufptr + bufptr,
|
||||
memcpy((uint8_t *)to + RIMEBUF_HDR_SIZE - hdrptr, rimebufptr + bufptr,
|
||||
buflen);
|
||||
return RIMEBUF_HDR_SIZE - hdrptr + buflen;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ rimebuf_hdrreduce(int size)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rimebuf_set_datalen(u16_t len)
|
||||
rimebuf_set_datalen(uint16_t len)
|
||||
{
|
||||
PRINTF("rimebuf_set_len: len %d\n", len);
|
||||
buflen = len;
|
||||
|
@ -187,7 +187,7 @@ rimebuf_hdrptr(void)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rimebuf_reference(void *ptr, u16_t len)
|
||||
rimebuf_reference(void *ptr, uint16_t len)
|
||||
{
|
||||
rimebuf_clear();
|
||||
rimebufptr = ptr;
|
||||
|
@ -206,19 +206,19 @@ rimebuf_reference_ptr(void)
|
|||
return rimebufptr;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
u16_t
|
||||
uint16_t
|
||||
rimebuf_datalen(void)
|
||||
{
|
||||
return buflen;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
u8_t
|
||||
uint8_t
|
||||
rimebuf_hdrlen(void)
|
||||
{
|
||||
return RIMEBUF_HDR_SIZE - hdrptr;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
u16_t
|
||||
uint16_t
|
||||
rimebuf_totlen(void)
|
||||
{
|
||||
return rimebuf_hdrlen() + rimebuf_datalen();
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rimebuf.h,v 1.11 2007/11/17 18:05:21 adamdunkels Exp $
|
||||
* $Id: rimebuf.h,v 1.12 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -127,7 +127,7 @@ void *rimebuf_hdrptr(void);
|
|||
* rimebuf_hdrptr() function.
|
||||
*
|
||||
*/
|
||||
u8_t rimebuf_hdrlen(void);
|
||||
uint8_t rimebuf_hdrlen(void);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -146,14 +146,14 @@ u8_t rimebuf_hdrlen(void);
|
|||
* length of the packet - both header and data.
|
||||
*
|
||||
*/
|
||||
u16_t rimebuf_datalen(void);
|
||||
uint16_t rimebuf_datalen(void);
|
||||
|
||||
/**
|
||||
* \brief Get the total length of the header and data in the rimebuf
|
||||
* \return Length of data and header in the rimebuf
|
||||
*
|
||||
*/
|
||||
u16_t rimebuf_totlen(void);
|
||||
uint16_t rimebuf_totlen(void);
|
||||
|
||||
/**
|
||||
* \brief Set the length of the data in the rimebuf
|
||||
|
@ -163,7 +163,7 @@ u16_t rimebuf_totlen(void);
|
|||
* parts: header and data. This function is used to set
|
||||
* the length of the data in the rimebuf.
|
||||
*/
|
||||
void rimebuf_set_datalen(u16_t len);
|
||||
void rimebuf_set_datalen(uint16_t len);
|
||||
|
||||
/**
|
||||
* \brief Point the rimebuf to external data
|
||||
|
@ -176,7 +176,7 @@ void rimebuf_set_datalen(u16_t len);
|
|||
* specifies the length of the external data that the
|
||||
* rimebuf references.
|
||||
*/
|
||||
void rimebuf_reference(void *ptr, u16_t len);
|
||||
void rimebuf_reference(void *ptr, uint16_t len);
|
||||
|
||||
/**
|
||||
* \brief Check if the rimebuf references external data
|
||||
|
@ -232,7 +232,7 @@ void rimebuf_compact(void);
|
|||
* copied into the rimbuf is returned.
|
||||
*
|
||||
*/
|
||||
int rimebuf_copyfrom(const void *from, u16_t len);
|
||||
int rimebuf_copyfrom(const void *from, uint16_t len);
|
||||
|
||||
/**
|
||||
* \brief Copy the entire rimebuf to an external buffer
|
||||
|
@ -268,7 +268,7 @@ int rimebuf_copyto(void *to);
|
|||
* copied to the external buffer is returned.
|
||||
*
|
||||
*/
|
||||
int rimebuf_copyto_hdr(u8_t *to);
|
||||
int rimebuf_copyto_hdr(uint8_t *to);
|
||||
|
||||
/**
|
||||
* \brief Extend the header of the rimebuf, for outbound packets
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rmh.c,v 1.5 2008/01/08 07:55:56 adamdunkels Exp $
|
||||
* $Id: rmh.c,v 1.6 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -50,8 +50,8 @@
|
|||
struct data_hdr {
|
||||
rimeaddr_t dest;
|
||||
rimeaddr_t originator;
|
||||
u8_t hops;
|
||||
u8_t max_rexmits;
|
||||
uint8_t hops;
|
||||
uint8_t max_rexmits;
|
||||
};
|
||||
|
||||
#define DEBUG 0
|
||||
|
@ -64,7 +64,7 @@ struct data_hdr {
|
|||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
received(struct ruc_conn *uc, rimeaddr_t *from, u8_t seqno)
|
||||
received(struct ruc_conn *uc, rimeaddr_t *from, uint8_t seqno)
|
||||
{
|
||||
struct rmh_conn *c = (struct rmh_conn *)uc;
|
||||
struct data_hdr *msg = rimebuf_dataptr();
|
||||
|
@ -111,7 +111,7 @@ static const struct ruc_callbacks data_callbacks = { received ,
|
|||
timedout};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rmh_open(struct rmh_conn *c, u16_t channel,
|
||||
rmh_open(struct rmh_conn *c, uint16_t channel,
|
||||
const struct rmh_callbacks *callbacks)
|
||||
{
|
||||
ruc_open(&c->c, channel, &data_callbacks);
|
||||
|
@ -125,7 +125,7 @@ rmh_close(struct rmh_conn *c)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
rmh_send(struct rmh_conn *c, rimeaddr_t *to, u8_t num_rexmit, u8_t max_hops)
|
||||
rmh_send(struct rmh_conn *c, rimeaddr_t *to, uint8_t num_rexmit, uint8_t max_hops)
|
||||
{
|
||||
rimeaddr_t *nexthop;
|
||||
struct data_hdr *hdr;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rmh.h,v 1.3 2008/01/08 07:55:56 adamdunkels Exp $
|
||||
* $Id: rmh.h,v 1.4 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -67,25 +67,25 @@
|
|||
struct rmh_conn;
|
||||
|
||||
struct rmh_callbacks {
|
||||
void (* recv)(struct rmh_conn *ptr, rimeaddr_t *sender, u8_t hops);
|
||||
void (* recv)(struct rmh_conn *ptr, rimeaddr_t *sender, uint8_t hops);
|
||||
rimeaddr_t *(* forward)(struct rmh_conn *ptr,
|
||||
rimeaddr_t *originator,
|
||||
rimeaddr_t *dest,
|
||||
rimeaddr_t *prevhop,
|
||||
u8_t hops);
|
||||
uint8_t hops);
|
||||
};
|
||||
|
||||
struct rmh_conn {
|
||||
struct ruc_conn c;
|
||||
const struct rmh_callbacks *cb;
|
||||
u8_t num_rexmit;
|
||||
uint8_t num_rexmit;
|
||||
};
|
||||
|
||||
void rmh_open(struct rmh_conn *c, u16_t channel,
|
||||
void rmh_open(struct rmh_conn *c, uint16_t channel,
|
||||
const struct rmh_callbacks *u);
|
||||
void rmh_close(struct rmh_conn *c);
|
||||
int rmh_send(struct rmh_conn *c, rimeaddr_t *to, u8_t num_rexmit,
|
||||
u8_t max_hops);
|
||||
int rmh_send(struct rmh_conn *c, rimeaddr_t *to, uint8_t num_rexmit,
|
||||
uint8_t max_hops);
|
||||
|
||||
#endif /* __RMH_H__ */
|
||||
/** @} */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: route-discovery.c,v 1.8 2008/02/03 20:52:41 adamdunkels Exp $
|
||||
* $Id: route-discovery.c,v 1.9 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -52,13 +52,13 @@
|
|||
|
||||
struct route_msg {
|
||||
rimeaddr_t dest;
|
||||
u8_t rreq_id;
|
||||
u8_t pad;
|
||||
uint8_t rreq_id;
|
||||
uint8_t pad;
|
||||
};
|
||||
|
||||
struct rrep_hdr {
|
||||
u8_t rreq_id;
|
||||
u8_t hops;
|
||||
uint8_t rreq_id;
|
||||
uint8_t hops;
|
||||
rimeaddr_t dest;
|
||||
rimeaddr_t originator;
|
||||
};
|
||||
|
@ -117,7 +117,7 @@ send_rrep(struct route_discovery_conn *c, rimeaddr_t *dest)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
insert_route(rimeaddr_t *originator, rimeaddr_t *last_hop, u8_t hops)
|
||||
insert_route(rimeaddr_t *originator, rimeaddr_t *last_hop, uint8_t hops)
|
||||
{
|
||||
struct route_entry *rt;
|
||||
|
||||
|
@ -175,7 +175,7 @@ rrep_packet_received(struct uc_conn *uc, rimeaddr_t *from)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
rreq_packet_received(struct nf_conn *nf, rimeaddr_t *from,
|
||||
rimeaddr_t *originator, u8_t seqno, u8_t hops)
|
||||
rimeaddr_t *originator, uint8_t seqno, uint8_t hops)
|
||||
{
|
||||
struct route_msg *msg = rimebuf_dataptr();
|
||||
struct route_discovery_conn *c = (struct route_discovery_conn *)
|
||||
|
@ -224,7 +224,7 @@ static const struct nf_callbacks rreq_callbacks = {rreq_packet_received, NULL, N
|
|||
void
|
||||
route_discovery_open(struct route_discovery_conn *c,
|
||||
clock_time_t time,
|
||||
u16_t channels,
|
||||
uint16_t channels,
|
||||
const struct route_discovery_callbacks *callbacks)
|
||||
{
|
||||
nf_open(&c->rreqconn, time, channels + 0, &rreq_callbacks);
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: route-discovery.h,v 1.4 2007/12/17 09:14:08 adamdunkels Exp $
|
||||
* $Id: route-discovery.h,v 1.5 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -75,13 +75,13 @@ struct route_discovery_conn {
|
|||
struct uc_conn rrepconn;
|
||||
struct ctimer t;
|
||||
rimeaddr_t last_rreq_originator;
|
||||
u16_t last_rreq_id;
|
||||
u16_t rreq_id;
|
||||
uint16_t last_rreq_id;
|
||||
uint16_t rreq_id;
|
||||
const struct route_discovery_callbacks *cb;
|
||||
};
|
||||
|
||||
void route_discovery_open(struct route_discovery_conn *c, clock_time_t time,
|
||||
u16_t channels,
|
||||
uint16_t channels,
|
||||
const struct route_discovery_callbacks *callbacks);
|
||||
void route_discovery_discover(struct route_discovery_conn *c, rimeaddr_t *dest,
|
||||
clock_time_t timeout);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: route.c,v 1.11 2008/01/08 07:58:23 adamdunkels Exp $
|
||||
* $Id: route.c,v 1.12 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -97,7 +97,7 @@ route_init(void)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
route_add(rimeaddr_t *dest, rimeaddr_t *nexthop,
|
||||
u8_t hop_count, u8_t seqno)
|
||||
uint8_t hop_count, uint8_t seqno)
|
||||
{
|
||||
struct route_entry *e;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: route.h,v 1.7 2008/01/08 07:58:23 adamdunkels Exp $
|
||||
* $Id: route.h,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -58,14 +58,14 @@ struct route_entry {
|
|||
struct route_entry *next;
|
||||
rimeaddr_t dest;
|
||||
rimeaddr_t nexthop;
|
||||
u8_t seqno;
|
||||
u8_t hop_count;
|
||||
u8_t time;
|
||||
uint8_t seqno;
|
||||
uint8_t hop_count;
|
||||
uint8_t time;
|
||||
};
|
||||
|
||||
void route_init(void);
|
||||
int route_add(rimeaddr_t *dest, rimeaddr_t *nexthop,
|
||||
u8_t hop_count, u8_t seqno);
|
||||
uint8_t hop_count, uint8_t seqno);
|
||||
struct route_entry *route_lookup(rimeaddr_t *dest);
|
||||
void route_remove(struct route_entry *e);
|
||||
void route_flush_all(void);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ruc.c,v 1.17 2008/01/14 09:34:33 adamdunkels Exp $
|
||||
* $Id: ruc.c,v 1.18 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -55,8 +55,8 @@
|
|||
#define TYPE_ACK 1
|
||||
|
||||
struct ruc_hdr {
|
||||
u8_t type;
|
||||
u8_t seqno;
|
||||
uint8_t type;
|
||||
uint8_t seqno;
|
||||
};
|
||||
|
||||
#define DEBUG 0
|
||||
|
@ -129,7 +129,7 @@ recv_from_suc(struct suc_conn *suc, rimeaddr_t *from)
|
|||
}
|
||||
} else if(hdr->type == TYPE_DATA) {
|
||||
/* int send_ack = 1;*/
|
||||
u16_t packet_seqno;
|
||||
uint16_t packet_seqno;
|
||||
struct queuebuf *q;
|
||||
|
||||
RIMESTATS_ADD(reliablerx);
|
||||
|
@ -168,7 +168,7 @@ recv_from_suc(struct suc_conn *suc, rimeaddr_t *from)
|
|||
static const struct suc_callbacks ruc = {recv_from_suc, sent_by_suc};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
ruc_open(struct ruc_conn *c, u16_t channel,
|
||||
ruc_open(struct ruc_conn *c, uint16_t channel,
|
||||
const struct ruc_callbacks *u)
|
||||
{
|
||||
suc_open(&c->c, channel, &ruc);
|
||||
|
@ -184,7 +184,7 @@ ruc_close(struct ruc_conn *c)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
ruc_send(struct ruc_conn *c, rimeaddr_t *receiver, u8_t max_retransmissions)
|
||||
ruc_send(struct ruc_conn *c, rimeaddr_t *receiver, uint8_t max_retransmissions)
|
||||
{
|
||||
if(rimebuf_hdralloc(sizeof(struct ruc_hdr))) {
|
||||
struct ruc_hdr *hdr = rimebuf_hdrptr();
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ruc.h,v 1.11 2007/12/16 14:33:32 adamdunkels Exp $
|
||||
* $Id: ruc.h,v 1.12 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -63,24 +63,24 @@
|
|||
struct ruc_conn;
|
||||
|
||||
struct ruc_callbacks {
|
||||
void (* recv)(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno);
|
||||
void (* sent)(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions);
|
||||
void (* timedout)(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions);
|
||||
void (* recv)(struct ruc_conn *c, rimeaddr_t *from, uint8_t seqno);
|
||||
void (* sent)(struct ruc_conn *c, rimeaddr_t *to, uint8_t retransmissions);
|
||||
void (* timedout)(struct ruc_conn *c, rimeaddr_t *to, uint8_t retransmissions);
|
||||
};
|
||||
|
||||
struct ruc_conn {
|
||||
struct suc_conn c;
|
||||
const struct ruc_callbacks *u;
|
||||
u8_t sndnxt;
|
||||
u8_t rxmit;
|
||||
u8_t max_rxmit;
|
||||
uint8_t sndnxt;
|
||||
uint8_t rxmit;
|
||||
uint8_t max_rxmit;
|
||||
};
|
||||
|
||||
void ruc_open(struct ruc_conn *c, u16_t channel,
|
||||
void ruc_open(struct ruc_conn *c, uint16_t channel,
|
||||
const struct ruc_callbacks *u);
|
||||
void ruc_close(struct ruc_conn *c);
|
||||
|
||||
int ruc_send(struct ruc_conn *c, rimeaddr_t *receiver, u8_t max_retransmissions);
|
||||
int ruc_send(struct ruc_conn *c, rimeaddr_t *receiver, uint8_t max_retransmissions);
|
||||
|
||||
#endif /* __RUC_H__ */
|
||||
/** @} */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rucb.c,v 1.5 2008/01/14 09:36:35 adamdunkels Exp $
|
||||
* $Id: rucb.c,v 1.6 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ read_data(struct rucb_conn *c)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
acked(struct ruc_conn *ruc, rimeaddr_t *to, u8_t retransmissions)
|
||||
acked(struct ruc_conn *ruc, rimeaddr_t *to, uint8_t retransmissions)
|
||||
{
|
||||
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
||||
PRINTF("%d.%d: rucb acked\n",
|
||||
|
@ -80,7 +80,7 @@ acked(struct ruc_conn *ruc, rimeaddr_t *to, u8_t retransmissions)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
timedout(struct ruc_conn *ruc, rimeaddr_t *to, u8_t retransmissions)
|
||||
timedout(struct ruc_conn *ruc, rimeaddr_t *to, uint8_t retransmissions)
|
||||
{
|
||||
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
||||
PRINTF("%d.%d: rucb timedout\n",
|
||||
|
@ -91,7 +91,7 @@ timedout(struct ruc_conn *ruc, rimeaddr_t *to, u8_t retransmissions)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
recv(struct ruc_conn *ruc, rimeaddr_t *from, u8_t seqno)
|
||||
recv(struct ruc_conn *ruc, rimeaddr_t *from, uint8_t seqno)
|
||||
{
|
||||
struct rucb_conn *c = (struct rucb_conn *)ruc;
|
||||
|
||||
|
@ -135,7 +135,7 @@ recv(struct ruc_conn *ruc, rimeaddr_t *from, u8_t seqno)
|
|||
static const struct ruc_callbacks ruc = {recv, acked, timedout};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rucb_open(struct rucb_conn *c, u16_t channel,
|
||||
rucb_open(struct rucb_conn *c, uint16_t channel,
|
||||
const struct rucb_callbacks *u)
|
||||
{
|
||||
ruc_open(&c->c, channel, &ruc);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rucb.h,v 1.1 2007/05/22 20:45:49 adamdunkels Exp $
|
||||
* $Id: rucb.h,v 1.2 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -65,11 +65,11 @@ struct rucb_conn {
|
|||
struct ruc_conn c;
|
||||
const struct rucb_callbacks *u;
|
||||
rimeaddr_t receiver, sender;
|
||||
u16_t chunk;
|
||||
u8_t last_seqno;
|
||||
uint16_t chunk;
|
||||
uint8_t last_seqno;
|
||||
};
|
||||
|
||||
void rucb_open(struct rucb_conn *c, u16_t channel,
|
||||
void rucb_open(struct rucb_conn *c, uint16_t channel,
|
||||
const struct rucb_callbacks *u);
|
||||
void rucb_close(struct rucb_conn *c);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rudolph0.c,v 1.7 2007/11/28 20:03:50 adamdunkels Exp $
|
||||
* $Id: rudolph0.c,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,7 @@ static const struct polite_callbacks polite = { recv_nack, 0, 0 };
|
|||
static const struct sabc_callbacks sabc = { recv, sent };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rudolph0_open(struct rudolph0_conn *c, u16_t channel,
|
||||
rudolph0_open(struct rudolph0_conn *c, uint16_t channel,
|
||||
const struct rudolph0_callbacks *cb)
|
||||
{
|
||||
sabc_open(&c->c, channel, &sabc);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rudolph0.h,v 1.7 2007/12/17 09:14:08 adamdunkels Exp $
|
||||
* $Id: rudolph0.h,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -85,15 +85,15 @@ struct rudolph0_callbacks {
|
|||
#endif
|
||||
|
||||
struct rudolph0_hdr {
|
||||
u8_t type;
|
||||
u8_t version;
|
||||
u16_t chunk;
|
||||
uint8_t type;
|
||||
uint8_t version;
|
||||
uint16_t chunk;
|
||||
};
|
||||
|
||||
struct rudolph0_datapacket {
|
||||
struct rudolph0_hdr h;
|
||||
u8_t datalen;
|
||||
u8_t data[RUDOLPH0_DATASIZE];
|
||||
uint8_t datalen;
|
||||
uint8_t data[RUDOLPH0_DATASIZE];
|
||||
};
|
||||
|
||||
struct rudolph0_conn {
|
||||
|
@ -101,11 +101,11 @@ struct rudolph0_conn {
|
|||
struct polite_conn nackc;
|
||||
const struct rudolph0_callbacks *cb;
|
||||
clock_time_t send_interval;
|
||||
u8_t state;
|
||||
uint8_t state;
|
||||
struct rudolph0_datapacket current;
|
||||
};
|
||||
|
||||
void rudolph0_open(struct rudolph0_conn *c, u16_t channel,
|
||||
void rudolph0_open(struct rudolph0_conn *c, uint16_t channel,
|
||||
const struct rudolph0_callbacks *cb);
|
||||
void rudolph0_close(struct rudolph0_conn *c);
|
||||
void rudolph0_send(struct rudolph0_conn *c, clock_time_t interval);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rudolph1.c,v 1.10 2007/11/17 18:05:21 adamdunkels Exp $
|
||||
* $Id: rudolph1.c,v 1.11 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -56,17 +56,17 @@
|
|||
#define REPAIR_TIMEOUT CLOCK_SECOND / 4
|
||||
|
||||
struct rudolph1_hdr {
|
||||
u8_t type;
|
||||
u8_t version;
|
||||
u16_t chunk;
|
||||
uint8_t type;
|
||||
uint8_t version;
|
||||
uint16_t chunk;
|
||||
};
|
||||
|
||||
#define RUDOLPH1_DATASIZE 64
|
||||
|
||||
struct rudolph1_datapacket {
|
||||
struct rudolph1_hdr h;
|
||||
u8_t datalen;
|
||||
u8_t data[RUDOLPH1_DATASIZE];
|
||||
uint8_t datalen;
|
||||
uint8_t data[RUDOLPH1_DATASIZE];
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -115,7 +115,7 @@ format_data(struct rudolph1_conn *c, int chunk)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
write_data(struct rudolph1_conn *c, int chunk, u8_t *data, int datalen)
|
||||
write_data(struct rudolph1_conn *c, int chunk, uint8_t *data, int datalen)
|
||||
{
|
||||
if(chunk == 0) {
|
||||
c->cb->write_chunk(c, 0, RUDOLPH1_FLAG_NEWFILE, data, 0);
|
||||
|
@ -299,7 +299,7 @@ static const struct ipolite_callbacks ipolite = { recv_ipolite, sent_ipolite, dr
|
|||
static const struct trickle_callbacks trickle = { recv_trickle };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rudolph1_open(struct rudolph1_conn *c, u16_t channel,
|
||||
rudolph1_open(struct rudolph1_conn *c, uint16_t channel,
|
||||
const struct rudolph1_callbacks *cb)
|
||||
{
|
||||
trickle_open(&c->trickle, TRICKLE_INTERVAL, channel, &trickle);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rudolph1.h,v 1.7 2007/12/17 09:14:08 adamdunkels Exp $
|
||||
* $Id: rudolph1.h,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -84,13 +84,13 @@ struct rudolph1_conn {
|
|||
const struct rudolph1_callbacks *cb;
|
||||
struct ctimer t;
|
||||
clock_time_t send_interval;
|
||||
u16_t chunk, highest_chunk_heard;
|
||||
u8_t version;
|
||||
/* u8_t trickle_interval;*/
|
||||
u8_t nacks;
|
||||
uint16_t chunk, highest_chunk_heard;
|
||||
uint8_t version;
|
||||
/* uint8_t trickle_interval;*/
|
||||
uint8_t nacks;
|
||||
};
|
||||
|
||||
void rudolph1_open(struct rudolph1_conn *c, u16_t channel,
|
||||
void rudolph1_open(struct rudolph1_conn *c, uint16_t channel,
|
||||
const struct rudolph1_callbacks *cb);
|
||||
void rudolph1_close(struct rudolph1_conn *c);
|
||||
void rudolph1_send(struct rudolph1_conn *c, clock_time_t send_interval);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rudolph2.c,v 1.4 2007/11/28 20:03:50 adamdunkels Exp $
|
||||
* $Id: rudolph2.c,v 1.5 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -63,10 +63,10 @@
|
|||
#define NACK_TIMEOUT CLOCK_SECOND / 4
|
||||
|
||||
struct rudolph2_hdr {
|
||||
u8_t type;
|
||||
u8_t hops_from_base;
|
||||
u16_t version;
|
||||
u16_t chunk;
|
||||
uint8_t type;
|
||||
uint8_t hops_from_base;
|
||||
uint16_t version;
|
||||
uint16_t chunk;
|
||||
};
|
||||
|
||||
#define POLITE_HEADER 1
|
||||
|
@ -124,7 +124,7 @@ format_data(struct rudolph2_conn *c, int chunk)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
write_data(struct rudolph2_conn *c, int chunk, u8_t *data, int datalen)
|
||||
write_data(struct rudolph2_conn *c, int chunk, uint8_t *data, int datalen)
|
||||
{
|
||||
/* xxx Don't write any data if the application has been stopped. */
|
||||
if(c->flags & FLAG_IS_STOPPED) {
|
||||
|
@ -364,7 +364,7 @@ recv(struct polite_conn *polite)
|
|||
static const struct polite_callbacks polite = { recv, sent, dropped };
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rudolph2_open(struct rudolph2_conn *c, u16_t channel,
|
||||
rudolph2_open(struct rudolph2_conn *c, uint16_t channel,
|
||||
const struct rudolph2_callbacks *cb)
|
||||
{
|
||||
polite_open(&c->c, channel, &polite);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rudolph2.h,v 1.3 2007/12/17 09:14:08 adamdunkels Exp $
|
||||
* $Id: rudolph2.h,v 1.4 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -83,14 +83,14 @@ struct rudolph2_conn {
|
|||
struct polite_conn c;
|
||||
const struct rudolph2_callbacks *cb;
|
||||
struct ctimer t;
|
||||
u16_t snd_nxt, rcv_nxt;
|
||||
u16_t version;
|
||||
u8_t hops_from_base;
|
||||
u8_t nacks;
|
||||
u8_t flags;
|
||||
uint16_t snd_nxt, rcv_nxt;
|
||||
uint16_t version;
|
||||
uint8_t hops_from_base;
|
||||
uint8_t nacks;
|
||||
uint8_t flags;
|
||||
};
|
||||
|
||||
void rudolph2_open(struct rudolph2_conn *c, u16_t channel,
|
||||
void rudolph2_open(struct rudolph2_conn *c, uint16_t channel,
|
||||
const struct rudolph2_callbacks *cb);
|
||||
void rudolph2_close(struct rudolph2_conn *c);
|
||||
void rudolph2_send(struct rudolph2_conn *c, clock_time_t interval);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: sabc.c,v 1.7 2007/03/31 18:31:28 adamdunkels Exp $
|
||||
* $Id: sabc.c,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -62,7 +62,7 @@ recv_from_abc(struct abc_conn *abc)
|
|||
static const struct abc_callbacks sabc = {recv_from_abc};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
sabc_open(struct sabc_conn *c, u16_t channel,
|
||||
sabc_open(struct sabc_conn *c, uint16_t channel,
|
||||
const struct sabc_callbacks *u)
|
||||
{
|
||||
abc_open(&c->c, channel, &sabc);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: sabc.h,v 1.7 2007/03/31 18:31:28 adamdunkels Exp $
|
||||
* $Id: sabc.h,v 1.8 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -100,7 +100,7 @@ struct sabc_conn {
|
|||
* that operates on the connection is called.
|
||||
*
|
||||
*/
|
||||
void sabc_open(struct sabc_conn *c, u16_t channel,
|
||||
void sabc_open(struct sabc_conn *c, uint16_t channel,
|
||||
const struct sabc_callbacks *u);
|
||||
void sabc_close(struct sabc_conn *c);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: sibc.c,v 1.6 2007/03/31 18:31:28 adamdunkels Exp $
|
||||
* $Id: sibc.c,v 1.7 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ recv_from_ibc(struct ibc_conn *ibc, rimeaddr_t *from)
|
|||
static const struct ibc_callbacks sibc = {recv_from_ibc};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
sibc_open(struct sibc_conn *c, u16_t channel,
|
||||
sibc_open(struct sibc_conn *c, uint16_t channel,
|
||||
const struct sibc_callbacks *u)
|
||||
{
|
||||
ibc_open(&c->c, channel, &sibc);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: sibc.h,v 1.6 2007/03/31 18:31:29 adamdunkels Exp $
|
||||
* $Id: sibc.h,v 1.7 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -79,7 +79,7 @@ struct sibc_conn {
|
|||
const struct sibc_callbacks *u;
|
||||
};
|
||||
|
||||
void sibc_open(struct sibc_conn *c, u16_t channel,
|
||||
void sibc_open(struct sibc_conn *c, uint16_t channel,
|
||||
const struct sibc_callbacks *u);
|
||||
void sibc_close(struct sibc_conn *c);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: suc.c,v 1.11 2007/11/13 21:00:10 adamdunkels Exp $
|
||||
* $Id: suc.c,v 1.12 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ recv_from_uc(struct uc_conn *uc, rimeaddr_t *from)
|
|||
static const struct uc_callbacks suc = {recv_from_uc};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
suc_open(struct suc_conn *c, u16_t channel,
|
||||
suc_open(struct suc_conn *c, uint16_t channel,
|
||||
const struct suc_callbacks *u)
|
||||
{
|
||||
uc_open(&c->c, channel, &suc);
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: suc.h,v 1.9 2007/11/13 21:00:10 adamdunkels Exp $
|
||||
* $Id: suc.h,v 1.10 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ struct suc_conn {
|
|||
rimeaddr_t receiver;
|
||||
};
|
||||
|
||||
void suc_open(struct suc_conn *c, u16_t channel,
|
||||
void suc_open(struct suc_conn *c, uint16_t channel,
|
||||
const struct suc_callbacks *u);
|
||||
void suc_close(struct suc_conn *c);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: trickle.c,v 1.6 2008/01/08 07:59:51 adamdunkels Exp $
|
||||
* $Id: trickle.c,v 1.7 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -78,7 +78,7 @@ send(void *ptr)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
recv(struct nf_conn *nf, rimeaddr_t *from,
|
||||
rimeaddr_t *originator, u8_t seqno, u8_t hops)
|
||||
rimeaddr_t *originator, uint8_t seqno, uint8_t hops)
|
||||
{
|
||||
struct trickle_conn *c = (struct trickle_conn *)nf;
|
||||
|
||||
|
@ -122,7 +122,7 @@ static const struct nf_callbacks nf = {recv,
|
|||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
trickle_open(struct trickle_conn *c, clock_time_t interval,
|
||||
u16_t channel, const struct trickle_callbacks *cb)
|
||||
uint16_t channel, const struct trickle_callbacks *cb)
|
||||
{
|
||||
nf_open(&c->c, interval, channel, &nf);
|
||||
c->cb = cb;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: trickle.h,v 1.6 2008/01/08 08:00:13 adamdunkels Exp $
|
||||
* $Id: trickle.h,v 1.7 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -72,8 +72,8 @@ struct trickle_conn {
|
|||
struct ctimer t;
|
||||
struct queuebuf *q;
|
||||
clock_time_t interval;
|
||||
u8_t seqno;
|
||||
u8_t interval_scaling;
|
||||
uint8_t seqno;
|
||||
uint8_t interval_scaling;
|
||||
};
|
||||
|
||||
void trickle_open(struct trickle_conn *c, clock_time_t interval,
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: uc.c,v 1.12 2008/02/05 20:18:57 adamdunkels Exp $
|
||||
* $Id: uc.c,v 1.13 2008/02/24 22:05:27 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -82,7 +82,7 @@ recv_from_ibc(struct ibc_conn *ibc, rimeaddr_t *from)
|
|||
static const struct ibc_callbacks uc = {recv_from_ibc};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
uc_open(struct uc_conn *c, u16_t channel,
|
||||
uc_open(struct uc_conn *c, uint16_t channel,
|
||||
const struct uc_callbacks *u)
|
||||
{
|
||||
ibc_open(&c->c, channel, &uc);
|
||||
|
|
Loading…
Reference in a new issue