EthernetNetIf Compatibility.

Dependents:   XBeeWiFi_SPI_example

Fork of NetServicesSource by Donatien Garnier

Committer:
donatien
Date:
Thu Aug 05 15:01:33 2010 +0000
Revision:
11:da4498f591ee
Parent:
9:c79fa4034f5b

        

Who changed what in which revision?

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