Netservices modded to read fragmented HTTP respsonse/payload from special purpose server - 180 bytes only

Committer:
RodColeman
Date:
Thu Sep 08 10:48:09 2011 +0000
Revision:
0:850eacf3e945
revised fixed length to 178 bytes

Who changed what in which revision?

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