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 #include <board.h> 00043 00044 #ifndef BOARD 00045 #error "BOARD must be defined" 00046 #endif 00047 00048 /* 00049 ----------------------------------------------- 00050 ---------- Platform specific locking ---------- 00051 ----------------------------------------------- 00052 */ 00053 00058 #define NO_SYS 1 00059 00060 00061 /* 00062 ------------------------------------ 00063 ---------- Memory options ---------- 00064 ------------------------------------ 00065 */ 00071 #define MEM_ALIGNMENT 4 00072 00077 #define MEM_SIZE 16000 00078 00079 00080 /* 00081 ------------------------------------------------ 00082 ---------- Internal Memory Pool Sizes ---------- 00083 ------------------------------------------------ 00084 */ 00090 #if BOARD == EVK1101 /* Reduced RAM */ 00091 #define MEMP_NUM_PBUF 4 00092 #else 00093 #define MEMP_NUM_PBUF 30 00094 #endif 00095 00099 #define MEMP_NUM_RAW_PCB 4 00100 00106 #define MEMP_NUM_UDP_PCB 4 00107 00112 #define MEMP_NUM_TCP_PCB 2 00113 00118 #define MEMP_NUM_TCP_PCB_LISTEN 2 00119 00124 #if BOARD == EVK1101 /* Reduced RAM */ 00125 #define MEMP_NUM_TCP_SEG 2 00126 #else 00127 #define MEMP_NUM_TCP_SEG 32 00128 #endif 00129 00136 #define MEMP_NUM_ARP_QUEUE 2 00137 00142 #define MEMP_NUM_SYS_TIMEOUT 0 00143 00148 #define MEMP_NUM_NETBUF 0 00149 00154 #define MEMP_NUM_NETCONN 0 00155 00161 #define MEMP_NUM_TCPIP_MSG_API 0 00162 00168 #define MEMP_NUM_TCPIP_MSG_INPKT 0 00169 00173 #if BOARD == EVK1101 /* Reduced RAM */ 00174 #define PBUF_POOL_SIZE 2 00175 #else 00176 #define PBUF_POOL_SIZE 32 00177 #endif 00178 /* 00179 --------------------------------- 00180 ---------- ARP options ---------- 00181 --------------------------------- 00182 */ 00186 #define LWIP_ARP 1 00187 00188 /* 00189 -------------------------------- 00190 ---------- IP options ---------- 00191 -------------------------------- 00192 */ 00198 #define IP_FORWARD 0 00199 00205 #define IP_OPTIONS_ALLOWED 1 00206 00212 #define IP_REASSEMBLY 1 00213 00219 #define IP_FRAG 1 00220 00226 #define IP_REASS_MAXAGE 3 00227 00234 #if BOARD == EVK1101 /* Reduced RAM */ 00235 #define IP_REASS_MAX_PBUFS PBUF_POOL_SIZE 00236 #define MEMP_NUM_REASSDATA PBUF_POOL_SIZE-1 00237 #else 00238 #define IP_REASS_MAX_PBUFS 10 00239 #endif 00240 00246 #define IP_FRAG_USES_STATIC_BUF 0 00247 00251 #define IP_DEFAULT_TTL 255 00252 00253 /* 00254 ---------------------------------- 00255 ---------- ICMP options ---------- 00256 ---------------------------------- 00257 */ 00262 #define LWIP_ICMP 1 00263 00267 #define ICMP_TTL (IP_DEFAULT_TTL) 00268 00269 /* 00270 --------------------------------- 00271 ---------- RAW options ---------- 00272 --------------------------------- 00273 */ 00277 #define LWIP_RAW 1 00278 00279 /* 00280 ---------------------------------- 00281 ---------- DHCP options ---------- 00282 ---------------------------------- 00283 */ 00287 #define LWIP_DHCP 1 00288 00289 /* 00290 ------------------------------------ 00291 ---------- AUTOIP options ---------- 00292 ------------------------------------ 00293 */ 00297 #define LWIP_AUTOIP 0 00298 00299 /* 00300 ---------------------------------- 00301 ---------- SNMP options ---------- 00302 ---------------------------------- 00303 */ 00308 #define LWIP_SNMP 0 00309 #define SNMP_PRIVATE_MIB 0 00310 00311 /* 00312 ---------------------------------- 00313 ---------- IGMP options ---------- 00314 ---------------------------------- 00315 */ 00319 #define LWIP_IGMP 0 00320 00321 /* 00322 ---------------------------------- 00323 ---------- DNS options ----------- 00324 ---------------------------------- 00325 */ 00330 #define LWIP_DNS 0 00331 00332 /* 00333 --------------------------------- 00334 ---------- UDP options ---------- 00335 --------------------------------- 00336 */ 00340 #define LWIP_UDP 1 00341 00345 #define LWIP_UDPLITE 0 00346 00350 #define UDP_TTL (IP_DEFAULT_TTL) 00351 00352 /* 00353 --------------------------------- 00354 ---------- TCP options ---------- 00355 --------------------------------- 00356 */ 00360 #define LWIP_TCP 1 00361 00362 /* 00363 ---------------------------------- 00364 ---------- Pbuf options ---------- 00365 ---------------------------------- 00366 */ 00372 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 00373 00374 /* 00375 ------------------------------------ 00376 ---------- LOOPIF options ---------- 00377 ------------------------------------ 00378 */ 00382 #define LWIP_HAVE_LOOPIF 1 00383 #define LWIP_LOOPIF_MULTITHREADING 0 00384 00385 /* 00386 ---------------------------------------------- 00387 ---------- Sequential layer options ---------- 00388 ---------------------------------------------- 00389 */ 00390 00394 #define LWIP_NETCONN 0 00395 00396 /* 00397 ------------------------------------ 00398 ---------- Socket options ---------- 00399 ------------------------------------ 00400 */ 00404 #define LWIP_SOCKET 0 00405 00406 /* 00407 ---------------------------------------- 00408 ---------- Statistics options ---------- 00409 ---------------------------------------- 00410 */ 00414 #define LWIP_STATS 1 00415 #define LINK_STATS 1 00416 00417 /* Misc */ 00418 #define LWIP_NETIF_LINK_CALLBACK 1 00419 #define LWIP_NETIF_STATUS_CALLBACK 1 00420 #define LWIP_TIMEVAL_PRIVATE 0 00421 00422 #undef DHCP_DOES_ARP_CHECK 00423 00424 #if 0 00425 #define LWIP_DEBUG 1 00426 //#define NETIF_DEBUG LWIP_DBG_ON 00427 #define DHCP_DEBUG LWIP_DBG_ON 00428 //#define ICMP_DEBUG LWIP_DBG_ON 00429 //#define TCP_DEBUG LWIP_DBG_ON 00430 //#define TCP_RTO_DEBUG LWIP_DBG_ON 00431 //#define IP_DEBUG LWIP_DBG_ON 00432 //#define TCP_CWND_DEBUG LWIP_DBG_ON 00433 //#define ETHARP_DEBUG LWIP_DBG_ON 00434 //#define PBUF_DEBUG LWIP_DBG_ON 00435 #define TCP_INPUT_DEBUG LWIP_DBG_ON 00436 #define TCP_OUTPUT_DEBUG LWIP_DBG_ON 00437 #endif 00438 00439 #define ETH_PAD_SIZE WL_HEADER_SIZE /* size of wifiengine header */ 00440 #define MEM_LIBC_MALLOC 1 00441 00442 #define TCP_MSS 512 00443 #if BOARD == EVK1101 /* Reduced RAM */ 00444 #define TCP_SND_BUF (1460*1) /* MTU (1500) - IP - TCP hdrs == 1460 */ 00445 #else 00446 #define TCP_SND_BUF 4096 00447 #endif 00448 #endif /* __LWIPOPTS_H__ */