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