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