ID the MBED processor on the network if you have more than one. View MBED name on DHCP of your Router - Example \"MBED PE\" Change your ID in Core / host.h

Committer:
JeffM
Date:
Sat Nov 06 14:11:02 2010 +0000
Revision:
0:fd3b85615428
MBED ID 1A

Who changed what in which revision?

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