From fd33a89214f513f8be4368d5618f5c5841e9f3dd Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Thu, 15 Mar 2007 10:01:04 +0000 Subject: [PATCH] Renamed ulayer -> callbacks --- core/net/rime/abc.c | 6 +++--- core/net/rime/abc.h | 12 ++++++------ core/net/rime/ccsabc.c | 6 +++--- core/net/rime/ccsabc.h | 8 ++++---- core/net/rime/ibc.c | 6 +++--- core/net/rime/ibc.h | 8 ++++---- core/net/rime/nf.c | 6 +++--- core/net/rime/nf.h | 8 ++++---- core/net/rime/rime-debug.h | 4 ++-- core/net/rime/ruc.c | 6 +++--- core/net/rime/ruc.h | 8 ++++---- core/net/rime/sabc.c | 6 +++--- core/net/rime/sabc.h | 8 ++++---- core/net/rime/sibc.c | 6 +++--- core/net/rime/sibc.h | 8 ++++---- core/net/rime/suc.c | 6 +++--- core/net/rime/suc.h | 8 ++++---- core/net/rime/uc.c | 6 +++--- core/net/rime/uc.h | 8 ++++---- 19 files changed, 67 insertions(+), 67 deletions(-) diff --git a/core/net/rime/abc.c b/core/net/rime/abc.c index 6daa5768b..aac765d63 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.2 2007/03/14 00:29:05 adamdunkels Exp $ + * $Id: abc.c,v 1.3 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -57,10 +57,10 @@ LIST(channels); /*---------------------------------------------------------------------------*/ void abc_setup(struct abc_conn *c, u16_t channel, - const struct abc_ulayer *ulayer) + const struct abc_callbacks *callbacks) { c->channel = channel; - c->u = ulayer; + c->u = callbacks; list_add(channels, c); } diff --git a/core/net/rime/abc.h b/core/net/rime/abc.h index 401993ad2..02ccf0331 100644 --- a/core/net/rime/abc.h +++ b/core/net/rime/abc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: abc.h,v 1.3 2007/03/14 00:29:05 adamdunkels Exp $ + * $Id: abc.h,v 1.4 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -51,34 +51,34 @@ struct abc_conn; -struct abc_ulayer { +struct abc_callbacks { void (* recv)(struct abc_conn *ptr); }; struct abc_conn { struct abc_conn *next; u16_t channel; - const struct abc_ulayer *u; + const struct abc_callbacks *u; }; /** * \brief Set up an anonymous best-effort broadcast connection * \param c A pointer to a struct abc_conn * \param channel The channel on which the connection will operate - * \param u A struct abc_ulayer with function pointers to functions that will be called when a packet has been received + * \param u A struct abc_callbacks with function pointers to functions that will be called when a packet has been received * * This function sets up an abc connection on the * specified channel. The caller must have allocated the * memory for the struct abc_conn, usually by declaring it * as a static variable. * - * The struct abc_ulayer pointer must point to a structure + * The struct abc_callbacks pointer must point to a structure * containing a pointer to a function that will be called * when a packet arrives on the channel. * */ void abc_setup(struct abc_conn *c, u16_t channel, - const struct abc_ulayer *u); + const struct abc_callbacks *u); /** * \brief Send an anonymous best-effort broadcast packet diff --git a/core/net/rime/ccsabc.c b/core/net/rime/ccsabc.c index 242a281d5..3d6745d88 100644 --- a/core/net/rime/ccsabc.c +++ b/core/net/rime/ccsabc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ccsabc.c,v 1.1 2007/02/28 16:38:51 adamdunkels Exp $ + * $Id: ccsabc.c,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -62,11 +62,11 @@ sent_from_sabc(struct sabc_conn *sabc) } } /*---------------------------------------------------------------------------*/ -static const struct sabc_ulayer ccsabc = {recv_from_sabc, sent_from_sabc}; +static const struct sabc_callbacks ccsabc = {recv_from_sabc, sent_from_sabc}; /*---------------------------------------------------------------------------*/ void ccsabc_setup(struct ccsabc_conn *c, u16_t channel, - const struct ccsabc_ulayer *u) + const struct ccsabc_callbacks *u) { sabc_setup(&c->c, channel, &ccsabc); } diff --git a/core/net/rime/ccsabc.h b/core/net/rime/ccsabc.h index be23968d7..7a89c087f 100644 --- a/core/net/rime/ccsabc.h +++ b/core/net/rime/ccsabc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ccsabc.h,v 1.1 2007/02/28 16:38:51 adamdunkels Exp $ + * $Id: ccsabc.h,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -46,20 +46,20 @@ struct ccsabc_conn; -struct ccsabc_ulayer { +struct ccsabc_callbacks { void (* recv)(struct ccsabc_conn *c); void (* sent)(struct ccsabc_conn *c); }; struct ccsabc_conn { struct sabc_conn conn; - const struct ccsabc_ulayer *u; + const struct ccsabc_callbacks *u; unsigned char state; unsigned char c; }; void ccsabc_setup(struct ccsabc_conn *c, u16_t channel, - const struct ccsabc_ulayer *u); + const struct ccsabc_callbacks *u); int ccsabc_send_stubborn(struct ccsabc_conn *c, clock_time_t t); void ccsabc_cancel(struct ccsabc_conn *c); diff --git a/core/net/rime/ibc.c b/core/net/rime/ibc.c index 21b3daa8c..55a9231db 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.1 2007/02/28 16:38:51 adamdunkels Exp $ + * $Id: ibc.c,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -57,11 +57,11 @@ recv_from_abc(struct abc_conn *bc) c->u->recv(c, hdr->sender_id); } /*---------------------------------------------------------------------------*/ -static const struct abc_ulayer ibc = {recv_from_abc}; +static const struct abc_callbacks ibc = {recv_from_abc}; /*---------------------------------------------------------------------------*/ void ibc_setup(struct ibc_conn *c, u16_t channel, - const struct ibc_ulayer *u) + const struct ibc_callbacks *u) { abc_setup(&c->c, channel, &ibc); c->u = u; diff --git a/core/net/rime/ibc.h b/core/net/rime/ibc.h index 77bb8b238..cd039b8de 100644 --- a/core/net/rime/ibc.h +++ b/core/net/rime/ibc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ibc.h,v 1.1 2007/02/28 16:38:51 adamdunkels Exp $ + * $Id: ibc.h,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -46,17 +46,17 @@ struct ibc_conn; -struct ibc_ulayer { +struct ibc_callbacks { void (* recv)(struct ibc_conn *ptr, node_id_t sender); }; struct ibc_conn { struct abc_conn c; - const struct ibc_ulayer *u; + const struct ibc_callbacks *u; }; void ibc_setup(struct ibc_conn *c, u16_t channel, - const struct ibc_ulayer *u); + const struct ibc_callbacks *u); int ibc_send(struct ibc_conn *c); #endif /* __IBC_H__ */ diff --git a/core/net/rime/nf.c b/core/net/rime/nf.c index 2f8e0a6f7..923fa5425 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.2 2007/03/15 09:56:30 adamdunkels Exp $ + * $Id: nf.c,v 1.3 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -147,11 +147,11 @@ recv_from_ibc(struct ibc_conn *ibc, node_id_t from_id) } } /*---------------------------------------------------------------------------*/ -static const struct ibc_ulayer nf = {recv_from_ibc}; +static const struct ibc_callbacks nf = {recv_from_ibc}; /*---------------------------------------------------------------------------*/ void nf_setup(struct nf_conn *c, u16_t channel, - const struct nf_ulayer *u) + const struct nf_callbacks *u) { ibc_setup(&c->c, channel, &nf); c->u = u; diff --git a/core/net/rime/nf.h b/core/net/rime/nf.h index 0a0687ca4..9b7fdc407 100644 --- a/core/net/rime/nf.h +++ b/core/net/rime/nf.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: nf.h,v 1.2 2007/03/15 09:56:30 adamdunkels Exp $ + * $Id: nf.h,v 1.3 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -47,7 +47,7 @@ struct nf_conn; -struct nf_ulayer { +struct nf_callbacks { int (* recv)(struct nf_conn *c, node_id_t from, node_id_t originator, u8_t seqno, u8_t hops); void (* sent)(struct nf_conn *c); @@ -60,11 +60,11 @@ struct nf_conn { u8_t packets_received; u8_t last_originator_seqno; node_id_t last_originator_id; - const struct nf_ulayer *u; + const struct nf_callbacks *u; }; void nf_setup(struct nf_conn *c, u16_t channel, - const struct nf_ulayer *u); + const struct nf_callbacks *u); int nf_send(struct nf_conn *c); diff --git a/core/net/rime/rime-debug.h b/core/net/rime/rime-debug.h index 8465f9282..ddd0ce74c 100644 --- a/core/net/rime/rime-debug.h +++ b/core/net/rime/rime-debug.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rime-debug.h,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: rime-debug.h,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -41,7 +41,7 @@ #ifndef __RIME_DEBUG_H__ #define __RIME_DEBUG_H__ -#define DEBUG_LEVEL 0 +#define DEBUG_LEVEL 1 #if DEBUG_LEVEL > 0 #include diff --git a/core/net/rime/ruc.c b/core/net/rime/ruc.c index b27e57a02..04d43d7b4 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.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: ruc.c,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -110,11 +110,11 @@ recv_from_suc(struct suc_conn *suc, node_id_t from_id) } } /*---------------------------------------------------------------------------*/ -static const struct suc_ulayer ruc = {recv_from_suc, sent_by_suc}; +static const struct suc_callbacks ruc = {recv_from_suc, sent_by_suc}; /*---------------------------------------------------------------------------*/ void ruc_setup(struct ruc_conn *c, u16_t channel, - const struct ruc_ulayer *u) + const struct ruc_callbacks *u) { suc_setup(&c->c, channel, &ruc); c->u = u; diff --git a/core/net/rime/ruc.h b/core/net/rime/ruc.h index a70095c82..74e95ff9f 100644 --- a/core/net/rime/ruc.h +++ b/core/net/rime/ruc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ruc.h,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: ruc.h,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -45,19 +45,19 @@ struct ruc_conn; -struct ruc_ulayer { +struct ruc_callbacks { int (* recv)(struct ruc_conn *c, node_id_t from, u8_t seqno); void (* sent)(struct ruc_conn *c); }; struct ruc_conn { struct suc_conn c; - const struct ruc_ulayer *u; + const struct ruc_callbacks *u; u8_t state; }; void ruc_setup(struct ruc_conn *c, u16_t channel, - const struct ruc_ulayer *u); + const struct ruc_callbacks *u); int ruc_send(struct ruc_conn *c, node_id_t receiver_id); diff --git a/core/net/rime/sabc.c b/core/net/rime/sabc.c index 19338924c..2a5ba143a 100644 --- a/core/net/rime/sabc.c +++ b/core/net/rime/sabc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sabc.c,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: sabc.c,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -54,11 +54,11 @@ recv_from_abc(struct abc_conn *abc) } } /*---------------------------------------------------------------------------*/ -static const struct abc_ulayer sabc = {recv_from_abc}; +static const struct abc_callbacks sabc = {recv_from_abc}; /*---------------------------------------------------------------------------*/ void sabc_setup(struct sabc_conn *c, u16_t channel, - const struct sabc_ulayer *u) + const struct sabc_callbacks *u) { abc_setup(&c->c, channel, &sabc); c->u = u; diff --git a/core/net/rime/sabc.h b/core/net/rime/sabc.h index 0a1d0bb89..b6b067966 100644 --- a/core/net/rime/sabc.h +++ b/core/net/rime/sabc.h @@ -44,7 +44,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sabc.h,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: sabc.h,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -63,7 +63,7 @@ struct sabc_conn; -struct sabc_ulayer { +struct sabc_callbacks { void (* recv)(struct sabc_conn *c); void (* sent)(struct sabc_conn *c); }; @@ -77,7 +77,7 @@ struct sabc_conn { struct abc_conn c; struct ctimer t; struct queuebuf *buf; - const struct sabc_ulayer *u; + const struct sabc_callbacks *u; }; @@ -97,7 +97,7 @@ struct sabc_conn { * */ void sabc_setup(struct sabc_conn *c, u16_t channel, - const struct sabc_ulayer *u); + const struct sabc_callbacks *u); /** diff --git a/core/net/rime/sibc.c b/core/net/rime/sibc.c index 4fa7eab46..4bb74d61d 100644 --- a/core/net/rime/sibc.c +++ b/core/net/rime/sibc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sibc.c,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: sibc.c,v 1.2 2007/03/15 10:01:04 adamdunkels Exp $ */ /** @@ -53,11 +53,11 @@ recv_from_ibc(struct ibc_conn *ibc, node_id_t from_id) } } /*---------------------------------------------------------------------------*/ -static const struct ibc_ulayer sibc = {recv_from_ibc}; +static const struct ibc_callbacks sibc = {recv_from_ibc}; /*---------------------------------------------------------------------------*/ void sibc_setup(struct sibc_conn *c, u16_t channel, - const struct sibc_ulayer *u) + const struct sibc_callbacks *u) { ibc_setup(&c->c, channel, &sibc); c->u = u; diff --git a/core/net/rime/sibc.h b/core/net/rime/sibc.h index e27fc8c73..6929c7f08 100644 --- a/core/net/rime/sibc.h +++ b/core/net/rime/sibc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sibc.h,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: sibc.h,v 1.2 2007/03/15 10:01:05 adamdunkels Exp $ */ /** @@ -47,7 +47,7 @@ struct sibc_conn; -struct sibc_ulayer { +struct sibc_callbacks { void (* recv)(struct sibc_conn *c, node_id_t from); void (* sent)(struct sibc_conn *c); }; @@ -56,11 +56,11 @@ struct sibc_conn { struct ibc_conn c; struct ctimer t; struct queuebuf *buf; - const struct sibc_ulayer *u; + const struct sibc_callbacks *u; }; void sibc_setup(struct sibc_conn *c, u16_t channel, - const struct sibc_ulayer *u); + const struct sibc_callbacks *u); int sibc_send_stubborn(struct sibc_conn *c, clock_time_t t); void sibc_cancel(struct sibc_conn *c); diff --git a/core/net/rime/suc.c b/core/net/rime/suc.c index f1024b90a..99138d419 100644 --- a/core/net/rime/suc.c +++ b/core/net/rime/suc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: suc.c,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: suc.c,v 1.2 2007/03/15 10:01:05 adamdunkels Exp $ */ /** @@ -53,11 +53,11 @@ recv_from_uc(struct uc_conn *uc, node_id_t from_id) } } /*---------------------------------------------------------------------------*/ -static const struct uc_ulayer suc = {recv_from_uc}; +static const struct uc_callbacks suc = {recv_from_uc}; /*---------------------------------------------------------------------------*/ void suc_setup(struct suc_conn *c, u16_t channel, - const struct suc_ulayer *u) + const struct suc_callbacks *u) { uc_setup(&c->c, channel, &suc); c->u = u; diff --git a/core/net/rime/suc.h b/core/net/rime/suc.h index 64e151a0e..59d7116df 100644 --- a/core/net/rime/suc.h +++ b/core/net/rime/suc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: suc.h,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: suc.h,v 1.2 2007/03/15 10:01:05 adamdunkels Exp $ */ /** @@ -47,7 +47,7 @@ struct suc_conn; -struct suc_ulayer { +struct suc_callbacks { void (* recv)(struct suc_conn *c, node_id_t from); void (* sent)(struct suc_conn *c); }; @@ -56,12 +56,12 @@ struct suc_conn { struct uc_conn c; struct ctimer t; struct queuebuf *buf; - const struct suc_ulayer *u; + const struct suc_callbacks *u; node_id_t receiver_id; }; void suc_setup(struct suc_conn *c, u16_t channel, - const struct suc_ulayer *u); + const struct suc_callbacks *u); int suc_send_stubborn(struct suc_conn *c, node_id_t receiver_id); void suc_cancel(struct suc_conn *c); diff --git a/core/net/rime/uc.c b/core/net/rime/uc.c index d9fce6e46..a8d9c70ef 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.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: uc.c,v 1.2 2007/03/15 10:01:05 adamdunkels Exp $ */ /** @@ -60,11 +60,11 @@ recv_from_ibc(struct ibc_conn *ibc, node_id_t from_id) } } /*---------------------------------------------------------------------------*/ -static const struct ibc_ulayer uc = {recv_from_ibc}; +static const struct ibc_callbacks uc = {recv_from_ibc}; /*---------------------------------------------------------------------------*/ void uc_setup(struct uc_conn *c, u16_t channel, - const struct uc_ulayer *u) + const struct uc_callbacks *u) { ibc_setup(&c->c, channel, &uc); c->u = u; diff --git a/core/net/rime/uc.h b/core/net/rime/uc.h index 8d5ca8e91..c2d84c8e4 100644 --- a/core/net/rime/uc.h +++ b/core/net/rime/uc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uc.h,v 1.1 2007/02/28 16:38:52 adamdunkels Exp $ + * $Id: uc.h,v 1.2 2007/03/15 10:01:05 adamdunkels Exp $ */ /** @@ -45,17 +45,17 @@ struct uc_conn; -struct uc_ulayer { +struct uc_callbacks { void (* recv)(struct uc_conn *c, node_id_t from_id); }; struct uc_conn { struct ibc_conn c; - const struct uc_ulayer *u; + const struct uc_callbacks *u; }; void uc_setup(struct uc_conn *c, u16_t channel, - const struct uc_ulayer *u); + const struct uc_callbacks *u); int uc_send(struct uc_conn *c, node_id_t receiver_id); #endif /* __UC_H__ */