4 * lwIP Options Configuration
8 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
11 * Redistribution and use in source and binary forms, with or without modification,
12 * are permitted provided that the following conditions are met:
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.
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
33 * This file is part of the lwIP TCP/IP stack.
35 * Author: Adam Dunkels <adam@sics.se>
40 * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug -
41 * without this, doxygen does not see the actual #define
44 #if !defined LWIP_HDR_OPT_H
45 #define LWIP_HDR_OPT_H
48 * Include user defined options first. Anything not defined in these files
49 * will be set to standard values. Override anything you don't like!
52 #include "lwip/debug.h"
55 * @defgroup lwip_opts Options (lwipopts.h)
58 * @defgroup lwip_opts_debug Debugging
61 * @defgroup lwip_opts_infrastructure Infrastructure
64 * @defgroup lwip_opts_callback Callback-style APIs
67 * @defgroup lwip_opts_threadsafe_apis Thread-safe APIs
72 ------------------------------------
73 -------------- NO SYS --------------
74 ------------------------------------
77 * @defgroup lwip_opts_nosys NO_SYS
78 * @ingroup lwip_opts_infrastructure
82 * NO_SYS==1: Use lwIP without OS-awareness (no thread, semaphores, mutexes or
83 * mboxes). This means threaded APIs cannot be used (socket, netconn,
84 * i.e. everything in the 'api' folder), only the callback-style raw API is
85 * available (and you have to watch out for yourself that you don't access
86 * lwIP functions/structures from more than one context at a time!)
88 #if !defined NO_SYS || defined __DOXYGEN__
96 * @defgroup lwip_opts_timers Timers
97 * @ingroup lwip_opts_infrastructure
101 * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers.
102 * (the array of lwip-internal cyclic timers is still provided)
103 * (check NO_SYS_NO_TIMERS for compatibility to old versions)
105 #if !defined LWIP_TIMERS || defined __DOXYGEN__
106 #ifdef NO_SYS_NO_TIMERS
107 #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS))
109 #define LWIP_TIMERS 1
114 * LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation.
115 * Function prototypes in timeouts.h and the array of lwip-internal cyclic timers
116 * are still included, but the implementation is not. The following functions
117 * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(),
118 * sys_timeouts_mbox_fetch()
120 #if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__
121 #define LWIP_TIMERS_CUSTOM 0
128 * @defgroup lwip_opts_memcpy memcpy
129 * @ingroup lwip_opts_infrastructure
133 * MEMCPY: override this if you have a faster implementation at hand than the
134 * one included in your C library
136 #if !defined MEMCPY || defined __DOXYGEN__
137 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
141 * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a
142 * call to memcpy() if the length is known at compile time and is small.
144 #if !defined SMEMCPY || defined __DOXYGEN__
145 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
149 * MEMMOVE: override this if you have a faster implementation at hand than the
150 * one included in your C library. lwIP currently uses MEMMOVE only when IPv6
151 * fragmentation support is enabled.
153 #if !defined MEMMOVE || defined __DOXYGEN__
154 #define MEMMOVE(dst,src,len) memmove(dst,src,len)
161 ------------------------------------
162 ----------- Core locking -----------
163 ------------------------------------
166 * @defgroup lwip_opts_lock Core locking and MPU
167 * @ingroup lwip_opts_infrastructure
171 * LWIP_MPU_COMPATIBLE: enables special memory management mechanism
172 * which makes lwip able to work on MPU (Memory Protection Unit) system
173 * by not passing stack-pointers to other threads
174 * (this decreases performance as memory is allocated from pools instead
175 * of keeping it on the stack)
177 #if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__
178 #define LWIP_MPU_COMPATIBLE 0
182 * LWIP_TCPIP_CORE_LOCKING
183 * Creates a global mutex that is held during TCPIP thread operations.
184 * Can be locked by client code to perform lwIP operations without changing
185 * into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and
186 * UNLOCK_TCPIP_CORE().
187 * Your system should provide mutexes supporting priority inversion to use this.
189 #if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__
190 #define LWIP_TCPIP_CORE_LOCKING 1
194 * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled,
195 * this lets tcpip_input() grab the mutex for input packets as well,
196 * instead of allocating a message and passing it to tcpip_thread.
198 * ATTENTION: this does not work when tcpip_input() is called from
201 #if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__
202 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
206 * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt
207 * protection) for certain critical regions during buffer allocation, deallocation
208 * and memory allocation and deallocation.
209 * ATTENTION: This is required when using lwIP from more than one context! If
210 * you disable this, you must be sure what you are doing!
212 #if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__
213 #define SYS_LIGHTWEIGHT_PROT 1
220 ------------------------------------
221 ---------- Memory options ----------
222 ------------------------------------
225 * @defgroup lwip_opts_mem Heap and memory pools
226 * @ingroup lwip_opts_infrastructure
230 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
231 * instead of the lwip internal allocator. Can save code size if you
234 #if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__
235 #define MEM_LIBC_MALLOC 0
239 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.
240 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution
241 * speed (heap alloc can be much slower than pool alloc) and usage from interrupts
242 * (especially if your netif driver allocates PBUF_POOL pbufs for received frames
244 * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools,
245 * not only for internal pools defined in memp_std.h)!
247 #if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__
248 #define MEMP_MEM_MALLOC 0
252 * MEM_ALIGNMENT: should be set to the alignment of the CPU
253 * 4 byte alignment -> \#define MEM_ALIGNMENT 4
254 * 2 byte alignment -> \#define MEM_ALIGNMENT 2
256 #if !defined MEM_ALIGNMENT || defined __DOXYGEN__
257 #define MEM_ALIGNMENT 1
261 * MEM_SIZE: the size of the heap memory. If the application will send
262 * a lot of data that needs to be copied, this should be set high.
264 #if !defined MEM_SIZE || defined __DOXYGEN__
265 #define MEM_SIZE 1600
269 * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
270 * amount of bytes before and after each memp element in every pool and fills
271 * it with a prominent default value.
272 * MEMP_OVERFLOW_CHECK == 0 no checking
273 * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
274 * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
275 * memp_malloc() or memp_free() is called (useful but slow!)
277 #if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__
278 #define MEMP_OVERFLOW_CHECK 0
282 * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
283 * sure that there are no cycles in the linked lists.
285 #if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__
286 #define MEMP_SANITY_CHECK 0
290 * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set
291 * of memory pools of various sizes. When mem_malloc is called, an element of
292 * the smallest pool that can provide the length needed is returned.
293 * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled.
295 #if !defined MEM_USE_POOLS || defined __DOXYGEN__
296 #define MEM_USE_POOLS 0
300 * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next
301 * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more
303 #if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__
304 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0
308 * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h
309 * that defines additional pools beyond the "standard" ones required
310 * by lwIP. If you set this to 1, you must have lwippools.h in your
311 * include path somewhere.
313 #if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__
314 #define MEMP_USE_CUSTOM_POOLS 0
318 * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from
319 * interrupt context (or another context that doesn't allow waiting for a
321 * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT,
322 * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs
323 * with each loop so that mem_free can run.
325 * ATTENTION: As you can see from the above description, this leads to dis-/
326 * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc
329 * If you don't want that, at least for NO_SYS=0, you can still use the following
330 * functions to enqueue a deallocation call which then runs in the tcpip_thread
332 * - pbuf_free_callback(p);
333 * - mem_free_callback(m);
335 #if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__
336 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
343 ------------------------------------------------
344 ---------- Internal Memory Pool Sizes ----------
345 ------------------------------------------------
348 * @defgroup lwip_opts_memp Internal memory pools
349 * @ingroup lwip_opts_infrastructure
353 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
354 * If the application sends a lot of data out of ROM (or other static memory),
355 * this should be set high.
357 #if !defined MEMP_NUM_PBUF || defined __DOXYGEN__
358 #define MEMP_NUM_PBUF 16
362 * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
363 * (requires the LWIP_RAW option)
365 #if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__
366 #define MEMP_NUM_RAW_PCB 4
370 * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
371 * per active UDP "connection".
372 * (requires the LWIP_UDP option)
374 #if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__
375 #define MEMP_NUM_UDP_PCB 4
379 * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections.
380 * (requires the LWIP_TCP option)
382 #if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__
383 #define MEMP_NUM_TCP_PCB 5
387 * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
388 * (requires the LWIP_TCP option)
390 #if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__
391 #define MEMP_NUM_TCP_PCB_LISTEN 8
395 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
396 * (requires the LWIP_TCP option)
398 #if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__
399 #define MEMP_NUM_TCP_SEG 16
403 * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for
404 * reassembly (whole packets, not fragments!)
406 #if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__
407 #define MEMP_NUM_REASSDATA 5
411 * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent
412 * (fragments, not whole packets!).
413 * This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1
414 * with DMA-enabled MACs where the packet is not yet sent when netif->output
417 #if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__
418 #define MEMP_NUM_FRAG_PBUF 15
422 * MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing
423 * packets (pbufs) that are waiting for an ARP request (to resolve
424 * their destination address) to finish.
425 * (requires the ARP_QUEUEING option)
427 #if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__
428 #define MEMP_NUM_ARP_QUEUE 30
432 * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces
433 * can be members at the same time (one per netif - allsystems group -, plus one
434 * per netif membership).
435 * (requires the LWIP_IGMP option)
437 #if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__
438 #define MEMP_NUM_IGMP_GROUP 8
442 * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts.
443 * The default number of timeouts is calculated here for all enabled modules.
444 * The formula expects settings to be either '0' or '1'.
446 #if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__
447 #define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0))
451 * MEMP_NUM_NETBUF: the number of struct netbufs.
452 * (only needed if you use the sequential API, like api_lib.c)
454 #if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__
455 #define MEMP_NUM_NETBUF 2
459 * MEMP_NUM_NETCONN: the number of struct netconns.
460 * (only needed if you use the sequential API, like api_lib.c)
462 #if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__
463 #define MEMP_NUM_NETCONN 4
467 * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
468 * for callback/timeout API communication.
469 * (only needed if you use tcpip.c)
471 #if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__
472 #define MEMP_NUM_TCPIP_MSG_API 8
476 * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
477 * for incoming packets.
478 * (only needed if you use tcpip.c)
480 #if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__
481 #define MEMP_NUM_TCPIP_MSG_INPKT 8
485 * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls
486 * (before freeing the corresponding memory using lwip_freeaddrinfo()).
488 #if !defined MEMP_NUM_NETDB || defined __DOXYGEN__
489 #define MEMP_NUM_NETDB 1
493 * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list
494 * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.
496 #if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__
497 #define MEMP_NUM_LOCALHOSTLIST 1
501 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
503 #if !defined PBUF_POOL_SIZE || defined __DOXYGEN__
504 #define PBUF_POOL_SIZE 16
507 /** MEMP_NUM_API_MSG: the number of concurrently active calls to various
508 * socket, netconn, and tcpip functions
510 #if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__
511 #define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API
514 /** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname
516 #if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__
517 #define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API
520 /** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls
521 * to getsockopt/setsockopt
523 #if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__
524 #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API
527 /** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the
530 #if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__
531 #define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API
538 ---------------------------------
539 ---------- ARP options ----------
540 ---------------------------------
543 * @defgroup lwip_opts_arp ARP
544 * @ingroup lwip_opts_ipv4
548 * LWIP_ARP==1: Enable ARP functionality.
550 #if !defined LWIP_ARP || defined __DOXYGEN__
555 * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
557 #if !defined ARP_TABLE_SIZE || defined __DOXYGEN__
558 #define ARP_TABLE_SIZE 10
561 /** the time an ARP entry stays valid after its last update,
562 * for ARP_TMR_INTERVAL = 1000, this is
563 * (60 * 5) seconds = 5 minutes.
565 #if !defined ARP_MAXAGE || defined __DOXYGEN__
566 #define ARP_MAXAGE 300
570 * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address
571 * resolution. By default, only the most recent packet is queued per IP address.
572 * This is sufficient for most protocols and mainly reduces TCP connection
573 * startup time. Set this to 1 if you know your application sends more than one
574 * packet in a row to an IP address that is not in the ARP cache.
576 #if !defined ARP_QUEUEING || defined __DOXYGEN__
577 #define ARP_QUEUEING 0
580 /** The maximum number of packets which may be queued for each
581 * unresolved address by other network layers. Defaults to 3, 0 means disabled.
582 * Old packets are dropped, new packets are queued.
584 #if !defined ARP_QUEUE_LEN || defined __DOXYGEN__
585 #define ARP_QUEUE_LEN 3
589 * ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with
590 * VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and
591 * LWIP_HOOK_VLAN_SET hooks to check/set VLAN headers.
592 * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check.
593 * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
594 * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted.
595 * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan)
596 * that returns 1 to accept a packet or 0 to drop a packet.
598 #if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__
599 #define ETHARP_SUPPORT_VLAN 0
602 /** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled
604 #if !defined LWIP_ETHERNET || defined __DOXYGEN__
605 #define LWIP_ETHERNET LWIP_ARP
608 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure
609 * alignment of payload after that header. Since the header is 14 bytes long,
610 * without this padding e.g. addresses in the IP header will not be aligned
611 * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
613 #if !defined ETH_PAD_SIZE || defined __DOXYGEN__
614 #define ETH_PAD_SIZE 0
617 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table
618 * entries (using etharp_add_static_entry/etharp_remove_static_entry).
620 #if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__
621 #define ETHARP_SUPPORT_STATIC_ENTRIES 0
624 /** ETHARP_TABLE_MATCH_NETIF==1: Match netif for ARP table entries.
625 * If disabled, duplicate IP address on multiple netifs are not supported
626 * (but this should only occur for AutoIP).
628 #if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__
629 #define ETHARP_TABLE_MATCH_NETIF !LWIP_SINGLE_NETIF
636 --------------------------------
637 ---------- IP options ----------
638 --------------------------------
641 * @defgroup lwip_opts_ipv4 IPv4
646 * LWIP_IPV4==1: Enable IPv4
648 #if !defined LWIP_IPV4 || defined __DOXYGEN__
653 * IP_FORWARD==1: Enables the ability to forward IP packets across network
654 * interfaces. If you are going to run lwIP on a device with only one network
655 * interface, define this to 0.
657 #if !defined IP_FORWARD || defined __DOXYGEN__
662 * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
663 * this option does not affect outgoing packet sizes, which can be controlled
666 #if !defined IP_REASSEMBLY || defined __DOXYGEN__
667 #define IP_REASSEMBLY 1
671 * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
672 * that this option does not affect incoming packet sizes, which can be
673 * controlled via IP_REASSEMBLY.
675 #if !defined IP_FRAG || defined __DOXYGEN__
680 /* disable IPv4 extensions when IPv4 is disabled */
684 #define IP_REASSEMBLY 0
687 #endif /* !LWIP_IPV4 */
690 * IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
691 * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
692 * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
694 #if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__
695 #define IP_OPTIONS_ALLOWED 1
699 * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
700 * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
701 * in this time, the whole packet is discarded.
703 #if !defined IP_REASS_MAXAGE || defined __DOXYGEN__
704 #define IP_REASS_MAXAGE 3
708 * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
709 * Since the received pbufs are enqueued, be sure to configure
710 * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
711 * packets even if the maximum amount of fragments is enqueued for reassembly!
713 #if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__
714 #define IP_REASS_MAX_PBUFS 10
718 * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
720 #if !defined IP_DEFAULT_TTL || defined __DOXYGEN__
721 #define IP_DEFAULT_TTL 255
725 * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast
726 * filter per pcb on udp and raw send operations. To enable broadcast filter
727 * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1.
729 #if !defined IP_SOF_BROADCAST || defined __DOXYGEN__
730 #define IP_SOF_BROADCAST 0
734 * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
735 * filter on recv operations.
737 #if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__
738 #define IP_SOF_BROADCAST_RECV 0
742 * IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back
743 * out on the netif where it was received. This should only be used for
745 * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming
746 * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags!
748 #if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__
749 #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0
753 * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first
754 * local TCP/UDP pcb (default==0). This can prevent creating predictable port
755 * numbers after booting a device.
757 #if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__
758 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0
765 ----------------------------------
766 ---------- ICMP options ----------
767 ----------------------------------
770 * @defgroup lwip_opts_icmp ICMP
771 * @ingroup lwip_opts_ipv4
775 * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
776 * Be careful, disable that make your product non-compliant to RFC1122
778 #if !defined LWIP_ICMP || defined __DOXYGEN__
783 * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
785 #if !defined ICMP_TTL || defined __DOXYGEN__
786 #define ICMP_TTL (IP_DEFAULT_TTL)
790 * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
792 #if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__
793 #define LWIP_BROADCAST_PING 0
797 * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only)
799 #if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__
800 #define LWIP_MULTICAST_PING 0
807 ---------------------------------
808 ---------- RAW options ----------
809 ---------------------------------
812 * @defgroup lwip_opts_raw RAW
813 * @ingroup lwip_opts_callback
817 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
819 #if !defined LWIP_RAW || defined __DOXYGEN__
824 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
826 #if !defined RAW_TTL || defined __DOXYGEN__
827 #define RAW_TTL (IP_DEFAULT_TTL)
834 ----------------------------------
835 ---------- DHCP options ----------
836 ----------------------------------
839 * @defgroup lwip_opts_dhcp DHCP
840 * @ingroup lwip_opts_ipv4
844 * LWIP_DHCP==1: Enable DHCP module.
846 #if !defined LWIP_DHCP || defined __DOXYGEN__
850 /* disable DHCP when IPv4 is disabled */
853 #endif /* !LWIP_IPV4 */
856 * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
858 #if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__
859 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
863 * LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has
864 * NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and
865 * netif drivers might not set this flag, the default is off. If enabled,
866 * netif_set_link_up() must be called to continue dhcp starting.
868 #if !defined LWIP_DHCP_CHECK_LINK_UP
869 #define LWIP_DHCP_CHECK_LINK_UP 0
873 * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name.
875 #if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__
876 #define LWIP_DHCP_BOOTP_FILE 0
880 * LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each
881 * response packet, an callback is called, which has to be provided by the port:
882 * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs);
884 #if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__
885 #define LWIP_DHCP_GET_NTP_SRV 0
889 * The maximum of NTP servers requested
891 #if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__
892 #define LWIP_DHCP_MAX_NTP_SERVERS 1
896 * LWIP_DHCP_MAX_DNS_SERVERS > 0: Request DNS servers with discover/select.
897 * DHCP servers received in the response are passed to DNS via @ref dns_setserver()
898 * (up to the maximum limit defined here).
900 #if !defined LWIP_DHCP_MAX_DNS_SERVERS || defined __DOXYGEN__
901 #define LWIP_DHCP_MAX_DNS_SERVERS DNS_MAX_SERVERS
908 ------------------------------------
909 ---------- AUTOIP options ----------
910 ------------------------------------
913 * @defgroup lwip_opts_autoip AUTOIP
914 * @ingroup lwip_opts_ipv4
918 * LWIP_AUTOIP==1: Enable AUTOIP module.
920 #if !defined LWIP_AUTOIP || defined __DOXYGEN__
921 #define LWIP_AUTOIP 0
924 /* disable AUTOIP when IPv4 is disabled */
926 #define LWIP_AUTOIP 0
927 #endif /* !LWIP_IPV4 */
930 * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
931 * the same interface at the same time.
933 #if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__
934 #define LWIP_DHCP_AUTOIP_COOP 0
938 * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes
939 * that should be sent before falling back on AUTOIP (the DHCP client keeps
940 * running in this case). This can be set as low as 1 to get an AutoIP address
941 * very quickly, but you should be prepared to handle a changing IP address
942 * when DHCP overrides AutoIP.
944 #if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__
945 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9
952 ----------------------------------
953 ----- SNMP MIB2 support -----
954 ----------------------------------
957 * @defgroup lwip_opts_mib2 SNMP MIB2 callbacks
958 * @ingroup lwip_opts_infrastructure
962 * LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks.
963 * Turn this on to get callbacks needed to implement MIB2.
964 * Usually MIB2_STATS should be enabled, too.
966 #if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__
967 #define LWIP_MIB2_CALLBACKS 0
974 ----------------------------------
975 -------- Multicast options -------
976 ----------------------------------
979 * @defgroup lwip_opts_multicast Multicast
980 * @ingroup lwip_opts_infrastructure
984 * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options
985 * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP, as well as (currently only)
986 * core support for the corresponding IPv6 options.
988 #if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__
989 #define LWIP_MULTICAST_TX_OPTIONS ((LWIP_IGMP || LWIP_IPV6_MLD) && (LWIP_UDP || LWIP_RAW))
996 ----------------------------------
997 ---------- IGMP options ----------
998 ----------------------------------
1001 * @defgroup lwip_opts_igmp IGMP
1002 * @ingroup lwip_opts_ipv4
1006 * LWIP_IGMP==1: Turn on IGMP module.
1008 #if !defined LWIP_IGMP || defined __DOXYGEN__
1020 ----------------------------------
1021 ---------- DNS options -----------
1022 ----------------------------------
1025 * @defgroup lwip_opts_dns DNS
1026 * @ingroup lwip_opts_callback
1030 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
1033 #if !defined LWIP_DNS || defined __DOXYGEN__
1037 /** DNS maximum number of entries to maintain locally. */
1038 #if !defined DNS_TABLE_SIZE || defined __DOXYGEN__
1039 #define DNS_TABLE_SIZE 4
1042 /** DNS maximum host name length supported in the name table. */
1043 #if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__
1044 #define DNS_MAX_NAME_LENGTH 256
1047 /** The maximum of DNS servers
1048 * The first server can be initialized automatically by defining
1049 * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*'
1051 #if !defined DNS_MAX_SERVERS || defined __DOXYGEN__
1052 #define DNS_MAX_SERVERS 2
1055 /** DNS do a name checking between the query and the response. */
1056 #if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__
1057 #define DNS_DOES_NAME_CHECK 1
1060 /** LWIP_DNS_SECURE: controls the security level of the DNS implementation
1061 * Use all DNS security features by default.
1062 * This is overridable but should only be needed by very small targets
1063 * or when using against non standard DNS servers. */
1064 #if !defined LWIP_DNS_SECURE || defined __DOXYGEN__
1065 #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)
1068 /* A list of DNS security features follows */
1069 #define LWIP_DNS_SECURE_RAND_XID 1
1070 #define LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING 2
1071 #define LWIP_DNS_SECURE_RAND_SRC_PORT 4
1073 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, you have to define an initializer:
1074 * \#define DNS_LOCAL_HOSTLIST_INIT {DNS_LOCAL_HOSTLIST_ELEM("host_ip4", IPADDR4_INIT_BYTES(1,2,3,4)), \
1075 * DNS_LOCAL_HOSTLIST_ELEM("host_ip6", IPADDR6_INIT_HOST(123, 234, 345, 456)}
1077 * Instead, you can also use an external function:
1078 * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype)
1079 * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype).
1081 #if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__
1082 #define DNS_LOCAL_HOSTLIST 0
1083 #endif /* DNS_LOCAL_HOSTLIST */
1085 /** If this is turned on, the local host-list can be dynamically changed
1087 #if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__
1088 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
1089 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
1091 /** Set this to 1 to enable querying ".local" names via mDNS
1092 * using a One-Shot Multicast DNS Query */
1093 #if !defined LWIP_DNS_SUPPORT_MDNS_QUERIES || defined __DOXYGEN__
1094 #define LWIP_DNS_SUPPORT_MDNS_QUERIES 0
1101 ---------------------------------
1102 ---------- UDP options ----------
1103 ---------------------------------
1106 * @defgroup lwip_opts_udp UDP
1107 * @ingroup lwip_opts_callback
1111 * LWIP_UDP==1: Turn on UDP.
1113 #if !defined LWIP_UDP || defined __DOXYGEN__
1118 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
1120 #if !defined LWIP_UDPLITE || defined __DOXYGEN__
1121 #define LWIP_UDPLITE 0
1125 * UDP_TTL: Default Time-To-Live value.
1127 #if !defined UDP_TTL || defined __DOXYGEN__
1128 #define UDP_TTL (IP_DEFAULT_TTL)
1132 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf.
1134 #if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__
1135 #define LWIP_NETBUF_RECVINFO 0
1142 ---------------------------------
1143 ---------- TCP options ----------
1144 ---------------------------------
1147 * @defgroup lwip_opts_tcp TCP
1148 * @ingroup lwip_opts_callback
1152 * LWIP_TCP==1: Turn on TCP.
1154 #if !defined LWIP_TCP || defined __DOXYGEN__
1159 * TCP_TTL: Default Time-To-Live value.
1161 #if !defined TCP_TTL || defined __DOXYGEN__
1162 #define TCP_TTL (IP_DEFAULT_TTL)
1166 * TCP_WND: The size of a TCP window. This must be at least
1167 * (2 * TCP_MSS) for things to work well.
1168 * ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size
1169 * with scaling applied. Maximum window value in the TCP header
1170 * will be TCP_WND >> TCP_RCV_SCALE
1172 #if !defined TCP_WND || defined __DOXYGEN__
1173 #define TCP_WND (4 * TCP_MSS)
1177 * TCP_MAXRTX: Maximum number of retransmissions of data segments.
1179 #if !defined TCP_MAXRTX || defined __DOXYGEN__
1180 #define TCP_MAXRTX 12
1184 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
1186 #if !defined TCP_SYNMAXRTX || defined __DOXYGEN__
1187 #define TCP_SYNMAXRTX 6
1191 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
1192 * Define to 0 if your device is low on memory.
1194 #if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__
1195 #define TCP_QUEUE_OOSEQ (LWIP_TCP)
1199 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
1200 * you might want to increase this.)
1201 * For the receive side, this MSS is advertised to the remote side
1202 * when opening a connection. For the transmit size, this MSS sets
1203 * an upper limit on the MSS advertised by the remote host.
1205 #if !defined TCP_MSS || defined __DOXYGEN__
1210 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really
1211 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which
1212 * reflects the available reassembly buffer size at the remote host) and the
1213 * largest size permitted by the IP layer" (RFC 1122)
1214 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the
1215 * netif used for a connection and limits the MSS if it would be too big otherwise.
1217 #if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__
1218 #define TCP_CALCULATE_EFF_SEND_MSS 1
1223 * TCP_SND_BUF: TCP sender buffer space (bytes).
1224 * To achieve good performance, this should be at least 2 * TCP_MSS.
1226 #if !defined TCP_SND_BUF || defined __DOXYGEN__
1227 #define TCP_SND_BUF (2 * TCP_MSS)
1231 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
1232 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
1234 #if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__
1235 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
1239 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than
1240 * TCP_SND_BUF. It is the amount of space which must be available in the
1241 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
1243 #if !defined TCP_SNDLOWAT || defined __DOXYGEN__
1244 #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1)
1248 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less
1249 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below
1250 * this number, select returns writable (combined with TCP_SNDLOWAT).
1252 #if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__
1253 #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5)
1257 * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb.
1258 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1.
1260 #if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__
1261 #define TCP_OOSEQ_MAX_BYTES 0
1265 * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb.
1266 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1.
1268 #if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__
1269 #define TCP_OOSEQ_MAX_PBUFS 0
1273 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
1275 #if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__
1276 #define TCP_LISTEN_BACKLOG 0
1280 * The maximum allowed backlog for TCP listen netconns.
1281 * This backlog is used unless another is explicitly specified.
1282 * 0xff is the maximum (u8_t).
1284 #if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__
1285 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff
1289 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may
1290 * allocate ahead of time in an attempt to create shorter pbuf chains
1291 * for transmission. The meaningful range is 0 to TCP_MSS. Some
1292 * suggested values are:
1294 * 0: Disable oversized allocation. Each tcp_write() allocates a new
1295 pbuf (old behaviour).
1296 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your
1297 * scatter-gather DMA requires aligned fragments.
1298 * 128: Limit the pbuf/memory overhead to 20%.
1299 * TCP_MSS: Try to create unfragmented TCP packets.
1300 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
1302 #if !defined TCP_OVERSIZE || defined __DOXYGEN__
1303 #define TCP_OVERSIZE TCP_MSS
1307 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option.
1308 * The timestamp option is currently only used to help remote hosts, it is not
1309 * really used locally. Therefore, it is only enabled when a TS option is
1310 * received in the initial SYN packet from a remote host.
1312 #if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__
1313 #define LWIP_TCP_TIMESTAMPS 0
1317 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an
1318 * explicit window update
1320 #if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__
1321 #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4))
1325 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
1326 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
1327 * events (accept, sent, etc) that happen in the system.
1328 * LWIP_CALLBACK_API==1: The PCB callback function is called directly
1329 * for the event. This is the default.
1331 #if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__
1332 #define LWIP_EVENT_API 0
1333 #define LWIP_CALLBACK_API 1
1335 #ifndef LWIP_EVENT_API
1336 #define LWIP_EVENT_API 0
1338 #ifndef LWIP_CALLBACK_API
1339 #define LWIP_CALLBACK_API 0
1344 * LWIP_WND_SCALE and TCP_RCV_SCALE:
1345 * Set LWIP_WND_SCALE to 1 to enable window scaling.
1346 * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the
1347 * range of [0..14]).
1348 * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large
1349 * send window while having a small receive window only.
1351 #if !defined LWIP_WND_SCALE || defined __DOXYGEN__
1352 #define LWIP_WND_SCALE 0
1353 #define TCP_RCV_SCALE 0
1360 ----------------------------------
1361 ---------- Pbuf options ----------
1362 ----------------------------------
1365 * @defgroup lwip_opts_pbuf PBUF
1366 * @ingroup lwip_opts
1370 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
1371 * link level header. The default is 14, the standard value for
1374 #if !defined PBUF_LINK_HLEN || defined __DOXYGEN__
1375 #if defined LWIP_HOOK_VLAN_SET && !defined __DOXYGEN__
1376 #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE)
1377 #else /* LWIP_HOOK_VLAN_SET */
1378 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
1379 #endif /* LWIP_HOOK_VLAN_SET */
1383 * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated
1384 * for an additional encapsulation header before ethernet headers (e.g. 802.11)
1386 #if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__
1387 #define PBUF_LINK_ENCAPSULATION_HLEN 0u
1391 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
1392 * designed to accommodate single full size TCP frame in one pbuf, including
1393 * TCP_MSS, IP header, and link header.
1395 #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__
1396 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
1400 * LWIP_PBUF_REF_T: Refcount type in pbuf.
1401 * Default width of u8_t can be increased if 255 refs are not enough for you.
1403 #ifndef LWIP_PBUF_REF_T
1404 #define LWIP_PBUF_REF_T u8_t
1411 ------------------------------------------------
1412 ---------- Network Interfaces options ----------
1413 ------------------------------------------------
1416 * @defgroup lwip_opts_netif NETIF
1417 * @ingroup lwip_opts
1421 * LWIP_SINGLE_NETIF==1: use a single netif only. This is the common case for
1422 * small real-life targets. Some code like routing etc. can be left out.
1424 #if !defined LWIP_SINGLE_NETIF || defined __DOXYGEN__
1425 #define LWIP_SINGLE_NETIF 0
1429 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
1432 #if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__
1433 #define LWIP_NETIF_HOSTNAME 0
1437 * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
1439 #if !defined LWIP_NETIF_API || defined __DOXYGEN__
1440 #define LWIP_NETIF_API 0
1444 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
1445 * changes its up/down status (i.e., due to DHCP IP acquisition)
1447 #if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__
1448 #define LWIP_NETIF_STATUS_CALLBACK 0
1452 * LWIP_NETIF_EXT_STATUS_CALLBACK==1: Support an extended callback function
1453 * for several netif related event that supports multiple subscribers.
1454 * @see netif_ext_status_callback
1456 #if !defined LWIP_NETIF_EXT_STATUS_CALLBACK || defined __DOXYGEN__
1457 #define LWIP_NETIF_EXT_STATUS_CALLBACK 0
1461 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
1462 * whenever the link changes (i.e., link down)
1464 #if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__
1465 #define LWIP_NETIF_LINK_CALLBACK 0
1469 * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called
1470 * when a netif has been removed
1472 #if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__
1473 #define LWIP_NETIF_REMOVE_CALLBACK 0
1477 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table
1478 * indices) in struct netif. TCP and UDP can make use of this to prevent
1479 * scanning the ARP table for every sent packet. While this is faster for big
1480 * ARP tables or many concurrent connections, it might be counterproductive
1481 * if you have a tiny ARP table or if there never are concurrent connections.
1483 #if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__
1484 #define LWIP_NETIF_HWADDRHINT 0
1488 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
1489 * to be sent into one single pbuf. This is for compatibility with DMA-enabled
1490 * MACs that do not support scatter-gather.
1491 * Beware that this might involve CPU-memcpy before transmitting that would not
1492 * be needed without this flag! Use this only if you need to!
1494 * @todo: TCP and IP-frag do not work with this, yet:
1496 #if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__
1497 #define LWIP_NETIF_TX_SINGLE_PBUF 0
1498 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
1501 * LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store
1502 * data in client_data member array of struct netif.
1504 #if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__
1505 #define LWIP_NUM_NETIF_CLIENT_DATA 0
1512 ------------------------------------
1513 ---------- LOOPIF options ----------
1514 ------------------------------------
1517 * @defgroup lwip_opts_loop Loopback interface
1518 * @ingroup lwip_opts_netif
1522 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1).
1523 * This is only needed when no real netifs are available. If at least one other
1524 * netif is available, loopback traffic uses this netif.
1526 #if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__
1527 #define LWIP_HAVE_LOOPIF (LWIP_NETIF_LOOPBACK && !LWIP_SINGLE_NETIF)
1531 * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1).
1533 #if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__
1534 #define LWIP_LOOPIF_MULTICAST 0
1538 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
1539 * address equal to the netif IP address, looping them back up the stack.
1541 #if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__
1542 #define LWIP_NETIF_LOOPBACK 0
1546 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
1547 * sending for each netif (0 = disabled)
1549 #if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__
1550 #define LWIP_LOOPBACK_MAX_PBUFS 0
1554 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in
1555 * the system, as netifs must change how they behave depending on this setting
1556 * for the LWIP_NETIF_LOOPBACK option to work.
1557 * Setting this is needed to avoid reentering non-reentrant functions like
1559 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a
1560 * multithreaded environment like tcpip.c. In this case, netif->input()
1561 * is called directly.
1562 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
1563 * The packets are put on a list and netif_poll() must be called in
1564 * the main application loop.
1566 #if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__
1567 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
1574 ------------------------------------
1575 ---------- Thread options ----------
1576 ------------------------------------
1579 * @defgroup lwip_opts_thread Threading
1580 * @ingroup lwip_opts_infrastructure
1584 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
1586 #if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__
1587 #define TCPIP_THREAD_NAME "tcpip_thread"
1591 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread.
1592 * The stack size value itself is platform-dependent, but is passed to
1593 * sys_thread_new() when the thread is created.
1595 #if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__
1596 #define TCPIP_THREAD_STACKSIZE 0
1600 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
1601 * The priority value itself is platform-dependent, but is passed to
1602 * sys_thread_new() when the thread is created.
1604 #if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__
1605 #define TCPIP_THREAD_PRIO 1
1609 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages
1610 * The queue size value itself is platform-dependent, but is passed to
1611 * sys_mbox_new() when tcpip_init is called.
1613 #if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__
1614 #define TCPIP_MBOX_SIZE 0
1618 * Define this to something that triggers a watchdog. This is called from
1619 * tcpip_thread after processing a message.
1621 #if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__
1622 #define LWIP_TCPIP_THREAD_ALIVE()
1626 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
1628 #if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__
1629 #define SLIPIF_THREAD_NAME "slipif_loop"
1633 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
1634 * The stack size value itself is platform-dependent, but is passed to
1635 * sys_thread_new() when the thread is created.
1637 #if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__
1638 #define SLIPIF_THREAD_STACKSIZE 0
1642 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
1643 * The priority value itself is platform-dependent, but is passed to
1644 * sys_thread_new() when the thread is created.
1646 #if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__
1647 #define SLIPIF_THREAD_PRIO 1
1651 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
1653 #if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__
1654 #define DEFAULT_THREAD_NAME "lwIP"
1658 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
1659 * The stack size value itself is platform-dependent, but is passed to
1660 * sys_thread_new() when the thread is created.
1662 #if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__
1663 #define DEFAULT_THREAD_STACKSIZE 0
1667 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
1668 * The priority value itself is platform-dependent, but is passed to
1669 * sys_thread_new() when the thread is created.
1671 #if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__
1672 #define DEFAULT_THREAD_PRIO 1
1676 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1677 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed
1678 * to sys_mbox_new() when the recvmbox is created.
1680 #if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__
1681 #define DEFAULT_RAW_RECVMBOX_SIZE 0
1685 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1686 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed
1687 * to sys_mbox_new() when the recvmbox is created.
1689 #if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__
1690 #define DEFAULT_UDP_RECVMBOX_SIZE 0
1694 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1695 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed
1696 * to sys_mbox_new() when the recvmbox is created.
1698 #if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__
1699 #define DEFAULT_TCP_RECVMBOX_SIZE 0
1703 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections.
1704 * The queue size value itself is platform-dependent, but is passed to
1705 * sys_mbox_new() when the acceptmbox is created.
1707 #if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__
1708 #define DEFAULT_ACCEPTMBOX_SIZE 0
1715 ----------------------------------------------
1716 ---------- Sequential layer options ----------
1717 ----------------------------------------------
1720 * @defgroup lwip_opts_netconn Netconn
1721 * @ingroup lwip_opts_threadsafe_apis
1725 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
1727 #if !defined LWIP_NETCONN || defined __DOXYGEN__
1728 #define LWIP_NETCONN 1
1731 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create
1732 * timers running in tcpip_thread from another thread.
1734 #if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__
1735 #define LWIP_TCPIP_TIMEOUT 0
1738 /** LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per
1739 * thread calling socket/netconn functions instead of allocating one
1740 * semaphore per netconn (and per select etc.)
1741 * ATTENTION: a thread-local semaphore for API calls is needed:
1742 * - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t*
1743 * - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore
1744 * - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore
1745 * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup().
1746 * Ports may call these for threads created with sys_thread_new().
1748 #if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__
1749 #define LWIP_NETCONN_SEM_PER_THREAD 0
1752 /** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread,
1753 * writing from a 2nd thread and closing from a 3rd thread at the same time.
1754 * ATTENTION: This is currently really alpha! Some requirements:
1755 * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from
1756 * multiple threads at once
1757 * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox
1758 * and prevent a task pending on this during/after deletion
1760 #if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__
1761 #define LWIP_NETCONN_FULLDUPLEX 0
1768 ------------------------------------
1769 ---------- Socket options ----------
1770 ------------------------------------
1773 * @defgroup lwip_opts_socket Sockets
1774 * @ingroup lwip_opts_threadsafe_apis
1778 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
1780 #if !defined LWIP_SOCKET || defined __DOXYGEN__
1781 #define LWIP_SOCKET 1
1784 /** LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete
1785 * successfully, as required by POSIX. Default is POSIX-compliant.
1787 #if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__
1788 #define LWIP_SOCKET_SET_ERRNO 1
1792 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines.
1793 * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created.
1794 * While this helps code completion, it might conflict with existing libraries.
1795 * (only used if you use sockets.c)
1797 #if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__
1798 #define LWIP_COMPAT_SOCKETS 1
1802 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
1803 * Disable this option if you use a POSIX operating system that uses the same
1804 * names (read, write & close). (only used if you use sockets.c)
1806 #if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__
1807 #define LWIP_POSIX_SOCKETS_IO_NAMES 1
1811 * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n.
1812 * This can be useful when there are multiple APIs which create file descriptors.
1813 * When they all start with a different offset and you won't make them overlap you can
1814 * re implement read/write/close/ioctl/fnctl to send the requested action to the right
1815 * library (sharing select will need more work though).
1817 #if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__
1818 #define LWIP_SOCKET_OFFSET 0
1822 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
1823 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
1824 * in seconds. (does not require sockets.c, and will affect tcp.c)
1826 #if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__
1827 #define LWIP_TCP_KEEPALIVE 0
1831 * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and
1832 * SO_SNDTIMEO processing.
1834 #if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__
1835 #define LWIP_SO_SNDTIMEO 0
1839 * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and
1840 * SO_RCVTIMEO processing.
1842 #if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__
1843 #define LWIP_SO_RCVTIMEO 0
1847 * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int
1848 * (milliseconds, much like winsock does) instead of a struct timeval (default).
1850 #if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__
1851 #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0
1855 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
1857 #if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__
1858 #define LWIP_SO_RCVBUF 0
1862 * LWIP_SO_LINGER==1: Enable SO_LINGER processing.
1864 #if !defined LWIP_SO_LINGER || defined __DOXYGEN__
1865 #define LWIP_SO_LINGER 0
1869 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
1871 #if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__
1872 #define RECV_BUFSIZE_DEFAULT INT_MAX
1876 * By default, TCP socket/netconn close waits 20 seconds max to send the FIN
1878 #if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__
1879 #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000
1883 * SO_REUSE==1: Enable SO_REUSEADDR option.
1885 #if !defined SO_REUSE || defined __DOXYGEN__
1890 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets
1891 * to all local matches if SO_REUSEADDR is turned on.
1892 * WARNING: Adds a memcpy for every packet if passing to more than one pcb!
1894 #if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__
1895 #define SO_REUSE_RXTOALL 0
1899 * LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of
1900 * pending data in the network buffer. This is the way windows does it. It's
1901 * the default for lwIP since it is smaller.
1902 * LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next
1903 * pending datagram in bytes. This is the way linux does it. This code is only
1904 * here for compatibility.
1906 #if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__
1907 #define LWIP_FIONREAD_LINUXMODE 0
1911 * LWIP_SOCKET_SELECT==1 (default): enable select() for sockets (uses a netconn
1912 * callback to keep track of events).
1913 * This saves RAM (counters per socket) and code (netconn event callback), which
1914 * should improve performance a bit).
1916 #if !defined LWIP_SOCKET_SELECT || defined __DOXYGEN__
1917 #define LWIP_SOCKET_SELECT 1
1924 ----------------------------------------
1925 ---------- Statistics options ----------
1926 ----------------------------------------
1929 * @defgroup lwip_opts_stats Statistics
1930 * @ingroup lwip_opts_debug
1934 * LWIP_STATS==1: Enable statistics collection in lwip_stats.
1936 #if !defined LWIP_STATS || defined __DOXYGEN__
1937 #define LWIP_STATS 1
1943 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
1945 #if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__
1946 #define LWIP_STATS_DISPLAY 0
1950 * LINK_STATS==1: Enable link stats.
1952 #if !defined LINK_STATS || defined __DOXYGEN__
1953 #define LINK_STATS 1
1957 * ETHARP_STATS==1: Enable etharp stats.
1959 #if !defined ETHARP_STATS || defined __DOXYGEN__
1960 #define ETHARP_STATS (LWIP_ARP)
1964 * IP_STATS==1: Enable IP stats.
1966 #if !defined IP_STATS || defined __DOXYGEN__
1971 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
1972 * on if using either frag or reass.
1974 #if !defined IPFRAG_STATS || defined __DOXYGEN__
1975 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
1979 * ICMP_STATS==1: Enable ICMP stats.
1981 #if !defined ICMP_STATS || defined __DOXYGEN__
1982 #define ICMP_STATS 1
1986 * IGMP_STATS==1: Enable IGMP stats.
1988 #if !defined IGMP_STATS || defined __DOXYGEN__
1989 #define IGMP_STATS (LWIP_IGMP)
1993 * UDP_STATS==1: Enable UDP stats. Default is on if
1994 * UDP enabled, otherwise off.
1996 #if !defined UDP_STATS || defined __DOXYGEN__
1997 #define UDP_STATS (LWIP_UDP)
2001 * TCP_STATS==1: Enable TCP stats. Default is on if TCP
2002 * enabled, otherwise off.
2004 #if !defined TCP_STATS || defined __DOXYGEN__
2005 #define TCP_STATS (LWIP_TCP)
2009 * MEM_STATS==1: Enable mem.c stats.
2011 #if !defined MEM_STATS || defined __DOXYGEN__
2012 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
2016 * MEMP_STATS==1: Enable memp.c pool stats.
2018 #if !defined MEMP_STATS || defined __DOXYGEN__
2019 #define MEMP_STATS (MEMP_MEM_MALLOC == 0)
2023 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
2025 #if !defined SYS_STATS || defined __DOXYGEN__
2026 #define SYS_STATS (NO_SYS == 0)
2030 * IP6_STATS==1: Enable IPv6 stats.
2032 #if !defined IP6_STATS || defined __DOXYGEN__
2033 #define IP6_STATS (LWIP_IPV6)
2037 * ICMP6_STATS==1: Enable ICMP for IPv6 stats.
2039 #if !defined ICMP6_STATS || defined __DOXYGEN__
2040 #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6)
2044 * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats.
2046 #if !defined IP6_FRAG_STATS || defined __DOXYGEN__
2047 #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS))
2051 * MLD6_STATS==1: Enable MLD for IPv6 stats.
2053 #if !defined MLD6_STATS || defined __DOXYGEN__
2054 #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD)
2058 * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats.
2060 #if !defined ND6_STATS || defined __DOXYGEN__
2061 #define ND6_STATS (LWIP_IPV6)
2065 * MIB2_STATS==1: Stats for SNMP MIB2.
2067 #if !defined MIB2_STATS || defined __DOXYGEN__
2068 #define MIB2_STATS 0
2073 #define LINK_STATS 0
2074 #define ETHARP_STATS 0
2076 #define IPFRAG_STATS 0
2077 #define ICMP_STATS 0
2078 #define IGMP_STATS 0
2082 #define MEMP_STATS 0
2084 #define LWIP_STATS_DISPLAY 0
2086 #define ICMP6_STATS 0
2087 #define IP6_FRAG_STATS 0
2088 #define MLD6_STATS 0
2090 #define MIB2_STATS 0
2092 #endif /* LWIP_STATS */
2098 --------------------------------------
2099 ---------- Checksum options ----------
2100 --------------------------------------
2103 * @defgroup lwip_opts_checksum Checksum
2104 * @ingroup lwip_opts_infrastructure
2108 * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled
2110 * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled!
2112 #if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__
2113 #define LWIP_CHECKSUM_CTRL_PER_NETIF 0
2117 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
2119 #if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__
2120 #define CHECKSUM_GEN_IP 1
2124 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
2126 #if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__
2127 #define CHECKSUM_GEN_UDP 1
2131 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
2133 #if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__
2134 #define CHECKSUM_GEN_TCP 1
2138 * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets.
2140 #if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__
2141 #define CHECKSUM_GEN_ICMP 1
2145 * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets.
2147 #if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__
2148 #define CHECKSUM_GEN_ICMP6 1
2152 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
2154 #if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__
2155 #define CHECKSUM_CHECK_IP 1
2159 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
2161 #if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__
2162 #define CHECKSUM_CHECK_UDP 1
2166 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
2168 #if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__
2169 #define CHECKSUM_CHECK_TCP 1
2173 * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets.
2175 #if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__
2176 #define CHECKSUM_CHECK_ICMP 1
2180 * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets
2182 #if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__
2183 #define CHECKSUM_CHECK_ICMP6 1
2187 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from
2188 * application buffers to pbufs.
2190 #if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__
2191 #define LWIP_CHECKSUM_ON_COPY 0
2198 ---------------------------------------
2199 ---------- IPv6 options ---------------
2200 ---------------------------------------
2203 * @defgroup lwip_opts_ipv6 IPv6
2204 * @ingroup lwip_opts
2208 * LWIP_IPV6==1: Enable IPv6
2210 #if !defined LWIP_IPV6 || defined __DOXYGEN__
2215 * LWIP_IPV6_SCOPES==1: Enable support for IPv6 address scopes, ensuring that
2216 * e.g. link-local addresses are really treated as link-local. Disable this
2217 * setting only for single-interface configurations.
2219 #if !defined LWIP_IPV6_SCOPES || defined __DOXYGEN__
2220 #define LWIP_IPV6_SCOPES (LWIP_IPV6 && !LWIP_SINGLE_NETIF)
2224 * LWIP_IPV6_SCOPES_DEBUG==1: Perform run-time checks to verify that addresses
2225 * are properly zoned (see ip6_zone.h on what that means) where it matters.
2226 * Enabling this setting is highly recommended when upgrading from an existing
2227 * installation that is not yet scope-aware; otherwise it may be too expensive.
2229 #if !defined LWIP_IPV6_SCOPES_DEBUG || defined __DOXYGEN__
2230 #define LWIP_IPV6_SCOPES_DEBUG 0
2234 * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif.
2236 #if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__
2237 #define LWIP_IPV6_NUM_ADDRESSES 3
2241 * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs
2243 #if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__
2244 #define LWIP_IPV6_FORWARD 0
2248 * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big.
2250 #if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__
2251 #define LWIP_IPV6_FRAG 0
2255 * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented
2257 #if !defined LWIP_IPV6_REASS || defined __DOXYGEN__
2258 #define LWIP_IPV6_REASS (LWIP_IPV6)
2262 * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during
2265 #if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__
2266 #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1
2270 * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862.
2272 #if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__
2273 #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6)
2277 * LWIP_IPV6_ADDRESS_LIFETIMES==1: Keep valid and preferred lifetimes for each
2278 * IPv6 address. Required for LWIP_IPV6_AUTOCONFIG. May still be enabled
2279 * otherwise, in which case the application may assign address lifetimes with
2280 * the appropriate macros. Addresses with no lifetime are assumed to be static.
2281 * If this option is disabled, all addresses are assumed to be static.
2283 #if !defined LWIP_IPV6_ADDRESS_LIFETIMES || defined __DOXYGEN__
2284 #define LWIP_IPV6_ADDRESS_LIFETIMES (LWIP_IPV6_AUTOCONFIG)
2288 * LWIP_IPV6_DUP_DETECT_ATTEMPTS=[0..7]: Number of duplicate address detection attempts.
2290 #if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__
2291 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1
2298 * @defgroup lwip_opts_icmp6 ICMP6
2299 * @ingroup lwip_opts_ipv6
2303 * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC)
2305 #if !defined LWIP_ICMP6 || defined __DOXYGEN__
2306 #define LWIP_ICMP6 (LWIP_IPV6)
2310 * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in
2311 * ICMPv6 error messages.
2313 #if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__
2314 #define LWIP_ICMP6_DATASIZE 8
2318 * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages
2320 #if !defined LWIP_ICMP6_HL || defined __DOXYGEN__
2321 #define LWIP_ICMP6_HL 255
2328 * @defgroup lwip_opts_mld6 Multicast listener discovery
2329 * @ingroup lwip_opts_ipv6
2333 * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol.
2334 * If LWIP_IPV6 is enabled but this setting is disabled, the MAC layer must
2335 * indiscriminately pass all inbound IPv6 multicast traffic to lwIP.
2337 #if !defined LWIP_IPV6_MLD || defined __DOXYGEN__
2338 #define LWIP_IPV6_MLD (LWIP_IPV6)
2342 * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast groups that can be joined.
2343 * There must be enough groups so that each netif can join the solicited-node
2344 * multicast group for each of its local addresses, plus one for MDNS if
2345 * applicable, plus any number of groups to be joined on UDP sockets.
2347 #if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__
2348 #define MEMP_NUM_MLD6_GROUP 4
2355 * @defgroup lwip_opts_nd6 Neighbor discovery
2356 * @ingroup lwip_opts_ipv6
2360 * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address
2361 * is being resolved.
2363 #if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__
2364 #define LWIP_ND6_QUEUEING (LWIP_IPV6)
2368 * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution.
2370 #if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__
2371 #define MEMP_NUM_ND6_QUEUE 20
2375 * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache
2377 #if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__
2378 #define LWIP_ND6_NUM_NEIGHBORS 10
2382 * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache
2384 #if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__
2385 #define LWIP_ND6_NUM_DESTINATIONS 10
2389 * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache
2391 #if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__
2392 #define LWIP_ND6_NUM_PREFIXES 5
2396 * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache
2398 #if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__
2399 #define LWIP_ND6_NUM_ROUTERS 3
2403 * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send
2404 * (neighbor solicit and router solicit)
2406 #if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__
2407 #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3
2411 * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages
2412 * to send during neighbor reachability detection.
2414 #if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__
2415 #define LWIP_ND6_MAX_UNICAST_SOLICIT 3
2419 * Unused: See ND RFC (time in milliseconds).
2421 #if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__
2422 #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000
2426 * Unused: See ND RFC
2428 #if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__
2429 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3
2433 * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds).
2434 * May be updated by router advertisement messages.
2436 #if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__
2437 #define LWIP_ND6_REACHABLE_TIME 30000
2441 * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages
2443 #if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__
2444 #define LWIP_ND6_RETRANS_TIMER 1000
2448 * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation
2449 * message is sent, during neighbor reachability detection.
2451 #if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__
2452 #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000
2456 * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update
2457 * Reachable time and retransmission timers, and netif MTU.
2459 #if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__
2460 #define LWIP_ND6_ALLOW_RA_UPDATES 1
2464 * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery
2465 * with reachability hints for connected destinations. This helps avoid sending
2466 * unicast neighbor solicitation messages.
2468 #if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__
2469 #define LWIP_ND6_TCP_REACHABILITY_HINTS 1
2473 * LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive
2474 * DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS
2475 * servers to the DNS module.
2477 #if !defined LWIP_ND6_RDNSS_MAX_DNS_SERVERS || defined __DOXYGEN__
2478 #define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0
2485 * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration.
2487 #if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__
2488 #define LWIP_IPV6_DHCP6 0
2492 ---------------------------------------
2493 ---------- Hook options ---------------
2494 ---------------------------------------
2498 * @defgroup lwip_opts_hooks Hooks
2499 * @ingroup lwip_opts_infrastructure
2500 * Hooks are undefined by default, define them to a function if you need them.
2505 * LWIP_HOOK_FILENAME: Custom filename to \#include in files that provide hooks.
2506 * Declare your hook function prototypes in there, you may also \#include all headers
2507 * providing data types that are need in this file.
2510 #define LWIP_HOOK_FILENAME "path/to/my/lwip_hooks.h"
2514 * LWIP_HOOK_TCP_ISN:
2515 * Hook for generation of the Initial Sequence Number (ISN) for a new TCP
2516 * connection. The default lwIP ISN generation algorithm is very basic and may
2517 * allow for TCP spoofing attacks. This hook provides the means to implement
2518 * the standardized ISN generation algorithm from RFC 6528 (see contrib/adons/tcp_isn),
2519 * or any other desired algorithm as a replacement.
2520 * Called from tcp_connect() and tcp_listen_input() when an ISN is needed for
2521 * a new TCP connection, if TCP support (@ref LWIP_TCP) is enabled.\n
2522 * Signature: u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port);
2523 * - it may be necessary to use "struct ip_addr" (ip4_addr, ip6_addr) instead of "ip_addr_t" in function declarations\n
2525 * - local_ip: pointer to the local IP address of the connection
2526 * - local_port: local port number of the connection (host-byte order)
2527 * - remote_ip: pointer to the remote IP address of the connection
2528 * - remote_port: remote port number of the connection (host-byte order)\n
2530 * - the 32-bit Initial Sequence Number to use for the new TCP connection.
2533 #define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port)
2537 * LWIP_HOOK_IP4_INPUT(pbuf, input_netif):
2538 * - called from ip_input() (IPv4)
2539 * - pbuf: received struct pbuf passed to ip_input()
2540 * - input_netif: struct netif on which the packet has been received
2542 * - 0: Hook has not consumed the packet, packet is processed as normal
2543 * - != 0: Hook has consumed the packet.
2544 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook
2545 * (i.e. free it when done).
2548 #define LWIP_HOOK_IP4_INPUT(pbuf, input_netif)
2552 * LWIP_HOOK_IP4_ROUTE(dest):
2553 * - called from ip_route() (IPv4)
2554 * - dest: destination IPv4 address
2555 * Returns the destination netif or NULL if no destination netif is found. In
2556 * that case, ip_route() continues as normal.
2559 #define LWIP_HOOK_IP4_ROUTE()
2563 * LWIP_HOOK_IP4_ROUTE_SRC(dest, src):
2564 * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL)
2567 #define LWIP_HOOK_IP4_ROUTE_SRC(dest, src)
2571 * LWIP_HOOK_ETHARP_GET_GW(netif, dest):
2572 * - called from etharp_output() (IPv4)
2573 * - netif: the netif used for sending
2574 * - dest: the destination IPv4 address
2575 * Returns the IPv4 address of the gateway to handle the specified destination
2576 * IPv4 address. If NULL is returned, the netif's default gateway is used.
2577 * The returned address MUST be directly reachable on the specified netif!
2578 * This function is meant to implement advanced IPv4 routing together with
2579 * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is
2580 * not part of lwIP but can e.g. be hidden in the netif's state argument.
2583 #define LWIP_HOOK_ETHARP_GET_GW(netif, dest)
2587 * LWIP_HOOK_IP6_INPUT(pbuf, input_netif):
2588 * - called from ip6_input() (IPv6)
2589 * - pbuf: received struct pbuf passed to ip6_input()
2590 * - input_netif: struct netif on which the packet has been received
2592 * - 0: Hook has not consumed the packet, packet is processed as normal
2593 * - != 0: Hook has consumed the packet.
2594 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook
2595 * (i.e. free it when done).
2598 #define LWIP_HOOK_IP6_INPUT(pbuf, input_netif)
2602 * LWIP_HOOK_IP6_ROUTE(src, dest):
2603 * - called from ip6_route() (IPv6)
2604 * - src: sourc IPv6 address
2605 * - dest: destination IPv6 address
2606 * Returns the destination netif or NULL if no destination netif is found. In
2607 * that case, ip6_route() continues as normal.
2610 #define LWIP_HOOK_IP6_ROUTE(src, dest)
2614 * LWIP_HOOK_ND6_GET_GW(netif, dest):
2615 * - called from nd6_get_next_hop_entry() (IPv6)
2616 * - netif: the netif used for sending
2617 * - dest: the destination IPv6 address
2618 * Returns the IPv6 address of the next hop to handle the specified destination
2619 * IPv6 address. If NULL is returned, a NDP-discovered router is used instead.
2620 * The returned address MUST be directly reachable on the specified netif!
2621 * This function is meant to implement advanced IPv6 routing together with
2622 * LWIP_HOOK_IP6_ROUTE(). The actual routing/gateway table implementation is
2623 * not part of lwIP but can e.g. be hidden in the netif's state argument.
2626 #define LWIP_HOOK_ND6_GET_GW(netif, dest)
2630 * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr):
2631 * - called from ethernet_input() if VLAN support is enabled
2632 * - netif: struct netif on which the packet has been received
2633 * - eth_hdr: struct eth_hdr of the packet
2634 * - vlan_hdr: struct eth_vlan_hdr of the packet
2636 * - 0: Packet must be dropped.
2637 * - != 0: Packet must be accepted.
2640 #define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr)
2644 * LWIP_HOOK_VLAN_SET:
2645 * Hook can be used to set prio_vid field of vlan_hdr. If you need to store data
2646 * on per-netif basis to implement this callback, see @ref netif_cd.
2647 * Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n
2648 * Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n
2650 * - netif: struct netif that the packet will be sent through
2651 * - p: struct pbuf packet to be sent
2652 * - src: source eth address
2653 * - dst: destination eth address
2654 * - eth_type: ethernet type to packet to be sent\n
2658 * - <0: Packet shall not contain VLAN header.
2659 * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order.
2662 #define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type)
2666 * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type):
2667 * - called from memp_free() when a memp pool was empty and an item is now available
2670 #define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type)
2674 * LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif):
2675 * Called from ethernet_input() when an unknown eth type is encountered.
2676 * Return ERR_OK if packet is accepted, any error code otherwise.
2677 * Payload points to ethernet header!
2680 #define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif)
2687 ---------------------------------------
2688 ---------- Debugging options ----------
2689 ---------------------------------------
2692 * @defgroup lwip_opts_debugmsg Debug messages
2693 * @ingroup lwip_opts_debug
2697 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
2698 * compared against this value. If it is smaller, then debugging
2699 * messages are written.
2700 * @see debugging_levels
2702 #if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__
2703 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
2707 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
2708 * debug messages of certain types.
2709 * @see debugging_levels
2711 #if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__
2712 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
2716 * ETHARP_DEBUG: Enable debugging in etharp.c.
2718 #if !defined ETHARP_DEBUG || defined __DOXYGEN__
2719 #define ETHARP_DEBUG LWIP_DBG_OFF
2723 * NETIF_DEBUG: Enable debugging in netif.c.
2725 #if !defined NETIF_DEBUG || defined __DOXYGEN__
2726 #define NETIF_DEBUG LWIP_DBG_OFF
2730 * PBUF_DEBUG: Enable debugging in pbuf.c.
2732 #if !defined PBUF_DEBUG || defined __DOXYGEN__
2733 #define PBUF_DEBUG LWIP_DBG_OFF
2737 * API_LIB_DEBUG: Enable debugging in api_lib.c.
2739 #if !defined API_LIB_DEBUG || defined __DOXYGEN__
2740 #define API_LIB_DEBUG LWIP_DBG_OFF
2744 * API_MSG_DEBUG: Enable debugging in api_msg.c.
2746 #if !defined API_MSG_DEBUG || defined __DOXYGEN__
2747 #define API_MSG_DEBUG LWIP_DBG_OFF
2751 * SOCKETS_DEBUG: Enable debugging in sockets.c.
2753 #if !defined SOCKETS_DEBUG || defined __DOXYGEN__
2754 #define SOCKETS_DEBUG LWIP_DBG_OFF
2758 * ICMP_DEBUG: Enable debugging in icmp.c.
2760 #if !defined ICMP_DEBUG || defined __DOXYGEN__
2761 #define ICMP_DEBUG LWIP_DBG_OFF
2765 * IGMP_DEBUG: Enable debugging in igmp.c.
2767 #if !defined IGMP_DEBUG || defined __DOXYGEN__
2768 #define IGMP_DEBUG LWIP_DBG_OFF
2772 * INET_DEBUG: Enable debugging in inet.c.
2774 #if !defined INET_DEBUG || defined __DOXYGEN__
2775 #define INET_DEBUG LWIP_DBG_OFF
2779 * IP_DEBUG: Enable debugging for IP.
2781 #if !defined IP_DEBUG || defined __DOXYGEN__
2782 #define IP_DEBUG LWIP_DBG_OFF
2786 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
2788 #if !defined IP_REASS_DEBUG || defined __DOXYGEN__
2789 #define IP_REASS_DEBUG LWIP_DBG_OFF
2793 * RAW_DEBUG: Enable debugging in raw.c.
2795 #if !defined RAW_DEBUG || defined __DOXYGEN__
2796 #define RAW_DEBUG LWIP_DBG_OFF
2800 * MEM_DEBUG: Enable debugging in mem.c.
2802 #if !defined MEM_DEBUG || defined __DOXYGEN__
2803 #define MEM_DEBUG LWIP_DBG_OFF
2807 * MEMP_DEBUG: Enable debugging in memp.c.
2809 #if !defined MEMP_DEBUG || defined __DOXYGEN__
2810 #define MEMP_DEBUG LWIP_DBG_OFF
2814 * SYS_DEBUG: Enable debugging in sys.c.
2816 #if !defined SYS_DEBUG || defined __DOXYGEN__
2817 #define SYS_DEBUG LWIP_DBG_OFF
2821 * TIMERS_DEBUG: Enable debugging in timers.c.
2823 #if !defined TIMERS_DEBUG || defined __DOXYGEN__
2824 #define TIMERS_DEBUG LWIP_DBG_OFF
2828 * TCP_DEBUG: Enable debugging for TCP.
2830 #if !defined TCP_DEBUG || defined __DOXYGEN__
2831 #define TCP_DEBUG LWIP_DBG_OFF
2835 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
2837 #if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__
2838 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
2842 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
2844 #if !defined TCP_FR_DEBUG || defined __DOXYGEN__
2845 #define TCP_FR_DEBUG LWIP_DBG_OFF
2849 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
2852 #if !defined TCP_RTO_DEBUG || defined __DOXYGEN__
2853 #define TCP_RTO_DEBUG LWIP_DBG_OFF
2857 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
2859 #if !defined TCP_CWND_DEBUG || defined __DOXYGEN__
2860 #define TCP_CWND_DEBUG LWIP_DBG_OFF
2864 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
2866 #if !defined TCP_WND_DEBUG || defined __DOXYGEN__
2867 #define TCP_WND_DEBUG LWIP_DBG_OFF
2871 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
2873 #if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__
2874 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
2878 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
2880 #if !defined TCP_RST_DEBUG || defined __DOXYGEN__
2881 #define TCP_RST_DEBUG LWIP_DBG_OFF
2885 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
2887 #if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__
2888 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
2892 * UDP_DEBUG: Enable debugging in UDP.
2894 #if !defined UDP_DEBUG || defined __DOXYGEN__
2895 #define UDP_DEBUG LWIP_DBG_OFF
2899 * TCPIP_DEBUG: Enable debugging in tcpip.c.
2901 #if !defined TCPIP_DEBUG || defined __DOXYGEN__
2902 #define TCPIP_DEBUG LWIP_DBG_OFF
2906 * SLIP_DEBUG: Enable debugging in slipif.c.
2908 #if !defined SLIP_DEBUG || defined __DOXYGEN__
2909 #define SLIP_DEBUG LWIP_DBG_OFF
2913 * DHCP_DEBUG: Enable debugging in dhcp.c.
2915 #if !defined DHCP_DEBUG || defined __DOXYGEN__
2916 #define DHCP_DEBUG LWIP_DBG_OFF
2920 * AUTOIP_DEBUG: Enable debugging in autoip.c.
2922 #if !defined AUTOIP_DEBUG || defined __DOXYGEN__
2923 #define AUTOIP_DEBUG LWIP_DBG_OFF
2927 * DNS_DEBUG: Enable debugging for DNS.
2929 #if !defined DNS_DEBUG || defined __DOXYGEN__
2930 #define DNS_DEBUG LWIP_DBG_OFF
2934 * IP6_DEBUG: Enable debugging for IPv6.
2936 #if !defined IP6_DEBUG || defined __DOXYGEN__
2937 #define IP6_DEBUG LWIP_DBG_OFF
2944 --------------------------------------------------
2945 ---------- Performance tracking options ----------
2946 --------------------------------------------------
2949 * @defgroup lwip_opts_perf Performance
2950 * @ingroup lwip_opts_debug
2954 * LWIP_PERF: Enable performance testing for lwIP
2955 * (if enabled, arch/perf.h is included)
2957 #if !defined LWIP_PERF || defined __DOXYGEN__
2964 #endif /* LWIP_HDR_OPT_H */