Bonjour/Zerconf library

Dependencies:   mbed

Committer:
dirkx
Date:
Sat Aug 14 15:54:31 2010 +0000
Revision:
5:8e53abda9900
Parent:
0:355018f44c9f

        

Who changed what in which revision?

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