Dependents:   RTnoV3 RTnoV3_LED RTnoV3_Template RTnoV3_ADC ... more

Committer:
sherckuith
Date:
Sat Dec 31 11:25:27 2011 +0000
Revision:
0:479ce5546098
Ethernet

Who changed what in which revision?

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