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_ON
bfictorie 0:8cdad1c73e8e 61 #define MEMP_DEBUG LWIP_DBG_ON
bfictorie 0:8cdad1c73e8e 62 #define PBUF_DEBUG LWIP_DBG_ON
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 UDP_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 74 #define TCP_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 75 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 76 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 77 #define TCP_RTO_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 78 #define TCP_CWND_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 79 #define TCP_WND_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 80 #define TCP_FR_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 81 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 82 #define TCP_RST_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 83 #define ETHARP_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 84 #define DNS_DEBUG LWIP_DBG_OFF
bfictorie 0:8cdad1c73e8e 85
bfictorie 0:8cdad1c73e8e 86 #endif
bfictorie 0:8cdad1c73e8e 87
bfictorie 0:8cdad1c73e8e 88 /*
bfictorie 0:8cdad1c73e8e 89 extern unsigned char debug_flags;
bfictorie 0:8cdad1c73e8e 90 #define LWIP_DBG_TYPES_ON debug_flags
bfictorie 0:8cdad1c73e8e 91 */
bfictorie 0:8cdad1c73e8e 92 #define NO_SYS 1
bfictorie 0:8cdad1c73e8e 93 #define LWIP_SOCKET (NO_SYS==0)
bfictorie 0:8cdad1c73e8e 94 #define LWIP_NETCONN (NO_SYS==0)
bfictorie 0:8cdad1c73e8e 95
bfictorie 0:8cdad1c73e8e 96
bfictorie 0:8cdad1c73e8e 97 #define IP_FRAG_USES_STATIC_BUF 0
bfictorie 0:8cdad1c73e8e 98
bfictorie 0:8cdad1c73e8e 99
bfictorie 0:8cdad1c73e8e 100
bfictorie 0:8cdad1c73e8e 101 /* ---------- Memory options ---------- */
bfictorie 0:8cdad1c73e8e 102 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
bfictorie 0:8cdad1c73e8e 103 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
bfictorie 0:8cdad1c73e8e 104 byte alignment -> define MEM_ALIGNMENT to 2. */
bfictorie 0:8cdad1c73e8e 105 /* MSVC port: intel processors don't need 4-byte alignment,
bfictorie 0:8cdad1c73e8e 106 but are faster that way! */
bfictorie 0:8cdad1c73e8e 107 #define MEM_ALIGNMENT 4
bfictorie 0:8cdad1c73e8e 108
bfictorie 0:8cdad1c73e8e 109 /* MEM_SIZE: the size of the heap memory. If the application will send
bfictorie 0:8cdad1c73e8e 110 a lot of data that needs to be copied, this should be set high. */
bfictorie 0:8cdad1c73e8e 111 //#define MEM_SIZE 10240
bfictorie 0:8cdad1c73e8e 112
bfictorie 0:8cdad1c73e8e 113 #if TARGET_LPC1768
bfictorie 0:8cdad1c73e8e 114
bfictorie 0:8cdad1c73e8e 115
bfictorie 0:8cdad1c73e8e 116 #define MEM_SIZE 4000
bfictorie 0:8cdad1c73e8e 117
bfictorie 0:8cdad1c73e8e 118 ///
bfictorie 0:8cdad1c73e8e 119
bfictorie 0:8cdad1c73e8e 120 #define MEM_POSITION __attribute((section("AHBSRAM0")))
bfictorie 0:8cdad1c73e8e 121
bfictorie 0:8cdad1c73e8e 122 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
bfictorie 0:8cdad1c73e8e 123 sends a lot of data out of ROM (or other static memory), this
bfictorie 0:8cdad1c73e8e 124 should be set high. */
bfictorie 0:8cdad1c73e8e 125 #define MEMP_NUM_PBUF 16
bfictorie 0:8cdad1c73e8e 126 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
bfictorie 0:8cdad1c73e8e 127 per active RAW "connection". */
bfictorie 0:8cdad1c73e8e 128 //#define MEMP_NUM_RAW_PCB 3
bfictorie 0:8cdad1c73e8e 129 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
bfictorie 0:8cdad1c73e8e 130 per active UDP "connection". */
bfictorie 0:8cdad1c73e8e 131 #define MEMP_NUM_UDP_PCB 2
bfictorie 0:8cdad1c73e8e 132 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
bfictorie 0:8cdad1c73e8e 133 connections. */
bfictorie 0:8cdad1c73e8e 134 #define MEMP_NUM_TCP_PCB 2
bfictorie 0:8cdad1c73e8e 135 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
bfictorie 0:8cdad1c73e8e 136 connections. */
bfictorie 0:8cdad1c73e8e 137 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
bfictorie 0:8cdad1c73e8e 138 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
bfictorie 0:8cdad1c73e8e 139 segments. */
bfictorie 0:8cdad1c73e8e 140 #define MEMP_NUM_TCP_SEG 16
bfictorie 0:8cdad1c73e8e 141 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
bfictorie 0:8cdad1c73e8e 142 timeouts. */
bfictorie 0:8cdad1c73e8e 143 #define MEMP_NUM_SYS_TIMEOUT 12
bfictorie 0:8cdad1c73e8e 144
bfictorie 0:8cdad1c73e8e 145 /* The following four are used only with the sequential API and can be
bfictorie 0:8cdad1c73e8e 146 set to 0 if the application only will use the raw API. */
bfictorie 0:8cdad1c73e8e 147 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
bfictorie 0:8cdad1c73e8e 148 #define MEMP_NUM_NETBUF 0
bfictorie 0:8cdad1c73e8e 149 /* MEMP_NUM_NETCONN: the number of struct netconns. */
bfictorie 0:8cdad1c73e8e 150 #define MEMP_NUM_NETCONN 0
bfictorie 0:8cdad1c73e8e 151 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
bfictorie 0:8cdad1c73e8e 152 for sequential API communication and incoming packets. Used in
bfictorie 0:8cdad1c73e8e 153 src/api/tcpip.c. */
bfictorie 0:8cdad1c73e8e 154 #define MEMP_NUM_TCPIP_MSG_API 0
bfictorie 0:8cdad1c73e8e 155 #define MEMP_NUM_TCPIP_MSG_INPKT 0
bfictorie 0:8cdad1c73e8e 156
bfictorie 0:8cdad1c73e8e 157 /* ---------- Pbuf options ---------- */
bfictorie 0:8cdad1c73e8e 158 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
bfictorie 0:8cdad1c73e8e 159 #define PBUF_POOL_SIZE 8//100
bfictorie 0:8cdad1c73e8e 160
bfictorie 0:8cdad1c73e8e 161 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
bfictorie 0:8cdad1c73e8e 162 #define PBUF_POOL_BUFSIZE 128
bfictorie 0:8cdad1c73e8e 163
bfictorie 0:8cdad1c73e8e 164 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
bfictorie 0:8cdad1c73e8e 165 link level header. */
bfictorie 0:8cdad1c73e8e 166 //#define PBUF_LINK_HLEN 16
bfictorie 0:8cdad1c73e8e 167
bfictorie 0:8cdad1c73e8e 168 /** SYS_LIGHTWEIGHT_PROT
bfictorie 0:8cdad1c73e8e 169 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
bfictorie 0:8cdad1c73e8e 170 * for certain critical regions during buffer allocation, deallocation and memory
bfictorie 0:8cdad1c73e8e 171 * allocation and deallocation.
bfictorie 0:8cdad1c73e8e 172 */
bfictorie 0:8cdad1c73e8e 173 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
bfictorie 0:8cdad1c73e8e 174
bfictorie 0:8cdad1c73e8e 175 /* ---------- TCP options ---------- */
bfictorie 0:8cdad1c73e8e 176 #define LWIP_TCP 1
bfictorie 0:8cdad1c73e8e 177 #define TCP_TTL 255
bfictorie 0:8cdad1c73e8e 178
bfictorie 0:8cdad1c73e8e 179 /* Controls if TCP should queue segments that arrive out of
bfictorie 0:8cdad1c73e8e 180 order. Define to 0 if your device is low on memory. */
bfictorie 0:8cdad1c73e8e 181 #define TCP_QUEUE_OOSEQ 0
bfictorie 0:8cdad1c73e8e 182
bfictorie 0:8cdad1c73e8e 183 /* TCP Maximum segment size. */
bfictorie 0:8cdad1c73e8e 184 //#define TCP_MSS 1024
bfictorie 0:8cdad1c73e8e 185 #define TCP_MSS 0x276//536//0x276
bfictorie 0:8cdad1c73e8e 186
bfictorie 0:8cdad1c73e8e 187 /* TCP sender buffer space (bytes). */
bfictorie 0:8cdad1c73e8e 188 #define TCP_SND_BUF 2048
bfictorie 0:8cdad1c73e8e 189
bfictorie 0:8cdad1c73e8e 190 /* TCP sender buffer space (pbufs). This must be at least = 2 *
bfictorie 0:8cdad1c73e8e 191 TCP_SND_BUF/TCP_MSS for things to work. */
bfictorie 0:8cdad1c73e8e 192 #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)
bfictorie 0:8cdad1c73e8e 193
bfictorie 0:8cdad1c73e8e 194 /* TCP writable space (bytes). This must be less than or equal
bfictorie 0:8cdad1c73e8e 195 to TCP_SND_BUF. It is the amount of space which must be
bfictorie 0:8cdad1c73e8e 196 available in the tcp snd_buf for select to return writable */
bfictorie 0:8cdad1c73e8e 197 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
bfictorie 0:8cdad1c73e8e 198
bfictorie 0:8cdad1c73e8e 199 /* TCP receive window. */
bfictorie 0:8cdad1c73e8e 200 #define TCP_WND 2048 //8096
bfictorie 0:8cdad1c73e8e 201
bfictorie 0:8cdad1c73e8e 202 /* Maximum number of retransmissions of data segments. */
bfictorie 0:8cdad1c73e8e 203 //#define TCP_MAXRTX 12
bfictorie 0:8cdad1c73e8e 204
bfictorie 0:8cdad1c73e8e 205 /* Maximum number of retransmissions of SYN segments. */
bfictorie 0:8cdad1c73e8e 206 //#define TCP_SYNMAXRTX 4
bfictorie 0:8cdad1c73e8e 207
bfictorie 0:8cdad1c73e8e 208 #elif TARGET_LPC2368
bfictorie 0:8cdad1c73e8e 209
bfictorie 0:8cdad1c73e8e 210 #define MEM_POSITION __attribute((section("AHBSRAM1")))
bfictorie 0:8cdad1c73e8e 211
bfictorie 0:8cdad1c73e8e 212 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
bfictorie 0:8cdad1c73e8e 213 sends a lot of data out of ROM (or other static memory), this
bfictorie 0:8cdad1c73e8e 214 should be set high. */
bfictorie 0:8cdad1c73e8e 215 #define MEMP_NUM_PBUF 8
bfictorie 0:8cdad1c73e8e 216 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
bfictorie 0:8cdad1c73e8e 217 per active RAW "connection". */
bfictorie 0:8cdad1c73e8e 218 //#define MEMP_NUM_RAW_PCB 3
bfictorie 0:8cdad1c73e8e 219 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
bfictorie 0:8cdad1c73e8e 220 per active UDP "connection". */
bfictorie 0:8cdad1c73e8e 221 #define MEMP_NUM_UDP_PCB 2
bfictorie 0:8cdad1c73e8e 222 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
bfictorie 0:8cdad1c73e8e 223 connections. */
bfictorie 0:8cdad1c73e8e 224 #define MEMP_NUM_TCP_PCB 2
bfictorie 0:8cdad1c73e8e 225 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
bfictorie 0:8cdad1c73e8e 226 connections. */
bfictorie 0:8cdad1c73e8e 227 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
bfictorie 0:8cdad1c73e8e 228 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
bfictorie 0:8cdad1c73e8e 229 segments. */
bfictorie 0:8cdad1c73e8e 230 #define MEMP_NUM_TCP_SEG 8
bfictorie 0:8cdad1c73e8e 231 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
bfictorie 0:8cdad1c73e8e 232 timeouts. */
bfictorie 0:8cdad1c73e8e 233 #define MEMP_NUM_SYS_TIMEOUT 12
bfictorie 0:8cdad1c73e8e 234
bfictorie 0:8cdad1c73e8e 235 /* The following four are used only with the sequential API and can be
bfictorie 0:8cdad1c73e8e 236 set to 0 if the application only will use the raw API. */
bfictorie 0:8cdad1c73e8e 237 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
bfictorie 0:8cdad1c73e8e 238 #define MEMP_NUM_NETBUF 0
bfictorie 0:8cdad1c73e8e 239 /* MEMP_NUM_NETCONN: the number of struct netconns. */
bfictorie 0:8cdad1c73e8e 240 #define MEMP_NUM_NETCONN 0
bfictorie 0:8cdad1c73e8e 241 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
bfictorie 0:8cdad1c73e8e 242 for sequential API communication and incoming packets. Used in
bfictorie 0:8cdad1c73e8e 243 src/api/tcpip.c. */
bfictorie 0:8cdad1c73e8e 244 #define MEMP_NUM_TCPIP_MSG_API 0
bfictorie 0:8cdad1c73e8e 245 #define MEMP_NUM_TCPIP_MSG_INPKT 0
bfictorie 0:8cdad1c73e8e 246
bfictorie 0:8cdad1c73e8e 247 /* ---------- Pbuf options ---------- */
bfictorie 0:8cdad1c73e8e 248 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
bfictorie 0:8cdad1c73e8e 249 #define PBUF_POOL_SIZE 8//16//100
bfictorie 0:8cdad1c73e8e 250
bfictorie 0:8cdad1c73e8e 251 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
bfictorie 0:8cdad1c73e8e 252 //#define PBUF_POOL_BUFSIZE 128
bfictorie 0:8cdad1c73e8e 253
bfictorie 0:8cdad1c73e8e 254 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
bfictorie 0:8cdad1c73e8e 255 link level header. */
bfictorie 0:8cdad1c73e8e 256 //#define PBUF_LINK_HLEN 16
bfictorie 0:8cdad1c73e8e 257
bfictorie 0:8cdad1c73e8e 258 /** SYS_LIGHTWEIGHT_PROT
bfictorie 0:8cdad1c73e8e 259 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
bfictorie 0:8cdad1c73e8e 260 * for certain critical regions during buffer allocation, deallocation and memory
bfictorie 0:8cdad1c73e8e 261 * allocation and deallocation.
bfictorie 0:8cdad1c73e8e 262 */
bfictorie 0:8cdad1c73e8e 263 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
bfictorie 0:8cdad1c73e8e 264
bfictorie 0:8cdad1c73e8e 265 /* ---------- TCP options ---------- */
bfictorie 0:8cdad1c73e8e 266 #define LWIP_TCP 1
bfictorie 0:8cdad1c73e8e 267 #define TCP_TTL 255
bfictorie 0:8cdad1c73e8e 268
bfictorie 0:8cdad1c73e8e 269 /* Controls if TCP should queue segments that arrive out of
bfictorie 0:8cdad1c73e8e 270 order. Define to 0 if your device is low on memory. */
bfictorie 0:8cdad1c73e8e 271 #define TCP_QUEUE_OOSEQ 0
bfictorie 0:8cdad1c73e8e 272
bfictorie 0:8cdad1c73e8e 273 /* TCP Maximum segment size. */
bfictorie 0:8cdad1c73e8e 274 //#define TCP_MSS 1024
bfictorie 0:8cdad1c73e8e 275 #define TCP_MSS 512//0x276//536//0x276
bfictorie 0:8cdad1c73e8e 276
bfictorie 0:8cdad1c73e8e 277 /* TCP sender buffer space (bytes). */
bfictorie 0:8cdad1c73e8e 278 #define TCP_SND_BUF 1024//2048
bfictorie 0:8cdad1c73e8e 279
bfictorie 0:8cdad1c73e8e 280 /* TCP sender buffer space (pbufs). This must be at least = 2 *
bfictorie 0:8cdad1c73e8e 281 TCP_SND_BUF/TCP_MSS for things to work. */
bfictorie 0:8cdad1c73e8e 282 #define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS)//(4 * TCP_SND_BUF/TCP_MSS)
bfictorie 0:8cdad1c73e8e 283
bfictorie 0:8cdad1c73e8e 284 /* TCP writable space (bytes). This must be less than or equal
bfictorie 0:8cdad1c73e8e 285 to TCP_SND_BUF. It is the amount of space which must be
bfictorie 0:8cdad1c73e8e 286 available in the tcp snd_buf for select to return writable */
bfictorie 0:8cdad1c73e8e 287 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
bfictorie 0:8cdad1c73e8e 288
bfictorie 0:8cdad1c73e8e 289 /* TCP receive window. */
bfictorie 0:8cdad1c73e8e 290 #define TCP_WND 512 //8096
bfictorie 0:8cdad1c73e8e 291
bfictorie 0:8cdad1c73e8e 292 /* Maximum number of retransmissions of data segments. */
bfictorie 0:8cdad1c73e8e 293 //#define TCP_MAXRTX 12
bfictorie 0:8cdad1c73e8e 294
bfictorie 0:8cdad1c73e8e 295 /* Maximum number of retransmissions of SYN segments. */
bfictorie 0:8cdad1c73e8e 296 //#define TCP_SYNMAXRTX 4
bfictorie 0:8cdad1c73e8e 297
bfictorie 0:8cdad1c73e8e 298 #endif
bfictorie 0:8cdad1c73e8e 299
bfictorie 0:8cdad1c73e8e 300 /* ---------- ARP options ---------- */
bfictorie 0:8cdad1c73e8e 301 #define LWIP_ARP (NET_ETH | NET_ZG2100)
bfictorie 0:8cdad1c73e8e 302 #define ARP_TABLE_SIZE 2//4//10
bfictorie 0:8cdad1c73e8e 303 #define ARP_QUEUEING 0//1
bfictorie 0:8cdad1c73e8e 304 #define ETHARP_TRUST_IP_MAC 1
bfictorie 0:8cdad1c73e8e 305
bfictorie 0:8cdad1c73e8e 306 /* ---------- IP options ---------- */
bfictorie 0:8cdad1c73e8e 307 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
bfictorie 0:8cdad1c73e8e 308 IP packets across network interfaces. If you are going to run lwIP
bfictorie 0:8cdad1c73e8e 309 on a device with only one network interface, define this to 0. */
bfictorie 0:8cdad1c73e8e 310 #define IP_FORWARD 0
bfictorie 0:8cdad1c73e8e 311
bfictorie 0:8cdad1c73e8e 312
bfictorie 0:8cdad1c73e8e 313 /* IP reassembly and segmentation.These are orthogonal even
bfictorie 0:8cdad1c73e8e 314 * if they both deal with IP fragments */
bfictorie 0:8cdad1c73e8e 315 /*
bfictorie 0:8cdad1c73e8e 316 #define IP_REASSEMBLY 1
bfictorie 0:8cdad1c73e8e 317 #define IP_REASS_MAX_PBUFS 10
bfictorie 0:8cdad1c73e8e 318 #define MEMP_NUM_REASSDATA 10
bfictorie 0:8cdad1c73e8e 319 #define IP_FRAG 1
bfictorie 0:8cdad1c73e8e 320 */
bfictorie 0:8cdad1c73e8e 321 /* ---------- ICMP options ---------- */
bfictorie 0:8cdad1c73e8e 322 #define ICMP_TTL 255
bfictorie 0:8cdad1c73e8e 323
bfictorie 0:8cdad1c73e8e 324 /* ---------- DHCP options ---------- */
bfictorie 0:8cdad1c73e8e 325 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
bfictorie 0:8cdad1c73e8e 326 interfaces. */
bfictorie 0:8cdad1c73e8e 327 #define LWIP_DHCP (NET_ETH | NET_ZG2100)
bfictorie 0:8cdad1c73e8e 328
bfictorie 0:8cdad1c73e8e 329 /* 1 if you want to do an ARP check on the offered address
bfictorie 0:8cdad1c73e8e 330 (recommended if using DHCP). */
bfictorie 0:8cdad1c73e8e 331 #define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
bfictorie 0:8cdad1c73e8e 332
bfictorie 0:8cdad1c73e8e 333 /* ---------- AUTOIP options ------- */
bfictorie 0:8cdad1c73e8e 334 #define LWIP_AUTOIP 0
bfictorie 0:8cdad1c73e8e 335
bfictorie 0:8cdad1c73e8e 336 /* ---------- SNMP options ---------- */
bfictorie 0:8cdad1c73e8e 337 /** @todo SNMP is experimental for now
bfictorie 0:8cdad1c73e8e 338 @note UDP must be available for SNMP transport */
bfictorie 0:8cdad1c73e8e 339 #ifndef LWIP_SNMP
bfictorie 0:8cdad1c73e8e 340 #define LWIP_SNMP 0
bfictorie 0:8cdad1c73e8e 341 #endif
bfictorie 0:8cdad1c73e8e 342
bfictorie 0:8cdad1c73e8e 343
bfictorie 0:8cdad1c73e8e 344 #ifndef SNMP_PRIVATE_MIB
bfictorie 0:8cdad1c73e8e 345 #define SNMP_PRIVATE_MIB 0
bfictorie 0:8cdad1c73e8e 346 #endif
bfictorie 0:8cdad1c73e8e 347
bfictorie 0:8cdad1c73e8e 348
bfictorie 0:8cdad1c73e8e 349 /* ---------- UDP options ---------- */
bfictorie 0:8cdad1c73e8e 350 #define LWIP_UDP 1
bfictorie 0:8cdad1c73e8e 351 #define UDP_TTL 255
bfictorie 0:8cdad1c73e8e 352
bfictorie 0:8cdad1c73e8e 353 /* ---------- DNS options ---------- */
bfictorie 0:8cdad1c73e8e 354 #define LWIP_DNS 1
bfictorie 0:8cdad1c73e8e 355
bfictorie 0:8cdad1c73e8e 356 /* ---------- RAW options ---------- */
bfictorie 0:8cdad1c73e8e 357 #define LWIP_RAW 0
bfictorie 0:8cdad1c73e8e 358 #define RAW_TTL 255
bfictorie 0:8cdad1c73e8e 359
bfictorie 0:8cdad1c73e8e 360 /* ---------- Statistics options ---------- */
bfictorie 0:8cdad1c73e8e 361 /* individual STATS options can be turned off by defining them to 0
bfictorie 0:8cdad1c73e8e 362 * (e.g #define TCP_STATS 0). All of them are turned off if LWIP_STATS
bfictorie 0:8cdad1c73e8e 363 * is 0
bfictorie 0:8cdad1c73e8e 364 * */
bfictorie 0:8cdad1c73e8e 365
bfictorie 0:8cdad1c73e8e 366 #define LWIP_STATS 0
bfictorie 0:8cdad1c73e8e 367
bfictorie 0:8cdad1c73e8e 368 /* ---------- PPP options ---------- */
bfictorie 0:8cdad1c73e8e 369
bfictorie 0:8cdad1c73e8e 370 #define PPP_SUPPORT NET_PPP /* Set > 0 for PPP */
bfictorie 0:8cdad1c73e8e 371
bfictorie 0:8cdad1c73e8e 372 #if PPP_SUPPORT > 0
bfictorie 0:8cdad1c73e8e 373
bfictorie 0:8cdad1c73e8e 374 #define NUM_PPP 1 /* Max PPP sessions. */
bfictorie 0:8cdad1c73e8e 375
bfictorie 0:8cdad1c73e8e 376
bfictorie 0:8cdad1c73e8e 377 /* Select modules to enable. Ideally these would be set in the makefile but
bfictorie 0:8cdad1c73e8e 378 * we're limited by the command line length so you need to modify the settings
bfictorie 0:8cdad1c73e8e 379 * in this file.
bfictorie 0:8cdad1c73e8e 380 */
bfictorie 0:8cdad1c73e8e 381 #define PAP_SUPPORT 1 /* Set > 0 for PAP. */
bfictorie 0:8cdad1c73e8e 382 #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */
bfictorie 0:8cdad1c73e8e 383 #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */
bfictorie 0:8cdad1c73e8e 384 #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */
bfictorie 0:8cdad1c73e8e 385 #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */
bfictorie 0:8cdad1c73e8e 386 #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */
bfictorie 0:8cdad1c73e8e 387 #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */
bfictorie 0:8cdad1c73e8e 388
bfictorie 0:8cdad1c73e8e 389
bfictorie 0:8cdad1c73e8e 390 /*
bfictorie 0:8cdad1c73e8e 391 * Timeouts.
bfictorie 0:8cdad1c73e8e 392 */
bfictorie 0:8cdad1c73e8e 393 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
bfictorie 0:8cdad1c73e8e 394 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
bfictorie 0:8cdad1c73e8e 395 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
bfictorie 0:8cdad1c73e8e 396 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
bfictorie 0:8cdad1c73e8e 397
bfictorie 0:8cdad1c73e8e 398 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
bfictorie 0:8cdad1c73e8e 399 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
bfictorie 0:8cdad1c73e8e 400
bfictorie 0:8cdad1c73e8e 401 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
bfictorie 0:8cdad1c73e8e 402 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
bfictorie 0:8cdad1c73e8e 403
bfictorie 0:8cdad1c73e8e 404
bfictorie 0:8cdad1c73e8e 405 /* Interval in seconds between keepalive echo requests, 0 to disable. */
bfictorie 0:8cdad1c73e8e 406 #if 1
bfictorie 0:8cdad1c73e8e 407 #define LCP_ECHOINTERVAL 0
bfictorie 0:8cdad1c73e8e 408 #else
bfictorie 0:8cdad1c73e8e 409
bfictorie 0:8cdad1c73e8e 410 #define LCP_ECHOINTERVAL 10
bfictorie 0:8cdad1c73e8e 411 #endif
bfictorie 0:8cdad1c73e8e 412
bfictorie 0:8cdad1c73e8e 413
bfictorie 0:8cdad1c73e8e 414 /* Number of unanswered echo requests before failure. */
bfictorie 0:8cdad1c73e8e 415 #define LCP_MAXECHOFAILS 3
bfictorie 0:8cdad1c73e8e 416
bfictorie 0:8cdad1c73e8e 417 /* Max Xmit idle time (in jiffies) before resend flag char. */
bfictorie 0:8cdad1c73e8e 418 #define PPP_MAXIDLEFLAG 0//Send it every time//100
bfictorie 0:8cdad1c73e8e 419
bfictorie 0:8cdad1c73e8e 420 /*
bfictorie 0:8cdad1c73e8e 421 * Packet sizes
bfictorie 0:8cdad1c73e8e 422 *
bfictorie 0:8cdad1c73e8e 423 * Note - lcp shouldn't be allowed to negotiate stuff outside these
bfictorie 0:8cdad1c73e8e 424 * limits. See lcp.h in the pppd directory.
bfictorie 0:8cdad1c73e8e 425 * (XXX - these constants should simply be shared by lcp.c instead
bfictorie 0:8cdad1c73e8e 426 * of living in lcp.h)
bfictorie 0:8cdad1c73e8e 427 */
bfictorie 0:8cdad1c73e8e 428 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
bfictorie 0:8cdad1c73e8e 429 #if 0
bfictorie 0:8cdad1c73e8e 430 #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
bfictorie 0:8cdad1c73e8e 431 #else
bfictorie 0:8cdad1c73e8e 432
bfictorie 0:8cdad1c73e8e 433 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
bfictorie 0:8cdad1c73e8e 434 #endif
bfictorie 0:8cdad1c73e8e 435
bfictorie 0:8cdad1c73e8e 436 #define PPP_MINMTU 64
bfictorie 0:8cdad1c73e8e 437 #define PPP_MRU 1500 /* default MRU = max length of info field */
bfictorie 0:8cdad1c73e8e 438 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
bfictorie 0:8cdad1c73e8e 439 #define PPP_DEFMRU 296 /* Try for this */
bfictorie 0:8cdad1c73e8e 440 #define PPP_MINMRU 128 /* No MRUs below this */
bfictorie 0:8cdad1c73e8e 441
bfictorie 0:8cdad1c73e8e 442
bfictorie 0:8cdad1c73e8e 443 #define MAXNAMELEN 64 /* max length of hostname or name for auth */
bfictorie 0:8cdad1c73e8e 444 #define MAXSECRETLEN 64 /* max length of password or secret */
bfictorie 0:8cdad1c73e8e 445
bfictorie 0:8cdad1c73e8e 446 #endif /* PPP_SUPPORT > 0 */
bfictorie 0:8cdad1c73e8e 447
bfictorie 0:8cdad1c73e8e 448 //C++ Compat
bfictorie 0:8cdad1c73e8e 449 #define try vTry
bfictorie 0:8cdad1c73e8e 450
bfictorie 0:8cdad1c73e8e 451 #endif
bfictorie 0:8cdad1c73e8e 452
bfictorie 0:8cdad1c73e8e 453
bfictorie 0:8cdad1c73e8e 454 #endif /* __LWIPOPTS_H__ */