I have a problem getting this to work. Server only recieves half of the data being sent. Whats wrong

Dependencies:   mbed

Committer:
tax
Date:
Tue Mar 29 13:20:15 2011 +0000
Revision:
0:66300c77c6e9

        

Who changed what in which revision?

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