Contiki 2.6

contiki-conf.h

00001 /*
00002  * Copyright (c) 2005, 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 copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the Institute nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  *
00029  * This file is part of the Contiki operating system.
00030  *
00031  * @(#)$Id: contiki-conf.h,v 1.12 2009/09/09 21:11:24 adamdunkels Exp $
00032  */
00033 
00034 #ifndef __CONTIKI_CONF_H__
00035 #define __CONTIKI_CONF_H__
00036 
00037 #include <inttypes.h>
00038 #ifndef WIN32_LEAN_AND_MEAN
00039 #include <sys/select.h>
00040 #endif
00041 
00042 struct select_callback {
00043   int  (* set_fd)(fd_set *fdr, fd_set *fdw);
00044   void (* handle_fd)(fd_set *fdr, fd_set *fdw);
00045 };
00046 int select_set_callback(int fd, const struct select_callback *callback);
00047 
00048 #define CC_CONF_REGISTER_ARGS          1
00049 #define CC_CONF_FUNCTION_POINTER_ARGS  1
00050 #define CC_CONF_FASTCALL
00051 #define CC_CONF_VA_ARGS                1
00052 /*#define CC_CONF_INLINE                 inline*/
00053 
00054 
00055 #define CCIF
00056 #define CLIF
00057 
00058 /* These names are deprecated, use C99 names. */
00059 typedef uint8_t   u8_t;
00060 typedef uint16_t u16_t;
00061 typedef uint32_t u32_t;
00062 typedef  int32_t s32_t;
00063 
00064 typedef unsigned short uip_stats_t;
00065 
00066 #define UIP_CONF_UDP             1
00067 #define UIP_CONF_MAX_CONNECTIONS 40
00068 #define UIP_CONF_MAX_LISTENPORTS 40
00069 #define UIP_CONF_BUFFER_SIZE     420
00070 #define UIP_CONF_BYTE_ORDER      UIP_LITTLE_ENDIAN
00071 #define UIP_CONF_TCP       1
00072 #define UIP_CONF_TCP_SPLIT       0
00073 #define UIP_CONF_LOGGING         0
00074 #define UIP_CONF_UDP_CHECKSUMS   1
00075 
00076 #ifndef NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE
00077 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
00078 #endif /* NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE */
00079 
00080 #if UIP_CONF_IPV6
00081 
00082 #define RIMEADDR_CONF_SIZE              8
00083 
00084 #ifndef NETSTACK_CONF_MAC
00085 #define NETSTACK_CONF_MAC     nullmac_driver
00086 #endif /* NETSTACK_CONF_MAC */
00087 
00088 #ifndef NETSTACK_CONF_RDC
00089 #define NETSTACK_CONF_RDC     nullrdc_driver
00090 #endif /* NETSTACK_CONF_RDC */
00091 
00092 #ifndef NETSTACK_CONF_RADIO
00093 #define NETSTACK_CONF_RADIO   nullradio_driver
00094 #endif /* NETSTACK_CONF_RADIO */
00095 
00096 #ifndef NETSTACK_CONF_FRAMER
00097 #define NETSTACK_CONF_FRAMER  framer_802154
00098 #endif /* NETSTACK_CONF_FRAMER */
00099 
00100 #define NETSTACK_CONF_NETWORK sicslowpan_driver
00101 
00102 #define UIP_CONF_ROUTER                 1
00103 #ifndef UIP_CONF_IPV6_RPL
00104 #define UIP_CONF_IPV6_RPL               1
00105 #endif /* UIP_CONF_IPV6_RPL */
00106 
00107 #define SICSLOWPAN_CONF_COMPRESSION_IPV6        0
00108 #define SICSLOWPAN_CONF_COMPRESSION_HC1         1
00109 #define SICSLOWPAN_CONF_COMPRESSION_HC01        2
00110 #define SICSLOWPAN_CONF_COMPRESSION             SICSLOWPAN_COMPRESSION_HC06
00111 #ifndef SICSLOWPAN_CONF_FRAG
00112 #define SICSLOWPAN_CONF_FRAG                    1
00113 #define SICSLOWPAN_CONF_MAXAGE                  8
00114 #endif /* SICSLOWPAN_CONF_FRAG */
00115 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC        1
00116 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS       2
00117 #ifndef SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS
00118 #define SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS   5
00119 #endif /* SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS */
00120 
00121 #define UIP_CONF_IPV6_CHECKS     1
00122 #define UIP_CONF_IPV6_QUEUE_PKT  1
00123 #define UIP_CONF_IPV6_REASSEMBLY 0
00124 #define UIP_CONF_NETIF_MAX_ADDRESSES  3
00125 #define UIP_CONF_ND6_MAX_PREFIXES     3
00126 #define UIP_CONF_ND6_MAX_NEIGHBORS    4
00127 #define UIP_CONF_ND6_MAX_DEFROUTERS   2
00128 #define UIP_CONF_ICMP6           1
00129 
00130 /* configure number of neighbors and routes */
00131 #ifndef UIP_CONF_DS6_NBR_NBU
00132 #define UIP_CONF_DS6_NBR_NBU     30
00133 #endif /* UIP_CONF_DS6_NBR_NBU */
00134 #ifndef UIP_CONF_DS6_ROUTE_NBU
00135 #define UIP_CONF_DS6_ROUTE_NBU   30
00136 #endif /* UIP_CONF_DS6_ROUTE_NBU */
00137 
00138 #define UIP_CONF_ND6_SEND_RA            0
00139 #define UIP_CONF_ND6_REACHABLE_TIME     600000
00140 #define UIP_CONF_ND6_RETRANS_TIMER      10000
00141 
00142 #define UIP_CONF_IP_FORWARD             0
00143 #ifndef UIP_CONF_BUFFER_SIZE
00144 #define UIP_CONF_BUFFER_SIZE            240
00145 #endif
00146 
00147 
00148 #define UIP_CONF_LLH_LEN                0
00149 #define UIP_CONF_LL_802154              1
00150 
00151 #define UIP_CONF_ICMP_DEST_UNREACH 1
00152 
00153 #define UIP_CONF_DHCP_LIGHT
00154 #define UIP_CONF_RECEIVE_WINDOW  48
00155 #define UIP_CONF_TCP_MSS         48
00156 #define UIP_CONF_UDP_CONNS       12
00157 #define UIP_CONF_FWCACHE_SIZE    30
00158 #define UIP_CONF_BROADCAST       1
00159 #define UIP_ARCH_IPCHKSUM        1
00160 #define UIP_CONF_UDP             1
00161 #define UIP_CONF_UDP_CHECKSUMS   1
00162 #define UIP_CONF_PINGADDRCONF    0
00163 #define UIP_CONF_LOGGING         0
00164 
00165 
00166 
00167 #endif /* UIP_CONF_IPV6 */
00168 
00169 typedef unsigned long clock_time_t;
00170 
00171 #define CLOCK_CONF_SECOND 1000
00172 
00173 #define LOG_CONF_ENABLED 1
00174 
00175 /* Not part of C99 but actually present */
00176 int strcasecmp(const char*, const char*);
00177 
00178 /* include the project config */
00179 /* PROJECT_CONF_H might be defined in the project Makefile */
00180 #ifdef PROJECT_CONF_H
00181 #include PROJECT_CONF_H
00182 #endif /* PROJECT_CONF_H */
00183 
00184 #endif /* __CONTIKI_CONF_H__ */