Contiki-Inga 3.x
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
core
net
rime
rime.h
Go to the documentation of this file.
1
/**
2
* \addtogroup rime
3
* @{
4
*/
5
6
/*
7
* Copyright (c) 2006, Swedish Institute of Computer Science.
8
* All rights reserved.
9
*
10
* Redistribution and use in source and binary forms, with or without
11
* modification, are permitted provided that the following conditions
12
* are met:
13
* 1. Redistributions of source code must retain the above copyright
14
* notice, this list of conditions and the following disclaimer.
15
* 2. Redistributions in binary form must reproduce the above copyright
16
* notice, this list of conditions and the following disclaimer in the
17
* documentation and/or other materials provided with the distribution.
18
* 3. Neither the name of the Institute nor the names of its contributors
19
* may be used to endorse or promote products derived from this software
20
* without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
23
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
26
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32
* SUCH DAMAGE.
33
*
34
* This file is part of the Contiki operating system.
35
*
36
*/
37
38
/**
39
* \file
40
* Header file for the Rime stack
41
* \author
42
* Adam Dunkels <adam@sics.se>
43
*/
44
45
#ifndef RIME_H_
46
#define RIME_H_
47
48
#include "
net/rime/announcement.h
"
49
#include "
net/rime/collect.h
"
50
#include "
net/rime/ipolite.h
"
51
#include "
net/rime/mesh.h
"
52
#include "
net/rime/multihop.h
"
53
#include "
net/rime/neighbor-discovery.h
"
54
#include "
net/rime/netflood.h
"
55
#include "
net/rime/polite-announcement.h
"
56
#include "
net/rime/polite.h
"
57
#include "
net/queuebuf.h
"
58
#include "
net/linkaddr.h
"
59
#include "
net/packetbuf.h
"
60
#include "
net/rime/rimestats.h
"
61
#include "
net/rime/rmh.h
"
62
#include "
net/rime/route-discovery.h
"
63
#include "
net/rime/route.h
"
64
#include "
net/rime/rucb.h
"
65
#include "
net/rime/runicast.h
"
66
#include "
net/rime/timesynch.h
"
67
#include "
net/rime/trickle.h
"
68
69
#include "
net/mac/mac.h
"
70
/**
71
* \brief Initialize Rime
72
*
73
* This function should be called from the system boot up
74
* code to initialize Rime.
75
*/
76
int
rime_init
(
void
);
77
78
/**
79
* \brief Send an incoming packet to Rime
80
*
81
* This function should be called by the network driver to
82
* hand over a packet to Rime for further processing. The
83
* packet should be placed in the packetbuf (with
84
* packetbuf_copyfrom()) before calling this function.
85
*
86
*/
87
void
rime_input
(
void
);
88
89
int
rime_output(
struct
channel *c);
90
91
struct
rime_sniffer {
92
struct
rime_sniffer *next;
93
void (* input_callback)(void);
94
void (* output_callback)(
int
mac_status);
95
};
96
97
#define RIME_SNIFFER(name, input_callback, output_callback) \
98
static struct rime_sniffer name = { NULL, input_callback, output_callback }
99
100
void
rime_sniffer_add(
struct
rime_sniffer *s);
101
void
rime_sniffer_remove(
struct
rime_sniffer *s);
102
103
extern
const
struct
network_driver
rime_driver;
104
105
/* Generic Rime return values. */
106
enum
{
107
RIME_OK,
108
RIME_ERR,
109
RIME_ERR_CONTENTION,
110
RIME_ERR_NOACK,
111
};
112
#endif
/* RIME_H_ */
113
114
/** @} */
115
/** @} */
Generated on Thu Apr 24 2014 16:26:12 for Contiki-Inga 3.x by
1.8.3.1