testing of combination of LCS and LAN

Dependencies:   mbed

Committer:
damir
Date:
Wed Jan 14 13:29:55 2015 +0000
Revision:
0:a7a6a692162f
Test of LAN

Who changed what in which revision?

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