Dependencies:   mbed

Committer:
robertcook
Date:
Wed Jun 13 18:39:46 2012 +0000
Revision:
0:32a0996dff0f

        

Who changed what in which revision?

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