a

Fork of EthernetNetIf by Donatien Garnier

Committer:
donatien
Date:
Fri Jun 11 16:25:22 2010 +0000
Revision:
0:422060928e37
Child:
1:ba68cceb2917

        

Who changed what in which revision?

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