N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/OrbisQuartus/server/l4/patches/lwip-ore/lwipopts.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
00003  * All rights reserved. 
00004  * 
00005  * Redistribution and use in source and binary forms, with or without modification, 
00006  * are permitted provided that the following conditions are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright notice,
00009  *    this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright notice,
00011  *    this list of conditions and the following disclaimer in the documentation
00012  *    and/or other materials provided with the distribution.
00013  * 3. The name of the author may not be used to endorse or promote products
00014  *    derived from this software without specific prior written permission. 
00015  *
00016  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
00017  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
00018  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
00019  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00020  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
00021  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
00024  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
00025  * OF SUCH DAMAGE.
00026  *
00027  * This file is part of the lwIP TCP/IP stack.
00028  * 
00029  * Author: Adam Dunkels <adam@sics.se>
00030  *
00031  */
00032 #ifndef __LWIPOPTS_H__
00033 #define __LWIPOPTS_H__
00034 
00035 /* ---------- Memory options ---------- */
00036 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
00037    lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
00038    byte alignment -> define MEM_ALIGNMENT to 2. */
00039 #define MEM_ALIGNMENT           1
00040 
00041 /* MEM_SIZE: the size of the heap memory. If the application will send
00042 a lot of data that needs to be copied, this should be set high. */
00043 #define MEM_SIZE                1600
00044 
00045 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
00046    sends a lot of data out of ROM (or other static memory), this
00047    should be set high. */
00048 #define MEMP_NUM_PBUF           16
00049 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
00050    per active UDP "connection". */
00051 #define MEMP_NUM_UDP_PCB        4
00052 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
00053    connections. */
00054 #define MEMP_NUM_TCP_PCB        5
00055 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
00056    connections. */
00057 #define MEMP_NUM_TCP_PCB_LISTEN 8
00058 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
00059    segments. */
00060 #define MEMP_NUM_TCP_SEG        16
00061 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
00062    timeouts. */
00063 #define MEMP_NUM_SYS_TIMEOUT    3
00064 
00065 
00066 /* The following four are used only with the sequential API and can be
00067    set to 0 if the application only will use the raw API. */
00068 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
00069 #define MEMP_NUM_NETBUF         2
00070 /* MEMP_NUM_NETCONN: the number of struct netconns. */
00071 #define MEMP_NUM_NETCONN        4
00072 /* MEMP_NUM_APIMSG: the number of struct api_msg, used for
00073    communication between the TCP/IP stack and the sequential
00074    programs. */
00075 #define MEMP_NUM_API_MSG        8
00076 /* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
00077    for sequential API communication and incoming packets. Used in
00078    src/api/tcpip.c. */
00079 #define MEMP_NUM_TCPIP_MSG      8
00080 
00081 /* These two control is reclaimer functions should be compiled
00082    in. Should always be turned on (1). */
00083 #define MEM_RECLAIM             1
00084 #define MEMP_RECLAIM            1
00085 
00086 /* ---------- Pbuf options ---------- */
00087 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
00088 #define PBUF_POOL_SIZE          6
00089 
00090 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
00091 #define PBUF_POOL_BUFSIZE       128
00092 
00093 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
00094    link level header. */
00095 #define PBUF_LINK_HLEN          16
00096 
00097 /* ---------- TCP options ---------- */
00098 #define LWIP_TCP                1
00099 #define TCP_TTL                 255
00100 
00101 /* Controls if TCP should queue segments that arrive out of
00102    order. Define to 0 if your device is low on memory. */
00103 #define TCP_QUEUE_OOSEQ         1
00104 
00105 /* TCP Maximum segment size. */
00106 #define TCP_MSS                 128
00107 
00108 /* TCP sender buffer space (bytes). */
00109 #define TCP_SND_BUF             256
00110 
00111 /* TCP sender buffer space (pbufs). This must be at least = 2 *
00112    TCP_SND_BUF/TCP_MSS for things to work. */
00113 #define TCP_SND_QUEUELEN        4 * TCP_SND_BUF/TCP_MSS
00114 
00115 /* TCP receive window. */
00116 #define TCP_WND                 1024
00117 
00118 /* Maximum number of retransmissions of data segments. */
00119 #define TCP_MAXRTX              12
00120 
00121 /* Maximum number of retransmissions of SYN segments. */
00122 #define TCP_SYNMAXRTX           4
00123 
00124 /* ---------- ARP options ---------- */
00125 #define ARP_TABLE_SIZE 10
00126 #define ARP_QUEUEING 1
00127 
00128 /* ---------- IP options ---------- */
00129 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
00130    IP packets across network interfaces. If you are going to run lwIP
00131    on a device with only one network interface, define this to 0. */
00132 #define IP_FORWARD              1
00133 
00134 /* If defined to 1, IP options are allowed (but not parsed). If
00135    defined to 0, all packets with IP options are dropped. */
00136 #define IP_OPTIONS              1
00137 
00138 /* ---------- ICMP options ---------- */
00139 #define ICMP_TTL                255
00140 
00141 
00142 /* ---------- DHCP options ---------- */
00143 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
00144    interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
00145    turning this on does currently not work. */
00146 #define LWIP_DHCP               0
00147 
00148 /* 1 if you want to do an ARP check on the offered address
00149    (recommended). */
00150 #define DHCP_DOES_ARP_CHECK     1
00151 
00152 /* ---------- UDP options ---------- */
00153 #define LWIP_UDP                1
00154 #define UDP_TTL                 255
00155 
00156 
00157 /* ---------- Statistics options ---------- */
00158 /*#define LWIP_STATS 1*/
00159 
00160 #ifdef LWIP_STATS
00161 #define LINK_STATS 1
00162 #define IP_STATS 1
00163 #define ICMP_STATS 1
00164 #define UDP_STATS 1
00165 #define TCP_STATS 1
00166 #define MEM_STATS 1
00167 #define MEMP_STATS 1
00168 #define PBUF_STATS 1
00169 #define SYS_STATS 1
00170 #else
00171 #define LINK_STATS 0
00172 #define IP_STATS 0
00173 #define ICMP_STATS 0
00174 #define UDP_STATS 0
00175 #define TCP_STATS 0
00176 #define MEM_STATS 0
00177 #define MEMP_STATS 0 
00178 #define PBUF_STATS 0
00179 #define SYS_STATS 0
00180 #endif /* STATS */
00181 
00182 #endif /* __LWIPOPTS_H__ */


© 2007, Los Alamos National Security, LLC.