SMS Scheduler that will automatically send and receive text messages using the Enfora 1308 GSM Modem. Please note that it uses a modified NetServices library and to set the baud rate for the GSM Modem to 19.2K.

Dependencies:   mbed

Committer:
mafischl
Date:
Thu Oct 13 18:01:31 2011 +0000
Revision:
1:5a7cce9994a3
Parent:
0:d9266031f832

        

Who changed what in which revision?

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