EthernetNetIf

Dependents:   XBee_WiFi_EA_LPC4088

Committer:
hmike
Date:
Wed Nov 19 12:00:42 2014 +0000
Revision:
0:62580107d20c
EthernetNetIf

Who changed what in which revision?

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