Fork of NetServicesMin with some warnings removed

Dependencies:   lwip-sys lwip

Fork of NetServicesMin by Hendrik Lipka

Committer:
hlipka
Date:
Wed Jul 18 20:28:43 2012 +0000
Revision:
1:9d93f4dc2f46
Parent:
lwip/lwipopts.h@0:8b387bed54c2
updated to the new mbed library (version 41) and the new LwIP stack. Code is still untested.

Who changed what in which revision?

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