Used in Live Traffic Update Nokia LCD Display Project

Fork of NetServices by Segundo Equipo

Committer:
rrajan8
Date:
Wed Mar 06 19:07:23 2013 +0000
Revision:
8:92b57208ab99
Parent:
0:ac1725ba162c
This project utilizes mbed's networking features to display live traffic updates on the Nokia LCD using the MapQuest API's Traffic Web Service.

Who changed what in which revision?

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