Committer:
mbed714
Date:
Tue Nov 09 19:32:44 2010 +0000
Revision:
3:0c324737064d
Parent:
2:ed3cf96c4b63

        

Who changed what in which revision?

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