EthernetNetIf
Dependents: XBee_WiFi_EA_LPC4088
lwip/lwipopts.h@0:62580107d20c, 2014-11-19 (annotated)
- Committer:
- hmike
- Date:
- Wed Nov 19 12:00:42 2014 +0000
- Revision:
- 0:62580107d20c
EthernetNetIf
Who changed what in which revision?
User | Revision | Line number | New 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_ON |
hmike | 0:62580107d20c | 57 | #define TCPDUMP_DEBUG LWIP_DBG_ON |
hmike | 0:62580107d20c | 58 | |
hmike | 0:62580107d20c | 59 | #define PPP_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 60 | #define MEM_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 61 | #define MEMP_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 62 | #define PBUF_DEBUG LWIP_DBG_OFF |
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 IGMP_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 74 | #define UDP_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 75 | #define TCP_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 76 | #define TCP_INPUT_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 77 | #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 78 | #define TCP_RTO_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 79 | #define TCP_CWND_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 80 | #define TCP_WND_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 81 | #define TCP_FR_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 82 | #define TCP_QLEN_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 83 | #define TCP_RST_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 84 | #define ETHARP_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 85 | #define DNS_DEBUG LWIP_DBG_OFF |
hmike | 0:62580107d20c | 86 | |
hmike | 0:62580107d20c | 87 | #endif |
hmike | 0:62580107d20c | 88 | |
hmike | 0:62580107d20c | 89 | /* |
hmike | 0:62580107d20c | 90 | extern unsigned char debug_flags; |
hmike | 0:62580107d20c | 91 | #define LWIP_DBG_TYPES_ON debug_flags |
hmike | 0:62580107d20c | 92 | */ |
hmike | 0:62580107d20c | 93 | #define NO_SYS 1 |
hmike | 0:62580107d20c | 94 | #define LWIP_SOCKET (NO_SYS==0) |
hmike | 0:62580107d20c | 95 | #define LWIP_NETCONN (NO_SYS==0) |
hmike | 0:62580107d20c | 96 | |
hmike | 0:62580107d20c | 97 | |
hmike | 0:62580107d20c | 98 | #define IP_FRAG_USES_STATIC_BUF 0 |
hmike | 0:62580107d20c | 99 | |
hmike | 0:62580107d20c | 100 | |
hmike | 0:62580107d20c | 101 | |
hmike | 0:62580107d20c | 102 | /* ---------- Memory options ---------- */ |
hmike | 0:62580107d20c | 103 | /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which |
hmike | 0:62580107d20c | 104 | lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 |
hmike | 0:62580107d20c | 105 | byte alignment -> define MEM_ALIGNMENT to 2. */ |
hmike | 0:62580107d20c | 106 | /* MSVC port: intel processors don't need 4-byte alignment, |
hmike | 0:62580107d20c | 107 | but are faster that way! */ |
hmike | 0:62580107d20c | 108 | #define MEM_ALIGNMENT 4 |
hmike | 0:62580107d20c | 109 | |
hmike | 0:62580107d20c | 110 | /* MEM_SIZE: the size of the heap memory. If the application will send |
hmike | 0:62580107d20c | 111 | a lot of data that needs to be copied, this should be set high. */ |
hmike | 0:62580107d20c | 112 | //#define MEM_SIZE 10240 |
hmike | 0:62580107d20c | 113 | |
hmike | 0:62580107d20c | 114 | #if TARGET_LPC1768 |
hmike | 0:62580107d20c | 115 | |
hmike | 0:62580107d20c | 116 | |
hmike | 0:62580107d20c | 117 | #define MEM_SIZE 3000 //2000 |
hmike | 0:62580107d20c | 118 | |
hmike | 0:62580107d20c | 119 | /// |
hmike | 0:62580107d20c | 120 | |
hmike | 0:62580107d20c | 121 | #define MEM_POSITION __attribute((section("AHBSRAM0"))) |
hmike | 0:62580107d20c | 122 | |
hmike | 0:62580107d20c | 123 | /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application |
hmike | 0:62580107d20c | 124 | sends a lot of data out of ROM (or other static memory), this |
hmike | 0:62580107d20c | 125 | should be set high. */ |
hmike | 0:62580107d20c | 126 | #define MEMP_NUM_PBUF 16 |
hmike | 0:62580107d20c | 127 | /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One |
hmike | 0:62580107d20c | 128 | per active RAW "connection". */ |
hmike | 0:62580107d20c | 129 | //#define MEMP_NUM_RAW_PCB 3 |
hmike | 0:62580107d20c | 130 | /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One |
hmike | 0:62580107d20c | 131 | per active UDP "connection". */ |
hmike | 0:62580107d20c | 132 | #define MEMP_NUM_UDP_PCB 4 |
hmike | 0:62580107d20c | 133 | /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP |
hmike | 0:62580107d20c | 134 | connections. */ |
hmike | 0:62580107d20c | 135 | #define MEMP_NUM_TCP_PCB 3 |
hmike | 0:62580107d20c | 136 | /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP |
hmike | 0:62580107d20c | 137 | connections. */ |
hmike | 0:62580107d20c | 138 | #define MEMP_NUM_TCP_PCB_LISTEN 2//4 |
hmike | 0:62580107d20c | 139 | /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP |
hmike | 0:62580107d20c | 140 | segments. */ |
hmike | 0:62580107d20c | 141 | #define MEMP_NUM_TCP_SEG 16 |
hmike | 0:62580107d20c | 142 | /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active |
hmike | 0:62580107d20c | 143 | timeouts. */ |
hmike | 0:62580107d20c | 144 | #define MEMP_NUM_SYS_TIMEOUT 12 |
hmike | 0:62580107d20c | 145 | |
hmike | 0:62580107d20c | 146 | /* The following four are used only with the sequential API and can be |
hmike | 0:62580107d20c | 147 | set to 0 if the application only will use the raw API. */ |
hmike | 0:62580107d20c | 148 | /* MEMP_NUM_NETBUF: the number of struct netbufs. */ |
hmike | 0:62580107d20c | 149 | #define MEMP_NUM_NETBUF 0 |
hmike | 0:62580107d20c | 150 | /* MEMP_NUM_NETCONN: the number of struct netconns. */ |
hmike | 0:62580107d20c | 151 | #define MEMP_NUM_NETCONN 0 |
hmike | 0:62580107d20c | 152 | /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used |
hmike | 0:62580107d20c | 153 | for sequential API communication and incoming packets. Used in |
hmike | 0:62580107d20c | 154 | src/api/tcpip.c. */ |
hmike | 0:62580107d20c | 155 | #define MEMP_NUM_TCPIP_MSG_API 0 |
hmike | 0:62580107d20c | 156 | #define MEMP_NUM_TCPIP_MSG_INPKT 0 |
hmike | 0:62580107d20c | 157 | |
hmike | 0:62580107d20c | 158 | /* ---------- Pbuf options ---------- */ |
hmike | 0:62580107d20c | 159 | /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ |
hmike | 0:62580107d20c | 160 | #define PBUF_POOL_SIZE 8//16//100 |
hmike | 0:62580107d20c | 161 | |
hmike | 0:62580107d20c | 162 | /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ |
hmike | 0:62580107d20c | 163 | //#define PBUF_POOL_BUFSIZE 128 |
hmike | 0:62580107d20c | 164 | |
hmike | 0:62580107d20c | 165 | /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a |
hmike | 0:62580107d20c | 166 | link level header. */ |
hmike | 0:62580107d20c | 167 | //#define PBUF_LINK_HLEN 16 |
hmike | 0:62580107d20c | 168 | |
hmike | 0:62580107d20c | 169 | /** SYS_LIGHTWEIGHT_PROT |
hmike | 0:62580107d20c | 170 | * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection |
hmike | 0:62580107d20c | 171 | * for certain critical regions during buffer allocation, deallocation and memory |
hmike | 0:62580107d20c | 172 | * allocation and deallocation. |
hmike | 0:62580107d20c | 173 | */ |
hmike | 0:62580107d20c | 174 | #define SYS_LIGHTWEIGHT_PROT 0 //No sys here |
hmike | 0:62580107d20c | 175 | |
hmike | 0:62580107d20c | 176 | /* ---------- TCP options ---------- */ |
hmike | 0:62580107d20c | 177 | #define LWIP_TCP 1 |
hmike | 0:62580107d20c | 178 | //#define TCP_TTL 255 |
hmike | 0:62580107d20c | 179 | |
hmike | 0:62580107d20c | 180 | /* Controls if TCP should queue segments that arrive out of |
hmike | 0:62580107d20c | 181 | order. Define to 0 if your device is low on memory. */ |
hmike | 0:62580107d20c | 182 | #define TCP_QUEUE_OOSEQ 1 |
hmike | 0:62580107d20c | 183 | |
hmike | 0:62580107d20c | 184 | /* TCP Maximum segment size. */ |
hmike | 0:62580107d20c | 185 | //#define TCP_MSS 1024 |
hmike | 0:62580107d20c | 186 | #define TCP_MSS 536//1024//536//0x276 |
hmike | 0:62580107d20c | 187 | |
hmike | 0:62580107d20c | 188 | /* TCP sender buffer space (bytes). */ |
hmike | 0:62580107d20c | 189 | #define TCP_SND_BUF (3 * TCP_MSS) //2048 |
hmike | 0:62580107d20c | 190 | |
hmike | 0:62580107d20c | 191 | /* TCP sender buffer space (pbufs). This must be at least = 2 * |
hmike | 0:62580107d20c | 192 | TCP_SND_BUF/TCP_MSS for things to work. */ |
hmike | 0:62580107d20c | 193 | #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS)) |
hmike | 0:62580107d20c | 194 | |
hmike | 0:62580107d20c | 195 | /* TCP writable space (bytes). This must be less than or equal |
hmike | 0:62580107d20c | 196 | to TCP_SND_BUF. It is the amount of space which must be |
hmike | 0:62580107d20c | 197 | available in the tcp snd_buf for select to return writable */ |
hmike | 0:62580107d20c | 198 | #define TCP_SNDLOWAT ((TCP_SND_BUF)/2) |
hmike | 0:62580107d20c | 199 | |
hmike | 0:62580107d20c | 200 | /** |
hmike | 0:62580107d20c | 201 | * TCP_WND: The size of a TCP window. This must be at least |
hmike | 0:62580107d20c | 202 | * (2 * TCP_MSS) for things to work well |
hmike | 0:62580107d20c | 203 | */ |
hmike | 0:62580107d20c | 204 | /* TCP receive window. */ |
hmike | 0:62580107d20c | 205 | #define TCP_WND (4 * TCP_MSS) //8096 |
hmike | 0:62580107d20c | 206 | |
hmike | 0:62580107d20c | 207 | /* Maximum number of retransmissions of data segments. */ |
hmike | 0:62580107d20c | 208 | //#define TCP_MAXRTX 12 |
hmike | 0:62580107d20c | 209 | |
hmike | 0:62580107d20c | 210 | /* Maximum number of retransmissions of SYN segments. */ |
hmike | 0:62580107d20c | 211 | //#define TCP_SYNMAXRTX 4 |
hmike | 0:62580107d20c | 212 | |
hmike | 0:62580107d20c | 213 | #elif TARGET_LPC2368 |
hmike | 0:62580107d20c | 214 | |
hmike | 0:62580107d20c | 215 | #define MEM_POSITION __attribute((section("AHBSRAM1"))) |
hmike | 0:62580107d20c | 216 | |
hmike | 0:62580107d20c | 217 | /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application |
hmike | 0:62580107d20c | 218 | sends a lot of data out of ROM (or other static memory), this |
hmike | 0:62580107d20c | 219 | should be set high. */ |
hmike | 0:62580107d20c | 220 | #define MEMP_NUM_PBUF 8 |
hmike | 0:62580107d20c | 221 | /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One |
hmike | 0:62580107d20c | 222 | per active RAW "connection". */ |
hmike | 0:62580107d20c | 223 | //#define MEMP_NUM_RAW_PCB 3 |
hmike | 0:62580107d20c | 224 | /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One |
hmike | 0:62580107d20c | 225 | per active UDP "connection". */ |
hmike | 0:62580107d20c | 226 | #define MEMP_NUM_UDP_PCB 2 |
hmike | 0:62580107d20c | 227 | /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP |
hmike | 0:62580107d20c | 228 | connections. */ |
hmike | 0:62580107d20c | 229 | #define MEMP_NUM_TCP_PCB 2 |
hmike | 0:62580107d20c | 230 | /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP |
hmike | 0:62580107d20c | 231 | connections. */ |
hmike | 0:62580107d20c | 232 | #define MEMP_NUM_TCP_PCB_LISTEN 2//4 |
hmike | 0:62580107d20c | 233 | /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP |
hmike | 0:62580107d20c | 234 | segments. */ |
hmike | 0:62580107d20c | 235 | #define MEMP_NUM_TCP_SEG 8 |
hmike | 0:62580107d20c | 236 | /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active |
hmike | 0:62580107d20c | 237 | timeouts. */ |
hmike | 0:62580107d20c | 238 | #define MEMP_NUM_SYS_TIMEOUT 12 |
hmike | 0:62580107d20c | 239 | |
hmike | 0:62580107d20c | 240 | /* The following four are used only with the sequential API and can be |
hmike | 0:62580107d20c | 241 | set to 0 if the application only will use the raw API. */ |
hmike | 0:62580107d20c | 242 | /* MEMP_NUM_NETBUF: the number of struct netbufs. */ |
hmike | 0:62580107d20c | 243 | #define MEMP_NUM_NETBUF 0 |
hmike | 0:62580107d20c | 244 | /* MEMP_NUM_NETCONN: the number of struct netconns. */ |
hmike | 0:62580107d20c | 245 | #define MEMP_NUM_NETCONN 0 |
hmike | 0:62580107d20c | 246 | /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used |
hmike | 0:62580107d20c | 247 | for sequential API communication and incoming packets. Used in |
hmike | 0:62580107d20c | 248 | src/api/tcpip.c. */ |
hmike | 0:62580107d20c | 249 | #define MEMP_NUM_TCPIP_MSG_API 0 |
hmike | 0:62580107d20c | 250 | #define MEMP_NUM_TCPIP_MSG_INPKT 0 |
hmike | 0:62580107d20c | 251 | |
hmike | 0:62580107d20c | 252 | /* ---------- Pbuf options ---------- */ |
hmike | 0:62580107d20c | 253 | /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ |
hmike | 0:62580107d20c | 254 | #define PBUF_POOL_SIZE 8//16//100 |
hmike | 0:62580107d20c | 255 | |
hmike | 0:62580107d20c | 256 | /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ |
hmike | 0:62580107d20c | 257 | //#define PBUF_POOL_BUFSIZE 128 |
hmike | 0:62580107d20c | 258 | |
hmike | 0:62580107d20c | 259 | /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a |
hmike | 0:62580107d20c | 260 | link level header. */ |
hmike | 0:62580107d20c | 261 | //#define PBUF_LINK_HLEN 16 |
hmike | 0:62580107d20c | 262 | |
hmike | 0:62580107d20c | 263 | /** SYS_LIGHTWEIGHT_PROT |
hmike | 0:62580107d20c | 264 | * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection |
hmike | 0:62580107d20c | 265 | * for certain critical regions during buffer allocation, deallocation and memory |
hmike | 0:62580107d20c | 266 | * allocation and deallocation. |
hmike | 0:62580107d20c | 267 | */ |
hmike | 0:62580107d20c | 268 | #define SYS_LIGHTWEIGHT_PROT 0 //No sys here |
hmike | 0:62580107d20c | 269 | |
hmike | 0:62580107d20c | 270 | /* ---------- TCP options ---------- */ |
hmike | 0:62580107d20c | 271 | #define LWIP_TCP 1 |
hmike | 0:62580107d20c | 272 | #define TCP_TTL 255 |
hmike | 0:62580107d20c | 273 | |
hmike | 0:62580107d20c | 274 | /* Controls if TCP should queue segments that arrive out of |
hmike | 0:62580107d20c | 275 | order. Define to 0 if your device is low on memory. */ |
hmike | 0:62580107d20c | 276 | #define TCP_QUEUE_OOSEQ 0 |
hmike | 0:62580107d20c | 277 | |
hmike | 0:62580107d20c | 278 | /* TCP Maximum segment size. */ |
hmike | 0:62580107d20c | 279 | //#define TCP_MSS 1024 |
hmike | 0:62580107d20c | 280 | #define TCP_MSS 536//0x276//536//0x276 |
hmike | 0:62580107d20c | 281 | |
hmike | 0:62580107d20c | 282 | /* TCP sender buffer space (bytes). */ |
hmike | 0:62580107d20c | 283 | #define TCP_SND_BUF (3 * TCP_MSS) |
hmike | 0:62580107d20c | 284 | |
hmike | 0:62580107d20c | 285 | /* TCP sender buffer space (pbufs). This must be at least = 2 * |
hmike | 0:62580107d20c | 286 | TCP_SND_BUF/TCP_MSS for things to work. */ |
hmike | 0:62580107d20c | 287 | #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)//(4 * TCP_SND_BUF/TCP_MSS) |
hmike | 0:62580107d20c | 288 | |
hmike | 0:62580107d20c | 289 | /* TCP writable space (bytes). This must be less than or equal |
hmike | 0:62580107d20c | 290 | to TCP_SND_BUF. It is the amount of space which must be |
hmike | 0:62580107d20c | 291 | available in the tcp snd_buf for select to return writable */ |
hmike | 0:62580107d20c | 292 | #define TCP_SNDLOWAT (TCP_SND_BUF/2) |
hmike | 0:62580107d20c | 293 | |
hmike | 0:62580107d20c | 294 | /* TCP receive window. */ |
hmike | 0:62580107d20c | 295 | #define TCP_WND (3 * TCP_MSS) //8096 |
hmike | 0:62580107d20c | 296 | |
hmike | 0:62580107d20c | 297 | /* Maximum number of retransmissions of data segments. */ |
hmike | 0:62580107d20c | 298 | //#define TCP_MAXRTX 12 |
hmike | 0:62580107d20c | 299 | |
hmike | 0:62580107d20c | 300 | /* Maximum number of retransmissions of SYN segments. */ |
hmike | 0:62580107d20c | 301 | //#define TCP_SYNMAXRTX 4 |
hmike | 0:62580107d20c | 302 | |
hmike | 0:62580107d20c | 303 | #endif |
hmike | 0:62580107d20c | 304 | |
hmike | 0:62580107d20c | 305 | /* ---------- ARP options ---------- */ |
hmike | 0:62580107d20c | 306 | #define LWIP_ARP (NET_ETH | NET_ZG2100) |
hmike | 0:62580107d20c | 307 | #define ARP_TABLE_SIZE 4//10 |
hmike | 0:62580107d20c | 308 | #define ARP_QUEUEING 0 |
hmike | 0:62580107d20c | 309 | #define ETHARP_TRUST_IP_MAC 1 |
hmike | 0:62580107d20c | 310 | |
hmike | 0:62580107d20c | 311 | /* ---------- IP options ---------- */ |
hmike | 0:62580107d20c | 312 | /* Define IP_FORWARD to 1 if you wish to have the ability to forward |
hmike | 0:62580107d20c | 313 | IP packets across network interfaces. If you are going to run lwIP |
hmike | 0:62580107d20c | 314 | on a device with only one network interface, define this to 0. */ |
hmike | 0:62580107d20c | 315 | #define IP_FORWARD 0 |
hmike | 0:62580107d20c | 316 | |
hmike | 0:62580107d20c | 317 | |
hmike | 0:62580107d20c | 318 | /* IP reassembly and segmentation.These are orthogonal even |
hmike | 0:62580107d20c | 319 | * if they both deal with IP fragments */ |
hmike | 0:62580107d20c | 320 | /* |
hmike | 0:62580107d20c | 321 | #define IP_REASSEMBLY 1 |
hmike | 0:62580107d20c | 322 | #define IP_REASS_MAX_PBUFS 10 |
hmike | 0:62580107d20c | 323 | #define MEMP_NUM_REASSDATA 10 |
hmike | 0:62580107d20c | 324 | #define IP_FRAG 1 |
hmike | 0:62580107d20c | 325 | */ |
hmike | 0:62580107d20c | 326 | /* ---------- ICMP options ---------- */ |
hmike | 0:62580107d20c | 327 | #define ICMP_TTL 255 |
hmike | 0:62580107d20c | 328 | |
hmike | 0:62580107d20c | 329 | /* ---------- IGMP options ---------- */ |
hmike | 0:62580107d20c | 330 | #define LWIP_IGMP (NET_ETH | NET_ZG2100) |
hmike | 0:62580107d20c | 331 | |
hmike | 0:62580107d20c | 332 | /* ---------- DHCP options ---------- */ |
hmike | 0:62580107d20c | 333 | /* Define LWIP_DHCP to 1 if you want DHCP configuration of |
hmike | 0:62580107d20c | 334 | interfaces. */ |
hmike | 0:62580107d20c | 335 | #define LWIP_DHCP (NET_ETH | NET_ZG2100) |
hmike | 0:62580107d20c | 336 | |
hmike | 0:62580107d20c | 337 | /* 1 if you want to do an ARP check on the offered address |
hmike | 0:62580107d20c | 338 | (recommended if using DHCP). */ |
hmike | 0:62580107d20c | 339 | #define DHCP_DOES_ARP_CHECK (LWIP_DHCP) |
hmike | 0:62580107d20c | 340 | |
hmike | 0:62580107d20c | 341 | /* ---------- AUTOIP options ------- */ |
hmike | 0:62580107d20c | 342 | #define LWIP_AUTOIP 0 |
hmike | 0:62580107d20c | 343 | |
hmike | 0:62580107d20c | 344 | /* ---------- SNMP options ---------- */ |
hmike | 0:62580107d20c | 345 | /** @todo SNMP is experimental for now |
hmike | 0:62580107d20c | 346 | @note UDP must be available for SNMP transport */ |
hmike | 0:62580107d20c | 347 | #ifndef LWIP_SNMP |
hmike | 0:62580107d20c | 348 | #define LWIP_SNMP 0 |
hmike | 0:62580107d20c | 349 | #endif |
hmike | 0:62580107d20c | 350 | |
hmike | 0:62580107d20c | 351 | |
hmike | 0:62580107d20c | 352 | #ifndef SNMP_PRIVATE_MIB |
hmike | 0:62580107d20c | 353 | #define SNMP_PRIVATE_MIB 0 |
hmike | 0:62580107d20c | 354 | #endif |
hmike | 0:62580107d20c | 355 | |
hmike | 0:62580107d20c | 356 | |
hmike | 0:62580107d20c | 357 | /* ---------- UDP options ---------- */ |
hmike | 0:62580107d20c | 358 | #define LWIP_UDP 1 |
hmike | 0:62580107d20c | 359 | #define UDP_TTL 255 |
hmike | 0:62580107d20c | 360 | |
hmike | 0:62580107d20c | 361 | /* ---------- DNS options ---------- */ |
hmike | 0:62580107d20c | 362 | #define LWIP_DNS 1 |
hmike | 0:62580107d20c | 363 | |
hmike | 0:62580107d20c | 364 | /* ---------- RAW options ---------- */ |
hmike | 0:62580107d20c | 365 | #define LWIP_RAW 0 |
hmike | 0:62580107d20c | 366 | #define RAW_TTL 255 |
hmike | 0:62580107d20c | 367 | |
hmike | 0:62580107d20c | 368 | /* ---------- Statistics options ---------- */ |
hmike | 0:62580107d20c | 369 | /* individual STATS options can be turned off by defining them to 0 |
hmike | 0:62580107d20c | 370 | * (e.g #define TCP_STATS 0). All of them are turned off if LWIP_STATS |
hmike | 0:62580107d20c | 371 | * is 0 |
hmike | 0:62580107d20c | 372 | * */ |
hmike | 0:62580107d20c | 373 | |
hmike | 0:62580107d20c | 374 | #define LWIP_STATS 0 |
hmike | 0:62580107d20c | 375 | |
hmike | 0:62580107d20c | 376 | /* ---------- PPP options ---------- */ |
hmike | 0:62580107d20c | 377 | |
hmike | 0:62580107d20c | 378 | #define PPP_SUPPORT NET_PPP /* Set > 0 for PPP */ |
hmike | 0:62580107d20c | 379 | |
hmike | 0:62580107d20c | 380 | #if PPP_SUPPORT > 0 |
hmike | 0:62580107d20c | 381 | |
hmike | 0:62580107d20c | 382 | #define NUM_PPP 1 /* Max PPP sessions. */ |
hmike | 0:62580107d20c | 383 | |
hmike | 0:62580107d20c | 384 | |
hmike | 0:62580107d20c | 385 | /* Select modules to enable. Ideally these would be set in the makefile but |
hmike | 0:62580107d20c | 386 | * we're limited by the command line length so you need to modify the settings |
hmike | 0:62580107d20c | 387 | * in this file. |
hmike | 0:62580107d20c | 388 | */ |
hmike | 0:62580107d20c | 389 | #define PAP_SUPPORT 1 /* Set > 0 for PAP. */ |
hmike | 0:62580107d20c | 390 | #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */ |
hmike | 0:62580107d20c | 391 | #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */ |
hmike | 0:62580107d20c | 392 | #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */ |
hmike | 0:62580107d20c | 393 | #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */ |
hmike | 0:62580107d20c | 394 | #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */ |
hmike | 0:62580107d20c | 395 | #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */ |
hmike | 0:62580107d20c | 396 | |
hmike | 0:62580107d20c | 397 | |
hmike | 0:62580107d20c | 398 | /* |
hmike | 0:62580107d20c | 399 | * Timeouts. |
hmike | 0:62580107d20c | 400 | */ |
hmike | 0:62580107d20c | 401 | #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */ |
hmike | 0:62580107d20c | 402 | #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ |
hmike | 0:62580107d20c | 403 | #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ |
hmike | 0:62580107d20c | 404 | #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ |
hmike | 0:62580107d20c | 405 | |
hmike | 0:62580107d20c | 406 | #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */ |
hmike | 0:62580107d20c | 407 | #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ |
hmike | 0:62580107d20c | 408 | |
hmike | 0:62580107d20c | 409 | #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ |
hmike | 0:62580107d20c | 410 | #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ |
hmike | 0:62580107d20c | 411 | |
hmike | 0:62580107d20c | 412 | |
hmike | 0:62580107d20c | 413 | /* Interval in seconds between keepalive echo requests, 0 to disable. */ |
hmike | 0:62580107d20c | 414 | #if 1 |
hmike | 0:62580107d20c | 415 | #define LCP_ECHOINTERVAL 0 |
hmike | 0:62580107d20c | 416 | #else |
hmike | 0:62580107d20c | 417 | |
hmike | 0:62580107d20c | 418 | #define LCP_ECHOINTERVAL 10 |
hmike | 0:62580107d20c | 419 | #endif |
hmike | 0:62580107d20c | 420 | |
hmike | 0:62580107d20c | 421 | |
hmike | 0:62580107d20c | 422 | /* Number of unanswered echo requests before failure. */ |
hmike | 0:62580107d20c | 423 | #define LCP_MAXECHOFAILS 3 |
hmike | 0:62580107d20c | 424 | |
hmike | 0:62580107d20c | 425 | /* Max Xmit idle time (in jiffies) before resend flag char. */ |
hmike | 0:62580107d20c | 426 | #define PPP_MAXIDLEFLAG 0//Send it every time//100 |
hmike | 0:62580107d20c | 427 | |
hmike | 0:62580107d20c | 428 | /* |
hmike | 0:62580107d20c | 429 | * Packet sizes |
hmike | 0:62580107d20c | 430 | * |
hmike | 0:62580107d20c | 431 | * Note - lcp shouldn't be allowed to negotiate stuff outside these |
hmike | 0:62580107d20c | 432 | * limits. See lcp.h in the pppd directory. |
hmike | 0:62580107d20c | 433 | * (XXX - these constants should simply be shared by lcp.c instead |
hmike | 0:62580107d20c | 434 | * of living in lcp.h) |
hmike | 0:62580107d20c | 435 | */ |
hmike | 0:62580107d20c | 436 | #define PPP_MTU 1500 /* Default MTU (size of Info field) */ |
hmike | 0:62580107d20c | 437 | #if 0 |
hmike | 0:62580107d20c | 438 | #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) |
hmike | 0:62580107d20c | 439 | #else |
hmike | 0:62580107d20c | 440 | |
hmike | 0:62580107d20c | 441 | #define PPP_MAXMTU 1500 /* Largest MTU we allow */ |
hmike | 0:62580107d20c | 442 | #endif |
hmike | 0:62580107d20c | 443 | |
hmike | 0:62580107d20c | 444 | #define PPP_MINMTU 64 |
hmike | 0:62580107d20c | 445 | #define PPP_MRU 1500 /* default MRU = max length of info field */ |
hmike | 0:62580107d20c | 446 | #define PPP_MAXMRU 1500 /* Largest MRU we allow */ |
hmike | 0:62580107d20c | 447 | #define PPP_DEFMRU 296 /* Try for this */ |
hmike | 0:62580107d20c | 448 | #define PPP_MINMRU 128 /* No MRUs below this */ |
hmike | 0:62580107d20c | 449 | |
hmike | 0:62580107d20c | 450 | |
hmike | 0:62580107d20c | 451 | #define MAXNAMELEN 64 /* max length of hostname or name for auth */ |
hmike | 0:62580107d20c | 452 | #define MAXSECRETLEN 64 /* max length of password or secret */ |
hmike | 0:62580107d20c | 453 | |
hmike | 0:62580107d20c | 454 | #endif /* PPP_SUPPORT > 0 */ |
hmike | 0:62580107d20c | 455 | |
hmike | 0:62580107d20c | 456 | //C++ Compat |
hmike | 0:62580107d20c | 457 | #define try vTry |
hmike | 0:62580107d20c | 458 | |
hmike | 0:62580107d20c | 459 | #endif |
hmike | 0:62580107d20c | 460 | |
hmike | 0:62580107d20c | 461 | |
hmike | 0:62580107d20c | 462 | #endif /* __LWIPOPTS_H__ */ |