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