[457] | 1 | /**
|
---|
| 2 | * @file
|
---|
| 3 | *
|
---|
| 4 | * lwIP Options Configuration
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | /*
|
---|
| 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
|
---|
| 9 | * All rights reserved.
|
---|
| 10 | *
|
---|
| 11 | * Redistribution and use in source and binary forms, with or without modification,
|
---|
| 12 | * are permitted provided that the following conditions are met:
|
---|
| 13 | *
|
---|
| 14 | * 1. Redistributions of source code must retain the above copyright notice,
|
---|
| 15 | * this list of conditions and the following disclaimer.
|
---|
| 16 | * 2. Redistributions in binary form must reproduce the above copyright notice,
|
---|
| 17 | * this list of conditions and the following disclaimer in the documentation
|
---|
| 18 | * and/or other materials provided with the distribution.
|
---|
| 19 | * 3. The name of the author may not be used to endorse or promote products
|
---|
| 20 | * derived from this software without specific prior written permission.
|
---|
| 21 | *
|
---|
| 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
---|
| 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
---|
| 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
---|
| 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
---|
| 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
---|
| 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
---|
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
---|
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
---|
| 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
---|
| 31 | * OF SUCH DAMAGE.
|
---|
| 32 | *
|
---|
| 33 | * This file is part of the lwIP TCP/IP stack.
|
---|
| 34 | *
|
---|
| 35 | * Author: Adam Dunkels <adam@sics.se>
|
---|
| 36 | *
|
---|
| 37 | */
|
---|
| 38 | #ifndef LWIP_LWIPOPTS_H
|
---|
| 39 | #define LWIP_LWIPOPTS_H
|
---|
| 40 |
|
---|
| 41 | /*
|
---|
| 42 | * Include user defined options first. Anything not defined in these files
|
---|
| 43 | * will be set to standard values. Override anything you dont like!
|
---|
| 44 | */
|
---|
| 45 | #include "lwip/arch.h"
|
---|
| 46 | #include "lwip/debug.h"
|
---|
| 47 |
|
---|
| 48 | /*
|
---|
| 49 | -----------------------------------------------
|
---|
| 50 | ---------- Platform specific locking ----------
|
---|
| 51 | -----------------------------------------------
|
---|
| 52 | */
|
---|
| 53 |
|
---|
| 54 | /**
|
---|
| 55 | * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
|
---|
| 56 | * critical regions during buffer allocation, deallocation and memory
|
---|
| 57 | * allocation and deallocation.
|
---|
| 58 | */
|
---|
| 59 | #define SYS_LIGHTWEIGHT_PROT 1
|
---|
| 60 |
|
---|
| 61 | /**
|
---|
| 62 | * NO_SYS==1: Provides VERY minimal functionality. Otherwise,
|
---|
| 63 | * use lwIP facilities.
|
---|
| 64 | */
|
---|
| 65 | #define NO_SYS 0
|
---|
| 66 |
|
---|
| 67 | #define LWIP_IPV4 (NO_SYS==0)
|
---|
| 68 | #define LWIP_IPV6 (NO_SYS==0)
|
---|
| 69 | /*
|
---|
| 70 | ------------------------------------
|
---|
| 71 | ---------- Memory options ----------
|
---|
| 72 | ------------------------------------
|
---|
| 73 | */
|
---|
| 74 |
|
---|
| 75 | /**
|
---|
| 76 | * MEM_ALIGNMENT: should be set to the alignment of the CPU
|
---|
| 77 | * 4 byte alignment -> #define MEM_ALIGNMENT 4
|
---|
| 78 | * 2 byte alignment -> #define MEM_ALIGNMENT 2
|
---|
| 79 | */
|
---|
| 80 | #define MEM_ALIGNMENT 4U
|
---|
| 81 |
|
---|
| 82 | /**
|
---|
| 83 | * MEM_SIZE: the size of the heap memory. If the application will send
|
---|
| 84 | * a lot of data that needs to be copied, this should be set high.
|
---|
| 85 | */
|
---|
| 86 | #define MEM_SIZE 10240
|
---|
| 87 |
|
---|
| 88 | /*
|
---|
| 89 | ------------------------------------------------
|
---|
| 90 | ---------- Internal Memory Pool Sizes ----------
|
---|
| 91 | ------------------------------------------------
|
---|
| 92 | */
|
---|
| 93 | /**
|
---|
| 94 | * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
|
---|
| 95 | * If the application sends a lot of data out of ROM (or other static memory),
|
---|
| 96 | * this should be set high.
|
---|
| 97 | */
|
---|
| 98 | #define MEMP_NUM_PBUF 16
|
---|
| 99 |
|
---|
| 100 | /**
|
---|
| 101 | * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
|
---|
| 102 | * (requires the LWIP_RAW option)
|
---|
| 103 | */
|
---|
| 104 | #define MEMP_NUM_RAW_PCB 3
|
---|
| 105 |
|
---|
| 106 | /**
|
---|
| 107 | * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
|
---|
| 108 | * per active UDP "connection".
|
---|
| 109 | * (requires the LWIP_UDP option)
|
---|
| 110 | */
|
---|
| 111 | #define MEMP_NUM_UDP_PCB 11
|
---|
| 112 |
|
---|
| 113 | /**
|
---|
| 114 | * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
|
---|
| 115 | * (requires the LWIP_TCP option)
|
---|
| 116 | */
|
---|
| 117 | #define MEMP_NUM_TCP_PCB 5
|
---|
| 118 |
|
---|
| 119 | /**
|
---|
| 120 | * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
|
---|
| 121 | * (requires the LWIP_TCP option)
|
---|
| 122 | */
|
---|
| 123 | #define MEMP_NUM_TCP_PCB_LISTEN 8
|
---|
| 124 |
|
---|
| 125 | /**
|
---|
| 126 | * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
|
---|
| 127 | * (requires the LWIP_TCP option)
|
---|
| 128 | */
|
---|
| 129 | #define MEMP_NUM_TCP_SEG 16
|
---|
| 130 |
|
---|
| 131 | /**
|
---|
| 132 | * MEMP_NUM_REASSDATA: the number of simultaneously IP packets queued for
|
---|
| 133 | * reassembly (whole packets, not fragments!)
|
---|
| 134 | */
|
---|
| 135 | #define MEMP_NUM_REASSDATA 10
|
---|
| 136 |
|
---|
| 137 | /**
|
---|
| 138 | * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
|
---|
| 139 | * packets (pbufs) that are waiting for an ARP request (to resolve
|
---|
| 140 | * their destination address) to finish.
|
---|
| 141 | * (requires the ARP_QUEUEING option)
|
---|
| 142 | */
|
---|
| 143 | #define MEMP_NUM_ARP_QUEUE 2
|
---|
| 144 |
|
---|
| 145 | /**
|
---|
| 146 | * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
|
---|
| 147 | * (requires NO_SYS==0)
|
---|
| 148 | */
|
---|
| 149 | #define MEMP_NUM_SYS_TIMEOUT 12
|
---|
| 150 |
|
---|
| 151 | /**
|
---|
| 152 | * MEMP_NUM_NETBUF: the number of struct netbufs.
|
---|
| 153 | * (only needed if you use the sequential API, like api_lib.c)
|
---|
| 154 | */
|
---|
| 155 | #define MEMP_NUM_NETBUF 2
|
---|
| 156 |
|
---|
| 157 | /**
|
---|
| 158 | * MEMP_NUM_NETCONN: the number of struct netconns.
|
---|
| 159 | * (only needed if you use the sequential API, like api_lib.c)
|
---|
| 160 | */
|
---|
| 161 | #define MEMP_NUM_NETCONN 32
|
---|
| 162 |
|
---|
| 163 | /**
|
---|
| 164 | * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
|
---|
| 165 | * for callback/timeout API communication.
|
---|
| 166 | * (only needed if you use tcpip.c)
|
---|
| 167 | */
|
---|
| 168 | #define MEMP_NUM_TCPIP_MSG_API 16
|
---|
| 169 |
|
---|
| 170 | /**
|
---|
| 171 | * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
|
---|
| 172 | * for incoming packets.
|
---|
| 173 | * (only needed if you use tcpip.c)
|
---|
| 174 | */
|
---|
| 175 | #define MEMP_NUM_TCPIP_MSG_INPKT 16
|
---|
| 176 |
|
---|
| 177 | /**
|
---|
| 178 | * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
|
---|
| 179 | */
|
---|
| 180 | #define PBUF_POOL_SIZE 50
|
---|
| 181 |
|
---|
| 182 | /*
|
---|
| 183 | ---------------------------------
|
---|
| 184 | ---------- ARP options ----------
|
---|
| 185 | ---------------------------------
|
---|
| 186 | */
|
---|
| 187 | /**
|
---|
| 188 | * LWIP_ARP==1: Enable ARP functionality.
|
---|
| 189 | */
|
---|
| 190 | #define LWIP_ARP 1
|
---|
| 191 |
|
---|
| 192 | /*
|
---|
| 193 | --------------------------------
|
---|
| 194 | ---------- IP options ----------
|
---|
| 195 | --------------------------------
|
---|
| 196 | */
|
---|
| 197 | /**
|
---|
| 198 | * IP_FORWARD==1: Enables the ability to forward IP packets across network
|
---|
| 199 | * interfaces. If you are going to run lwIP on a device with only one network
|
---|
| 200 | * interface, define this to 0.
|
---|
| 201 | */
|
---|
| 202 | #define IP_FORWARD 1
|
---|
| 203 |
|
---|
| 204 | /**
|
---|
| 205 | * IP_OPTIONS: Defines the behavior for IP options.
|
---|
| 206 | * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
|
---|
| 207 | * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
|
---|
| 208 | */
|
---|
| 209 | #define IP_OPTIONS_ALLOWED 1
|
---|
| 210 |
|
---|
| 211 | /**
|
---|
| 212 | * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
|
---|
| 213 | * this option does not affect outgoing packet sizes, which can be controlled
|
---|
| 214 | * via IP_FRAG.
|
---|
| 215 | */
|
---|
| 216 | #define IP_REASSEMBLY 1
|
---|
| 217 |
|
---|
| 218 | /**
|
---|
| 219 | * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
|
---|
| 220 | * that this option does not affect incoming packet sizes, which can be
|
---|
| 221 | * controlled via IP_REASSEMBLY.
|
---|
| 222 | */
|
---|
| 223 | #define IP_FRAG 1
|
---|
| 224 |
|
---|
| 225 | /**
|
---|
| 226 | * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
|
---|
| 227 | * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
|
---|
| 228 | * in this time, the whole packet is discarded.
|
---|
| 229 | */
|
---|
| 230 | #define IP_REASS_MAXAGE 3
|
---|
| 231 |
|
---|
| 232 | /**
|
---|
| 233 | * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
|
---|
| 234 | * Since the received pbufs are enqueued, be sure to configure
|
---|
| 235 | * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
|
---|
| 236 | * packets even if the maximum amount of fragments is enqueued for reassembly!
|
---|
| 237 | */
|
---|
| 238 | #define IP_REASS_MAX_PBUFS 10
|
---|
| 239 |
|
---|
| 240 | /**
|
---|
| 241 | * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
|
---|
| 242 | * fragmentation. Otherwise pbufs are allocated and reference the original
|
---|
| 243 | * packet data to be fragmented.
|
---|
| 244 | */
|
---|
| 245 | #define IP_FRAG_USES_STATIC_BUF 0
|
---|
| 246 |
|
---|
| 247 | /**
|
---|
| 248 | * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
|
---|
| 249 | */
|
---|
| 250 | #define IP_DEFAULT_TTL 255
|
---|
| 251 |
|
---|
| 252 | /*
|
---|
| 253 | ----------------------------------
|
---|
| 254 | ---------- ICMP options ----------
|
---|
| 255 | ----------------------------------
|
---|
| 256 | */
|
---|
| 257 | /**
|
---|
| 258 | * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
|
---|
| 259 | * Be careful, disable that make your product non-compliant to RFC1122
|
---|
| 260 | */
|
---|
| 261 | #define LWIP_ICMP 1
|
---|
| 262 |
|
---|
| 263 | /*
|
---|
| 264 | ---------------------------------
|
---|
| 265 | ---------- RAW options ----------
|
---|
| 266 | ---------------------------------
|
---|
| 267 | */
|
---|
| 268 | /**
|
---|
| 269 | * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
|
---|
| 270 | */
|
---|
| 271 | #define LWIP_RAW 1
|
---|
| 272 |
|
---|
| 273 | /*
|
---|
| 274 | ----------------------------------
|
---|
| 275 | ---------- DHCP options ----------
|
---|
| 276 | ----------------------------------
|
---|
| 277 | */
|
---|
| 278 | /**
|
---|
| 279 | * LWIP_DHCP==1: Enable DHCP module.
|
---|
| 280 | */
|
---|
| 281 | #define LWIP_DHCP 1
|
---|
| 282 |
|
---|
| 283 |
|
---|
| 284 | /*
|
---|
| 285 | ------------------------------------
|
---|
| 286 | ---------- AUTOIP options ----------
|
---|
| 287 | ------------------------------------
|
---|
| 288 | */
|
---|
| 289 | /**
|
---|
| 290 | * LWIP_AUTOIP==1: Enable AUTOIP module.
|
---|
| 291 | */
|
---|
| 292 | #define LWIP_AUTOIP (LWIP_DHCP)
|
---|
| 293 |
|
---|
| 294 | /*
|
---|
| 295 | ----------------------------------
|
---|
| 296 | ---------- SNMP options ----------
|
---|
| 297 | ----------------------------------
|
---|
| 298 | */
|
---|
| 299 | /**
|
---|
| 300 | * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
|
---|
| 301 | * transport.
|
---|
| 302 | */
|
---|
| 303 | #define LWIP_SNMP 1
|
---|
| 304 |
|
---|
| 305 | /*
|
---|
| 306 | ----------------------------------
|
---|
| 307 | ---------- IGMP options ----------
|
---|
| 308 | ----------------------------------
|
---|
| 309 | */
|
---|
| 310 | /**
|
---|
| 311 | * LWIP_IGMP==1: Turn on IGMP module.
|
---|
| 312 | */
|
---|
| 313 | #define LWIP_IGMP (LWIP_IPV4)
|
---|
| 314 |
|
---|
| 315 | /*
|
---|
| 316 | ----------------------------------
|
---|
| 317 | ---------- DNS options -----------
|
---|
| 318 | ----------------------------------
|
---|
| 319 | */
|
---|
| 320 | /**
|
---|
| 321 | * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
|
---|
| 322 | * transport.
|
---|
| 323 | */
|
---|
| 324 | #define LWIP_DNS 1
|
---|
| 325 |
|
---|
| 326 | /*
|
---|
| 327 | ---------------------------------
|
---|
| 328 | ---------- UDP options ----------
|
---|
| 329 | ---------------------------------
|
---|
| 330 | */
|
---|
| 331 | /**
|
---|
| 332 | * LWIP_UDP==1: Turn on UDP.
|
---|
| 333 | */
|
---|
| 334 | #define LWIP_UDP 1
|
---|
| 335 |
|
---|
| 336 | /*
|
---|
| 337 | ---------------------------------
|
---|
| 338 | ---------- TCP options ----------
|
---|
| 339 | ---------------------------------
|
---|
| 340 | */
|
---|
| 341 | /**
|
---|
| 342 | * LWIP_TCP==1: Turn on TCP.
|
---|
| 343 | */
|
---|
| 344 | #define LWIP_TCP 1
|
---|
| 345 |
|
---|
| 346 | #define LWIP_LISTEN_BACKLOG 0
|
---|
| 347 |
|
---|
| 348 | /*
|
---|
| 349 | ----------------------------------
|
---|
| 350 | ---------- Pbuf options ----------
|
---|
| 351 | ----------------------------------
|
---|
| 352 | */
|
---|
| 353 | /**
|
---|
| 354 | * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
|
---|
| 355 | * link level header. The default is 14, the standard value for
|
---|
| 356 | * Ethernet.
|
---|
| 357 | */
|
---|
| 358 | #define PBUF_LINK_HLEN 16
|
---|
| 359 |
|
---|
| 360 | /**
|
---|
| 361 | * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
|
---|
| 362 | * designed to accomodate single full size TCP frame in one pbuf, including
|
---|
| 363 | * TCP_MSS, IP header, and link header.
|
---|
| 364 | *
|
---|
| 365 | */
|
---|
| 366 | #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
|
---|
| 367 |
|
---|
| 368 | /*
|
---|
| 369 | ------------------------------------
|
---|
| 370 | ---------- LOOPIF options ----------
|
---|
| 371 | ------------------------------------
|
---|
| 372 | */
|
---|
| 373 | /**
|
---|
| 374 | * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
|
---|
| 375 | */
|
---|
| 376 | #define LWIP_HAVE_LOOPIF 0
|
---|
| 377 |
|
---|
| 378 | /*
|
---|
| 379 | ----------------------------------------------
|
---|
| 380 | ---------- Sequential layer options ----------
|
---|
| 381 | ----------------------------------------------
|
---|
| 382 | */
|
---|
| 383 |
|
---|
| 384 | /**
|
---|
| 385 | * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
|
---|
| 386 | */
|
---|
| 387 | #define LWIP_NETCONN 1
|
---|
| 388 |
|
---|
| 389 | /*
|
---|
| 390 | ------------------------------------
|
---|
| 391 | ---------- Socket options ----------
|
---|
| 392 | ------------------------------------
|
---|
| 393 | */
|
---|
| 394 | /**
|
---|
| 395 | * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
|
---|
| 396 | */
|
---|
| 397 | #define LWIP_SOCKET 1
|
---|
| 398 |
|
---|
| 399 | /**
|
---|
| 400 | * SO_REUSE==1: Enable SO_REUSEADDR
|
---|
| 401 | */
|
---|
| 402 | #define SO_REUSE 1
|
---|
| 403 |
|
---|
| 404 | /*
|
---|
| 405 | ----------------------------------------
|
---|
| 406 | ---------- Statistics options ----------
|
---|
| 407 | ----------------------------------------
|
---|
| 408 | */
|
---|
| 409 | /**
|
---|
| 410 | * LWIP_STATS==1: Enable statistics collection in lwip_stats.
|
---|
| 411 | */
|
---|
| 412 | #define LWIP_STATS 1
|
---|
| 413 | /*
|
---|
| 414 | ---------------------------------
|
---|
| 415 | ---------- PPP options ----------
|
---|
| 416 | ---------------------------------
|
---|
| 417 | */
|
---|
| 418 | /**
|
---|
| 419 | * PPP_SUPPORT==1: Enable PPP.
|
---|
| 420 | */
|
---|
| 421 | #define PPP_SUPPORT 0
|
---|
| 422 |
|
---|
| 423 |
|
---|
| 424 | #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
|
---|
| 425 | #define LWIP_COMPAT_SOCKETS 1
|
---|
| 426 |
|
---|
| 427 | #define PPP_DEBUG LWIP_DBG_OFF
|
---|
| 428 | #define MEM_DEBUG LWIP_DBG_OFF
|
---|
| 429 | #define API_MSG_DEBUG LWIP_DBG_OFF
|
---|
| 430 | #define TCPIP_DEBUG LWIP_DBG_OFF
|
---|
| 431 | #define NETIF_DEBUG LWIP_DBG_OFF
|
---|
| 432 | #define SOCKETS_DEBUG LWIP_DBG_OFF
|
---|
| 433 | #define IP_DEBUG LWIP_DBG_OFF
|
---|
| 434 | #define IP_REASS_DEBUG LWIP_DBG_OFF
|
---|
| 435 | #define RAW_DEBUG LWIP_DBG_OFF
|
---|
| 436 | #define ICMP_DEBUG LWIP_DBG_OFF
|
---|
| 437 | #define UDP_DEBUG LWIP_DBG_OFF
|
---|
| 438 | #define TCP_DEBUG LWIP_DBG_OFF
|
---|
| 439 | #define TCP_INPUT_DEBUG LWIP_DBG_OFF
|
---|
| 440 | #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
|
---|
| 441 | #define TCP_RTO_DEBUG LWIP_DBG_OFF
|
---|
| 442 | #define TCP_CWND_DEBUG LWIP_DBG_OFF
|
---|
| 443 | #define TCP_WND_DEBUG LWIP_DBG_OFF
|
---|
| 444 | #define TCP_FR_DEBUG LWIP_DBG_OFF
|
---|
| 445 | #define TCP_QLEN_DEBUG LWIP_DBG_OFF
|
---|
| 446 | #define TCP_RST_DEBUG LWIP_DBG_OFF
|
---|
| 447 | #define DHCP_DEBUG LWIP_DBG_OFF
|
---|
| 448 | #define TIMERS_DEBUG LWIP_DBG_OFF
|
---|
| 449 | #define LWIP_DEBUG_TIMERNAMES LWIP_DBG_OFF
|
---|
| 450 | #define SNTP_DEBUG LWIP_DBG_OFF
|
---|
| 451 | #define DNS_DEBUG LWIP_DBG_OFF
|
---|
| 452 |
|
---|
| 453 | extern unsigned char debug_flags;
|
---|
| 454 | #define LWIP_DBG_TYPES_ON debug_flags
|
---|
| 455 |
|
---|
| 456 | #define IP_SOF_BROADCAST_RECV 1
|
---|
| 457 | #define IP_SOF_BROADCAST 1
|
---|
| 458 | #define SO_REUSE_RXTOALL 1
|
---|
| 459 | #define LWIP_SO_RCVTIMEO (LWIP_SOCKET)
|
---|
| 460 |
|
---|
| 461 | #define MEMP_OVERFLOW_CHECK 1
|
---|
| 462 |
|
---|
| 463 | #define LWIP_TCPIP_TIMEOUT 1
|
---|
| 464 |
|
---|
| 465 | /* ---------- TCP options ---------- */
|
---|
| 466 |
|
---|
| 467 | #define TCP_LISTEN_BACKLOG 1
|
---|
| 468 |
|
---|
| 469 | /* Controls if TCP should queue segments that arrive out of
|
---|
| 470 | order. Define to 0 if your device is low on memory. */
|
---|
| 471 | #define TCP_QUEUE_OOSEQ 1
|
---|
| 472 |
|
---|
| 473 | /* TCP Maximum segment size. */
|
---|
| 474 | #define TCP_MSS 1024
|
---|
| 475 |
|
---|
| 476 | /* TCP sender buffer space (bytes). */
|
---|
| 477 | #define TCP_SND_BUF (2 * TCP_MSS)
|
---|
| 478 |
|
---|
| 479 | /* TCP sender buffer space (pbufs). This must be at least = 2 *
|
---|
| 480 | TCP_SND_BUF/TCP_MSS for things to work. */
|
---|
| 481 | #define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS)
|
---|
| 482 |
|
---|
| 483 | /* TCP writable space (bytes). This must be less than or equal
|
---|
| 484 | to TCP_SND_BUF. It is the amount of space which must be
|
---|
| 485 | available in the tcp snd_buf for select to return writable */
|
---|
| 486 | #define TCP_SNDLOWAT (TCP_SND_BUF/2)
|
---|
| 487 |
|
---|
| 488 | /* TCP receive window. */
|
---|
| 489 | #define TCP_WND (4 * TCP_MSS)
|
---|
| 490 |
|
---|
| 491 | /* Maximum number of retransmissions of data segments. */
|
---|
| 492 | #define TCP_MAXRTX 12
|
---|
| 493 |
|
---|
| 494 | /* Maximum number of retransmissions of SYN segments. */
|
---|
| 495 | #define TCP_SYNMAXRTX 4
|
---|
| 496 |
|
---|
| 497 | /* ---------- ARP options ---------- */
|
---|
| 498 | #define ARP_TABLE_SIZE 10
|
---|
| 499 | #define ARP_QUEUEING 1
|
---|
| 500 |
|
---|
| 501 |
|
---|
| 502 |
|
---|
| 503 | /* IP reassembly and segmentation.These are orthogonal even
|
---|
| 504 | * if they both deal with IP fragments */
|
---|
| 505 | #define IPV6_FRAG_COPYHEADER 1
|
---|
| 506 | #define LWIP_IPV6_FRAG 1
|
---|
| 507 |
|
---|
| 508 |
|
---|
| 509 | /* ---------- ICMP options ---------- */
|
---|
| 510 | #define ICMP_TTL (IP_DEFAULT_TTL)
|
---|
| 511 |
|
---|
| 512 | /* ---------- DHCP options ---------- */
|
---|
| 513 | /* Define LWIP_DHCP to 1 if you want DHCP configuration of
|
---|
| 514 | interfaces. */
|
---|
| 515 |
|
---|
| 516 | #define LWIP_DHCP_GET_NTP_SRV (LWIP_DHCP)
|
---|
| 517 |
|
---|
| 518 | /* 1 if you want to do an ARP check on the offered address
|
---|
| 519 | (recommended if using DHCP). */
|
---|
| 520 | #define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
|
---|
| 521 |
|
---|
| 522 | /* ---------- AUTOIP options ------- */
|
---|
| 523 | #define LWIP_DHCP_AUTOIP_COOP (LWIP_DHCP)
|
---|
| 524 | #define LWIP_DHCP_AUTOIP_COOP_TRIES 3
|
---|
| 525 |
|
---|
| 526 | /* ---------- SNTP options --------- */
|
---|
| 527 | extern void sntp_set_system_time(u32_t sec);
|
---|
| 528 | #define SNTP_SET_SYSTEM_TIME(s) sntp_set_system_time(s)
|
---|
| 529 | #define SNTP_SERVER_DNS 1
|
---|
| 530 | #define SNTP_STARTUP_DELAY 1
|
---|
| 531 |
|
---|
| 532 | /* ---------- SNMP options ---------- */
|
---|
| 533 | #define MIB2_STATS LWIP_SNMP
|
---|
| 534 | #define SNMP_USE_NETCONN LWIP_NETCONN
|
---|
| 535 | #define SNMP_USE_RAW (!LWIP_NETCONN)
|
---|
| 536 |
|
---|
| 537 |
|
---|
| 538 | /* ---------- MDNS options ---------- */
|
---|
| 539 | #define LWIP_MDNS_RESPONDER 1
|
---|
| 540 | #define LWIP_NUM_NETIF_CLIENT_DATA (LWIP_MDNS_RESPONDER)
|
---|
| 541 |
|
---|
| 542 | /* ---------- UDP options ---------- */
|
---|
| 543 | #define UDP_TTL (IP_DEFAULT_TTL)
|
---|
| 544 |
|
---|
| 545 | /* ---------- RAW options ---------- */
|
---|
| 546 | #define RAW_TTL (IP_DEFAULT_TTL)
|
---|
| 547 |
|
---|
| 548 |
|
---|
| 549 | #define LWIP_NETIF_API 1
|
---|
| 550 | #define LWIP_NETIF_STATUS_CALLBACK 1
|
---|
| 551 | #define LWIP_NETIF_HOSTNAME 0
|
---|
| 552 |
|
---|
| 553 | /* ---------- SLIP options ---------- */
|
---|
| 554 |
|
---|
| 555 | #define LWIP_HAVE_SLIPIF 1 /* Set > 0 for SLIP */
|
---|
| 556 |
|
---|
| 557 | /* Maximum packet size that is received by this netif */
|
---|
| 558 | #define SLIP_MAX_SIZE 1500
|
---|
| 559 | #define sio_tryread sio_read
|
---|
| 560 |
|
---|
| 561 | #define LWIP_HTTPD_SSI 1
|
---|
| 562 |
|
---|
| 563 |
|
---|
| 564 | /*
|
---|
| 565 | * TOPPERS Additional DEFINE
|
---|
| 566 | */
|
---|
| 567 | #define ETH_PAD_SIZE 2
|
---|
| 568 | #define SHELL_ECHO 1
|
---|
| 569 | #define TFTP_MAX_MODE_LEN 9
|
---|
| 570 |
|
---|
| 571 | #define IN_ADDR_T_DEFINED
|
---|
| 572 |
|
---|
| 573 | extern void sys_memcpy(volatile void *d, const volatile void *s, int len);
|
---|
| 574 | #define MEMCPY(dst,src,len) sys_memcpy(dst,src,len)
|
---|
| 575 |
|
---|
| 576 | extern void sys_memcpy(volatile void *d, const volatile void *s, int len);
|
---|
| 577 | #define SMEMCPY(dst,src,len) sys_memcpy(dst,src,len)
|
---|
| 578 |
|
---|
| 579 | extern void sys_memset(volatile void *d, unsigned char val, int len);
|
---|
| 580 | #define MEMSET(a, b, c) sys_memset(a, b, c)
|
---|
| 581 |
|
---|
| 582 | #endif /* LWIP_LWIPOPTS_H */
|
---|