Contiki 3.x
contiki-conf.h
1 /*
2  * Copyright (c) 2006, Swedish Institute of Computer Science.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following
12  * disclaimer in the documentation and/or other materials provided
13  * with the distribution.
14  * 3. The name of the author may not be used to endorse or promote
15  * products derived from this software without specific prior
16  * written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
19  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
22  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
24  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  *
31  */
32 
33 #ifndef CONTIKI_CONF_H_
34 #define CONTIKI_CONF_H_
35 
36 #ifdef INCLUDE_SUBPLATFORM_CONF
37 #include "subplatform-conf.h"
38 #endif /* INCLUDE_SUBPLATFORM_CONF */
39 
40 #define PROFILE_CONF_ON 0
41 #define ENERGEST_CONF_ON 0
42 #define LOG_CONF_ENABLED 1
43 #define RIMESTATS_CONF_ON 1
44 #define RIMESTATS_CONF_ENABLED 1
45 
46 #define COOJA 1
47 
48 #ifndef EEPROM_CONF_SIZE
49 #define EEPROM_CONF_SIZE 1024
50 #endif
51 
52 #define w_memcpy memcpy
53 
54 #if NETSTACK_CONF_WITH_IPV4
55 #if NETSTACK_CONF_WITH_IPV6
56 #error NETSTACK_CONF_WITH_IPV4 && NETSTACK_CONF_WITH_IPV6: Bad configuration
57 #endif /* NETSTACK_CONF_WITH_IPV6 */
58 #endif /* NETSTACK_CONF_WITH_IPV4 */
59 
60 #ifdef NETSTACK_CONF_H
61 
62 /* These header overrides the below default configuration */
63 #define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
64 #define NETSTACK_QUOTEME(s) #s
65 #include NETSTACK__QUOTEME(NETSTACK_CONF_H)
66 
67 #else /* NETSTACK_CONF_H */
68 
69 /* Default network config */
70 #if NETSTACK_CONF_WITH_IPV6
71 
72 #define NULLRDC_CONF_802154_AUTOACK 1
73 #define NULLRDC_CONF_SEND_802154_ACK 1
74 #define NULLRDC_CONF_ACK_WAIT_TIME RTIMER_SECOND / 500
75 #define NULLRDC_CONF_AFTER_ACK_DETECTED_WAIT_TIME 0
76 
77 
78 /* Network setup for IPv6 */
79 #define NETSTACK_CONF_NETWORK sicslowpan_driver
80 #define NETSTACK_CONF_MAC csma_driver
81 #define NETSTACK_CONF_RDC nullrdc_driver
82 #define NETSTACK_CONF_RADIO cooja_radio_driver
83 #define NETSTACK_CONF_FRAMER framer_802154
84 
85 #else /* NETSTACK_CONF_WITH_IPV6 */
86 
87 #if NETSTACK_CONF_WITH_IPV4
88 
89 /* Network setup for IPv4 */
90 #define NETSTACK_CONF_NETWORK rime_driver /* NOTE: uip_over_mesh. else: uip_driver */
91 #define NETSTACK_CONF_MAC nullmac_driver
92 #define NETSTACK_CONF_RDC nullrdc_driver
93 #define NETSTACK_CONF_RADIO cooja_radio_driver
94 #define UIP_CONF_IP_FORWARD 1
95 
96 #else /* NETSTACK_CONF_WITH_IPV4 */
97 
98 /* Network setup for Rime */
99 #define NETSTACK_CONF_NETWORK rime_driver
100 #define NETSTACK_CONF_MAC csma_driver
101 #define NETSTACK_CONF_RDC nullrdc_driver
102 #define NETSTACK_CONF_RADIO cooja_radio_driver
103 /*#define NETSTACK_CONF_FRAMER framer_nullmac*/
104 
105 #endif /* NETSTACK_CONF_WITH_IPV4 */
106 #endif /* NETSTACK_CONF_WITH_IPV6 */
107 
108 #endif /* NETSTACK_CONF_H */
109 
110 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
111 
112 /* Default network config */
113 #if NETSTACK_CONF_WITH_IPV6
114 
115 
116 
117 /* Network setup for IPv6 */
118 #define NETSTACK_CONF_NETWORK sicslowpan_driver
119 #define NETSTACK_CONF_MAC csma_driver
120 #define NETSTACK_CONF_RDC nullrdc_driver
121 #define NETSTACK_CONF_RADIO cooja_radio_driver
122 #define NETSTACK_CONF_FRAMER framer_802154
123 #define NETSTACK_CONF_WITH_IPV6 1
124 
125 #define LINKADDR_CONF_SIZE 8
126 
127 #define UIP_CONF_LL_802154 1
128 #define UIP_CONF_LLH_LEN 0
129 
130 #define UIP_CONF_ROUTER 1
131 
132 /* configure number of neighbors and routes */
133 #ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
134 #define NBR_TABLE_CONF_MAX_NEIGHBORS 300
135 #endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
136 #ifndef UIP_CONF_MAX_ROUTES
137 #define UIP_CONF_MAX_ROUTES 300
138 #endif /* UIP_CONF_MAX_ROUTES */
139 #ifndef RPL_NS_CONF_LINK_NUM
140 #define RPL_NS_CONF_LINK_NUM 300
141 #endif /* RPL_NS_CONF_LINK_NUM */
142 
143 #define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1
144 
145 #ifndef UIP_CONF_ND6_SEND_RA
146 #define UIP_CONF_ND6_SEND_RA 0
147 #endif
148 
149 #ifndef UIP_CONF_ND6_REACHABLE_TIME
150 #define UIP_CONF_ND6_REACHABLE_TIME 600000
151 #endif
152 
153 #ifndef UIP_CONF_ND6_RETRANS_TIMER
154 #define UIP_CONF_ND6_RETRANS_TIMER 10000
155 #endif
156 
157 #define LINKADDR_CONF_SIZE 8
158 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
159 
160 #ifndef UIP_CONF_IPV6_QUEUE_PKT
161 #define UIP_CONF_IPV6_QUEUE_PKT 1
162 #endif /* UIP_CONF_IPV6_QUEUE_PKT */
163 #define UIP_CONF_IPV6_CHECKS 1
164 #define UIP_CONF_IPV6_REASSEMBLY 0
165 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
166 #define UIP_CONF_IP_FORWARD 0
167 
168 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
169 #ifndef SICSLOWPAN_CONF_FRAG
170 #define SICSLOWPAN_CONF_FRAG 1
171 #define SICSLOWPAN_CONF_MAXAGE 8
172 #endif /* SICSLOWPAN_CONF_FRAG */
173 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
174 
175 #endif /* NETSTACK_CONF_WITH_IPV6 */
176 
177 
178 #define PACKETBUF_CONF_ATTRS_INLINE 1
179 
180 #ifndef QUEUEBUF_CONF_NUM
181 #define QUEUEBUF_CONF_NUM 16
182 #endif
183 
184 #define CC_CONF_REGISTER_ARGS 1
185 #define CC_CONF_FUNCTION_POINTER_ARGS 1
186 #define CC_CONF_VA_ARGS 1
187 #define CC_CONF_INLINE inline
188 
189 #define CCIF
190 #define CLIF
191 
192 /* These names are deprecated, use C99 names. */
193 #include <inttypes.h>
194 typedef uint8_t u8_t;
195 typedef uint16_t u16_t;
196 typedef uint32_t u32_t;
197 typedef int32_t s32_t;
198 
199 typedef unsigned short uip_stats_t;
200 
201 #define CLOCK_CONF_SECOND 1000L
202 typedef unsigned long clock_time_t;
203 typedef unsigned long rtimer_clock_t;
204 #define RTIMER_CLOCK_DIFF(a,b) ((signed long)((a)-(b)))
205 
206 #define AODV_COMPLIANCE
207 #define AODV_NUM_RT_ENTRIES 32
208 
209 #define WITH_ASCII 1
210 
211 #define UIP_CONF_ICMP_DEST_UNREACH 1
212 
213 #define UIP_CONF_DHCP_LIGHT
214 #define UIP_CONF_LLH_LEN 0
215 #define UIP_CONF_MAX_CONNECTIONS 4
216 #define UIP_CONF_MAX_LISTENPORTS 8
217 #define UIP_CONF_UDP_CONNS 12
218 #define UIP_CONF_FWCACHE_SIZE 30
219 #define UIP_CONF_BROADCAST 1
220 #define UIP_ARCH_IPCHKSUM 1
221 #define UIP_CONF_UDP 1
222 #define UIP_CONF_UDP_CHECKSUMS 1
223 #define UIP_CONF_PINGADDRCONF 0
224 #define UIP_CONF_LOGGING 0
225 
226 #define UIP_CONF_TCP_SPLIT 0
227 
228 #if NETSTACK_CONF_WITH_IPV6
229 #endif /* NETSTACK_CONF_WITH_IPV6 */
230 
231 /* Turn off example-provided putchars */
232 #define SLIP_BRIDGE_CONF_NO_PUTCHAR 1
233 
234 
235 #define CFS_CONF_OFFSET_TYPE long
236 
237 #ifndef UIP_CONF_BUFFER_SIZE
238 #define UIP_CONF_BUFFER_SIZE 1600
239 #endif
240 
241 #ifndef UIP_CONF_TCP_MSS
242 #define UIP_CONF_TCP_MSS (UIP_CONF_BUFFER_SIZE - 70)
243 #endif
244 
245 #ifndef UIP_CONF_RECEIVE_WINDOW
246 #define UIP_CONF_RECEIVE_WINDOW (UIP_CONF_BUFFER_SIZE - 70)
247 #endif
248 
249 #define RF_CHANNEL 26
250 #define IEEE802154_CONF_PANID 0xABCD
251 #define NETSTACK_RADIO_MAX_PAYLOAD_LEN 125
252 
253 /* include the project config */
254 /* PROJECT_CONF_H might be defined in the project Makefile */
255 #ifdef PROJECT_CONF_H
256 #include PROJECT_CONF_H
257 #endif /* PROJECT_CONF_H */
258 
259 
260 #endif /* CONTIKI_CONF_H_ */