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_ON
sherckuith 0:479ce5546098 57 #define TCPDUMP_DEBUG LWIP_DBG_ON
sherckuith 0:479ce5546098 58
sherckuith 0:479ce5546098 59 #define PPP_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 60 #define MEM_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 61 #define MEMP_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 62 #define PBUF_DEBUG LWIP_DBG_OFF
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 IGMP_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 74 #define UDP_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 75 #define TCP_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 76 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 77 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 78 #define TCP_RTO_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 79 #define TCP_CWND_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 80 #define TCP_WND_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 81 #define TCP_FR_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 82 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 83 #define TCP_RST_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 84 #define ETHARP_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 85 #define DNS_DEBUG LWIP_DBG_OFF
sherckuith 0:479ce5546098 86
sherckuith 0:479ce5546098 87 #endif
sherckuith 0:479ce5546098 88
sherckuith 0:479ce5546098 89 /*
sherckuith 0:479ce5546098 90 extern unsigned char debug_flags;
sherckuith 0:479ce5546098 91 #define LWIP_DBG_TYPES_ON debug_flags
sherckuith 0:479ce5546098 92 */
sherckuith 0:479ce5546098 93 #define NO_SYS 1
sherckuith 0:479ce5546098 94 #define LWIP_SOCKET (NO_SYS==0)
sherckuith 0:479ce5546098 95 #define LWIP_NETCONN (NO_SYS==0)
sherckuith 0:479ce5546098 96
sherckuith 0:479ce5546098 97
sherckuith 0:479ce5546098 98 #define IP_FRAG_USES_STATIC_BUF 0
sherckuith 0:479ce5546098 99
sherckuith 0:479ce5546098 100
sherckuith 0:479ce5546098 101
sherckuith 0:479ce5546098 102 /* ---------- Memory options ---------- */
sherckuith 0:479ce5546098 103 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
sherckuith 0:479ce5546098 104 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
sherckuith 0:479ce5546098 105 byte alignment -> define MEM_ALIGNMENT to 2. */
sherckuith 0:479ce5546098 106 /* MSVC port: intel processors don't need 4-byte alignment,
sherckuith 0:479ce5546098 107 but are faster that way! */
sherckuith 0:479ce5546098 108 #define MEM_ALIGNMENT 4
sherckuith 0:479ce5546098 109
sherckuith 0:479ce5546098 110 /* MEM_SIZE: the size of the heap memory. If the application will send
sherckuith 0:479ce5546098 111 a lot of data that needs to be copied, this should be set high. */
sherckuith 0:479ce5546098 112 //#define MEM_SIZE 10240
sherckuith 0:479ce5546098 113
sherckuith 0:479ce5546098 114 #if TARGET_LPC1768
sherckuith 0:479ce5546098 115
sherckuith 0:479ce5546098 116
sherckuith 0:479ce5546098 117 #define MEM_SIZE 3000 //2000
sherckuith 0:479ce5546098 118
sherckuith 0:479ce5546098 119 ///
sherckuith 0:479ce5546098 120
sherckuith 0:479ce5546098 121 #define MEM_POSITION __attribute((section("AHBSRAM0")))
sherckuith 0:479ce5546098 122
sherckuith 0:479ce5546098 123 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
sherckuith 0:479ce5546098 124 sends a lot of data out of ROM (or other static memory), this
sherckuith 0:479ce5546098 125 should be set high. */
sherckuith 0:479ce5546098 126 #define MEMP_NUM_PBUF 16
sherckuith 0:479ce5546098 127 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
sherckuith 0:479ce5546098 128 per active RAW "connection". */
sherckuith 0:479ce5546098 129 //#define MEMP_NUM_RAW_PCB 3
sherckuith 0:479ce5546098 130 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
sherckuith 0:479ce5546098 131 per active UDP "connection". */
sherckuith 0:479ce5546098 132 #define MEMP_NUM_UDP_PCB 4
sherckuith 0:479ce5546098 133 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
sherckuith 0:479ce5546098 134 connections. */
sherckuith 0:479ce5546098 135 #define MEMP_NUM_TCP_PCB 3
sherckuith 0:479ce5546098 136 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
sherckuith 0:479ce5546098 137 connections. */
sherckuith 0:479ce5546098 138 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
sherckuith 0:479ce5546098 139 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
sherckuith 0:479ce5546098 140 segments. */
sherckuith 0:479ce5546098 141 #define MEMP_NUM_TCP_SEG 16
sherckuith 0:479ce5546098 142 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
sherckuith 0:479ce5546098 143 timeouts. */
sherckuith 0:479ce5546098 144 #define MEMP_NUM_SYS_TIMEOUT 12
sherckuith 0:479ce5546098 145
sherckuith 0:479ce5546098 146 /* The following four are used only with the sequential API and can be
sherckuith 0:479ce5546098 147 set to 0 if the application only will use the raw API. */
sherckuith 0:479ce5546098 148 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
sherckuith 0:479ce5546098 149 #define MEMP_NUM_NETBUF 0
sherckuith 0:479ce5546098 150 /* MEMP_NUM_NETCONN: the number of struct netconns. */
sherckuith 0:479ce5546098 151 #define MEMP_NUM_NETCONN 0
sherckuith 0:479ce5546098 152 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
sherckuith 0:479ce5546098 153 for sequential API communication and incoming packets. Used in
sherckuith 0:479ce5546098 154 src/api/tcpip.c. */
sherckuith 0:479ce5546098 155 #define MEMP_NUM_TCPIP_MSG_API 0
sherckuith 0:479ce5546098 156 #define MEMP_NUM_TCPIP_MSG_INPKT 0
sherckuith 0:479ce5546098 157
sherckuith 0:479ce5546098 158 /* ---------- Pbuf options ---------- */
sherckuith 0:479ce5546098 159 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
sherckuith 0:479ce5546098 160 #define PBUF_POOL_SIZE 8//16//100
sherckuith 0:479ce5546098 161
sherckuith 0:479ce5546098 162 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
sherckuith 0:479ce5546098 163 //#define PBUF_POOL_BUFSIZE 128
sherckuith 0:479ce5546098 164
sherckuith 0:479ce5546098 165 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
sherckuith 0:479ce5546098 166 link level header. */
sherckuith 0:479ce5546098 167 //#define PBUF_LINK_HLEN 16
sherckuith 0:479ce5546098 168
sherckuith 0:479ce5546098 169 /** SYS_LIGHTWEIGHT_PROT
sherckuith 0:479ce5546098 170 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
sherckuith 0:479ce5546098 171 * for certain critical regions during buffer allocation, deallocation and memory
sherckuith 0:479ce5546098 172 * allocation and deallocation.
sherckuith 0:479ce5546098 173 */
sherckuith 0:479ce5546098 174 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
sherckuith 0:479ce5546098 175
sherckuith 0:479ce5546098 176 /* ---------- TCP options ---------- */
sherckuith 0:479ce5546098 177 #define LWIP_TCP 1
sherckuith 0:479ce5546098 178 //#define TCP_TTL 255
sherckuith 0:479ce5546098 179
sherckuith 0:479ce5546098 180 /* Controls if TCP should queue segments that arrive out of
sherckuith 0:479ce5546098 181 order. Define to 0 if your device is low on memory. */
sherckuith 0:479ce5546098 182 #define TCP_QUEUE_OOSEQ 1
sherckuith 0:479ce5546098 183
sherckuith 0:479ce5546098 184 /* TCP Maximum segment size. */
sherckuith 0:479ce5546098 185 //#define TCP_MSS 1024
sherckuith 0:479ce5546098 186 #define TCP_MSS 536//1024//536//0x276
sherckuith 0:479ce5546098 187
sherckuith 0:479ce5546098 188 /* TCP sender buffer space (bytes). */
sherckuith 0:479ce5546098 189 #define TCP_SND_BUF (3 * TCP_MSS) //2048
sherckuith 0:479ce5546098 190
sherckuith 0:479ce5546098 191 /* TCP sender buffer space (pbufs). This must be at least = 2 *
sherckuith 0:479ce5546098 192 TCP_SND_BUF/TCP_MSS for things to work. */
sherckuith 0:479ce5546098 193 #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS))
sherckuith 0:479ce5546098 194
sherckuith 0:479ce5546098 195 /* TCP writable space (bytes). This must be less than or equal
sherckuith 0:479ce5546098 196 to TCP_SND_BUF. It is the amount of space which must be
sherckuith 0:479ce5546098 197 available in the tcp snd_buf for select to return writable */
sherckuith 0:479ce5546098 198 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2)
sherckuith 0:479ce5546098 199
sherckuith 0:479ce5546098 200 /**
sherckuith 0:479ce5546098 201 * TCP_WND: The size of a TCP window. This must be at least
sherckuith 0:479ce5546098 202 * (2 * TCP_MSS) for things to work well
sherckuith 0:479ce5546098 203 */
sherckuith 0:479ce5546098 204 /* TCP receive window. */
sherckuith 0:479ce5546098 205 #define TCP_WND (4 * TCP_MSS) //8096
sherckuith 0:479ce5546098 206
sherckuith 0:479ce5546098 207 /* Maximum number of retransmissions of data segments. */
sherckuith 0:479ce5546098 208 //#define TCP_MAXRTX 12
sherckuith 0:479ce5546098 209
sherckuith 0:479ce5546098 210 /* Maximum number of retransmissions of SYN segments. */
sherckuith 0:479ce5546098 211 //#define TCP_SYNMAXRTX 4
sherckuith 0:479ce5546098 212
sherckuith 0:479ce5546098 213 #elif TARGET_LPC2368
sherckuith 0:479ce5546098 214
sherckuith 0:479ce5546098 215 #define MEM_POSITION __attribute((section("AHBSRAM1")))
sherckuith 0:479ce5546098 216
sherckuith 0:479ce5546098 217 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
sherckuith 0:479ce5546098 218 sends a lot of data out of ROM (or other static memory), this
sherckuith 0:479ce5546098 219 should be set high. */
sherckuith 0:479ce5546098 220 #define MEMP_NUM_PBUF 8
sherckuith 0:479ce5546098 221 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
sherckuith 0:479ce5546098 222 per active RAW "connection". */
sherckuith 0:479ce5546098 223 //#define MEMP_NUM_RAW_PCB 3
sherckuith 0:479ce5546098 224 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
sherckuith 0:479ce5546098 225 per active UDP "connection". */
sherckuith 0:479ce5546098 226 #define MEMP_NUM_UDP_PCB 2
sherckuith 0:479ce5546098 227 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
sherckuith 0:479ce5546098 228 connections. */
sherckuith 0:479ce5546098 229 #define MEMP_NUM_TCP_PCB 2
sherckuith 0:479ce5546098 230 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
sherckuith 0:479ce5546098 231 connections. */
sherckuith 0:479ce5546098 232 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
sherckuith 0:479ce5546098 233 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
sherckuith 0:479ce5546098 234 segments. */
sherckuith 0:479ce5546098 235 #define MEMP_NUM_TCP_SEG 8
sherckuith 0:479ce5546098 236 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
sherckuith 0:479ce5546098 237 timeouts. */
sherckuith 0:479ce5546098 238 #define MEMP_NUM_SYS_TIMEOUT 12
sherckuith 0:479ce5546098 239
sherckuith 0:479ce5546098 240 /* The following four are used only with the sequential API and can be
sherckuith 0:479ce5546098 241 set to 0 if the application only will use the raw API. */
sherckuith 0:479ce5546098 242 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
sherckuith 0:479ce5546098 243 #define MEMP_NUM_NETBUF 0
sherckuith 0:479ce5546098 244 /* MEMP_NUM_NETCONN: the number of struct netconns. */
sherckuith 0:479ce5546098 245 #define MEMP_NUM_NETCONN 0
sherckuith 0:479ce5546098 246 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
sherckuith 0:479ce5546098 247 for sequential API communication and incoming packets. Used in
sherckuith 0:479ce5546098 248 src/api/tcpip.c. */
sherckuith 0:479ce5546098 249 #define MEMP_NUM_TCPIP_MSG_API 0
sherckuith 0:479ce5546098 250 #define MEMP_NUM_TCPIP_MSG_INPKT 0
sherckuith 0:479ce5546098 251
sherckuith 0:479ce5546098 252 /* ---------- Pbuf options ---------- */
sherckuith 0:479ce5546098 253 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
sherckuith 0:479ce5546098 254 #define PBUF_POOL_SIZE 8//16//100
sherckuith 0:479ce5546098 255
sherckuith 0:479ce5546098 256 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
sherckuith 0:479ce5546098 257 //#define PBUF_POOL_BUFSIZE 128
sherckuith 0:479ce5546098 258
sherckuith 0:479ce5546098 259 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
sherckuith 0:479ce5546098 260 link level header. */
sherckuith 0:479ce5546098 261 //#define PBUF_LINK_HLEN 16
sherckuith 0:479ce5546098 262
sherckuith 0:479ce5546098 263 /** SYS_LIGHTWEIGHT_PROT
sherckuith 0:479ce5546098 264 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
sherckuith 0:479ce5546098 265 * for certain critical regions during buffer allocation, deallocation and memory
sherckuith 0:479ce5546098 266 * allocation and deallocation.
sherckuith 0:479ce5546098 267 */
sherckuith 0:479ce5546098 268 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
sherckuith 0:479ce5546098 269
sherckuith 0:479ce5546098 270 /* ---------- TCP options ---------- */
sherckuith 0:479ce5546098 271 #define LWIP_TCP 1
sherckuith 0:479ce5546098 272 #define TCP_TTL 255
sherckuith 0:479ce5546098 273
sherckuith 0:479ce5546098 274 /* Controls if TCP should queue segments that arrive out of
sherckuith 0:479ce5546098 275 order. Define to 0 if your device is low on memory. */
sherckuith 0:479ce5546098 276 #define TCP_QUEUE_OOSEQ 0
sherckuith 0:479ce5546098 277
sherckuith 0:479ce5546098 278 /* TCP Maximum segment size. */
sherckuith 0:479ce5546098 279 //#define TCP_MSS 1024
sherckuith 0:479ce5546098 280 #define TCP_MSS 536//0x276//536//0x276
sherckuith 0:479ce5546098 281
sherckuith 0:479ce5546098 282 /* TCP sender buffer space (bytes). */
sherckuith 0:479ce5546098 283 #define TCP_SND_BUF (3 * TCP_MSS)
sherckuith 0:479ce5546098 284
sherckuith 0:479ce5546098 285 /* TCP sender buffer space (pbufs). This must be at least = 2 *
sherckuith 0:479ce5546098 286 TCP_SND_BUF/TCP_MSS for things to work. */
sherckuith 0:479ce5546098 287 #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)//(4 * TCP_SND_BUF/TCP_MSS)
sherckuith 0:479ce5546098 288
sherckuith 0:479ce5546098 289 /* TCP writable space (bytes). This must be less than or equal
sherckuith 0:479ce5546098 290 to TCP_SND_BUF. It is the amount of space which must be
sherckuith 0:479ce5546098 291 available in the tcp snd_buf for select to return writable */
sherckuith 0:479ce5546098 292 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
sherckuith 0:479ce5546098 293
sherckuith 0:479ce5546098 294 /* TCP receive window. */
sherckuith 0:479ce5546098 295 #define TCP_WND (3 * TCP_MSS) //8096
sherckuith 0:479ce5546098 296
sherckuith 0:479ce5546098 297 /* Maximum number of retransmissions of data segments. */
sherckuith 0:479ce5546098 298 //#define TCP_MAXRTX 12
sherckuith 0:479ce5546098 299
sherckuith 0:479ce5546098 300 /* Maximum number of retransmissions of SYN segments. */
sherckuith 0:479ce5546098 301 //#define TCP_SYNMAXRTX 4
sherckuith 0:479ce5546098 302
sherckuith 0:479ce5546098 303 #endif
sherckuith 0:479ce5546098 304
sherckuith 0:479ce5546098 305 /* ---------- ARP options ---------- */
sherckuith 0:479ce5546098 306 #define LWIP_ARP (NET_ETH | NET_ZG2100)
sherckuith 0:479ce5546098 307 #define ARP_TABLE_SIZE 4//10
sherckuith 0:479ce5546098 308 #define ARP_QUEUEING 0
sherckuith 0:479ce5546098 309 #define ETHARP_TRUST_IP_MAC 1
sherckuith 0:479ce5546098 310
sherckuith 0:479ce5546098 311 /* ---------- IP options ---------- */
sherckuith 0:479ce5546098 312 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
sherckuith 0:479ce5546098 313 IP packets across network interfaces. If you are going to run lwIP
sherckuith 0:479ce5546098 314 on a device with only one network interface, define this to 0. */
sherckuith 0:479ce5546098 315 #define IP_FORWARD 0
sherckuith 0:479ce5546098 316
sherckuith 0:479ce5546098 317
sherckuith 0:479ce5546098 318 /* IP reassembly and segmentation.These are orthogonal even
sherckuith 0:479ce5546098 319 * if they both deal with IP fragments */
sherckuith 0:479ce5546098 320 /*
sherckuith 0:479ce5546098 321 #define IP_REASSEMBLY 1
sherckuith 0:479ce5546098 322 #define IP_REASS_MAX_PBUFS 10
sherckuith 0:479ce5546098 323 #define MEMP_NUM_REASSDATA 10
sherckuith 0:479ce5546098 324 #define IP_FRAG 1
sherckuith 0:479ce5546098 325 */
sherckuith 0:479ce5546098 326 /* ---------- ICMP options ---------- */
sherckuith 0:479ce5546098 327 #define ICMP_TTL 255
sherckuith 0:479ce5546098 328
sherckuith 0:479ce5546098 329 /* ---------- IGMP options ---------- */
sherckuith 0:479ce5546098 330 #define LWIP_IGMP (NET_ETH | NET_ZG2100)
sherckuith 0:479ce5546098 331
sherckuith 0:479ce5546098 332 /* ---------- DHCP options ---------- */
sherckuith 0:479ce5546098 333 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
sherckuith 0:479ce5546098 334 interfaces. */
sherckuith 0:479ce5546098 335 #define LWIP_DHCP (NET_ETH | NET_ZG2100)
sherckuith 0:479ce5546098 336
sherckuith 0:479ce5546098 337 /* 1 if you want to do an ARP check on the offered address
sherckuith 0:479ce5546098 338 (recommended if using DHCP). */
sherckuith 0:479ce5546098 339 #define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
sherckuith 0:479ce5546098 340
sherckuith 0:479ce5546098 341 /* ---------- AUTOIP options ------- */
sherckuith 0:479ce5546098 342 #define LWIP_AUTOIP 0
sherckuith 0:479ce5546098 343
sherckuith 0:479ce5546098 344 /* ---------- SNMP options ---------- */
sherckuith 0:479ce5546098 345 /** @todo SNMP is experimental for now
sherckuith 0:479ce5546098 346 @note UDP must be available for SNMP transport */
sherckuith 0:479ce5546098 347 #ifndef LWIP_SNMP
sherckuith 0:479ce5546098 348 #define LWIP_SNMP 0
sherckuith 0:479ce5546098 349 #endif
sherckuith 0:479ce5546098 350
sherckuith 0:479ce5546098 351
sherckuith 0:479ce5546098 352 #ifndef SNMP_PRIVATE_MIB
sherckuith 0:479ce5546098 353 #define SNMP_PRIVATE_MIB 0
sherckuith 0:479ce5546098 354 #endif
sherckuith 0:479ce5546098 355
sherckuith 0:479ce5546098 356
sherckuith 0:479ce5546098 357 /* ---------- UDP options ---------- */
sherckuith 0:479ce5546098 358 #define LWIP_UDP 1
sherckuith 0:479ce5546098 359 #define UDP_TTL 255
sherckuith 0:479ce5546098 360
sherckuith 0:479ce5546098 361 /* ---------- DNS options ---------- */
sherckuith 0:479ce5546098 362 #define LWIP_DNS 1
sherckuith 0:479ce5546098 363
sherckuith 0:479ce5546098 364 /* ---------- RAW options ---------- */
sherckuith 0:479ce5546098 365 #define LWIP_RAW 0
sherckuith 0:479ce5546098 366 #define RAW_TTL 255
sherckuith 0:479ce5546098 367
sherckuith 0:479ce5546098 368 /* ---------- Statistics options ---------- */
sherckuith 0:479ce5546098 369 /* individual STATS options can be turned off by defining them to 0
sherckuith 0:479ce5546098 370 * (e.g #define TCP_STATS 0). All of them are turned off if LWIP_STATS
sherckuith 0:479ce5546098 371 * is 0
sherckuith 0:479ce5546098 372 * */
sherckuith 0:479ce5546098 373
sherckuith 0:479ce5546098 374 #define LWIP_STATS 0
sherckuith 0:479ce5546098 375
sherckuith 0:479ce5546098 376 /* ---------- PPP options ---------- */
sherckuith 0:479ce5546098 377
sherckuith 0:479ce5546098 378 #define PPP_SUPPORT NET_PPP /* Set > 0 for PPP */
sherckuith 0:479ce5546098 379
sherckuith 0:479ce5546098 380 #if PPP_SUPPORT > 0
sherckuith 0:479ce5546098 381
sherckuith 0:479ce5546098 382 #define NUM_PPP 1 /* Max PPP sessions. */
sherckuith 0:479ce5546098 383
sherckuith 0:479ce5546098 384
sherckuith 0:479ce5546098 385 /* Select modules to enable. Ideally these would be set in the makefile but
sherckuith 0:479ce5546098 386 * we're limited by the command line length so you need to modify the settings
sherckuith 0:479ce5546098 387 * in this file.
sherckuith 0:479ce5546098 388 */
sherckuith 0:479ce5546098 389 #define PAP_SUPPORT 1 /* Set > 0 for PAP. */
sherckuith 0:479ce5546098 390 #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */
sherckuith 0:479ce5546098 391 #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */
sherckuith 0:479ce5546098 392 #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */
sherckuith 0:479ce5546098 393 #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */
sherckuith 0:479ce5546098 394 #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */
sherckuith 0:479ce5546098 395 #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */
sherckuith 0:479ce5546098 396
sherckuith 0:479ce5546098 397
sherckuith 0:479ce5546098 398 /*
sherckuith 0:479ce5546098 399 * Timeouts.
sherckuith 0:479ce5546098 400 */
sherckuith 0:479ce5546098 401 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
sherckuith 0:479ce5546098 402 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
sherckuith 0:479ce5546098 403 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
sherckuith 0:479ce5546098 404 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
sherckuith 0:479ce5546098 405
sherckuith 0:479ce5546098 406 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
sherckuith 0:479ce5546098 407 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
sherckuith 0:479ce5546098 408
sherckuith 0:479ce5546098 409 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
sherckuith 0:479ce5546098 410 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
sherckuith 0:479ce5546098 411
sherckuith 0:479ce5546098 412
sherckuith 0:479ce5546098 413 /* Interval in seconds between keepalive echo requests, 0 to disable. */
sherckuith 0:479ce5546098 414 #if 1
sherckuith 0:479ce5546098 415 #define LCP_ECHOINTERVAL 0
sherckuith 0:479ce5546098 416 #else
sherckuith 0:479ce5546098 417
sherckuith 0:479ce5546098 418 #define LCP_ECHOINTERVAL 10
sherckuith 0:479ce5546098 419 #endif
sherckuith 0:479ce5546098 420
sherckuith 0:479ce5546098 421
sherckuith 0:479ce5546098 422 /* Number of unanswered echo requests before failure. */
sherckuith 0:479ce5546098 423 #define LCP_MAXECHOFAILS 3
sherckuith 0:479ce5546098 424
sherckuith 0:479ce5546098 425 /* Max Xmit idle time (in jiffies) before resend flag char. */
sherckuith 0:479ce5546098 426 #define PPP_MAXIDLEFLAG 0//Send it every time//100
sherckuith 0:479ce5546098 427
sherckuith 0:479ce5546098 428 /*
sherckuith 0:479ce5546098 429 * Packet sizes
sherckuith 0:479ce5546098 430 *
sherckuith 0:479ce5546098 431 * Note - lcp shouldn't be allowed to negotiate stuff outside these
sherckuith 0:479ce5546098 432 * limits. See lcp.h in the pppd directory.
sherckuith 0:479ce5546098 433 * (XXX - these constants should simply be shared by lcp.c instead
sherckuith 0:479ce5546098 434 * of living in lcp.h)
sherckuith 0:479ce5546098 435 */
sherckuith 0:479ce5546098 436 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
sherckuith 0:479ce5546098 437 #if 0
sherckuith 0:479ce5546098 438 #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
sherckuith 0:479ce5546098 439 #else
sherckuith 0:479ce5546098 440
sherckuith 0:479ce5546098 441 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
sherckuith 0:479ce5546098 442 #endif
sherckuith 0:479ce5546098 443
sherckuith 0:479ce5546098 444 #define PPP_MINMTU 64
sherckuith 0:479ce5546098 445 #define PPP_MRU 1500 /* default MRU = max length of info field */
sherckuith 0:479ce5546098 446 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
sherckuith 0:479ce5546098 447 #define PPP_DEFMRU 296 /* Try for this */
sherckuith 0:479ce5546098 448 #define PPP_MINMRU 128 /* No MRUs below this */
sherckuith 0:479ce5546098 449
sherckuith 0:479ce5546098 450
sherckuith 0:479ce5546098 451 #define MAXNAMELEN 64 /* max length of hostname or name for auth */
sherckuith 0:479ce5546098 452 #define MAXSECRETLEN 64 /* max length of password or secret */
sherckuith 0:479ce5546098 453
sherckuith 0:479ce5546098 454 #endif /* PPP_SUPPORT > 0 */
sherckuith 0:479ce5546098 455
sherckuith 0:479ce5546098 456 //C++ Compat
sherckuith 0:479ce5546098 457 #define try vTry
sherckuith 0:479ce5546098 458
sherckuith 0:479ce5546098 459 #endif
sherckuith 0:479ce5546098 460
sherckuith 0:479ce5546098 461
sherckuith 0:479ce5546098 462 #endif /* __LWIPOPTS_H__ */