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>
38 #ifndef LWIP_HDR_OPT_H
39 #define LWIP_HDR_OPT_H
42 * Include user defined options first. Anything not defined in these files
43 * will be set to standard values. Override anything you don't like!
46 #include "lwip/debug.h"
49 -----------------------------------------------
50 ---------- Platform specific locking ----------
51 -----------------------------------------------
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.
59 #ifndef SYS_LIGHTWEIGHT_PROT
60 #define SYS_LIGHTWEIGHT_PROT 0
64 * NO_SYS==1: Provides VERY minimal functionality. Otherwise,
65 * use lwIP facilities.
72 * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1
73 * Mainly for compatibility to old versions.
75 #ifndef NO_SYS_NO_TIMERS
76 #define NO_SYS_NO_TIMERS 0
80 * MEMCPY: override this if you have a faster implementation at hand than the
81 * one included in your C library
84 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
88 * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a
89 * call to memcpy() if the length is known at compile time and is small.
92 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
96 * LWIP_MPU_COMPATIBLE: enables special memory management mechanism
97 * which makes lwip able to work on MPU (Memory Protection Unit) system
98 * by not passing stack-pointers to other threads
99 * (this decreases performance)
101 #ifndef LWIP_MPU_COMPATIBLE
102 #define LWIP_MPU_COMPATIBLE 0
106 ------------------------------------
107 ---------- Memory options ----------
108 ------------------------------------
111 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
112 * instead of the lwip internal allocator. Can save code size if you
115 #ifndef MEM_LIBC_MALLOC
116 #define MEM_LIBC_MALLOC 0
120 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.
121 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution
122 * speed and usage from interrupts!
124 #ifndef MEMP_MEM_MALLOC
125 #define MEMP_MEM_MALLOC 0
129 * MEM_ALIGNMENT: should be set to the alignment of the CPU
130 * 4 byte alignment -> #define MEM_ALIGNMENT 4
131 * 2 byte alignment -> #define MEM_ALIGNMENT 2
133 #ifndef MEM_ALIGNMENT
134 #define MEM_ALIGNMENT 1
138 * MEM_SIZE: the size of the heap memory. If the application will send
139 * a lot of data that needs to be copied, this should be set high.
142 #define MEM_SIZE 1600
146 * MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array.
147 * This can be used to individually change the location of each pool.
148 * Default is one big array for all pools
150 #ifndef MEMP_SEPARATE_POOLS
151 #define MEMP_SEPARATE_POOLS 0
155 * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
156 * amount of bytes before and after each memp element in every pool and fills
157 * it with a prominent default value.
158 * MEMP_OVERFLOW_CHECK == 0 no checking
159 * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
160 * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
161 * memp_malloc() or memp_free() is called (useful but slow!)
163 #ifndef MEMP_OVERFLOW_CHECK
164 #define MEMP_OVERFLOW_CHECK 0
168 * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
169 * sure that there are no cycles in the linked lists.
171 #ifndef MEMP_SANITY_CHECK
172 #define MEMP_SANITY_CHECK 0
176 * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set
177 * of memory pools of various sizes. When mem_malloc is called, an element of
178 * the smallest pool that can provide the length needed is returned.
179 * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled.
181 #ifndef MEM_USE_POOLS
182 #define MEM_USE_POOLS 0
186 * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next
187 * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more
189 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL
190 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0
194 * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h
195 * that defines additional pools beyond the "standard" ones required
196 * by lwIP. If you set this to 1, you must have lwippools.h in your
197 * include path somewhere.
199 #ifndef MEMP_USE_CUSTOM_POOLS
200 #define MEMP_USE_CUSTOM_POOLS 0
204 * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from
205 * interrupt context (or another context that doesn't allow waiting for a
207 * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT,
208 * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs
209 * with each loop so that mem_free can run.
211 * ATTENTION: As you can see from the above description, this leads to dis-/
212 * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc
215 * If you don't want that, at least for NO_SYS=0, you can still use the following
216 * functions to enqueue a deallocation call which then runs in the tcpip_thread
218 * - pbuf_free_callback(p);
219 * - mem_free_callback(m);
221 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
222 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
226 ------------------------------------------------
227 ---------- Internal Memory Pool Sizes ----------
228 ------------------------------------------------
231 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
232 * If the application sends a lot of data out of ROM (or other static memory),
233 * this should be set high.
235 #ifndef MEMP_NUM_PBUF
236 #define MEMP_NUM_PBUF 16
240 * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
241 * (requires the LWIP_RAW option)
243 #ifndef MEMP_NUM_RAW_PCB
244 #define MEMP_NUM_RAW_PCB 4
248 * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
249 * per active UDP "connection".
250 * (requires the LWIP_UDP option)
252 #ifndef MEMP_NUM_UDP_PCB
253 #define MEMP_NUM_UDP_PCB 4
257 * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections.
258 * (requires the LWIP_TCP option)
260 #ifndef MEMP_NUM_TCP_PCB
261 #define MEMP_NUM_TCP_PCB 5
265 * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
266 * (requires the LWIP_TCP option)
268 #ifndef MEMP_NUM_TCP_PCB_LISTEN
269 #define MEMP_NUM_TCP_PCB_LISTEN 8
273 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
274 * (requires the LWIP_TCP option)
276 #ifndef MEMP_NUM_TCP_SEG
277 #define MEMP_NUM_TCP_SEG 16
281 * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for
282 * reassembly (whole packets, not fragments!)
284 #ifndef MEMP_NUM_REASSDATA
285 #define MEMP_NUM_REASSDATA 5
289 * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent
290 * (fragments, not whole packets!).
291 * This is only used with IP_FRAG_USES_STATIC_BUF==0 and
292 * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs
293 * where the packet is not yet sent when netif->output returns.
295 #ifndef MEMP_NUM_FRAG_PBUF
296 #define MEMP_NUM_FRAG_PBUF 15
300 * MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing
301 * packets (pbufs) that are waiting for an ARP request (to resolve
302 * their destination address) to finish.
303 * (requires the ARP_QUEUEING option)
305 #ifndef MEMP_NUM_ARP_QUEUE
306 #define MEMP_NUM_ARP_QUEUE 30
310 * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces
311 * can be members at the same time (one per netif - allsystems group -, plus one
312 * per netif membership).
313 * (requires the LWIP_IGMP option)
315 #ifndef MEMP_NUM_IGMP_GROUP
316 #define MEMP_NUM_IGMP_GROUP 8
320 * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts.
321 * The default number of timeouts is calculated here for all enabled modules.
322 * The formula expects settings to be either '0' or '1'.
324 #ifndef MEMP_NUM_SYS_TIMEOUT
325 #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))
329 * MEMP_NUM_NETBUF: the number of struct netbufs.
330 * (only needed if you use the sequential API, like api_lib.c)
332 #ifndef MEMP_NUM_NETBUF
333 #define MEMP_NUM_NETBUF 2
337 * MEMP_NUM_NETCONN: the number of struct netconns.
338 * (only needed if you use the sequential API, like api_lib.c)
340 #ifndef MEMP_NUM_NETCONN
341 #define MEMP_NUM_NETCONN 4
345 * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
346 * for callback/timeout API communication.
347 * (only needed if you use tcpip.c)
349 #ifndef MEMP_NUM_TCPIP_MSG_API
350 #define MEMP_NUM_TCPIP_MSG_API 8
354 * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
355 * for incoming packets.
356 * (only needed if you use tcpip.c)
358 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
359 #define MEMP_NUM_TCPIP_MSG_INPKT 8
363 * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree.
365 #ifndef MEMP_NUM_SNMP_NODE
366 #define MEMP_NUM_SNMP_NODE 50
370 * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree.
371 * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least!
373 #ifndef MEMP_NUM_SNMP_ROOTNODE
374 #define MEMP_NUM_SNMP_ROOTNODE 30
378 * MEMP_NUM_SNMP_VARBIND: influences the number of concurrent requests:
379 * 2 of these are used per request (1 for input, 1 for output), so this needs
380 * to be increased only if you want to support concurrent requests or multiple
381 * variables per request/response.
383 #ifndef MEMP_NUM_SNMP_VARBIND
384 #define MEMP_NUM_SNMP_VARBIND 2
388 * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used
389 * (does not have to be changed normally) - >=3 of these are used per request
390 * (1 for the value read and 2 for OIDs - input and output on getnext, or more
391 * if you want to support multiple varibles per request/response)
393 #ifndef MEMP_NUM_SNMP_VALUE
394 #define MEMP_NUM_SNMP_VALUE 3
398 * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls
399 * (before freeing the corresponding memory using lwip_freeaddrinfo()).
401 #ifndef MEMP_NUM_NETDB
402 #define MEMP_NUM_NETDB 1
406 * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list
407 * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.
409 #ifndef MEMP_NUM_LOCALHOSTLIST
410 #define MEMP_NUM_LOCALHOSTLIST 1
414 * MEMP_NUM_PPP_PCB: the number of simultaneously active PPP
415 * connections (requires the PPP_SUPPORT option)
417 #ifndef MEMP_NUM_PPP_PCB
418 #define MEMP_NUM_PPP_PCB 1
422 * MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS
423 * interfaces (only used with PPPOS_SUPPORT==1)
425 #ifndef MEMP_NUM_PPPOS_INTERFACES
426 #define MEMP_NUM_PPPOS_INTERFACES MEMP_NUM_PPP_PCB
430 * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE
431 * interfaces (only used with PPPOE_SUPPORT==1)
433 #ifndef MEMP_NUM_PPPOE_INTERFACES
434 #define MEMP_NUM_PPPOE_INTERFACES 1
438 * MEMP_NUM_PPPOL2TP_INTERFACES: the number of concurrently active PPPoL2TP
439 * interfaces (only used with PPPOL2TP_SUPPORT==1)
441 #ifndef MEMP_NUM_PPPOL2TP_INTERFACES
442 #define MEMP_NUM_PPPOL2TP_INTERFACES 1
446 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
448 #ifndef PBUF_POOL_SIZE
449 #define PBUF_POOL_SIZE 16
452 /** MEMP_NUM_API_MSG: the number of concurrently active calls to various
453 * socket, netconn, and tcpip functions
455 #ifndef MEMP_NUM_API_MSG
456 #define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API
459 /** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname
461 #ifndef MEMP_NUM_DNS_API_MSG
462 #define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API
465 /** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls
466 * to getsockopt/setsockopt
468 #ifndef MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA
469 #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API
472 /** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the
475 #ifndef MEMP_NUM_NETIFAPI_MSG
476 #define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API
480 ---------------------------------
481 ---------- ARP options ----------
482 ---------------------------------
485 * LWIP_ARP==1: Enable ARP functionality.
492 * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
494 #ifndef ARP_TABLE_SIZE
495 #define ARP_TABLE_SIZE 10
499 * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address
500 * resolution. By default, only the most recent packet is queued per IP address.
501 * This is sufficient for most protocols and mainly reduces TCP connection
502 * startup time. Set this to 1 if you know your application sends more than one
503 * packet in a row to an IP address that is not in the ARP cache.
506 #define ARP_QUEUEING 0
509 /** The maximum number of packets which may be queued for each
510 * unresolved address by other network layers. Defaults to 3, 0 means disabled.
511 * Old packets are dropped, new packets are queued.
513 #ifndef ARP_QUEUE_LEN
514 #define ARP_QUEUE_LEN 3
518 * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
519 * updated with the source MAC and IP addresses supplied in the packet.
520 * You may want to disable this if you do not trust LAN peers to have the
521 * correct addresses, or as a limited approach to attempt to handle
522 * spoofing. If disabled, lwIP will need to make a new ARP request if
523 * the peer is not already in the ARP table, adding a little latency.
524 * The peer *is* in the ARP table if it requested our address before.
525 * Also notice that this slows down input processing of every IP packet!
527 #ifndef ETHARP_TRUST_IP_MAC
528 #define ETHARP_TRUST_IP_MAC 0
532 * ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with
533 * VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and
534 * LWIP_HOOK_VLAN_SET hooks to check/set VLAN headers.
535 * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check.
536 * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
537 * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted.
538 * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan)
539 * that returns 1 to accept a packet or 0 to drop a packet.
541 #ifndef ETHARP_SUPPORT_VLAN
542 #define ETHARP_SUPPORT_VLAN 0
545 /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP
548 #ifndef LWIP_ETHERNET
549 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT)
552 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure
553 * alignment of payload after that header. Since the header is 14 bytes long,
554 * without this padding e.g. addresses in the IP header will not be aligned
555 * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
558 #define ETH_PAD_SIZE 0
561 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table
562 * entries (using etharp_add_static_entry/etharp_remove_static_entry).
564 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES
565 #define ETHARP_SUPPORT_STATIC_ENTRIES 0
568 /** ETHARP_TABLE_MATCH_NETIF==1: Match netif for ARP table entries.
569 * If disabled, duplicate IP address on multiple netifs are not supported
570 * (but this should only occur for AutoIP).
572 #ifndef ETHARP_TABLE_MATCH_NETIF
573 #define ETHARP_TABLE_MATCH_NETIF 0
577 --------------------------------
578 ---------- IP options ----------
579 --------------------------------
582 * LWIP_IPV4==1: Enable IPv4
589 * IP_FORWARD==1: Enables the ability to forward IP packets across network
590 * interfaces. If you are going to run lwIP on a device with only one network
591 * interface, define this to 0.
598 * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
599 * this option does not affect outgoing packet sizes, which can be controlled
602 #ifndef IP_REASSEMBLY
603 #define IP_REASSEMBLY 1
607 * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
608 * that this option does not affect incoming packet sizes, which can be
609 * controlled via IP_REASSEMBLY.
616 /* disable IPv4 extensions when IPv4 is disabled */
620 #define IP_REASSEMBLY 0
623 #endif /* !LWIP_IPV4 */
626 * IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
627 * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
628 * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
630 #ifndef IP_OPTIONS_ALLOWED
631 #define IP_OPTIONS_ALLOWED 1
635 * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
636 * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
637 * in this time, the whole packet is discarded.
639 #ifndef IP_REASS_MAXAGE
640 #define IP_REASS_MAXAGE 3
644 * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
645 * Since the received pbufs are enqueued, be sure to configure
646 * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
647 * packets even if the maximum amount of fragments is enqueued for reassembly!
649 #ifndef IP_REASS_MAX_PBUFS
650 #define IP_REASS_MAX_PBUFS 10
654 * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
655 * fragmentation. Otherwise pbufs are allocated and reference the original
656 * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1,
657 * new PBUF_RAM pbufs are used for fragments).
658 * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs!
660 #ifndef IP_FRAG_USES_STATIC_BUF
661 #define IP_FRAG_USES_STATIC_BUF 0
665 * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer
666 * (requires IP_FRAG_USES_STATIC_BUF==1)
668 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
669 #define IP_FRAG_MAX_MTU 1500
673 * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
675 #ifndef IP_DEFAULT_TTL
676 #define IP_DEFAULT_TTL 255
680 * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast
681 * filter per pcb on udp and raw send operations. To enable broadcast filter
682 * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1.
684 #ifndef IP_SOF_BROADCAST
685 #define IP_SOF_BROADCAST 0
689 * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
690 * filter on recv operations.
692 #ifndef IP_SOF_BROADCAST_RECV
693 #define IP_SOF_BROADCAST_RECV 0
697 * IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back
698 * out on the netif where it was received. This should only be used for
700 * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming
701 * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags!
703 #ifndef IP_FORWARD_ALLOW_TX_ON_RX_NETIF
704 #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0
708 * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first
709 * local TCP/UDP pcb (default==0). This can prevent creating predictable port
710 * numbers after booting a device.
712 #ifndef LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS
713 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0
717 ----------------------------------
718 ---------- ICMP options ----------
719 ----------------------------------
722 * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
723 * Be careful, disable that make your product non-compliant to RFC1122
730 * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
733 #define ICMP_TTL (IP_DEFAULT_TTL)
737 * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
739 #ifndef LWIP_BROADCAST_PING
740 #define LWIP_BROADCAST_PING 0
744 * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only)
746 #ifndef LWIP_MULTICAST_PING
747 #define LWIP_MULTICAST_PING 0
751 ---------------------------------
752 ---------- RAW options ----------
753 ---------------------------------
756 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
763 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
766 #define RAW_TTL (IP_DEFAULT_TTL)
770 ----------------------------------
771 ---------- DHCP options ----------
772 ----------------------------------
775 * LWIP_DHCP==1: Enable DHCP module.
781 /* disable DHCP when IPv4 is disabled */
784 #endif /* !LWIP_IPV4 */
787 * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
789 #ifndef DHCP_DOES_ARP_CHECK
790 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
794 * LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has
795 * NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and
796 * netif drivers might not set this flag, the default is off. If enabled,
797 * netif_set_link_up() must be called to continue dhcp starting.
799 #ifndef LWIP_DHCP_CHECK_LINK_UP
800 #define LWIP_DHCP_CHECK_LINK_UP 0
804 * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name.
806 #ifndef LWIP_DHCP_BOOTP_FILE
807 #define LWIP_DHCP_BOOTP_FILE 0
811 * LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each
812 * response packet, an callback is called, which has to be provided by the port:
813 * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs);
815 #ifndef LWIP_DHCP_GET_NTP_SRV
816 #define LWIP_DHCP_GET_NTP_SRV 0
820 * The maximum of NTP servers requested
822 #ifndef LWIP_DHCP_MAX_NTP_SERVERS
823 #define LWIP_DHCP_MAX_NTP_SERVERS 1
827 ------------------------------------
828 ---------- AUTOIP options ----------
829 ------------------------------------
832 * LWIP_AUTOIP==1: Enable AUTOIP module.
835 #define LWIP_AUTOIP 0
838 /* disable AUTOIP when IPv4 is disabled */
840 #define LWIP_AUTOIP 0
841 #endif /* !LWIP_IPV4 */
844 * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
845 * the same interface at the same time.
847 #ifndef LWIP_DHCP_AUTOIP_COOP
848 #define LWIP_DHCP_AUTOIP_COOP 0
852 * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes
853 * that should be sent before falling back on AUTOIP. This can be set
854 * as low as 1 to get an AutoIP address very quickly, but you should
855 * be prepared to handle a changing IP address when DHCP overrides
858 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES
859 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9
863 ----------------------------------
864 ---------- SNMP options ----------
865 ----------------------------------
868 * LWIP_SNMP==1: This enables the lwIP SNMP agent. UDP must be available
869 * for SNMP transport.
870 * If you want to use your own SNMP agent, leave this disabled.
871 * To integrate MIB2 of an external agent, you need to enable
872 * LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks
873 * and statistics counters you need to get MIB2 working.
880 * LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks.
881 * Turn this on to get callbacks needed to implement MIB2.
882 * Usually MIB2_STATS should be enabled, too.
884 #ifndef LWIP_MIB2_CALLBACKS
885 #define LWIP_MIB2_CALLBACKS LWIP_SNMP
889 * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will
890 * allow. At least one request buffer is required.
891 * Does not have to be changed unless external MIBs answer request asynchronously
893 #ifndef SNMP_CONCURRENT_REQUESTS
894 #define SNMP_CONCURRENT_REQUESTS 1
898 * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
899 * destination is required
901 #ifndef SNMP_TRAP_DESTINATIONS
902 #define SNMP_TRAP_DESTINATIONS 1
907 * When using a private MIB, you have to create a file 'private_mib.h' that contains
908 * a 'struct mib_array_node mib_private' which contains your MIB.
910 #ifndef SNMP_PRIVATE_MIB
911 #define SNMP_PRIVATE_MIB 0
915 * Only allow SNMP write actions that are 'safe' (e.g. disabling netifs is not
916 * a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
917 * Unsafe requests are disabled by default!
919 #ifndef SNMP_SAFE_REQUESTS
920 #define SNMP_SAFE_REQUESTS 1
924 * The maximum length of strings used. This affects the size of
925 * MEMP_SNMP_VALUE elements.
927 #ifndef SNMP_MAX_OCTET_STRING_LEN
928 #define SNMP_MAX_OCTET_STRING_LEN 127
932 * The maximum depth of the SNMP tree.
933 * With private MIBs enabled, this depends on your MIB!
934 * This affects the size of MEMP_SNMP_VALUE elements.
936 #ifndef SNMP_MAX_TREE_DEPTH
937 #define SNMP_MAX_TREE_DEPTH 15
941 * The size of the MEMP_SNMP_VALUE elements, normally calculated from
942 * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH.
944 #ifndef SNMP_MAX_VALUE_SIZE
945 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH))
949 * The snmp read-access community. Used for write-access and traps, too
950 * unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively.
952 #ifndef SNMP_COMMUNITY
953 #define SNMP_COMMUNITY "public"
957 * Set this to 1 to enable support for dedicated write-access and trap communities.
959 #ifndef SNMP_COMMUNITY_EXT
960 #define SNMP_COMMUNITY_EXT 0
963 #if SNMP_COMMUNITY_EXT
965 * The snmp write-access community.
967 #ifndef SNMP_COMMUNITY_WRITE
968 #define SNMP_COMMUNITY_WRITE "private"
972 * The snmp community used for sending traps.
974 #ifndef SNMP_COMMUNITY_TRAP
975 #define SNMP_COMMUNITY_TRAP "public"
977 #endif /* SNMP_COMMUNITY_EXT */
980 ----------------------------------
981 ----- Multicast/IGMP options -----
982 ----------------------------------
985 * LWIP_IGMP==1: Turn on IGMP module.
996 * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options
997 * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP
999 #ifndef LWIP_MULTICAST_TX_OPTIONS
1000 #define LWIP_MULTICAST_TX_OPTIONS LWIP_IGMP
1004 ----------------------------------
1005 ---------- DNS options -----------
1006 ----------------------------------
1009 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
1016 /** DNS maximum number of entries to maintain locally. */
1017 #ifndef DNS_TABLE_SIZE
1018 #define DNS_TABLE_SIZE 4
1021 /** DNS maximum host name length supported in the name table. */
1022 #ifndef DNS_MAX_NAME_LENGTH
1023 #define DNS_MAX_NAME_LENGTH 256
1026 /** The maximum of DNS servers
1027 * The first server can be initialized automatically by defining
1028 * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*'
1030 #ifndef DNS_MAX_SERVERS
1031 #define DNS_MAX_SERVERS 2
1034 /** DNS do a name checking between the query and the response. */
1035 #ifndef DNS_DOES_NAME_CHECK
1036 #define DNS_DOES_NAME_CHECK 1
1039 /** LWIP_DNS_SECURE: controls the security level of the DNS implementation
1040 * Use all DNS security features by default.
1041 * This is overridable but should only be needed by very small targets
1042 * or when using against non standard DNS servers. */
1043 #ifndef LWIP_DNS_SECURE
1044 #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)
1046 /* A list of DNS security features follows */
1047 #define LWIP_DNS_SECURE_RAND_XID 1
1048 #define LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING 2
1049 #define LWIP_DNS_SECURE_RAND_SRC_PORT 4
1051 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled,
1052 * you have to define
1053 * #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}}
1054 * (an array of structs name/address, where address is an u32_t in network
1057 * Instead, you can also use an external function:
1058 * #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name)
1059 * that returns the IP address or INADDR_NONE if not found.
1061 #ifndef DNS_LOCAL_HOSTLIST
1062 #define DNS_LOCAL_HOSTLIST 0
1063 #endif /* DNS_LOCAL_HOSTLIST */
1065 /** If this is turned on, the local host-list can be dynamically changed
1067 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
1068 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
1069 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
1072 ---------------------------------
1073 ---------- UDP options ----------
1074 ---------------------------------
1077 * LWIP_UDP==1: Turn on UDP.
1084 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
1086 #ifndef LWIP_UDPLITE
1087 #define LWIP_UDPLITE 0
1091 * UDP_TTL: Default Time-To-Live value.
1094 #define UDP_TTL (IP_DEFAULT_TTL)
1098 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf.
1100 #ifndef LWIP_NETBUF_RECVINFO
1101 #define LWIP_NETBUF_RECVINFO 0
1105 ---------------------------------
1106 ---------- TCP options ----------
1107 ---------------------------------
1110 * LWIP_TCP==1: Turn on TCP.
1117 * TCP_TTL: Default Time-To-Live value.
1120 #define TCP_TTL (IP_DEFAULT_TTL)
1124 * TCP_WND: The size of a TCP window. This must be at least
1125 * (2 * TCP_MSS) for things to work well
1128 #define TCP_WND (4 * TCP_MSS)
1132 * TCP_MAXRTX: Maximum number of retransmissions of data segments.
1135 #define TCP_MAXRTX 12
1139 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
1141 #ifndef TCP_SYNMAXRTX
1142 #define TCP_SYNMAXRTX 6
1146 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
1147 * Define to 0 if your device is low on memory.
1149 #ifndef TCP_QUEUE_OOSEQ
1150 #define TCP_QUEUE_OOSEQ (LWIP_TCP)
1154 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
1155 * you might want to increase this.)
1156 * For the receive side, this MSS is advertised to the remote side
1157 * when opening a connection. For the transmit size, this MSS sets
1158 * an upper limit on the MSS advertised by the remote host.
1165 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really
1166 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which
1167 * reflects the available reassembly buffer size at the remote host) and the
1168 * largest size permitted by the IP layer" (RFC 1122)
1169 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the
1170 * netif used for a connection and limits the MSS if it would be too big otherwise.
1172 #ifndef TCP_CALCULATE_EFF_SEND_MSS
1173 #define TCP_CALCULATE_EFF_SEND_MSS 1
1178 * TCP_SND_BUF: TCP sender buffer space (bytes).
1179 * To achieve good performance, this should be at least 2 * TCP_MSS.
1182 #define TCP_SND_BUF (2 * TCP_MSS)
1186 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
1187 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
1189 #ifndef TCP_SND_QUEUELEN
1190 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
1194 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than
1195 * TCP_SND_BUF. It is the amount of space which must be available in the
1196 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
1198 #ifndef TCP_SNDLOWAT
1199 #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1)
1203 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less
1204 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below
1205 * this number, select returns writable (combined with TCP_SNDLOWAT).
1207 #ifndef TCP_SNDQUEUELOWAT
1208 #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5)
1212 * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb.
1213 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0.
1215 #ifndef TCP_OOSEQ_MAX_BYTES
1216 #define TCP_OOSEQ_MAX_BYTES 0
1220 * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb.
1221 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0.
1223 #ifndef TCP_OOSEQ_MAX_PBUFS
1224 #define TCP_OOSEQ_MAX_PBUFS 0
1228 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
1230 #ifndef TCP_LISTEN_BACKLOG
1231 #define TCP_LISTEN_BACKLOG 0
1235 * The maximum allowed backlog for TCP listen netconns.
1236 * This backlog is used unless another is explicitly specified.
1237 * 0xff is the maximum (u8_t).
1239 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
1240 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff
1244 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may
1245 * allocate ahead of time in an attempt to create shorter pbuf chains
1246 * for transmission. The meaningful range is 0 to TCP_MSS. Some
1247 * suggested values are:
1249 * 0: Disable oversized allocation. Each tcp_write() allocates a new
1250 pbuf (old behaviour).
1251 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your
1252 * scatter-gather DMA requires aligned fragments.
1253 * 128: Limit the pbuf/memory overhead to 20%.
1254 * TCP_MSS: Try to create unfragmented TCP packets.
1255 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
1257 #ifndef TCP_OVERSIZE
1258 #define TCP_OVERSIZE TCP_MSS
1262 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option.
1263 * The timestamp option is currently only used to help remote hosts, it is not
1264 * really used locally. Therefore, it is only enabled when a TS option is
1265 * received in the initial SYN packet from a remote host.
1267 #ifndef LWIP_TCP_TIMESTAMPS
1268 #define LWIP_TCP_TIMESTAMPS 0
1272 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an
1273 * explicit window update
1275 #ifndef TCP_WND_UPDATE_THRESHOLD
1276 #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4))
1280 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
1281 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
1282 * events (accept, sent, etc) that happen in the system.
1283 * LWIP_CALLBACK_API==1: The PCB callback function is called directly
1284 * for the event. This is the default.
1286 #if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API)
1287 #define LWIP_EVENT_API 0
1288 #define LWIP_CALLBACK_API 1
1292 * LWIP_WND_SCALE and TCP_RCV_SCALE:
1293 * Set LWIP_WND_SCALE to 1 to enable window scaling.
1294 * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the
1295 * range of [0..14]).
1296 * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large
1297 * send window while having a small receive window only.
1299 #ifndef LWIP_WND_SCALE
1300 #define LWIP_WND_SCALE 0
1301 #define TCP_RCV_SCALE 0
1306 ----------------------------------
1307 ---------- Pbuf options ----------
1308 ----------------------------------
1311 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
1312 * link level header. The default is 14, the standard value for
1315 #ifndef PBUF_LINK_HLEN
1316 #ifdef LWIP_HOOK_VLAN_SET
1317 #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE)
1318 #else /* LWIP_HOOK_VLAN_SET */
1319 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
1320 #endif /* LWIP_HOOK_VLAN_SET */
1324 * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated
1325 * for an additional encapsulation header before ethernet headers (e.g. 802.11)
1327 #ifndef PBUF_LINK_ENCAPSULATION_HLEN
1328 #define PBUF_LINK_ENCAPSULATION_HLEN 0
1332 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
1333 * designed to accommodate single full size TCP frame in one pbuf, including
1334 * TCP_MSS, IP header, and link header.
1336 #ifndef PBUF_POOL_BUFSIZE
1337 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
1341 ------------------------------------------------
1342 ---------- Network Interfaces options ----------
1343 ------------------------------------------------
1346 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
1349 #ifndef LWIP_NETIF_HOSTNAME
1350 #define LWIP_NETIF_HOSTNAME 0
1354 * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
1356 #ifndef LWIP_NETIF_API
1357 #define LWIP_NETIF_API 0
1361 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
1362 * changes its up/down status (i.e., due to DHCP IP acquisition)
1364 #ifndef LWIP_NETIF_STATUS_CALLBACK
1365 #define LWIP_NETIF_STATUS_CALLBACK 0
1369 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
1370 * whenever the link changes (i.e., link down)
1372 #ifndef LWIP_NETIF_LINK_CALLBACK
1373 #define LWIP_NETIF_LINK_CALLBACK 0
1377 * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called
1378 * when a netif has been removed
1380 #ifndef LWIP_NETIF_REMOVE_CALLBACK
1381 #define LWIP_NETIF_REMOVE_CALLBACK 0
1385 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table
1386 * indices) in struct netif. TCP and UDP can make use of this to prevent
1387 * scanning the ARP table for every sent packet. While this is faster for big
1388 * ARP tables or many concurrent connections, it might be counterproductive
1389 * if you have a tiny ARP table or if there never are concurrent connections.
1391 #ifndef LWIP_NETIF_HWADDRHINT
1392 #define LWIP_NETIF_HWADDRHINT 0
1396 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
1397 * address equal to the netif IP address, looping them back up the stack.
1399 #ifndef LWIP_NETIF_LOOPBACK
1400 #define LWIP_NETIF_LOOPBACK 0
1404 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
1405 * sending for each netif (0 = disabled)
1407 #ifndef LWIP_LOOPBACK_MAX_PBUFS
1408 #define LWIP_LOOPBACK_MAX_PBUFS 0
1412 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in
1413 * the system, as netifs must change how they behave depending on this setting
1414 * for the LWIP_NETIF_LOOPBACK option to work.
1415 * Setting this is needed to avoid reentering non-reentrant functions like
1417 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a
1418 * multithreaded environment like tcpip.c. In this case, netif->input()
1419 * is called directly.
1420 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
1421 * The packets are put on a list and netif_poll() must be called in
1422 * the main application loop.
1424 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
1425 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
1429 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
1430 * to be sent into one single pbuf. This is for compatibility with DMA-enabled
1431 * MACs that do not support scatter-gather.
1432 * Beware that this might involve CPU-memcpy before transmitting that would not
1433 * be needed without this flag! Use this only if you need to!
1435 * @todo: TCP and IP-frag do not work with this, yet:
1437 #ifndef LWIP_NETIF_TX_SINGLE_PBUF
1438 #define LWIP_NETIF_TX_SINGLE_PBUF 0
1439 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
1442 ------------------------------------
1443 ---------- LOOPIF options ----------
1444 ------------------------------------
1447 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1).
1448 * This is only needed when no real netifs are available. If at least one other
1449 * netif is available, loopback traffic uses this netif.
1451 #ifndef LWIP_HAVE_LOOPIF
1452 #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK
1456 * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1).
1458 #ifndef LWIP_LOOPIF_MULTICAST
1459 #define LWIP_LOOPIF_MULTICAST 0
1463 ------------------------------------
1464 ---------- SLIPIF options ----------
1465 ------------------------------------
1468 * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c
1470 #ifndef LWIP_HAVE_SLIPIF
1471 #define LWIP_HAVE_SLIPIF 0
1475 ------------------------------------
1476 ---------- Thread options ----------
1477 ------------------------------------
1480 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
1482 #ifndef TCPIP_THREAD_NAME
1483 #define TCPIP_THREAD_NAME "tcpip_thread"
1487 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread.
1488 * The stack size value itself is platform-dependent, but is passed to
1489 * sys_thread_new() when the thread is created.
1491 #ifndef TCPIP_THREAD_STACKSIZE
1492 #define TCPIP_THREAD_STACKSIZE 0
1496 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
1497 * The priority value itself is platform-dependent, but is passed to
1498 * sys_thread_new() when the thread is created.
1500 #ifndef TCPIP_THREAD_PRIO
1501 #define TCPIP_THREAD_PRIO 1
1505 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages
1506 * The queue size value itself is platform-dependent, but is passed to
1507 * sys_mbox_new() when tcpip_init is called.
1509 #ifndef TCPIP_MBOX_SIZE
1510 #define TCPIP_MBOX_SIZE 0
1514 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
1516 #ifndef SLIPIF_THREAD_NAME
1517 #define SLIPIF_THREAD_NAME "slipif_loop"
1521 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
1522 * The stack size value itself is platform-dependent, but is passed to
1523 * sys_thread_new() when the thread is created.
1525 #ifndef SLIPIF_THREAD_STACKSIZE
1526 #define SLIPIF_THREAD_STACKSIZE 0
1530 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
1531 * The priority value itself is platform-dependent, but is passed to
1532 * sys_thread_new() when the thread is created.
1534 #ifndef SLIPIF_THREAD_PRIO
1535 #define SLIPIF_THREAD_PRIO 1
1539 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
1541 #ifndef DEFAULT_THREAD_NAME
1542 #define DEFAULT_THREAD_NAME "lwIP"
1546 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
1547 * The stack size value itself is platform-dependent, but is passed to
1548 * sys_thread_new() when the thread is created.
1550 #ifndef DEFAULT_THREAD_STACKSIZE
1551 #define DEFAULT_THREAD_STACKSIZE 0
1555 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
1556 * The priority value itself is platform-dependent, but is passed to
1557 * sys_thread_new() when the thread is created.
1559 #ifndef DEFAULT_THREAD_PRIO
1560 #define DEFAULT_THREAD_PRIO 1
1564 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1565 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed
1566 * to sys_mbox_new() when the recvmbox is created.
1568 #ifndef DEFAULT_RAW_RECVMBOX_SIZE
1569 #define DEFAULT_RAW_RECVMBOX_SIZE 0
1573 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1574 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed
1575 * to sys_mbox_new() when the recvmbox is created.
1577 #ifndef DEFAULT_UDP_RECVMBOX_SIZE
1578 #define DEFAULT_UDP_RECVMBOX_SIZE 0
1582 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1583 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed
1584 * to sys_mbox_new() when the recvmbox is created.
1586 #ifndef DEFAULT_TCP_RECVMBOX_SIZE
1587 #define DEFAULT_TCP_RECVMBOX_SIZE 0
1591 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections.
1592 * The queue size value itself is platform-dependent, but is passed to
1593 * sys_mbox_new() when the acceptmbox is created.
1595 #ifndef DEFAULT_ACCEPTMBOX_SIZE
1596 #define DEFAULT_ACCEPTMBOX_SIZE 0
1600 ----------------------------------------------
1601 ---------- Sequential layer options ----------
1602 ----------------------------------------------
1605 * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
1606 * Don't use it if you're not an active lwIP project member
1608 #ifndef LWIP_TCPIP_CORE_LOCKING
1609 #define LWIP_TCPIP_CORE_LOCKING 0
1613 * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!)
1614 * Don't use it if you're not an active lwIP project member
1616 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
1617 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
1621 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
1623 #ifndef LWIP_NETCONN
1624 #define LWIP_NETCONN 1
1627 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create
1628 * timers running in tcpip_thread from another thread.
1630 #ifndef LWIP_TCPIP_TIMEOUT
1631 #define LWIP_TCPIP_TIMEOUT 0
1634 /** LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per
1635 * thread calling socket/netconn functions instead of allocating one
1636 * semaphore per netconn (and per select etc.)
1637 * ATTENTION: a thread-local semaphore for API calls is needed:
1638 * - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t*
1639 * - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore
1640 * - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore
1641 * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup().
1642 * Ports may call these for threads created with sys_thread_new().
1644 #ifndef LWIP_NETCONN_SEM_PER_THREAD
1645 #define LWIP_NETCONN_SEM_PER_THREAD 0
1648 /** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread,
1649 * writing from a 2nd thread and closing from a 3rd thread at the same time.
1650 * ATTENTION: This is currently really alpha! Some requirements:
1651 * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from
1652 * multiple threads at once
1653 * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox
1654 * and prevent a task pending on this during/after deletion
1656 #ifndef LWIP_NETCONN_FULLDUPLEX
1657 #define LWIP_NETCONN_FULLDUPLEX 0
1661 ------------------------------------
1662 ---------- Socket options ----------
1663 ------------------------------------
1666 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
1669 #define LWIP_SOCKET 1
1672 /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete
1673 * successfully, as required by POSIX. Default is POSIX-compliant.
1675 #ifndef LWIP_SOCKET_SET_ERRNO
1676 #define LWIP_SOCKET_SET_ERRNO 1
1680 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines.
1681 * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created.
1682 * While this helps code completion, it might conflict with existing libraries.
1683 * (only used if you use sockets.c)
1685 #ifndef LWIP_COMPAT_SOCKETS
1686 #define LWIP_COMPAT_SOCKETS 1
1690 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
1691 * Disable this option if you use a POSIX operating system that uses the same
1692 * names (read, write & close). (only used if you use sockets.c)
1694 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
1695 #define LWIP_POSIX_SOCKETS_IO_NAMES 1
1699 * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n.
1700 * This can be useful when there are multiple APIs which create file descriptors.
1701 * When they all start with a different offset and you won't make them overlap you can
1702 * re implement read/write/close/ioctl/fnctl to send the requested action to the right
1703 * library (sharing select will need more work though).
1705 #ifndef LWIP_SOCKET_OFFSET
1706 #define LWIP_SOCKET_OFFSET 0
1710 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
1711 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
1712 * in seconds. (does not require sockets.c, and will affect tcp.c)
1714 #ifndef LWIP_TCP_KEEPALIVE
1715 #define LWIP_TCP_KEEPALIVE 0
1719 * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and
1720 * SO_SNDTIMEO processing.
1722 #ifndef LWIP_SO_SNDTIMEO
1723 #define LWIP_SO_SNDTIMEO 0
1727 * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and
1728 * SO_RCVTIMEO processing.
1730 #ifndef LWIP_SO_RCVTIMEO
1731 #define LWIP_SO_RCVTIMEO 0
1735 * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int
1736 * (milliseconds, much like winsock does) instead of a struct timeval (default).
1738 #ifndef LWIP_SO_SNDRCVTIMEO_NONSTANDARD
1739 #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0
1743 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
1745 #ifndef LWIP_SO_RCVBUF
1746 #define LWIP_SO_RCVBUF 0
1750 * LWIP_SO_LINGER==1: Enable SO_LINGER processing.
1752 #ifndef LWIP_SO_LINGER
1753 #define LWIP_SO_LINGER 0
1757 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
1759 #ifndef RECV_BUFSIZE_DEFAULT
1760 #define RECV_BUFSIZE_DEFAULT INT_MAX
1764 * By default, TCP socket/netconn close waits 20 seconds max to send the FIN
1766 #ifndef LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT
1767 #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000
1771 * SO_REUSE==1: Enable SO_REUSEADDR option.
1778 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets
1779 * to all local matches if SO_REUSEADDR is turned on.
1780 * WARNING: Adds a memcpy for every packet if passing to more than one pcb!
1782 #ifndef SO_REUSE_RXTOALL
1783 #define SO_REUSE_RXTOALL 0
1787 * LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of
1788 * pending data in the network buffer. This is the way windows does it. It's
1789 * the default for lwIP since it is smaller.
1790 * LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next
1791 * pending datagram in bytes. This is the way linux does it. This code is only
1792 * here for compatibility.
1794 #ifndef LWIP_FIONREAD_LINUXMODE
1795 #define LWIP_FIONREAD_LINUXMODE 0
1799 ----------------------------------------
1800 ---------- Statistics options ----------
1801 ----------------------------------------
1804 * LWIP_STATS==1: Enable statistics collection in lwip_stats.
1807 #define LWIP_STATS 1
1813 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
1815 #ifndef LWIP_STATS_DISPLAY
1816 #define LWIP_STATS_DISPLAY 0
1820 * LINK_STATS==1: Enable link stats.
1823 #define LINK_STATS 1
1827 * ETHARP_STATS==1: Enable etharp stats.
1829 #ifndef ETHARP_STATS
1830 #define ETHARP_STATS (LWIP_ARP)
1834 * IP_STATS==1: Enable IP stats.
1841 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
1842 * on if using either frag or reass.
1844 #ifndef IPFRAG_STATS
1845 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
1849 * ICMP_STATS==1: Enable ICMP stats.
1852 #define ICMP_STATS 1
1856 * IGMP_STATS==1: Enable IGMP stats.
1859 #define IGMP_STATS (LWIP_IGMP)
1863 * UDP_STATS==1: Enable UDP stats. Default is on if
1864 * UDP enabled, otherwise off.
1867 #define UDP_STATS (LWIP_UDP)
1871 * TCP_STATS==1: Enable TCP stats. Default is on if TCP
1872 * enabled, otherwise off.
1875 #define TCP_STATS (LWIP_TCP)
1879 * MEM_STATS==1: Enable mem.c stats.
1882 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
1886 * MEMP_STATS==1: Enable memp.c pool stats.
1889 #define MEMP_STATS (MEMP_MEM_MALLOC == 0)
1893 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
1896 #define SYS_STATS (NO_SYS == 0)
1900 * IP6_STATS==1: Enable IPv6 stats.
1903 #define IP6_STATS (LWIP_IPV6)
1907 * ICMP6_STATS==1: Enable ICMP for IPv6 stats.
1910 #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6)
1914 * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats.
1916 #ifndef IP6_FRAG_STATS
1917 #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS))
1921 * MLD6_STATS==1: Enable MLD for IPv6 stats.
1924 #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD)
1928 * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats.
1931 #define ND6_STATS (LWIP_IPV6)
1935 * MIB2_STATS==1: Stats for SNMP MIB2.
1938 #define MIB2_STATS (LWIP_SNMP)
1943 #define LINK_STATS 0
1944 #define ETHARP_STATS 0
1946 #define IPFRAG_STATS 0
1947 #define ICMP_STATS 0
1948 #define IGMP_STATS 0
1952 #define MEMP_STATS 0
1954 #define LWIP_STATS_DISPLAY 0
1956 #define ICMP6_STATS 0
1957 #define IP6_FRAG_STATS 0
1958 #define MLD6_STATS 0
1960 #define MIB2_STATS 0
1962 #endif /* LWIP_STATS */
1965 ---------------------------------
1966 ---------- PPP options ----------
1967 ---------------------------------
1971 * PPP_SUPPORT==1: Enable PPP.
1974 #define PPP_SUPPORT 0
1978 * PPPOE_SUPPORT==1: Enable PPP Over Ethernet
1980 #ifndef PPPOE_SUPPORT
1981 #define PPPOE_SUPPORT 0
1985 * PPPOL2TP_SUPPORT==1: Enable PPP Over L2TP
1987 #ifndef PPPOL2TP_SUPPORT
1988 #define PPPOL2TP_SUPPORT 0
1992 * PPPOL2TP_AUTH_SUPPORT==1: Enable PPP Over L2TP Auth (enable MD5 support)
1994 #ifndef PPPOL2TP_AUTH_SUPPORT
1995 #define PPPOL2TP_AUTH_SUPPORT PPPOL2TP_SUPPORT
1999 * PPPOS_SUPPORT==1: Enable PPP Over Serial
2001 #ifndef PPPOS_SUPPORT
2002 #define PPPOS_SUPPORT PPP_SUPPORT
2006 * LWIP_PPP_API==1: Enable PPP API (in pppapi.c)
2008 #ifndef LWIP_PPP_API
2009 #define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0))
2015 * PPP_INPROC_IRQ_SAFE==1 call pppos_input() using tcpip_callback().
2017 * Please read the "PPPoS input path" chapter in the PPP documentation about this option.
2019 #ifndef PPP_INPROC_IRQ_SAFE
2020 #define PPP_INPROC_IRQ_SAFE 0
2024 * PRINTPKT_SUPPORT==1: Enable PPP print packet support
2026 * Mandatory for debugging, it displays exchanged packet content in debug trace.
2028 #ifndef PRINTPKT_SUPPORT
2029 #define PRINTPKT_SUPPORT 0
2033 * PPP_IPV4_SUPPORT==1: Enable PPP IPv4 support
2035 #ifndef PPP_IPV4_SUPPORT
2036 #define PPP_IPV4_SUPPORT (LWIP_IPV4)
2040 * PPP_IPV6_SUPPORT==1: Enable PPP IPv6 support
2042 #ifndef PPP_IPV6_SUPPORT
2043 #define PPP_IPV6_SUPPORT (LWIP_IPV6)
2047 * PPP_NOTIFY_PHASE==1: Support PPP notify phase support
2049 * PPP notify phase support allows you to set a callback which is
2050 * called on change of the internal PPP state machine.
2052 * This can be used for example to set a LED pattern depending on the
2053 * current phase of the PPP session.
2055 #ifndef PPP_NOTIFY_PHASE
2056 #define PPP_NOTIFY_PHASE 0
2060 * pbuf_type PPP is using for LCP, PAP, CHAP, EAP, CCP, IPCP and IP6CP packets.
2062 * Memory allocated must be single buffered for PPP to works, it requires pbuf
2063 * that are not going to be chained when allocated. This requires setting
2064 * PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems.
2066 * Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous
2067 * buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE.
2069 #ifndef PPP_USE_PBUF_RAM
2070 #define PPP_USE_PBUF_RAM 0
2074 * PPP_FCS_TABLE: Keep a 256*2 byte table to speed up FCS calculation for PPPoS
2076 #ifndef PPP_FCS_TABLE
2077 #define PPP_FCS_TABLE 1
2081 * PAP_SUPPORT==1: Support PAP.
2084 #define PAP_SUPPORT 0
2088 * CHAP_SUPPORT==1: Support CHAP.
2090 #ifndef CHAP_SUPPORT
2091 #define CHAP_SUPPORT 0
2095 * MSCHAP_SUPPORT==1: Support MSCHAP.
2097 #ifndef MSCHAP_SUPPORT
2098 #define MSCHAP_SUPPORT 0
2101 /* MSCHAP requires CHAP support */
2103 #define CHAP_SUPPORT 1
2104 #endif /* MSCHAP_SUPPORT */
2107 * EAP_SUPPORT==1: Support EAP.
2110 #define EAP_SUPPORT 0
2114 * CCP_SUPPORT==1: Support CCP.
2117 #define CCP_SUPPORT 0
2121 * MPPE_SUPPORT==1: Support MPPE.
2123 #ifndef MPPE_SUPPORT
2124 #define MPPE_SUPPORT 0
2127 /* MPPE requires CCP support */
2129 #define CCP_SUPPORT 1
2130 /* MPPE requires MSCHAP support */
2131 #undef MSCHAP_SUPPORT
2132 #define MSCHAP_SUPPORT 1
2133 /* MSCHAP requires CHAP support */
2135 #define CHAP_SUPPORT 1
2136 #endif /* MPPE_SUPPORT */
2139 * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
2141 #ifndef CBCP_SUPPORT
2142 #define CBCP_SUPPORT 0
2146 * ECP_SUPPORT==1: Support ECP. CURRENTLY NOT SUPPORTED! DO NOT SET!
2149 #define ECP_SUPPORT 0
2153 * DEMAND_SUPPORT==1: Support dial on demand. CURRENTLY NOT SUPPORTED! DO NOT SET!
2155 #ifndef DEMAND_SUPPORT
2156 #define DEMAND_SUPPORT 0
2160 * LQR_SUPPORT==1: Support Link Quality Report. Do nothing except exchanging some LCP packets.
2163 #define LQR_SUPPORT 0
2167 * PPP_SERVER==1: Enable PPP server support (waiting for incoming PPP session).
2169 * Currently only supported for PPPoS.
2172 #define PPP_SERVER 0
2177 * PPP_OUR_NAME: Our name for authentication purposes
2179 #ifndef PPP_OUR_NAME
2180 #define PPP_OUR_NAME "lwIP"
2182 #endif /* PPP_SERVER */
2185 * VJ_SUPPORT==1: Support VJ header compression.
2188 #define VJ_SUPPORT 1
2190 /* VJ compression is only supported for IPv4 over PPPoS. */
2191 #if !PPPOS_SUPPORT || !PPP_IPV4_SUPPORT
2193 #define VJ_SUPPORT 0
2194 #endif /* !PPPOS_SUPPORT */
2197 * PPP_MD5_RANDM==1: Use MD5 for better randomness.
2198 * Enabled by default if CHAP, EAP, or L2TP AUTH support is enabled.
2200 #ifndef PPP_MD5_RANDM
2201 #define PPP_MD5_RANDM (CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT)
2205 * PolarSSL library, used if necessary and not previously disabled
2208 * lwIP contains some files fetched from the latest BSD release of
2209 * the PolarSSL project for ciphers and encryption methods we need for lwIP
2212 * The PolarSSL files were cleaned to contain only the necessary struct
2213 * fields and functions needed for lwIP.
2215 * The PolarSSL API was not changed at all, so if you are already using
2216 * PolarSSL you can choose to skip the compilation of the included PolarSSL
2217 * library into lwIP:
2219 * The following defines are available for flexibility:
2221 * LWIP_INCLUDED_POLARSSL_MD4 ; Use lwIP internal PolarSSL for MD4
2222 * LWIP_INCLUDED_POLARSSL_MD5 ; Use lwIP internal PolarSSL for MD5
2223 * LWIP_INCLUDED_POLARSSL_SHA1 ; Use lwIP internal PolarSSL for SHA1
2224 * LWIP_INCLUDED_POLARSSL_DES ; Use lwIP internal PolarSSL for DES
2226 * If set (=1), the default if required by another enabled PPP feature unless
2227 * explicitly set to 0, using included lwIP PolarSSL.
2229 * If clear (=0), not needed or using external PolarSSL.
2231 * Beware of the stack requirements which can be a lot larger if you are not
2232 * using our cleaned PolarSSL library.
2235 /* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */
2236 #if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM
2237 #ifndef LWIP_INCLUDED_POLARSSL_MD5
2238 #define LWIP_INCLUDED_POLARSSL_MD5 1
2239 #endif /* LWIP_INCLUDED_POLARSSL_MD5 */
2240 #endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */
2243 /* MSCHAP require MD4 support */
2244 #ifndef LWIP_INCLUDED_POLARSSL_MD4
2245 #define LWIP_INCLUDED_POLARSSL_MD4 1
2246 #endif /* LWIP_INCLUDED_POLARSSL_MD4 */
2247 /* MSCHAP require SHA1 support */
2248 #ifndef LWIP_INCLUDED_POLARSSL_SHA1
2249 #define LWIP_INCLUDED_POLARSSL_SHA1 1
2250 #endif /* LWIP_INCLUDED_POLARSSL_SHA1 */
2251 /* MSCHAP require DES support */
2252 #ifndef LWIP_INCLUDED_POLARSSL_DES
2253 #define LWIP_INCLUDED_POLARSSL_DES 1
2254 #endif /* LWIP_INCLUDED_POLARSSL_DES */
2255 /* MS-CHAP support is required for MPPE */
2257 /* MPPE require ARC4 support */
2258 #ifndef LWIP_INCLUDED_POLARSSL_ARC4
2259 #define LWIP_INCLUDED_POLARSSL_ARC4 1
2260 #endif /* LWIP_INCLUDED_POLARSSL_ARC4*/
2261 #endif /* MPPE_SUPPORT */
2262 #endif /* MSCHAP_SUPPORT */
2264 /* Default value if unset */
2265 #ifndef LWIP_INCLUDED_POLARSSL_MD4
2266 #define LWIP_INCLUDED_POLARSSL_MD4 0
2267 #endif /* LWIP_INCLUDED_POLARSSL_MD4 */
2268 #ifndef LWIP_INCLUDED_POLARSSL_MD5
2269 #define LWIP_INCLUDED_POLARSSL_MD5 0
2270 #endif /* LWIP_INCLUDED_POLARSSL_MD5 */
2271 #ifndef LWIP_INCLUDED_POLARSSL_SHA1
2272 #define LWIP_INCLUDED_POLARSSL_SHA1 0
2273 #endif /* LWIP_INCLUDED_POLARSSL_SHA1 */
2274 #ifndef LWIP_INCLUDED_POLARSSL_DES
2275 #define LWIP_INCLUDED_POLARSSL_DES 0
2276 #endif /* LWIP_INCLUDED_POLARSSL_DES */
2277 #ifndef LWIP_INCLUDED_POLARSSL_ARC4
2278 #define LWIP_INCLUDED_POLARSSL_ARC4 0
2279 #endif /* LWIP_INCLUDED_POLARSSL_ARC4 */
2286 * FSM_DEFTIMEOUT: Timeout time in seconds
2288 #ifndef FSM_DEFTIMEOUT
2289 #define FSM_DEFTIMEOUT 6
2293 * FSM_DEFMAXTERMREQS: Maximum Terminate-Request transmissions
2295 #ifndef FSM_DEFMAXTERMREQS
2296 #define FSM_DEFMAXTERMREQS 2
2300 * FSM_DEFMAXCONFREQS: Maximum Configure-Request transmissions
2302 #ifndef FSM_DEFMAXCONFREQS
2303 #define FSM_DEFMAXCONFREQS 10
2307 * FSM_DEFMAXNAKLOOPS: Maximum number of nak loops
2309 #ifndef FSM_DEFMAXNAKLOOPS
2310 #define FSM_DEFMAXNAKLOOPS 5
2314 * UPAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req
2316 #ifndef UPAP_DEFTIMEOUT
2317 #define UPAP_DEFTIMEOUT 6
2321 * UPAP_DEFTRANSMITS: Maximum number of auth-reqs to send
2323 #ifndef UPAP_DEFTRANSMITS
2324 #define UPAP_DEFTRANSMITS 10
2329 * UPAP_DEFREQTIME: Time to wait for auth-req from peer
2331 #ifndef UPAP_DEFREQTIME
2332 #define UPAP_DEFREQTIME 30
2334 #endif /* PPP_SERVER */
2337 * CHAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req
2339 #ifndef CHAP_DEFTIMEOUT
2340 #define CHAP_DEFTIMEOUT 6
2344 * CHAP_DEFTRANSMITS: max # times to send challenge
2346 #ifndef CHAP_DEFTRANSMITS
2347 #define CHAP_DEFTRANSMITS 10
2352 * CHAP_DEFRECHALLENGETIME: If this option is > 0, rechallenge the peer every n seconds
2354 #ifndef CHAP_DEFRECHALLENGETIME
2355 #define CHAP_DEFRECHALLENGETIME 0
2357 #endif /* PPP_SERVER */
2360 * EAP_DEFREQTIME: Time to wait for peer request
2362 #ifndef EAP_DEFREQTIME
2363 #define EAP_DEFREQTIME 6
2367 * EAP_DEFALLOWREQ: max # times to accept requests
2369 #ifndef EAP_DEFALLOWREQ
2370 #define EAP_DEFALLOWREQ 10
2375 * EAP_DEFTIMEOUT: Timeout (seconds) for rexmit
2377 #ifndef EAP_DEFTIMEOUT
2378 #define EAP_DEFTIMEOUT 6
2382 * EAP_DEFTRANSMITS: max # times to transmit
2384 #ifndef EAP_DEFTRANSMITS
2385 #define EAP_DEFTRANSMITS 10
2387 #endif /* PPP_SERVER */
2390 * LCP_DEFLOOPBACKFAIL: Default number of times we receive our magic number from the peer
2391 * before deciding the link is looped-back.
2393 #ifndef LCP_DEFLOOPBACKFAIL
2394 #define LCP_DEFLOOPBACKFAIL 10
2398 * LCP_ECHOINTERVAL: Interval in seconds between keepalive echo requests, 0 to disable.
2400 #ifndef LCP_ECHOINTERVAL
2401 #define LCP_ECHOINTERVAL 0
2405 * LCP_MAXECHOFAILS: Number of unanswered echo requests before failure.
2407 #ifndef LCP_MAXECHOFAILS
2408 #define LCP_MAXECHOFAILS 3
2412 * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char.
2414 #ifndef PPP_MAXIDLEFLAG
2415 #define PPP_MAXIDLEFLAG 100
2423 * PPP_MRU: Default MRU
2426 #define PPP_MRU 1500
2430 * PPP_DEFMRU: Default MRU to try
2433 #define PPP_DEFMRU 1500
2437 * PPP_MAXMRU: Normally limit MRU to this (pppd default = 16384)
2440 #define PPP_MAXMRU 1500
2444 * PPP_MINMRU: No MRUs below this
2447 #define PPP_MINMRU 128
2451 * PPPOL2TP_DEFMRU: Default MTU and MRU for L2TP
2452 * Default = 1500 - PPPoE(6) - PPP Protocol(2) - IPv4 header(20) - UDP Header(8)
2453 * - L2TP Header(6) - HDLC Header(2) - PPP Protocol(2) - MPPE Header(2) - PPP Protocol(2)
2455 #if PPPOL2TP_SUPPORT
2456 #ifndef PPPOL2TP_DEFMRU
2457 #define PPPOL2TP_DEFMRU 1450
2459 #endif /* PPPOL2TP_SUPPORT */
2462 * MAXNAMELEN: max length of hostname or name for auth
2465 #define MAXNAMELEN 256
2469 * MAXSECRETLEN: max length of password or secret
2471 #ifndef MAXSECRETLEN
2472 #define MAXSECRETLEN 256
2475 #endif /* PPP_SUPPORT */
2478 --------------------------------------
2479 ---------- Checksum options ----------
2480 --------------------------------------
2484 * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled
2486 * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled!
2488 #ifndef LWIP_CHECKSUM_CTRL_PER_NETIF
2489 #define LWIP_CHECKSUM_CTRL_PER_NETIF 0
2493 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
2495 #ifndef CHECKSUM_GEN_IP
2496 #define CHECKSUM_GEN_IP 1
2500 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
2502 #ifndef CHECKSUM_GEN_UDP
2503 #define CHECKSUM_GEN_UDP 1
2507 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
2509 #ifndef CHECKSUM_GEN_TCP
2510 #define CHECKSUM_GEN_TCP 1
2514 * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets.
2516 #ifndef CHECKSUM_GEN_ICMP
2517 #define CHECKSUM_GEN_ICMP 1
2521 * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets.
2523 #ifndef CHECKSUM_GEN_ICMP6
2524 #define CHECKSUM_GEN_ICMP6 1
2528 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
2530 #ifndef CHECKSUM_CHECK_IP
2531 #define CHECKSUM_CHECK_IP 1
2535 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
2537 #ifndef CHECKSUM_CHECK_UDP
2538 #define CHECKSUM_CHECK_UDP 1
2542 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
2544 #ifndef CHECKSUM_CHECK_TCP
2545 #define CHECKSUM_CHECK_TCP 1
2549 * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets.
2551 #ifndef CHECKSUM_CHECK_ICMP
2552 #define CHECKSUM_CHECK_ICMP 1
2556 * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets
2558 #ifndef CHECKSUM_CHECK_ICMP6
2559 #define CHECKSUM_CHECK_ICMP6 1
2563 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from
2564 * application buffers to pbufs.
2566 #ifndef LWIP_CHECKSUM_ON_COPY
2567 #define LWIP_CHECKSUM_ON_COPY 0
2571 ---------------------------------------
2572 ---------- IPv6 options ---------------
2573 ---------------------------------------
2576 * LWIP_IPV6==1: Enable IPv6
2583 * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif.
2585 #ifndef LWIP_IPV6_NUM_ADDRESSES
2586 #define LWIP_IPV6_NUM_ADDRESSES 3
2590 * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs
2592 #ifndef LWIP_IPV6_FORWARD
2593 #define LWIP_IPV6_FORWARD 0
2597 * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC)
2600 #define LWIP_ICMP6 (LWIP_IPV6)
2604 * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in
2605 * ICMPv6 error messages.
2607 #ifndef LWIP_ICMP6_DATASIZE
2608 #define LWIP_ICMP6_DATASIZE 8
2612 * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages
2614 #ifndef LWIP_ICMP6_HL
2615 #define LWIP_ICMP6_HL 255
2619 * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol.
2621 #ifndef LWIP_IPV6_MLD
2622 #define LWIP_IPV6_MLD (LWIP_IPV6)
2626 * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast that can be joined.
2628 #ifndef MEMP_NUM_MLD6_GROUP
2629 #define MEMP_NUM_MLD6_GROUP 4
2633 * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big.
2635 #ifndef LWIP_IPV6_FRAG
2636 #define LWIP_IPV6_FRAG 0
2640 * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented
2642 #ifndef LWIP_IPV6_REASS
2643 #define LWIP_IPV6_REASS (LWIP_IPV6)
2647 * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address
2648 * is being resolved.
2650 #ifndef LWIP_ND6_QUEUEING
2651 #define LWIP_ND6_QUEUEING (LWIP_IPV6)
2655 * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution.
2657 #ifndef MEMP_NUM_ND6_QUEUE
2658 #define MEMP_NUM_ND6_QUEUE 20
2662 * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache
2664 #ifndef LWIP_ND6_NUM_NEIGHBORS
2665 #define LWIP_ND6_NUM_NEIGHBORS 10
2669 * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache
2671 #ifndef LWIP_ND6_NUM_DESTINATIONS
2672 #define LWIP_ND6_NUM_DESTINATIONS 10
2676 * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache
2678 #ifndef LWIP_ND6_NUM_PREFIXES
2679 #define LWIP_ND6_NUM_PREFIXES 5
2683 * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache
2685 #ifndef LWIP_ND6_NUM_ROUTERS
2686 #define LWIP_ND6_NUM_ROUTERS 3
2690 * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send
2691 * (neighbor solicit and router solicit)
2693 #ifndef LWIP_ND6_MAX_MULTICAST_SOLICIT
2694 #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3
2698 * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages
2699 * to send during neighbor reachability detection.
2701 #ifndef LWIP_ND6_MAX_UNICAST_SOLICIT
2702 #define LWIP_ND6_MAX_UNICAST_SOLICIT 3
2706 * Unused: See ND RFC (time in milliseconds).
2708 #ifndef LWIP_ND6_MAX_ANYCAST_DELAY_TIME
2709 #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000
2713 * Unused: See ND RFC
2715 #ifndef LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT
2716 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3
2720 * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds).
2721 * May be updated by router advertisement messages.
2723 #ifndef LWIP_ND6_REACHABLE_TIME
2724 #define LWIP_ND6_REACHABLE_TIME 30000
2728 * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages
2730 #ifndef LWIP_ND6_RETRANS_TIMER
2731 #define LWIP_ND6_RETRANS_TIMER 1000
2735 * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation
2736 * message is sent, during neighbor reachability detection.
2738 #ifndef LWIP_ND6_DELAY_FIRST_PROBE_TIME
2739 #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000
2743 * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update
2744 * Reachable time and retransmission timers, and netif MTU.
2746 #ifndef LWIP_ND6_ALLOW_RA_UPDATES
2747 #define LWIP_ND6_ALLOW_RA_UPDATES 1
2751 * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during
2754 #ifndef LWIP_IPV6_SEND_ROUTER_SOLICIT
2755 #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1
2759 * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery
2760 * with reachability hints for connected destinations. This helps avoid sending
2761 * unicast neighbor solicitation messages.
2763 #ifndef LWIP_ND6_TCP_REACHABILITY_HINTS
2764 #define LWIP_ND6_TCP_REACHABILITY_HINTS 1
2768 * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862.
2770 #ifndef LWIP_IPV6_AUTOCONFIG
2771 #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6)
2775 * LWIP_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts.
2777 #ifndef LWIP_IPV6_DUP_DETECT_ATTEMPTS
2778 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1
2782 * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration.
2784 #ifndef LWIP_IPV6_DHCP6
2785 #define LWIP_IPV6_DHCP6 0
2789 ---------------------------------------
2790 ---------- Hook options ---------------
2791 ---------------------------------------
2794 /* Hooks are undefined by default, define them to a function if you need them. */
2797 * LWIP_HOOK_IP4_INPUT(pbuf, input_netif):
2798 * - called from ip_input() (IPv4)
2799 * - pbuf: received struct pbuf passed to ip_input()
2800 * - input_netif: struct netif on which the packet has been received
2802 * - 0: Hook has not consumed the packet, packet is processed as normal
2803 * - != 0: Hook has consumed the packet.
2804 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook
2805 * (i.e. free it when done).
2809 * LWIP_HOOK_IP4_ROUTE(dest):
2810 * - called from ip_route() (IPv4)
2811 * - dest: destination IPv4 address
2812 * Returns the destination netif or NULL if no destination netif is found. In
2813 * that case, ip_route() continues as normal.
2817 * LWIP_HOOK_IP4_ROUTE_SRC(dest, src):
2818 * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL)
2822 * LWIP_HOOK_ETHARP_GET_GW(netif, dest):
2823 * - called from etharp_output() (IPv4)
2824 * - netif: the netif used for sending
2825 * - dest: the destination IPv4 address
2826 * Returns the IPv4 address of the gateway to handle the specified destination
2827 * IPv4 address. If NULL is returned, the netif's default gateway is used.
2828 * The returned address MUST be reachable on the specified netif!
2829 * This function is meant to implement advanced IPv4 routing together with
2830 * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is
2831 * not part of lwIP but can e.g. be hidden in the netif's state argument.
2835 * LWIP_HOOK_IP6_INPUT(pbuf, input_netif):
2836 * - called from ip6_input() (IPv6)
2837 * - pbuf: received struct pbuf passed to ip6_input()
2838 * - input_netif: struct netif on which the packet has been received
2840 * - 0: Hook has not consumed the packet, packet is processed as normal
2841 * - != 0: Hook has consumed the packet.
2842 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook
2843 * (i.e. free it when done).
2847 * LWIP_HOOK_IP6_ROUTE(src, dest):
2848 * - called from ip6_route() (IPv6)
2849 * - src: sourc IPv6 address
2850 * - dest: destination IPv6 address
2851 * Returns the destination netif or NULL if no destination netif is found. In
2852 * that case, ip6_route() continues as normal.
2856 * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr):
2857 * - called from ethernet_input() if VLAN support is enabled
2858 * - netif: struct netif on which the packet has been received
2859 * - eth_hdr: struct eth_hdr of the packet
2860 * - vlan_hdr: struct eth_vlan_hdr of the packet
2862 * - 0: Packet must be dropped.
2863 * - != 0: Packet must be accepted.
2867 * LWIP_HOOK_VLAN_SET(netif, eth_hdr, vlan_hdr):
2868 * - called from etharp_raw() and etharp_send_ip() if VLAN support is enabled
2869 * - netif: struct netif that the packet will be sent through
2870 * - eth_hdr: struct eth_hdr of the packet
2871 * - vlan_hdr: struct eth_vlan_hdr of the packet
2873 * - 0: Packet shall not contain VLAN header.
2874 * - != 0: Packet shall contain VLAN header.
2875 * Hook can be used to set prio_vid field of vlan_hdr.
2879 * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type):
2880 * - called from memp_free() when a memp pool was empty and an item is now available
2884 ---------------------------------------
2885 ---------- Debugging options ----------
2886 ---------------------------------------
2889 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
2890 * compared against this value. If it is smaller, then debugging
2891 * messages are written.
2893 #ifndef LWIP_DBG_MIN_LEVEL
2894 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
2898 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
2899 * debug messages of certain types.
2901 #ifndef LWIP_DBG_TYPES_ON
2902 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
2906 * ETHARP_DEBUG: Enable debugging in etharp.c.
2908 #ifndef ETHARP_DEBUG
2909 #define ETHARP_DEBUG LWIP_DBG_OFF
2913 * NETIF_DEBUG: Enable debugging in netif.c.
2916 #define NETIF_DEBUG LWIP_DBG_OFF
2920 * PBUF_DEBUG: Enable debugging in pbuf.c.
2923 #define PBUF_DEBUG LWIP_DBG_OFF
2927 * API_LIB_DEBUG: Enable debugging in api_lib.c.
2929 #ifndef API_LIB_DEBUG
2930 #define API_LIB_DEBUG LWIP_DBG_OFF
2934 * API_MSG_DEBUG: Enable debugging in api_msg.c.
2936 #ifndef API_MSG_DEBUG
2937 #define API_MSG_DEBUG LWIP_DBG_OFF
2941 * SOCKETS_DEBUG: Enable debugging in sockets.c.
2943 #ifndef SOCKETS_DEBUG
2944 #define SOCKETS_DEBUG LWIP_DBG_OFF
2948 * ICMP_DEBUG: Enable debugging in icmp.c.
2951 #define ICMP_DEBUG LWIP_DBG_OFF
2955 * IGMP_DEBUG: Enable debugging in igmp.c.
2958 #define IGMP_DEBUG LWIP_DBG_OFF
2962 * INET_DEBUG: Enable debugging in inet.c.
2965 #define INET_DEBUG LWIP_DBG_OFF
2969 * IP_DEBUG: Enable debugging for IP.
2972 #define IP_DEBUG LWIP_DBG_OFF
2976 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
2978 #ifndef IP_REASS_DEBUG
2979 #define IP_REASS_DEBUG LWIP_DBG_OFF
2983 * RAW_DEBUG: Enable debugging in raw.c.
2986 #define RAW_DEBUG LWIP_DBG_OFF
2990 * MEM_DEBUG: Enable debugging in mem.c.
2993 #define MEM_DEBUG LWIP_DBG_OFF
2997 * MEMP_DEBUG: Enable debugging in memp.c.
3000 #define MEMP_DEBUG LWIP_DBG_OFF
3004 * SYS_DEBUG: Enable debugging in sys.c.
3007 #define SYS_DEBUG LWIP_DBG_OFF
3011 * TIMERS_DEBUG: Enable debugging in timers.c.
3013 #ifndef TIMERS_DEBUG
3014 #define TIMERS_DEBUG LWIP_DBG_OFF
3018 * TCP_DEBUG: Enable debugging for TCP.
3021 #define TCP_DEBUG LWIP_DBG_OFF
3025 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
3027 #ifndef TCP_INPUT_DEBUG
3028 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
3032 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
3034 #ifndef TCP_FR_DEBUG
3035 #define TCP_FR_DEBUG LWIP_DBG_OFF
3039 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
3042 #ifndef TCP_RTO_DEBUG
3043 #define TCP_RTO_DEBUG LWIP_DBG_OFF
3047 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
3049 #ifndef TCP_CWND_DEBUG
3050 #define TCP_CWND_DEBUG LWIP_DBG_OFF
3054 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
3056 #ifndef TCP_WND_DEBUG
3057 #define TCP_WND_DEBUG LWIP_DBG_OFF
3061 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
3063 #ifndef TCP_OUTPUT_DEBUG
3064 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
3068 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
3070 #ifndef TCP_RST_DEBUG
3071 #define TCP_RST_DEBUG LWIP_DBG_OFF
3075 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
3077 #ifndef TCP_QLEN_DEBUG
3078 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
3082 * UDP_DEBUG: Enable debugging in UDP.
3085 #define UDP_DEBUG LWIP_DBG_OFF
3089 * TCPIP_DEBUG: Enable debugging in tcpip.c.
3092 #define TCPIP_DEBUG LWIP_DBG_OFF
3096 * PPP_DEBUG: Enable debugging for PPP.
3099 #define PPP_DEBUG LWIP_DBG_OFF
3103 * SLIP_DEBUG: Enable debugging in slipif.c.
3106 #define SLIP_DEBUG LWIP_DBG_OFF
3110 * DHCP_DEBUG: Enable debugging in dhcp.c.
3113 #define DHCP_DEBUG LWIP_DBG_OFF
3117 * AUTOIP_DEBUG: Enable debugging in autoip.c.
3119 #ifndef AUTOIP_DEBUG
3120 #define AUTOIP_DEBUG LWIP_DBG_OFF
3124 * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
3126 #ifndef SNMP_MSG_DEBUG
3127 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
3131 * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
3133 #ifndef SNMP_MIB_DEBUG
3134 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
3138 * DNS_DEBUG: Enable debugging for DNS.
3141 #define DNS_DEBUG LWIP_DBG_OFF
3145 * IP6_DEBUG: Enable debugging for IPv6.
3148 #define IP6_DEBUG LWIP_DBG_OFF
3152 --------------------------------------------------
3153 ---------- Performance tracking options ----------
3154 --------------------------------------------------
3157 * LWIP_PERF: Enable performance testing for lwIP
3158 * (if enabled, arch/perf.h is included)
3164 #endif /* LWIP_HDR_OPT_H */