Dependencies:   mbed

Committer:
gbeardall
Date:
Mon Oct 17 10:39:17 2011 +0000
Revision:
0:715023d993d6

        

Who changed what in which revision?

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