diff --git a/apps/rudolph/rudolph0.c b/apps/rudolph/rudolph0.c index c268b194a..dd3be2db4 100644 --- a/apps/rudolph/rudolph0.c +++ b/apps/rudolph/rudolph0.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rudolph0.c,v 1.3 2007/03/22 23:54:40 adamdunkels Exp $ + * $Id: rudolph0.c,v 1.4 2007/03/23 10:46:56 adamdunkels Exp $ */ /** @@ -86,7 +86,7 @@ send_nack(struct rudolph0_conn *c) { struct rudolph0_hdr *hdr; rimebuf_clear(); - rimebuf_hdrextend(sizeof(struct rudolph0_hdr)); + rimebuf_hdralloc(sizeof(struct rudolph0_hdr)); hdr = rimebuf_hdrptr(); hdr->type = TYPE_NACK; diff --git a/apps/rudolph/rudolph1.c b/apps/rudolph/rudolph1.c index 4a498629b..92902db3e 100644 --- a/apps/rudolph/rudolph1.c +++ b/apps/rudolph/rudolph1.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rudolph1.c,v 1.2 2007/03/22 23:54:40 adamdunkels Exp $ + * $Id: rudolph1.c,v 1.3 2007/03/23 10:46:56 adamdunkels Exp $ */ /** @@ -137,7 +137,7 @@ send_nack(struct rudolph1_conn *c) { struct rudolph1_hdr *hdr; rimebuf_clear(); - rimebuf_hdrextend(sizeof(struct rudolph1_hdr)); + rimebuf_hdralloc(sizeof(struct rudolph1_hdr)); hdr = rimebuf_hdrptr(); hdr->type = TYPE_NACK; diff --git a/core/net/rime/abc.c b/core/net/rime/abc.c index 785c466f1..4e5bb3b2c 100644 --- a/core/net/rime/abc.c +++ b/core/net/rime/abc.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: abc.c,v 1.7 2007/03/20 12:28:13 adamdunkels Exp $ + * $Id: abc.c,v 1.8 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -74,7 +74,7 @@ abc_close(struct abc_conn *c) int abc_send(struct abc_conn *c) { - if(rimebuf_hdrextend(sizeof(struct abc_hdr))) { + if(rimebuf_hdralloc(sizeof(struct abc_hdr))) { struct abc_hdr *hdr = rimebuf_hdrptr(); DEBUGF(1, "%d: abc: abc_send on channel %d\n", rimeaddr_node_addr.u16, c->channel); diff --git a/core/net/rime/ibc.c b/core/net/rime/ibc.c index ad3bd247f..c89317eb4 100644 --- a/core/net/rime/ibc.c +++ b/core/net/rime/ibc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ibc.c,v 1.6 2007/03/20 12:28:13 adamdunkels Exp $ + * $Id: ibc.c,v 1.7 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -81,7 +81,7 @@ int ibc_send(struct ibc_conn *c) { DEBUGF(1, "%d: ibc_send\n", rimeaddr_node_addr.u16); - if(rimebuf_hdrextend(sizeof(struct ibc_hdr))) { + if(rimebuf_hdralloc(sizeof(struct ibc_hdr))) { struct ibc_hdr *hdr = rimebuf_hdrptr(); rimeaddr_copy(&hdr->sender, &rimeaddr_node_addr); return abc_send(&c->c); diff --git a/core/net/rime/mh.c b/core/net/rime/mh.c index a13915481..f5a3bd78d 100644 --- a/core/net/rime/mh.c +++ b/core/net/rime/mh.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: mh.c,v 1.1 2007/03/22 17:33:15 adamdunkels Exp $ + * $Id: mh.c,v 1.2 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -64,7 +64,7 @@ send_data(struct mh_conn *c, rimeaddr_t *to, struct route_entry *next) { struct data_hdr *hdr; - if(rimebuf_hdrextend(sizeof(struct data_hdr))) { + if(rimebuf_hdralloc(sizeof(struct data_hdr))) { hdr = rimebuf_hdrptr(); rimeaddr_copy(&hdr->dest, to); rimeaddr_copy(&hdr->originator, &rimeaddr_node_addr); diff --git a/core/net/rime/nf.c b/core/net/rime/nf.c index 499b8a5b6..603d92baa 100644 --- a/core/net/rime/nf.c +++ b/core/net/rime/nf.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: nf.c,v 1.8 2007/03/22 18:53:38 adamdunkels Exp $ + * $Id: nf.c,v 1.9 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -185,7 +185,7 @@ nf_send(struct nf_conn *c) c->buf = NULL; } - if(rimebuf_hdrextend(sizeof(struct nf_hdr))) { + if(rimebuf_hdralloc(sizeof(struct nf_hdr))) { struct nf_hdr *hdr = rimebuf_hdrptr(); rimeaddr_copy(&hdr->originator, &rimeaddr_node_addr); rimeaddr_copy(&c->last_originator, &hdr->originator); diff --git a/core/net/rime/queuebuf.c b/core/net/rime/queuebuf.c index 00b18f699..a4fc48901 100644 --- a/core/net/rime/queuebuf.c +++ b/core/net/rime/queuebuf.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: queuebuf.c,v 1.4 2007/03/20 12:26:23 adamdunkels Exp $ + * $Id: queuebuf.c,v 1.5 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -111,7 +111,7 @@ queuebuf_to_rimebuf(struct queuebuf *b) r = (struct queuebuf_ref *)b; rimebuf_clear(); rimebuf_copyfrom(r->ref, r->len); - rimebuf_hdrextend(r->hdrlen); + rimebuf_hdralloc(r->hdrlen); memcpy(rimebuf_hdrptr(), r->hdr, r->hdrlen); } } diff --git a/core/net/rime/rimebuf.c b/core/net/rime/rimebuf.c index e763c0c73..57fac0e17 100644 --- a/core/net/rime/rimebuf.c +++ b/core/net/rime/rimebuf.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimebuf.c,v 1.3 2007/03/14 00:30:11 adamdunkels Exp $ + * $Id: rimebuf.c,v 1.4 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -130,7 +130,7 @@ rimebuf_copyto(u8_t *to) } /*---------------------------------------------------------------------------*/ int -rimebuf_hdrextend(int size) +rimebuf_hdralloc(int size) { if(hdrptr > size) { hdrptr -= size; diff --git a/core/net/rime/rimebuf.h b/core/net/rime/rimebuf.h index 9bcc1fc61..a5fe4badc 100644 --- a/core/net/rime/rimebuf.h +++ b/core/net/rime/rimebuf.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimebuf.h,v 1.4 2007/03/15 09:57:00 adamdunkels Exp $ + * $Id: rimebuf.h,v 1.5 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -262,7 +262,7 @@ int rimebuf_copyto_hdr(u8_t *to); * zero and does not allocate anything. * */ -int rimebuf_hdrextend(int size); +int rimebuf_hdralloc(int size); /** * \brief Reduce the header in the rimebuf, for incoming packets diff --git a/core/net/rime/ruc.c b/core/net/rime/ruc.c index c5effb004..e196690ad 100644 --- a/core/net/rime/ruc.c +++ b/core/net/rime/ruc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ruc.c,v 1.6 2007/03/20 12:28:01 adamdunkels Exp $ + * $Id: ruc.c,v 1.7 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -100,7 +100,7 @@ recv_from_suc(struct suc_conn *suc, rimeaddr_t *from) rimeaddr_node_addr.u16, from->u16, packet_seqno); rimebuf_clear(); - rimebuf_hdrextend(sizeof(struct ruc_hdr)); + rimebuf_hdralloc(sizeof(struct ruc_hdr)); hdr = rimebuf_hdrptr(); hdr->type = TYPE_ACK; hdr->seqno = packet_seqno; @@ -130,7 +130,7 @@ ruc_close(struct ruc_conn *c) int ruc_send(struct ruc_conn *c, rimeaddr_t *receiver) { - if(rimebuf_hdrextend(sizeof(struct ruc_hdr))) { + if(rimebuf_hdralloc(sizeof(struct ruc_hdr))) { struct ruc_hdr *hdr = rimebuf_hdrptr(); hdr->type = TYPE_DATA; hdr->seqno = seqno; diff --git a/core/net/rime/tree.c b/core/net/rime/tree.c index dc44e7d65..f36965121 100644 --- a/core/net/rime/tree.c +++ b/core/net/rime/tree.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: tree.c,v 1.6 2007/03/22 18:54:22 adamdunkels Exp $ + * $Id: tree.c,v 1.7 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -250,7 +250,7 @@ tree_send(struct tree_conn *tc) struct neighbor *n; struct hdr *hdr; - if(rimebuf_hdrextend(sizeof(struct hdr))) { + if(rimebuf_hdralloc(sizeof(struct hdr))) { hdr = rimebuf_hdrptr(); hdr->originator_seqno = tc->seqno++; rimeaddr_copy(&hdr->originator, &rimeaddr_node_addr); diff --git a/core/net/rime/trickle.c b/core/net/rime/trickle.c index 5236de320..30be43f7c 100644 --- a/core/net/rime/trickle.c +++ b/core/net/rime/trickle.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: trickle.c,v 1.2 2007/03/21 23:23:02 adamdunkels Exp $ + * $Id: trickle.c,v 1.3 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -62,7 +62,7 @@ send(struct trickle_conn *c) if(c->q != NULL) { queuebuf_to_rimebuf(c->q); - rimebuf_hdrextend(sizeof(struct trickle_hdr)); + rimebuf_hdralloc(sizeof(struct trickle_hdr)); hdr = rimebuf_hdrptr(); hdr->seqno = c->seqno; hdr->interval = c->interval; diff --git a/core/net/rime/uc.c b/core/net/rime/uc.c index f18d2c8ab..4784c7479 100644 --- a/core/net/rime/uc.c +++ b/core/net/rime/uc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uc.c,v 1.6 2007/03/20 12:28:13 adamdunkels Exp $ + * $Id: uc.c,v 1.7 2007/03/23 10:46:35 adamdunkels Exp $ */ /** @@ -80,7 +80,7 @@ int uc_send(struct uc_conn *c, rimeaddr_t *receiver) { DEBUGF(2, "%d: uc_send to %d\n", rimeaddr_node_addr.u16, receiver->u16); - if(rimebuf_hdrextend(sizeof(struct uc_hdr))) { + if(rimebuf_hdralloc(sizeof(struct uc_hdr))) { struct uc_hdr *hdr = rimebuf_hdrptr(); rimeaddr_copy(&hdr->receiver, receiver); return ibc_send(&c->c);