Program the control the fischertechnik robo interface or intelligent interface via tcp socket or via a java gui.

Dependencies:   mbed ConfigFile

Committer:
networker
Date:
Fri Dec 31 14:01:14 2010 +0000
Revision:
0:7f26f0680202
initial release: comprises ftlib (no usb), ft-over-ip socket server, and the http server (the html page and java jar I still have to publish somewhere)

Who changed what in which revision?

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