Contiki 2.6

cooja-contiki-conf.h

00001 /*
00002  * Copyright (c) 2006, Swedish Institute of Computer Science.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above
00011  *    copyright notice, this list of conditions and the following
00012  *    disclaimer in the documentation and/or other materials provided
00013  *    with the distribution.
00014  * 3. The name of the author may not be used to endorse or promote
00015  *    products derived from this software without specific prior
00016  *    written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00019  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00020  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00022  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00024  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00027  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
00030  * $Id: contiki-conf.h,v 1.17 2010/03/31 10:22:33 fros4943 Exp $
00031  *
00032  */
00033 
00034 #ifndef __CONTIKI_CONF_H__
00035 #define __CONTIKI_CONF_H__
00036 
00037 #define PROFILE_CONF_ON 0
00038 #define ENERGEST_CONF_ON 0
00039 #define LOG_CONF_ENABLED 1
00040 
00041 #define COOJA 1
00042 
00043 #if WITH_UIP
00044 #if WITH_UIP6
00045 #error WITH_UIP && WITH_IP6: Bad configuration
00046 #endif /* WITH_UIP6 */
00047 #endif /* WITH_UIP */
00048 
00049 #ifdef NETSTACK_CONF_H
00050 
00051 /* These header overrides the below default configuration */
00052 #define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
00053 #define NETSTACK_QUOTEME(s) #s
00054 #include NETSTACK__QUOTEME(NETSTACK_CONF_H)
00055 
00056 #else /* NETSTACK_CONF_H */
00057 
00058 /* Default network config */
00059 #if WITH_UIP6
00060 
00061 /* Network setup for IPv6 */
00062 #define NETSTACK_CONF_NETWORK       sicslowpan_driver
00063 #define NETSTACK_CONF_MAC           csma_driver
00064 #define NETSTACK_CONF_RDC           nullrdc_driver
00065 #define NETSTACK_CONF_RADIO         cooja_radio_driver
00066 #define NETSTACK_CONF_FRAMER        framer_802154
00067 
00068 #else /* WITH_UIP6 */
00069 
00070 #if WITH_UIP
00071 
00072 /* Network setup for IPv4 */
00073 #define NETSTACK_CONF_NETWORK rime_driver /* NOTE: uip_over_mesh. else: uip_driver */
00074 #define NETSTACK_CONF_MAC nullmac_driver
00075 #define NETSTACK_CONF_RDC nullrdc_driver
00076 #define NETSTACK_CONF_RADIO cooja_radio_driver
00077 #define UIP_CONF_IP_FORWARD           1
00078 
00079 #else /* WITH_UIP */
00080 
00081 /* Network setup for Rime */
00082 #define NETSTACK_CONF_NETWORK rime_driver
00083 #define NETSTACK_CONF_MAC csma_driver
00084 #define NETSTACK_CONF_RDC nullrdc_driver
00085 #define NETSTACK_CONF_RADIO cooja_radio_driver
00086 /*#define NETSTACK_CONF_FRAMER framer_nullmac*/
00087 
00088 #endif /* WITH_UIP */
00089 #endif /* WITH_UIP6 */
00090 
00091 #endif /* NETSTACK_CONF_H */
00092 
00093 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
00094 
00095 /* Default network config */
00096 #if WITH_UIP6
00097 
00098 
00099 
00100 /* Network setup for IPv6 */
00101 #define NETSTACK_CONF_NETWORK       sicslowpan_driver
00102 #define NETSTACK_CONF_MAC           csma_driver
00103 #define NETSTACK_CONF_RDC           nullrdc_driver
00104 #define NETSTACK_CONF_RADIO         cooja_radio_driver
00105 #define NETSTACK_CONF_FRAMER        framer_802154
00106 #define UIP_CONF_IPV6               1
00107 
00108 #define RIMEADDR_CONF_SIZE          8
00109 
00110 #define UIP_CONF_LL_802154          1
00111 #define UIP_CONF_LLH_LEN            0
00112 
00113 #define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 400
00114 
00115 #define UIP_CONF_ROUTER             1
00116 #ifndef UIP_CONF_IPV6_RPL
00117 #define UIP_CONF_IPV6_RPL           1
00118 #endif /* UIP_CONF_IPV6_RPL */
00119 
00120 /* configure number of neighbors and routes */
00121 #ifndef UIP_CONF_DS6_NBR_NBU
00122 #define UIP_CONF_DS6_NBR_NBU     20
00123 #endif /* UIP_CONF_DS6_NBR_NBU */
00124 #ifndef UIP_CONF_DS6_ROUTE_NBU
00125 #define UIP_CONF_DS6_ROUTE_NBU   20
00126 #endif /* UIP_CONF_DS6_ROUTE_NBU */
00127 
00128 #define UIP_CONF_ND6_SEND_RA            0
00129 #define UIP_CONF_ND6_REACHABLE_TIME     600000
00130 #define UIP_CONF_ND6_RETRANS_TIMER      10000
00131 
00132 #define RIMEADDR_CONF_SIZE            8
00133 #define UIP_CONF_NETIF_MAX_ADDRESSES  3
00134 #define UIP_CONF_ND6_MAX_PREFIXES     3
00135 #define UIP_CONF_ND6_MAX_NEIGHBORS    4
00136 #define UIP_CONF_ND6_MAX_DEFROUTERS   2
00137 
00138 #ifndef UIP_CONF_IPV6_QUEUE_PKT
00139 #define UIP_CONF_IPV6_QUEUE_PKT         1
00140 #endif /* UIP_CONF_IPV6_QUEUE_PKT */
00141 #define UIP_CONF_IPV6_CHECKS            1
00142 #define UIP_CONF_IPV6_REASSEMBLY        0
00143 #define UIP_CONF_NETIF_MAX_ADDRESSES    3
00144 #define UIP_CONF_ND6_MAX_PREFIXES       3
00145 #define UIP_CONF_ND6_MAX_NEIGHBORS      4
00146 #define UIP_CONF_ND6_MAX_DEFROUTERS     2
00147 #define UIP_CONF_IP_FORWARD             0
00148 #ifndef UIP_CONF_BUFFER_SIZE
00149 #define UIP_CONF_BUFFER_SIZE            240
00150 #endif
00151 
00152 #define SICSLOWPAN_CONF_COMPRESSION_IPV6        0
00153 #define SICSLOWPAN_CONF_COMPRESSION_HC1         1
00154 #define SICSLOWPAN_CONF_COMPRESSION_HC01        2
00155 #define SICSLOWPAN_CONF_COMPRESSION             SICSLOWPAN_COMPRESSION_HC06
00156 #ifndef SICSLOWPAN_CONF_FRAG
00157 #define SICSLOWPAN_CONF_FRAG                    1
00158 #define SICSLOWPAN_CONF_MAXAGE                  8
00159 #endif /* SICSLOWPAN_CONF_FRAG */
00160 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC        1
00161 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS       2
00162 #ifndef SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS
00163 #define SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS   8
00164 #endif /* SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS */
00165 
00166 #endif /* WITH_UIP6 */
00167 
00168 
00169 #define PACKETBUF_CONF_ATTRS_INLINE 1
00170 
00171 #define QUEUEBUF_CONF_NUM 16
00172 
00173 #define CC_CONF_REGISTER_ARGS          1
00174 #define CC_CONF_FUNCTION_POINTER_ARGS  1
00175 #define CC_CONF_FASTCALL
00176 #define CC_CONF_VA_ARGS                1
00177 #define CC_CONF_INLINE inline
00178 
00179 #define CCIF
00180 #define CLIF
00181 
00182 /* These names are deprecated, use C99 names. */
00183 #include <inttypes.h>
00184 typedef uint8_t u8_t;
00185 typedef uint16_t u16_t;
00186 typedef uint32_t u32_t;
00187 typedef int32_t s32_t;
00188 
00189 typedef unsigned short uip_stats_t;
00190 
00191 #define CLOCK_CONF_SECOND 1000L
00192 typedef unsigned long clock_time_t;
00193 typedef unsigned long rtimer_clock_t;
00194 #define RTIMER_CLOCK_LT(a,b)     ((signed long)((a)-(b)) < 0)
00195 
00196 #define AODV_COMPLIANCE
00197 #define AODV_NUM_RT_ENTRIES 32
00198 
00199 #define WITH_ASCII 1
00200 
00201 #define UIP_CONF_ICMP_DEST_UNREACH 1
00202 
00203 #define UIP_CONF_DHCP_LIGHT
00204 #define UIP_CONF_LLH_LEN         0
00205 #ifndef  UIP_CONF_RECEIVE_WINDOW
00206 #define UIP_CONF_RECEIVE_WINDOW  48
00207 #endif
00208 #ifndef  UIP_CONF_TCP_MSS
00209 #define UIP_CONF_TCP_MSS         48
00210 #endif
00211 #define UIP_CONF_MAX_CONNECTIONS 4
00212 #define UIP_CONF_MAX_LISTENPORTS 8
00213 #define UIP_CONF_UDP_CONNS       12
00214 #define UIP_CONF_FWCACHE_SIZE    30
00215 #define UIP_CONF_BROADCAST       1
00216 #define UIP_ARCH_IPCHKSUM        1
00217 #define UIP_CONF_UDP             1
00218 #define UIP_CONF_UDP_CHECKSUMS   1
00219 #define UIP_CONF_PINGADDRCONF    0
00220 #define UIP_CONF_LOGGING         0
00221 
00222 #define UIP_CONF_TCP_SPLIT       0
00223 
00224 #if UIP_CONF_IPV6
00225 #endif /* UIP_CONF_IPV6 */
00226 
00227 #define CFS_CONF_OFFSET_TYPE    long
00228 
00229 #endif /* __CONTIKI_CONF_H__ */