Committer:
donatien
Date:
Thu Jul 22 11:31:59 2010 +0000
Revision:
2:1f10f8ab527b
Parent:
0:0f5a52711275
Child:
3:e02ec42cf9c8

        

Who changed what in which revision?

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