Dependencies:   FatFileSystem mbed WeatherMeters SDFileSystem

Committer:
dcoban
Date:
Tue Apr 03 18:43:13 2012 +0000
Revision:
0:1a61c61d0845

        

Who changed what in which revision?

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