00001 00007 /* 00008 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 00009 * All rights reserved. 00010 * 00011 * Redistribution and use in source and binary forms, with or without modification, 00012 * are permitted provided that the following conditions are met: 00013 * 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. The name of the author may not be used to endorse or promote products 00020 * derived from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00023 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00025 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00026 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00027 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00028 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00029 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00030 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00031 * OF SUCH DAMAGE. 00032 * 00033 * This file is part of the lwIP TCP/IP stack. 00034 * 00035 * Author: Adam Dunkels <adam@sics.se> 00036 * 00037 */ 00038 #ifndef __LWIPOPTS_H__ 00039 #define __LWIPOPTS_H__ 00040 00041 #include "wl_api.h" 00042 00043 /* 00044 ----------------------------------------------- 00045 ---------- Platform specific locking ---------- 00046 ----------------------------------------------- 00047 */ 00048 00053 #define NO_SYS 1 00054 00055 00056 /* 00057 ------------------------------------ 00058 ---------- Memory options ---------- 00059 ------------------------------------ 00060 */ 00066 #define MEM_ALIGNMENT 4 00067 00072 #define MEM_SIZE 16000 00073 00074 00075 /* 00076 ------------------------------------------------ 00077 ---------- Internal Memory Pool Sizes ---------- 00078 ------------------------------------------------ 00079 */ 00085 #if BOARD == EVK1101 /* Reduced RAM */ 00086 #define MEMP_NUM_PBUF 8 00087 #else 00088 #define MEMP_NUM_PBUF 30 00089 #endif 00090 00094 #define MEMP_NUM_RAW_PCB 2 00095 00101 #define MEMP_NUM_UDP_PCB 2 00102 00107 #define MEMP_NUM_TCP_PCB 2 00108 00113 #if BOARD == EVK1101 /* Reduced RAM */ 00114 #define MEMP_NUM_TCP_PCB_LISTEN 2 00115 #else 00116 #define MEMP_NUM_TCP_PCB_LISTEN 8 00117 #endif 00118 00123 #if BOARD == EVK1101 /* Reduced RAM */ 00124 #define MEMP_NUM_TCP_SEG 8 00125 #else 00126 #define MEMP_NUM_TCP_SEG 32 00127 #endif 00128 00135 #define MEMP_NUM_ARP_QUEUE 2 00136 00141 #define MEMP_NUM_SYS_TIMEOUT 0 00142 00147 #define MEMP_NUM_NETBUF 0 00148 00153 #define MEMP_NUM_NETCONN 0 00154 00160 #define MEMP_NUM_TCPIP_MSG_API 0 00161 00167 #define MEMP_NUM_TCPIP_MSG_INPKT 0 00168 00172 #if BOARD == EVK1101 /* Reduced RAM */ 00173 #define PBUF_POOL_SIZE 4 00174 #else 00175 #define PBUF_POOL_SIZE 32 00176 #endif 00177 /* 00178 --------------------------------- 00179 ---------- ARP options ---------- 00180 --------------------------------- 00181 */ 00185 #define LWIP_ARP 1 00186 00187 /* 00188 -------------------------------- 00189 ---------- IP options ---------- 00190 -------------------------------- 00191 */ 00197 #define IP_FORWARD 0 00198 00204 #define IP_OPTIONS_ALLOWED 1 00205 00211 #define IP_REASSEMBLY 1 00212 00218 #define IP_FRAG 1 00219 00225 #define IP_REASS_MAXAGE 3 00226 00233 #define IP_REASS_MAX_PBUFS 10 00234 00240 #define IP_FRAG_USES_STATIC_BUF 0 00241 00245 #define IP_DEFAULT_TTL 255 00246 00247 /* 00248 ---------------------------------- 00249 ---------- ICMP options ---------- 00250 ---------------------------------- 00251 */ 00256 #define LWIP_ICMP 1 00257 00261 #define ICMP_TTL (IP_DEFAULT_TTL) 00262 00263 /* 00264 --------------------------------- 00265 ---------- RAW options ---------- 00266 --------------------------------- 00267 */ 00271 #define LWIP_RAW 1 00272 00273 /* 00274 ---------------------------------- 00275 ---------- DHCP options ---------- 00276 ---------------------------------- 00277 */ 00281 #define LWIP_DHCP 1 00282 00283 /* 00284 ------------------------------------ 00285 ---------- AUTOIP options ---------- 00286 ------------------------------------ 00287 */ 00291 #define LWIP_AUTOIP 0 00292 00293 /* 00294 ---------------------------------- 00295 ---------- SNMP options ---------- 00296 ---------------------------------- 00297 */ 00302 #define LWIP_SNMP 0 00303 #define SNMP_PRIVATE_MIB 0 00304 00305 /* 00306 ---------------------------------- 00307 ---------- IGMP options ---------- 00308 ---------------------------------- 00309 */ 00313 #define LWIP_IGMP 0 00314 00315 /* 00316 ---------------------------------- 00317 ---------- DNS options ----------- 00318 ---------------------------------- 00319 */ 00324 #define LWIP_DNS 0 00325 00326 /* 00327 --------------------------------- 00328 ---------- UDP options ---------- 00329 --------------------------------- 00330 */ 00334 #define LWIP_UDP 1 00335 00339 #define LWIP_UDPLITE 0 00340 00344 #define UDP_TTL (IP_DEFAULT_TTL) 00345 00346 /* 00347 --------------------------------- 00348 ---------- TCP options ---------- 00349 --------------------------------- 00350 */ 00354 #define LWIP_TCP 1 00355 00356 /* 00357 ---------------------------------- 00358 ---------- Pbuf options ---------- 00359 ---------------------------------- 00360 */ 00366 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 00367 00368 /* 00369 ------------------------------------ 00370 ---------- LOOPIF options ---------- 00371 ------------------------------------ 00372 */ 00376 #define LWIP_HAVE_LOOPIF 1 00377 #define LWIP_LOOPIF_MULTITHREADING 0 00378 00379 /* 00380 ---------------------------------------------- 00381 ---------- Sequential layer options ---------- 00382 ---------------------------------------------- 00383 */ 00384 00388 #define LWIP_NETCONN 0 00389 00390 /* 00391 ------------------------------------ 00392 ---------- Socket options ---------- 00393 ------------------------------------ 00394 */ 00398 #define LWIP_SOCKET 0 00399 00400 /* 00401 ---------------------------------------- 00402 ---------- Statistics options ---------- 00403 ---------------------------------------- 00404 */ 00408 #define LWIP_STATS 1 00409 #define LINK_STATS 1 00410 00411 /* Misc */ 00412 #define LWIP_NETIF_LINK_CALLBACK 1 00413 #define LWIP_NETIF_STATUS_CALLBACK 1 00414 #define LWIP_TIMEVAL_PRIVATE 0 00415 00416 #undef DHCP_DOES_ARP_CHECK 00417 00418 #if 0 00419 #define LWIP_DEBUG 1 00420 //#define NETIF_DEBUG LWIP_DBG_ON 00421 #define DHCP_DEBUG LWIP_DBG_ON 00422 //#define ICMP_DEBUG LWIP_DBG_ON 00423 //#define TCP_DEBUG LWIP_DBG_ON 00424 //#define TCP_RTO_DEBUG LWIP_DBG_ON 00425 //#define IP_DEBUG LWIP_DBG_ON 00426 //#define TCP_CWND_DEBUG LWIP_DBG_ON 00427 //#define ETHARP_DEBUG LWIP_DBG_ON 00428 //#define PBUF_DEBUG LWIP_DBG_ON 00429 #define TCP_INPUT_DEBUG LWIP_DBG_ON 00430 #define TCP_OUTPUT_DEBUG LWIP_DBG_ON 00431 #endif 00432 00433 #define ETH_PAD_SIZE WL_HEADER_SIZE /* size of wifiengine header */ 00434 #define MEM_LIBC_MALLOC 1 00435 00436 #define TCP_MSS 512 00437 #if BOARD == EVK1101 /* Reduced RAM */ 00438 #define TCP_SND_BUF (1460*2) /* MTU (1500) - IP - TCP hdrs == 1460 */ 00439 #else 00440 #define TCP_SND_BUF 4096 00441 #endif 00442 #endif /* __LWIPOPTS_H__ */