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