Committer:
zoot661
Date:
Tue May 29 09:49:18 2012 +0000
Revision:
0:f993b6d8b1d8

        

Who changed what in which revision?

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