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 #define PROFILE_CONF_ON 0
37 #define ENERGEST_CONF_ON 0
38 #define LOG_CONF_ENABLED 1
39 #define RIMESTATS_CONF_ON 1
40 #define RIMESTATS_CONF_ENABLED 1
41 
42 #define COOJA 1
43 
44 #ifndef EEPROM_CONF_SIZE
45 #define EEPROM_CONF_SIZE 1024
46 #endif
47 
48 #define w_memcpy memcpy
49 
50 #if WITH_UIP
51 #if WITH_UIP6
52 #error WITH_UIP && WITH_IP6: Bad configuration
53 #endif /* WITH_UIP6 */
54 #endif /* WITH_UIP */
55 
56 #ifdef NETSTACK_CONF_H
57 
58 /* These header overrides the below default configuration */
59 #define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
60 #define NETSTACK_QUOTEME(s) #s
61 #include NETSTACK__QUOTEME(NETSTACK_CONF_H)
62 
63 #else /* NETSTACK_CONF_H */
64 
65 /* Default network config */
66 #if WITH_UIP6
67 
68 #define NULLRDC_CONF_802154_AUTOACK 1
69 #define NULLRDC_CONF_SEND_802154_ACK 1
70 #define NULLRDC_CONF_ACK_WAIT_TIME RTIMER_SECOND / 500
71 #define NULLRDC_CONF_AFTER_ACK_DETECTED_WAIT_TIME 0
72 
73 
74 /* Network setup for IPv6 */
75 #define NETSTACK_CONF_NETWORK sicslowpan_driver
76 #define NETSTACK_CONF_MAC csma_driver
77 #define NETSTACK_CONF_RDC nullrdc_driver
78 #define NETSTACK_CONF_RADIO cooja_radio_driver
79 #define NETSTACK_CONF_FRAMER framer_802154
80 
81 #else /* WITH_UIP6 */
82 
83 #if WITH_UIP
84 
85 /* Network setup for IPv4 */
86 #define NETSTACK_CONF_NETWORK rime_driver /* NOTE: uip_over_mesh. else: uip_driver */
87 #define NETSTACK_CONF_MAC nullmac_driver
88 #define NETSTACK_CONF_RDC nullrdc_driver
89 #define NETSTACK_CONF_RADIO cooja_radio_driver
90 #define UIP_CONF_IP_FORWARD 1
91 
92 #else /* WITH_UIP */
93 
94 /* Network setup for Rime */
95 #define NETSTACK_CONF_NETWORK rime_driver
96 #define NETSTACK_CONF_MAC csma_driver
97 #define NETSTACK_CONF_RDC nullrdc_driver
98 #define NETSTACK_CONF_RADIO cooja_radio_driver
99 /*#define NETSTACK_CONF_FRAMER framer_nullmac*/
100 
101 #endif /* WITH_UIP */
102 #endif /* WITH_UIP6 */
103 
104 #endif /* NETSTACK_CONF_H */
105 
106 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
107 
108 /* Default network config */
109 #if WITH_UIP6
110 
111 
112 
113 /* Network setup for IPv6 */
114 #define NETSTACK_CONF_NETWORK sicslowpan_driver
115 #define NETSTACK_CONF_MAC csma_driver
116 #define NETSTACK_CONF_RDC nullrdc_driver
117 #define NETSTACK_CONF_RADIO cooja_radio_driver
118 #define NETSTACK_CONF_FRAMER framer_802154
119 #define UIP_CONF_IPV6 1
120 
121 #define LINKADDR_CONF_SIZE 8
122 
123 #define UIP_CONF_LL_802154 1
124 #define UIP_CONF_LLH_LEN 0
125 
126 #define UIP_CONF_ROUTER 1
127 #ifndef UIP_CONF_IPV6_RPL
128 #define UIP_CONF_IPV6_RPL 1
129 #endif /* UIP_CONF_IPV6_RPL */
130 
131 /* configure number of neighbors and routes */
132 #ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
133 #define NBR_TABLE_CONF_MAX_NEIGHBORS 300
134 #endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
135 #ifndef UIP_CONF_MAX_ROUTES
136 #define UIP_CONF_MAX_ROUTES 300
137 #endif /* UIP_CONF_MAX_ROUTES */
138 
139 #define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1
140 
141 #define UIP_CONF_ND6_SEND_RA 0
142 #define UIP_CONF_ND6_REACHABLE_TIME 600000
143 #define UIP_CONF_ND6_RETRANS_TIMER 10000
144 
145 #define LINKADDR_CONF_SIZE 8
146 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
147 #define UIP_CONF_ND6_MAX_PREFIXES 3
148 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
149 
150 #ifndef UIP_CONF_IPV6_QUEUE_PKT
151 #define UIP_CONF_IPV6_QUEUE_PKT 1
152 #endif /* UIP_CONF_IPV6_QUEUE_PKT */
153 #define UIP_CONF_IPV6_CHECKS 1
154 #define UIP_CONF_IPV6_REASSEMBLY 0
155 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
156 #define UIP_CONF_ND6_MAX_PREFIXES 3
157 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
158 #define UIP_CONF_IP_FORWARD 0
159 #ifndef UIP_CONF_BUFFER_SIZE
160 #define UIP_CONF_BUFFER_SIZE 240
161 #endif
162 
163 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
164 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
165 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2
166 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
167 #ifndef SICSLOWPAN_CONF_FRAG
168 #define SICSLOWPAN_CONF_FRAG 1
169 #define SICSLOWPAN_CONF_MAXAGE 8
170 #endif /* SICSLOWPAN_CONF_FRAG */
171 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1
172 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
173 #ifndef SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS
174 #define SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS 8
175 #endif /* SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS */
176 
177 #endif /* WITH_UIP6 */
178 
179 
180 #define PACKETBUF_CONF_ATTRS_INLINE 1
181 
182 #define QUEUEBUF_CONF_NUM 16
183 
184 #define CC_CONF_REGISTER_ARGS 1
185 #define CC_CONF_FUNCTION_POINTER_ARGS 1
186 #define CC_CONF_FASTCALL
187 #define CC_CONF_VA_ARGS 1
188 #define CC_CONF_INLINE inline
189 
190 #define CCIF
191 #define CLIF
192 
193 /* These names are deprecated, use C99 names. */
194 #include <inttypes.h>
195 typedef uint8_t u8_t;
196 typedef uint16_t u16_t;
197 typedef uint32_t u32_t;
198 typedef int32_t s32_t;
199 
200 typedef unsigned short uip_stats_t;
201 
202 #define CLOCK_CONF_SECOND 1000L
203 typedef unsigned long clock_time_t;
204 typedef unsigned long rtimer_clock_t;
205 #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
206 
207 #define AODV_COMPLIANCE
208 #define AODV_NUM_RT_ENTRIES 32
209 
210 #define WITH_ASCII 1
211 
212 #define UIP_CONF_ICMP_DEST_UNREACH 1
213 
214 #define UIP_CONF_DHCP_LIGHT
215 #define UIP_CONF_LLH_LEN 0
216 #ifndef UIP_CONF_RECEIVE_WINDOW
217 #define UIP_CONF_RECEIVE_WINDOW 48
218 #endif
219 #ifndef UIP_CONF_TCP_MSS
220 #define UIP_CONF_TCP_MSS 48
221 #endif
222 #define UIP_CONF_MAX_CONNECTIONS 4
223 #define UIP_CONF_MAX_LISTENPORTS 8
224 #define UIP_CONF_UDP_CONNS 12
225 #define UIP_CONF_FWCACHE_SIZE 30
226 #define UIP_CONF_BROADCAST 1
227 #define UIP_ARCH_IPCHKSUM 1
228 #define UIP_CONF_UDP 1
229 #define UIP_CONF_UDP_CHECKSUMS 1
230 #define UIP_CONF_PINGADDRCONF 0
231 #define UIP_CONF_LOGGING 0
232 
233 #define UIP_CONF_TCP_SPLIT 0
234 
235 #if UIP_CONF_IPV6
236 #endif /* UIP_CONF_IPV6 */
237 
238 /* Turn off example-provided putchars */
239 #define SLIP_BRIDGE_CONF_NO_PUTCHAR 1
240 
241 
242 #define CFS_CONF_OFFSET_TYPE long
243 
244 /* include the project config */
245 /* PROJECT_CONF_H might be defined in the project Makefile */
246 #ifdef PROJECT_CONF_H
247 #include PROJECT_CONF_H
248 #endif /* PROJECT_CONF_H */
249 
250 #endif /* CONTIKI_CONF_H_ */