Trial code integration web page update with analogue data and ntp support

Dependencies:   NTPClient_NetServices mbed

Committer:
pmr1
Date:
Fri Aug 06 17:57:45 2010 +0000
Revision:
0:8cc2035bebfc

        

Who changed what in which revision?

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