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