Renamed Rime nf module to netflood

This commit is contained in:
adamdunkels 2008-07-03 22:02:09 +00:00
parent c2c3835110
commit ec22f3c2fc
8 changed files with 24 additions and 26 deletions

View file

@ -33,7 +33,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: rime.h,v 1.18 2008/07/03 21:52:25 adamdunkels Exp $ * $Id: rime.h,v 1.19 2008/07/03 22:02:09 adamdunkels Exp $
*/ */
/** /**
@ -53,7 +53,7 @@
#include "net/rime/mh.h" #include "net/rime/mh.h"
#include "net/rime/neighbor-discovery.h" #include "net/rime/neighbor-discovery.h"
#include "net/rime/neighbor.h" #include "net/rime/neighbor.h"
#include "net/rime/nf.h" #include "net/rime/netflood.h"
#include "net/rime/polite.h" #include "net/rime/polite.h"
#include "net/rime/queuebuf.h" #include "net/rime/queuebuf.h"
#include "net/rime/rimeaddr.h" #include "net/rime/rimeaddr.h"

View file

@ -4,7 +4,7 @@ RIME_BASE = rimebuf.c queuebuf.c rimeaddr.c ctimer.c rime.c timesynch.c \
RIME_SINGLEHOP = broadcast.c stbroadcast.c unicast.c stunicast.c \ RIME_SINGLEHOP = broadcast.c stbroadcast.c unicast.c stunicast.c \
runicast.c abc.c \ runicast.c abc.c \
rucb.c polite.c ipolite.c rucb.c polite.c ipolite.c
RIME_MULTIHOP = nf.c mh.c rmh.c trickle.c RIME_MULTIHOP = netflood.c mh.c rmh.c trickle.c
RIME_MESH = mesh.c route.c route-discovery.c RIME_MESH = mesh.c route.c route-discovery.c
RIME_COLLECT = collect.c neighbor.c neighbor-discovery.c RIME_COLLECT = collect.c neighbor.c neighbor-discovery.c
RIME_RUDOLPH = rudolph0.c rudolph1.c rudolph2.c RIME_RUDOLPH = rudolph0.c rudolph1.c rudolph2.c

View file

@ -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.12 2008/07/03 21:52:25 adamdunkels Exp $ * $Id: collect.c,v 1.13 2008/07/03 22:02:10 adamdunkels Exp $
*/ */
/** /**
@ -50,7 +50,6 @@
#include "net/rime.h" #include "net/rime.h"
#include "net/rime/neighbor.h" #include "net/rime/neighbor.h"
#include "net/rime/nf.h"
#include "net/rime/collect.h" #include "net/rime/collect.h"
#include "dev/radio-sensor.h" #include "dev/radio-sensor.h"

View file

@ -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.7 2008/07/02 15:02:33 matsutsuka Exp $ * $Id: neighbor-discovery.c,v 1.8 2008/07/03 22:02:10 adamdunkels Exp $
*/ */
/** /**
@ -47,7 +47,6 @@
#include "net/rime.h" #include "net/rime.h"
#include "net/rime/neighbor.h" #include "net/rime/neighbor.h"
#include "net/rime/nf.h"
#include "net/rime/neighbor-discovery.h" #include "net/rime/neighbor-discovery.h"
#include "dev/radio-sensor.h" #include "dev/radio-sensor.h"

View file

@ -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.10 2008/06/26 11:19:22 adamdunkels Exp $ * $Id: route-discovery.c,v 1.11 2008/07/03 22:02:10 adamdunkels Exp $
*/ */
/** /**
@ -90,7 +90,7 @@ send_rreq(struct route_discovery_conn *c, rimeaddr_t *dest)
msg->rreq_id = c->rreq_id; msg->rreq_id = c->rreq_id;
rimeaddr_copy(&msg->dest, dest); rimeaddr_copy(&msg->dest, dest);
nf_send(&c->rreqconn, c->rreq_id); netflood_send(&c->rreqconn, c->rreq_id);
c->rreq_id++; c->rreq_id++;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -174,7 +174,7 @@ rrep_packet_received(struct unicast_conn *uc, rimeaddr_t *from)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
rreq_packet_received(struct nf_conn *nf, rimeaddr_t *from, rreq_packet_received(struct netflood_conn *nf, rimeaddr_t *from,
rimeaddr_t *originator, uint8_t seqno, uint8_t hops) rimeaddr_t *originator, uint8_t seqno, uint8_t hops)
{ {
struct route_msg *msg = rimebuf_dataptr(); struct route_msg *msg = rimebuf_dataptr();
@ -219,7 +219,7 @@ rreq_packet_received(struct nf_conn *nf, rimeaddr_t *from,
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static const struct unicast_callbacks rrep_callbacks = {rrep_packet_received}; static const struct unicast_callbacks rrep_callbacks = {rrep_packet_received};
static const struct nf_callbacks rreq_callbacks = {rreq_packet_received, NULL, NULL}; static const struct netflood_callbacks rreq_callbacks = {rreq_packet_received, NULL, NULL};
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
route_discovery_open(struct route_discovery_conn *c, route_discovery_open(struct route_discovery_conn *c,
@ -227,7 +227,7 @@ route_discovery_open(struct route_discovery_conn *c,
uint16_t channels, uint16_t channels,
const struct route_discovery_callbacks *callbacks) const struct route_discovery_callbacks *callbacks)
{ {
nf_open(&c->rreqconn, time, channels + 0, &rreq_callbacks); netflood_open(&c->rreqconn, time, channels + 0, &rreq_callbacks);
unicast_open(&c->rrepconn, channels + 1, &rrep_callbacks); unicast_open(&c->rrepconn, channels + 1, &rrep_callbacks);
c->cb = callbacks; c->cb = callbacks;
} }
@ -236,7 +236,7 @@ void
route_discovery_close(struct route_discovery_conn *c) route_discovery_close(struct route_discovery_conn *c)
{ {
unicast_close(&c->rrepconn); unicast_close(&c->rrepconn);
nf_close(&c->rreqconn); netflood_close(&c->rreqconn);
ctimer_stop(&c->t); ctimer_stop(&c->t);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View file

@ -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.6 2008/06/26 11:19:22 adamdunkels Exp $ * $Id: route-discovery.h,v 1.7 2008/07/03 22:02:10 adamdunkels Exp $
*/ */
/** /**
@ -59,7 +59,7 @@
#define __ROUTE_DISCOVERY_H__ #define __ROUTE_DISCOVERY_H__
#include "net/rime/unicast.h" #include "net/rime/unicast.h"
#include "net/rime/nf.h" #include "net/rime/netflood.h"
struct route_discovery_conn; struct route_discovery_conn;
@ -71,7 +71,7 @@ struct route_discovery_callbacks {
#define ROUTE_DISCOVERY_ENTRIES 8 #define ROUTE_DISCOVERY_ENTRIES 8
struct route_discovery_conn { struct route_discovery_conn {
struct nf_conn rreqconn; struct netflood_conn rreqconn;
struct unicast_conn rrepconn; struct unicast_conn rrepconn;
struct ctimer t; struct ctimer t;
rimeaddr_t last_rreq_originator; rimeaddr_t last_rreq_originator;

View file

@ -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.8 2008/02/25 02:14:35 adamdunkels Exp $ * $Id: trickle.c,v 1.9 2008/07/03 22:02:10 adamdunkels Exp $
*/ */
/** /**
@ -71,7 +71,7 @@ send(void *ptr)
if(c->q != NULL) { if(c->q != NULL) {
queuebuf_to_rimebuf(c->q); queuebuf_to_rimebuf(c->q);
nf_send(&c->c, c->seqno); netflood_send(&c->c, c->seqno);
ctimer_set(&c->t, c->interval << c->interval_scaling, ctimer_set(&c->t, c->interval << c->interval_scaling,
send, c); send, c);
} else { } else {
@ -81,7 +81,7 @@ send(void *ptr)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
recv(struct nf_conn *nf, rimeaddr_t *from, recv(struct netflood_conn *nf, rimeaddr_t *from,
rimeaddr_t *originator, uint8_t seqno, uint8_t hops) rimeaddr_t *originator, uint8_t seqno, uint8_t hops)
{ {
struct trickle_conn *c = (struct trickle_conn *)nf; struct trickle_conn *c = (struct trickle_conn *)nf;
@ -113,7 +113,7 @@ recv(struct nf_conn *nf, rimeaddr_t *from,
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
sent_or_dropped(struct nf_conn *nf) sent_or_dropped(struct netflood_conn *nf)
{ {
struct trickle_conn *c = (struct trickle_conn *)nf; struct trickle_conn *c = (struct trickle_conn *)nf;
@ -123,7 +123,7 @@ sent_or_dropped(struct nf_conn *nf)
} }
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static const struct nf_callbacks nf = {recv, static const struct netflood_callbacks nf = {recv,
sent_or_dropped, sent_or_dropped,
sent_or_dropped}; sent_or_dropped};
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -131,7 +131,7 @@ void
trickle_open(struct trickle_conn *c, clock_time_t interval, trickle_open(struct trickle_conn *c, clock_time_t interval,
uint16_t channel, const struct trickle_callbacks *cb) uint16_t channel, const struct trickle_callbacks *cb)
{ {
nf_open(&c->c, interval, channel, &nf); netflood_open(&c->c, interval, channel, &nf);
c->cb = cb; c->cb = cb;
c->q = NULL; c->q = NULL;
c->interval = interval; c->interval = interval;
@ -140,7 +140,7 @@ trickle_open(struct trickle_conn *c, clock_time_t interval,
void void
trickle_close(struct trickle_conn *c) trickle_close(struct trickle_conn *c)
{ {
nf_close(&c->c); netflood_close(&c->c);
ctimer_stop(&c->t); ctimer_stop(&c->t);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View file

@ -45,7 +45,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: trickle.h,v 1.7 2008/02/24 22:05:27 adamdunkels Exp $ * $Id: trickle.h,v 1.8 2008/07/03 22:02:10 adamdunkels Exp $
*/ */
/** /**
@ -58,7 +58,7 @@
#ifndef __TRICKLE_H__ #ifndef __TRICKLE_H__
#define __TRICKLE_H__ #define __TRICKLE_H__
#include "net/rime/nf.h" #include "net/rime/netflood.h"
struct trickle_conn; struct trickle_conn;
@ -67,7 +67,7 @@ struct trickle_callbacks {
}; };
struct trickle_conn { struct trickle_conn {
struct nf_conn c; struct netflood_conn c;
const struct trickle_callbacks *cb; const struct trickle_callbacks *cb;
struct ctimer t; struct ctimer t;
struct queuebuf *q; struct queuebuf *q;