http://mbed.org/users/okini3939/notebook/logger/

Dependencies:   mbed

Committer:
okini3939
Date:
Sat Apr 16 15:15:48 2011 +0000
Revision:
0:a3c892f39cc1

        

Who changed what in which revision?

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