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