Dependencies:   mbed

Committer:
gbeardall
Date:
Mon Oct 17 10:39:17 2011 +0000
Revision:
0:715023d993d6

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gbeardall 0:715023d993d6 1 /*
gbeardall 0:715023d993d6 2 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
gbeardall 0:715023d993d6 3 * All rights reserved.
gbeardall 0:715023d993d6 4 *
gbeardall 0:715023d993d6 5 * Redistribution and use in source and binary forms, with or without modification,
gbeardall 0:715023d993d6 6 * are permitted provided that the following conditions are met:
gbeardall 0:715023d993d6 7 *
gbeardall 0:715023d993d6 8 * 1. Redistributions of source code must retain the above copyright notice,
gbeardall 0:715023d993d6 9 * this list of conditions and the following disclaimer.
gbeardall 0:715023d993d6 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
gbeardall 0:715023d993d6 11 * this list of conditions and the following disclaimer in the documentation
gbeardall 0:715023d993d6 12 * and/or other materials provided with the distribution.
gbeardall 0:715023d993d6 13 * 3. The name of the author may not be used to endorse or promote products
gbeardall 0:715023d993d6 14 * derived from this software without specific prior written permission.
gbeardall 0:715023d993d6 15 *
gbeardall 0:715023d993d6 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
gbeardall 0:715023d993d6 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
gbeardall 0:715023d993d6 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
gbeardall 0:715023d993d6 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
gbeardall 0:715023d993d6 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
gbeardall 0:715023d993d6 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
gbeardall 0:715023d993d6 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
gbeardall 0:715023d993d6 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
gbeardall 0:715023d993d6 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
gbeardall 0:715023d993d6 25 * OF SUCH DAMAGE.
gbeardall 0:715023d993d6 26 *
gbeardall 0:715023d993d6 27 * This file is part of the lwIP TCP/IP stack.
gbeardall 0:715023d993d6 28 *
gbeardall 0:715023d993d6 29 * Author: Adam Dunkels <adam@sics.se>
gbeardall 0:715023d993d6 30 *
gbeardall 0:715023d993d6 31 */
gbeardall 0:715023d993d6 32 #ifndef __LWIPOPTS_H__
gbeardall 0:715023d993d6 33 #define __LWIPOPTS_H__
gbeardall 0:715023d993d6 34
gbeardall 0:715023d993d6 35 #include "netCfg.h"
gbeardall 0:715023d993d6 36 #if NET_LWIP_STACK
gbeardall 0:715023d993d6 37
gbeardall 0:715023d993d6 38 //#include "arch/sys_arch.h"
gbeardall 0:715023d993d6 39
gbeardall 0:715023d993d6 40 /* <sys/time.h> is included in cc.h! */
gbeardall 0:715023d993d6 41 #define LWIP_TIMEVAL_PRIVATE 0
gbeardall 0:715023d993d6 42
gbeardall 0:715023d993d6 43 //#define __LWIP_DEBUG
gbeardall 0:715023d993d6 44 #include "dbg/dbg.h"
gbeardall 0:715023d993d6 45
gbeardall 0:715023d993d6 46 #ifdef __LWIP_DEBUG
gbeardall 0:715023d993d6 47
gbeardall 0:715023d993d6 48 #define LWIP_DEBUG 1
gbeardall 0:715023d993d6 49
gbeardall 0:715023d993d6 50 #define LWIP_DBG_MIN_LEVEL 0
gbeardall 0:715023d993d6 51 //#define LWIP_COMPAT_SOCKETS 1
gbeardall 0:715023d993d6 52 #define TAPIF_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 53 #define TUNIF_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 54 #define UNIXIF_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 55 #define DELIF_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 56 #define SIO_FIFO_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 57 #define TCPDUMP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 58
gbeardall 0:715023d993d6 59 #define PPP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 60 #define MEM_DEBUG LWIP_DBG_ON
gbeardall 0:715023d993d6 61 #define MEMP_DEBUG LWIP_DBG_ON
gbeardall 0:715023d993d6 62 #define PBUF_DEBUG LWIP_DBG_ON
gbeardall 0:715023d993d6 63 #define API_LIB_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 64 #define API_MSG_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 65 #define TCPIP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 66 #define NETIF_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 67 #define SOCKETS_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 68 #define DEMO_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 69 #define IP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 70 #define IP_REASS_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 71 #define RAW_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 72 #define ICMP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 73 #define UDP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 74 #define TCP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 75 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 76 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 77 #define TCP_RTO_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 78 #define TCP_CWND_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 79 #define TCP_WND_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 80 #define TCP_FR_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 81 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 82 #define TCP_RST_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 83 #define ETHARP_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 84 #define DNS_DEBUG LWIP_DBG_OFF
gbeardall 0:715023d993d6 85
gbeardall 0:715023d993d6 86 #endif
gbeardall 0:715023d993d6 87
gbeardall 0:715023d993d6 88 /*
gbeardall 0:715023d993d6 89 extern unsigned char debug_flags;
gbeardall 0:715023d993d6 90 #define LWIP_DBG_TYPES_ON debug_flags
gbeardall 0:715023d993d6 91 */
gbeardall 0:715023d993d6 92 #define NO_SYS 1
gbeardall 0:715023d993d6 93 #define LWIP_SOCKET (NO_SYS==0)
gbeardall 0:715023d993d6 94 #define LWIP_NETCONN (NO_SYS==0)
gbeardall 0:715023d993d6 95
gbeardall 0:715023d993d6 96
gbeardall 0:715023d993d6 97 #define IP_FRAG_USES_STATIC_BUF 0
gbeardall 0:715023d993d6 98
gbeardall 0:715023d993d6 99
gbeardall 0:715023d993d6 100
gbeardall 0:715023d993d6 101 /* ---------- Memory options ---------- */
gbeardall 0:715023d993d6 102 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
gbeardall 0:715023d993d6 103 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
gbeardall 0:715023d993d6 104 byte alignment -> define MEM_ALIGNMENT to 2. */
gbeardall 0:715023d993d6 105 /* MSVC port: intel processors don't need 4-byte alignment,
gbeardall 0:715023d993d6 106 but are faster that way! */
gbeardall 0:715023d993d6 107 #define MEM_ALIGNMENT 4
gbeardall 0:715023d993d6 108
gbeardall 0:715023d993d6 109 /* MEM_SIZE: the size of the heap memory. If the application will send
gbeardall 0:715023d993d6 110 a lot of data that needs to be copied, this should be set high. */
gbeardall 0:715023d993d6 111 //#define MEM_SIZE 10240
gbeardall 0:715023d993d6 112
gbeardall 0:715023d993d6 113 #if TARGET_LPC1768
gbeardall 0:715023d993d6 114
gbeardall 0:715023d993d6 115
gbeardall 0:715023d993d6 116 #define MEM_SIZE 4000
gbeardall 0:715023d993d6 117
gbeardall 0:715023d993d6 118 ///
gbeardall 0:715023d993d6 119
gbeardall 0:715023d993d6 120 #define MEM_POSITION __attribute((section("AHBSRAM0")))
gbeardall 0:715023d993d6 121
gbeardall 0:715023d993d6 122 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
gbeardall 0:715023d993d6 123 sends a lot of data out of ROM (or other static memory), this
gbeardall 0:715023d993d6 124 should be set high. */
gbeardall 0:715023d993d6 125 #define MEMP_NUM_PBUF 16
gbeardall 0:715023d993d6 126 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
gbeardall 0:715023d993d6 127 per active RAW "connection". */
gbeardall 0:715023d993d6 128 //#define MEMP_NUM_RAW_PCB 3
gbeardall 0:715023d993d6 129 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
gbeardall 0:715023d993d6 130 per active UDP "connection". */
gbeardall 0:715023d993d6 131 #define MEMP_NUM_UDP_PCB 2
gbeardall 0:715023d993d6 132 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
gbeardall 0:715023d993d6 133 connections. */
gbeardall 0:715023d993d6 134 #define MEMP_NUM_TCP_PCB 2
gbeardall 0:715023d993d6 135 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
gbeardall 0:715023d993d6 136 connections. */
gbeardall 0:715023d993d6 137 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
gbeardall 0:715023d993d6 138 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
gbeardall 0:715023d993d6 139 segments. */
gbeardall 0:715023d993d6 140 #define MEMP_NUM_TCP_SEG 16
gbeardall 0:715023d993d6 141 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
gbeardall 0:715023d993d6 142 timeouts. */
gbeardall 0:715023d993d6 143 #define MEMP_NUM_SYS_TIMEOUT 12
gbeardall 0:715023d993d6 144
gbeardall 0:715023d993d6 145 /* The following four are used only with the sequential API and can be
gbeardall 0:715023d993d6 146 set to 0 if the application only will use the raw API. */
gbeardall 0:715023d993d6 147 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
gbeardall 0:715023d993d6 148 #define MEMP_NUM_NETBUF 0
gbeardall 0:715023d993d6 149 /* MEMP_NUM_NETCONN: the number of struct netconns. */
gbeardall 0:715023d993d6 150 #define MEMP_NUM_NETCONN 0
gbeardall 0:715023d993d6 151 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
gbeardall 0:715023d993d6 152 for sequential API communication and incoming packets. Used in
gbeardall 0:715023d993d6 153 src/api/tcpip.c. */
gbeardall 0:715023d993d6 154 #define MEMP_NUM_TCPIP_MSG_API 0
gbeardall 0:715023d993d6 155 #define MEMP_NUM_TCPIP_MSG_INPKT 0
gbeardall 0:715023d993d6 156
gbeardall 0:715023d993d6 157 /* ---------- Pbuf options ---------- */
gbeardall 0:715023d993d6 158 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
gbeardall 0:715023d993d6 159 #define PBUF_POOL_SIZE 8//100
gbeardall 0:715023d993d6 160
gbeardall 0:715023d993d6 161 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
gbeardall 0:715023d993d6 162 #define PBUF_POOL_BUFSIZE 128
gbeardall 0:715023d993d6 163
gbeardall 0:715023d993d6 164 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
gbeardall 0:715023d993d6 165 link level header. */
gbeardall 0:715023d993d6 166 //#define PBUF_LINK_HLEN 16
gbeardall 0:715023d993d6 167
gbeardall 0:715023d993d6 168 /** SYS_LIGHTWEIGHT_PROT
gbeardall 0:715023d993d6 169 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
gbeardall 0:715023d993d6 170 * for certain critical regions during buffer allocation, deallocation and memory
gbeardall 0:715023d993d6 171 * allocation and deallocation.
gbeardall 0:715023d993d6 172 */
gbeardall 0:715023d993d6 173 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
gbeardall 0:715023d993d6 174
gbeardall 0:715023d993d6 175 /* ---------- TCP options ---------- */
gbeardall 0:715023d993d6 176 #define LWIP_TCP 1
gbeardall 0:715023d993d6 177 #define TCP_TTL 255
gbeardall 0:715023d993d6 178
gbeardall 0:715023d993d6 179 /* Controls if TCP should queue segments that arrive out of
gbeardall 0:715023d993d6 180 order. Define to 0 if your device is low on memory. */
gbeardall 0:715023d993d6 181 #define TCP_QUEUE_OOSEQ 0
gbeardall 0:715023d993d6 182
gbeardall 0:715023d993d6 183 /* TCP Maximum segment size. */
gbeardall 0:715023d993d6 184 //#define TCP_MSS 1024
gbeardall 0:715023d993d6 185 #define TCP_MSS 0x276//536//0x276
gbeardall 0:715023d993d6 186
gbeardall 0:715023d993d6 187 /* TCP sender buffer space (bytes). */
gbeardall 0:715023d993d6 188 #define TCP_SND_BUF 2048
gbeardall 0:715023d993d6 189
gbeardall 0:715023d993d6 190 /* TCP sender buffer space (pbufs). This must be at least = 2 *
gbeardall 0:715023d993d6 191 TCP_SND_BUF/TCP_MSS for things to work. */
gbeardall 0:715023d993d6 192 #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)
gbeardall 0:715023d993d6 193
gbeardall 0:715023d993d6 194 /* TCP writable space (bytes). This must be less than or equal
gbeardall 0:715023d993d6 195 to TCP_SND_BUF. It is the amount of space which must be
gbeardall 0:715023d993d6 196 available in the tcp snd_buf for select to return writable */
gbeardall 0:715023d993d6 197 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
gbeardall 0:715023d993d6 198
gbeardall 0:715023d993d6 199 /* TCP receive window. */
gbeardall 0:715023d993d6 200 #define TCP_WND 2048 //8096
gbeardall 0:715023d993d6 201
gbeardall 0:715023d993d6 202 /* Maximum number of retransmissions of data segments. */
gbeardall 0:715023d993d6 203 //#define TCP_MAXRTX 12
gbeardall 0:715023d993d6 204
gbeardall 0:715023d993d6 205 /* Maximum number of retransmissions of SYN segments. */
gbeardall 0:715023d993d6 206 //#define TCP_SYNMAXRTX 4
gbeardall 0:715023d993d6 207
gbeardall 0:715023d993d6 208 #elif TARGET_LPC2368
gbeardall 0:715023d993d6 209
gbeardall 0:715023d993d6 210 #define MEM_POSITION __attribute((section("AHBSRAM1")))
gbeardall 0:715023d993d6 211
gbeardall 0:715023d993d6 212 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
gbeardall 0:715023d993d6 213 sends a lot of data out of ROM (or other static memory), this
gbeardall 0:715023d993d6 214 should be set high. */
gbeardall 0:715023d993d6 215 #define MEMP_NUM_PBUF 8
gbeardall 0:715023d993d6 216 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
gbeardall 0:715023d993d6 217 per active RAW "connection". */
gbeardall 0:715023d993d6 218 //#define MEMP_NUM_RAW_PCB 3
gbeardall 0:715023d993d6 219 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
gbeardall 0:715023d993d6 220 per active UDP "connection". */
gbeardall 0:715023d993d6 221 #define MEMP_NUM_UDP_PCB 2
gbeardall 0:715023d993d6 222 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
gbeardall 0:715023d993d6 223 connections. */
gbeardall 0:715023d993d6 224 #define MEMP_NUM_TCP_PCB 2
gbeardall 0:715023d993d6 225 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
gbeardall 0:715023d993d6 226 connections. */
gbeardall 0:715023d993d6 227 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
gbeardall 0:715023d993d6 228 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
gbeardall 0:715023d993d6 229 segments. */
gbeardall 0:715023d993d6 230 #define MEMP_NUM_TCP_SEG 8
gbeardall 0:715023d993d6 231 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
gbeardall 0:715023d993d6 232 timeouts. */
gbeardall 0:715023d993d6 233 #define MEMP_NUM_SYS_TIMEOUT 12
gbeardall 0:715023d993d6 234
gbeardall 0:715023d993d6 235 /* The following four are used only with the sequential API and can be
gbeardall 0:715023d993d6 236 set to 0 if the application only will use the raw API. */
gbeardall 0:715023d993d6 237 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
gbeardall 0:715023d993d6 238 #define MEMP_NUM_NETBUF 0
gbeardall 0:715023d993d6 239 /* MEMP_NUM_NETCONN: the number of struct netconns. */
gbeardall 0:715023d993d6 240 #define MEMP_NUM_NETCONN 0
gbeardall 0:715023d993d6 241 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
gbeardall 0:715023d993d6 242 for sequential API communication and incoming packets. Used in
gbeardall 0:715023d993d6 243 src/api/tcpip.c. */
gbeardall 0:715023d993d6 244 #define MEMP_NUM_TCPIP_MSG_API 0
gbeardall 0:715023d993d6 245 #define MEMP_NUM_TCPIP_MSG_INPKT 0
gbeardall 0:715023d993d6 246
gbeardall 0:715023d993d6 247 /* ---------- Pbuf options ---------- */
gbeardall 0:715023d993d6 248 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
gbeardall 0:715023d993d6 249 #define PBUF_POOL_SIZE 8//16//100
gbeardall 0:715023d993d6 250
gbeardall 0:715023d993d6 251 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
gbeardall 0:715023d993d6 252 //#define PBUF_POOL_BUFSIZE 128
gbeardall 0:715023d993d6 253
gbeardall 0:715023d993d6 254 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
gbeardall 0:715023d993d6 255 link level header. */
gbeardall 0:715023d993d6 256 //#define PBUF_LINK_HLEN 16
gbeardall 0:715023d993d6 257
gbeardall 0:715023d993d6 258 /** SYS_LIGHTWEIGHT_PROT
gbeardall 0:715023d993d6 259 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
gbeardall 0:715023d993d6 260 * for certain critical regions during buffer allocation, deallocation and memory
gbeardall 0:715023d993d6 261 * allocation and deallocation.
gbeardall 0:715023d993d6 262 */
gbeardall 0:715023d993d6 263 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
gbeardall 0:715023d993d6 264
gbeardall 0:715023d993d6 265 /* ---------- TCP options ---------- */
gbeardall 0:715023d993d6 266 #define LWIP_TCP 1
gbeardall 0:715023d993d6 267 #define TCP_TTL 255
gbeardall 0:715023d993d6 268
gbeardall 0:715023d993d6 269 /* Controls if TCP should queue segments that arrive out of
gbeardall 0:715023d993d6 270 order. Define to 0 if your device is low on memory. */
gbeardall 0:715023d993d6 271 #define TCP_QUEUE_OOSEQ 0
gbeardall 0:715023d993d6 272
gbeardall 0:715023d993d6 273 /* TCP Maximum segment size. */
gbeardall 0:715023d993d6 274 //#define TCP_MSS 1024
gbeardall 0:715023d993d6 275 #define TCP_MSS 512//0x276//536//0x276
gbeardall 0:715023d993d6 276
gbeardall 0:715023d993d6 277 /* TCP sender buffer space (bytes). */
gbeardall 0:715023d993d6 278 #define TCP_SND_BUF 1024//2048
gbeardall 0:715023d993d6 279
gbeardall 0:715023d993d6 280 /* TCP sender buffer space (pbufs). This must be at least = 2 *
gbeardall 0:715023d993d6 281 TCP_SND_BUF/TCP_MSS for things to work. */
gbeardall 0:715023d993d6 282 #define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS)//(4 * TCP_SND_BUF/TCP_MSS)
gbeardall 0:715023d993d6 283
gbeardall 0:715023d993d6 284 /* TCP writable space (bytes). This must be less than or equal
gbeardall 0:715023d993d6 285 to TCP_SND_BUF. It is the amount of space which must be
gbeardall 0:715023d993d6 286 available in the tcp snd_buf for select to return writable */
gbeardall 0:715023d993d6 287 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
gbeardall 0:715023d993d6 288
gbeardall 0:715023d993d6 289 /* TCP receive window. */
gbeardall 0:715023d993d6 290 #define TCP_WND 512 //8096
gbeardall 0:715023d993d6 291
gbeardall 0:715023d993d6 292 /* Maximum number of retransmissions of data segments. */
gbeardall 0:715023d993d6 293 //#define TCP_MAXRTX 12
gbeardall 0:715023d993d6 294
gbeardall 0:715023d993d6 295 /* Maximum number of retransmissions of SYN segments. */
gbeardall 0:715023d993d6 296 //#define TCP_SYNMAXRTX 4
gbeardall 0:715023d993d6 297
gbeardall 0:715023d993d6 298 #endif
gbeardall 0:715023d993d6 299
gbeardall 0:715023d993d6 300 /* ---------- ARP options ---------- */
gbeardall 0:715023d993d6 301 #define LWIP_ARP (NET_ETH | NET_ZG2100)
gbeardall 0:715023d993d6 302 #define ARP_TABLE_SIZE 2//4//10
gbeardall 0:715023d993d6 303 #define ARP_QUEUEING 0//1
gbeardall 0:715023d993d6 304 #define ETHARP_TRUST_IP_MAC 1
gbeardall 0:715023d993d6 305
gbeardall 0:715023d993d6 306 /* ---------- IP options ---------- */
gbeardall 0:715023d993d6 307 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
gbeardall 0:715023d993d6 308 IP packets across network interfaces. If you are going to run lwIP
gbeardall 0:715023d993d6 309 on a device with only one network interface, define this to 0. */
gbeardall 0:715023d993d6 310 #define IP_FORWARD 0
gbeardall 0:715023d993d6 311
gbeardall 0:715023d993d6 312
gbeardall 0:715023d993d6 313 /* IP reassembly and segmentation.These are orthogonal even
gbeardall 0:715023d993d6 314 * if they both deal with IP fragments */
gbeardall 0:715023d993d6 315 /*
gbeardall 0:715023d993d6 316 #define IP_REASSEMBLY 1
gbeardall 0:715023d993d6 317 #define IP_REASS_MAX_PBUFS 10
gbeardall 0:715023d993d6 318 #define MEMP_NUM_REASSDATA 10
gbeardall 0:715023d993d6 319 #define IP_FRAG 1
gbeardall 0:715023d993d6 320 */
gbeardall 0:715023d993d6 321 /* ---------- ICMP options ---------- */
gbeardall 0:715023d993d6 322 #define ICMP_TTL 255
gbeardall 0:715023d993d6 323
gbeardall 0:715023d993d6 324 /* ---------- DHCP options ---------- */
gbeardall 0:715023d993d6 325 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
gbeardall 0:715023d993d6 326 interfaces. */
gbeardall 0:715023d993d6 327 #define LWIP_DHCP (NET_ETH | NET_ZG2100)
gbeardall 0:715023d993d6 328
gbeardall 0:715023d993d6 329 /* 1 if you want to do an ARP check on the offered address
gbeardall 0:715023d993d6 330 (recommended if using DHCP). */
gbeardall 0:715023d993d6 331 #define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
gbeardall 0:715023d993d6 332
gbeardall 0:715023d993d6 333 /* ---------- AUTOIP options ------- */
gbeardall 0:715023d993d6 334 #define LWIP_AUTOIP 0
gbeardall 0:715023d993d6 335
gbeardall 0:715023d993d6 336 /* ---------- SNMP options ---------- */
gbeardall 0:715023d993d6 337 /** @todo SNMP is experimental for now
gbeardall 0:715023d993d6 338 @note UDP must be available for SNMP transport */
gbeardall 0:715023d993d6 339 #ifndef LWIP_SNMP
gbeardall 0:715023d993d6 340 #define LWIP_SNMP 0
gbeardall 0:715023d993d6 341 #endif
gbeardall 0:715023d993d6 342
gbeardall 0:715023d993d6 343
gbeardall 0:715023d993d6 344 #ifndef SNMP_PRIVATE_MIB
gbeardall 0:715023d993d6 345 #define SNMP_PRIVATE_MIB 0
gbeardall 0:715023d993d6 346 #endif
gbeardall 0:715023d993d6 347
gbeardall 0:715023d993d6 348
gbeardall 0:715023d993d6 349 /* ---------- UDP options ---------- */
gbeardall 0:715023d993d6 350 #define LWIP_UDP 1
gbeardall 0:715023d993d6 351 #define UDP_TTL 255
gbeardall 0:715023d993d6 352
gbeardall 0:715023d993d6 353 /* ---------- DNS options ---------- */
gbeardall 0:715023d993d6 354 #define LWIP_DNS 1
gbeardall 0:715023d993d6 355
gbeardall 0:715023d993d6 356 /* ---------- RAW options ---------- */
gbeardall 0:715023d993d6 357 #define LWIP_RAW 0
gbeardall 0:715023d993d6 358 #define RAW_TTL 255
gbeardall 0:715023d993d6 359
gbeardall 0:715023d993d6 360 /* ---------- Statistics options ---------- */
gbeardall 0:715023d993d6 361 /* individual STATS options can be turned off by defining them to 0
gbeardall 0:715023d993d6 362 * (e.g #define TCP_STATS 0). All of them are turned off if LWIP_STATS
gbeardall 0:715023d993d6 363 * is 0
gbeardall 0:715023d993d6 364 * */
gbeardall 0:715023d993d6 365
gbeardall 0:715023d993d6 366 #define LWIP_STATS 0
gbeardall 0:715023d993d6 367
gbeardall 0:715023d993d6 368 /* ---------- PPP options ---------- */
gbeardall 0:715023d993d6 369
gbeardall 0:715023d993d6 370 #define PPP_SUPPORT NET_PPP /* Set > 0 for PPP */
gbeardall 0:715023d993d6 371
gbeardall 0:715023d993d6 372 #if PPP_SUPPORT > 0
gbeardall 0:715023d993d6 373
gbeardall 0:715023d993d6 374 #define NUM_PPP 1 /* Max PPP sessions. */
gbeardall 0:715023d993d6 375
gbeardall 0:715023d993d6 376
gbeardall 0:715023d993d6 377 /* Select modules to enable. Ideally these would be set in the makefile but
gbeardall 0:715023d993d6 378 * we're limited by the command line length so you need to modify the settings
gbeardall 0:715023d993d6 379 * in this file.
gbeardall 0:715023d993d6 380 */
gbeardall 0:715023d993d6 381 #define PAP_SUPPORT 1 /* Set > 0 for PAP. */
gbeardall 0:715023d993d6 382 #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */
gbeardall 0:715023d993d6 383 #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */
gbeardall 0:715023d993d6 384 #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */
gbeardall 0:715023d993d6 385 #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */
gbeardall 0:715023d993d6 386 #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */
gbeardall 0:715023d993d6 387 #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */
gbeardall 0:715023d993d6 388
gbeardall 0:715023d993d6 389
gbeardall 0:715023d993d6 390 /*
gbeardall 0:715023d993d6 391 * Timeouts.
gbeardall 0:715023d993d6 392 */
gbeardall 0:715023d993d6 393 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
gbeardall 0:715023d993d6 394 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
gbeardall 0:715023d993d6 395 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
gbeardall 0:715023d993d6 396 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
gbeardall 0:715023d993d6 397
gbeardall 0:715023d993d6 398 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
gbeardall 0:715023d993d6 399 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
gbeardall 0:715023d993d6 400
gbeardall 0:715023d993d6 401 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
gbeardall 0:715023d993d6 402 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
gbeardall 0:715023d993d6 403
gbeardall 0:715023d993d6 404
gbeardall 0:715023d993d6 405 /* Interval in seconds between keepalive echo requests, 0 to disable. */
gbeardall 0:715023d993d6 406 #if 1
gbeardall 0:715023d993d6 407 #define LCP_ECHOINTERVAL 0
gbeardall 0:715023d993d6 408 #else
gbeardall 0:715023d993d6 409
gbeardall 0:715023d993d6 410 #define LCP_ECHOINTERVAL 10
gbeardall 0:715023d993d6 411 #endif
gbeardall 0:715023d993d6 412
gbeardall 0:715023d993d6 413
gbeardall 0:715023d993d6 414 /* Number of unanswered echo requests before failure. */
gbeardall 0:715023d993d6 415 #define LCP_MAXECHOFAILS 3
gbeardall 0:715023d993d6 416
gbeardall 0:715023d993d6 417 /* Max Xmit idle time (in jiffies) before resend flag char. */
gbeardall 0:715023d993d6 418 #define PPP_MAXIDLEFLAG 0//Send it every time//100
gbeardall 0:715023d993d6 419
gbeardall 0:715023d993d6 420 /*
gbeardall 0:715023d993d6 421 * Packet sizes
gbeardall 0:715023d993d6 422 *
gbeardall 0:715023d993d6 423 * Note - lcp shouldn't be allowed to negotiate stuff outside these
gbeardall 0:715023d993d6 424 * limits. See lcp.h in the pppd directory.
gbeardall 0:715023d993d6 425 * (XXX - these constants should simply be shared by lcp.c instead
gbeardall 0:715023d993d6 426 * of living in lcp.h)
gbeardall 0:715023d993d6 427 */
gbeardall 0:715023d993d6 428 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
gbeardall 0:715023d993d6 429 #if 0
gbeardall 0:715023d993d6 430 #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
gbeardall 0:715023d993d6 431 #else
gbeardall 0:715023d993d6 432
gbeardall 0:715023d993d6 433 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
gbeardall 0:715023d993d6 434 #endif
gbeardall 0:715023d993d6 435
gbeardall 0:715023d993d6 436 #define PPP_MINMTU 64
gbeardall 0:715023d993d6 437 #define PPP_MRU 1500 /* default MRU = max length of info field */
gbeardall 0:715023d993d6 438 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
gbeardall 0:715023d993d6 439 #define PPP_DEFMRU 296 /* Try for this */
gbeardall 0:715023d993d6 440 #define PPP_MINMRU 128 /* No MRUs below this */
gbeardall 0:715023d993d6 441
gbeardall 0:715023d993d6 442
gbeardall 0:715023d993d6 443 #define MAXNAMELEN 64 /* max length of hostname or name for auth */
gbeardall 0:715023d993d6 444 #define MAXSECRETLEN 64 /* max length of password or secret */
gbeardall 0:715023d993d6 445
gbeardall 0:715023d993d6 446 #endif /* PPP_SUPPORT > 0 */
gbeardall 0:715023d993d6 447
gbeardall 0:715023d993d6 448 //C++ Compat
gbeardall 0:715023d993d6 449 #define try vTry
gbeardall 0:715023d993d6 450
gbeardall 0:715023d993d6 451 #endif
gbeardall 0:715023d993d6 452
gbeardall 0:715023d993d6 453
gbeardall 0:715023d993d6 454 #endif /* __LWIPOPTS_H__ */