Brandon Fictorie / Mbed 2 deprecated BF_Websocket

Dependencies:   mbed

Committer:
bfictorie
Date:
Sun Mar 25 17:26:30 2012 +0000
Revision:
0:8cdad1c73e8e

        

Who changed what in which revision?

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