NetTribute library with debug turned on in FShandler Donatien Garner -> Segundo Equipo -> this version

Committer:
hexley
Date:
Fri Nov 19 01:54:45 2010 +0000
Revision:
0:281d6ff68967

        

Who changed what in which revision?

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