mbeduino + Weatherduino Weather Stations post test

Dependencies:   mbed

Committer:
okini3939
Date:
Tue Oct 26 17:19:28 2010 +0000
Revision:
0:10bcaa7c2253

        

Who changed what in which revision?

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