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_OPT_H__
39 #define __LWIP_OPT_H__
42 * Include user defined options first. Anything not defined in these files
43 * will be set to standard values. Override anything you dont 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 * MEMCPY: override this if you have a faster implementation at hand than the
73 * one included in your C library
76 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
80 * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a
81 * call to memcpy() if the length is known at compile time and is small.
84 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
88 ------------------------------------
89 ---------- Memory options ----------
90 ------------------------------------
93 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
94 * instead of the lwip internal allocator. Can save code size if you
97 #ifndef MEM_LIBC_MALLOC
98 #define MEM_LIBC_MALLOC 0
102 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.
103 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution
104 * speed and usage from interrupts!
106 #ifndef MEMP_MEM_MALLOC
107 #define MEMP_MEM_MALLOC 0
111 * MEM_ALIGNMENT: should be set to the alignment of the CPU
112 * 4 byte alignment -> #define MEM_ALIGNMENT 4
113 * 2 byte alignment -> #define MEM_ALIGNMENT 2
115 #ifndef MEM_ALIGNMENT
116 #define MEM_ALIGNMENT 1
120 * MEM_SIZE: the size of the heap memory. If the application will send
121 * a lot of data that needs to be copied, this should be set high.
124 #define MEM_SIZE 1600
128 * MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array.
129 * This can be used to individually change the location of each pool.
130 * Default is one big array for all pools
132 #ifndef MEMP_SEPARATE_POOLS
133 #define MEMP_SEPARATE_POOLS 0
137 * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
138 * amount of bytes before and after each memp element in every pool and fills
139 * it with a prominent default value.
140 * MEMP_OVERFLOW_CHECK == 0 no checking
141 * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
142 * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
143 * memp_malloc() or memp_free() is called (useful but slow!)
145 #ifndef MEMP_OVERFLOW_CHECK
146 #define MEMP_OVERFLOW_CHECK 0
150 * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
151 * sure that there are no cycles in the linked lists.
153 #ifndef MEMP_SANITY_CHECK
154 #define MEMP_SANITY_CHECK 0
158 * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set
159 * of memory pools of various sizes. When mem_malloc is called, an element of
160 * the smallest pool that can provide the length needed is returned.
161 * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled.
163 #ifndef MEM_USE_POOLS
164 #define MEM_USE_POOLS 0
168 * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next
169 * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more
171 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL
172 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0
176 * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h
177 * that defines additional pools beyond the "standard" ones required
178 * by lwIP. If you set this to 1, you must have lwippools.h in your
179 * inlude path somewhere.
181 #ifndef MEMP_USE_CUSTOM_POOLS
182 #define MEMP_USE_CUSTOM_POOLS 0
186 * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from
187 * interrupt context (or another context that doesn't allow waiting for a
189 * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT,
190 * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs
191 * with each loop so that mem_free can run.
193 * ATTENTION: As you can see from the above description, this leads to dis-/
194 * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc
197 * If you don't want that, at least for NO_SYS=0, you can still use the following
198 * functions to enqueue a deallocation call which then runs in the tcpip_thread
200 * - pbuf_free_callback(p);
201 * - mem_free_callback(m);
203 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
204 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
208 ------------------------------------------------
209 ---------- Internal Memory Pool Sizes ----------
210 ------------------------------------------------
213 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
214 * If the application sends a lot of data out of ROM (or other static memory),
215 * this should be set high.
217 #ifndef MEMP_NUM_PBUF
218 #define MEMP_NUM_PBUF 16
222 * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
223 * (requires the LWIP_RAW option)
225 #ifndef MEMP_NUM_RAW_PCB
226 #define MEMP_NUM_RAW_PCB 4
230 * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
231 * per active UDP "connection".
232 * (requires the LWIP_UDP option)
234 #ifndef MEMP_NUM_UDP_PCB
235 #define MEMP_NUM_UDP_PCB 4
239 * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
240 * (requires the LWIP_TCP option)
242 #ifndef MEMP_NUM_TCP_PCB
243 #define MEMP_NUM_TCP_PCB 5
247 * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
248 * (requires the LWIP_TCP option)
250 #ifndef MEMP_NUM_TCP_PCB_LISTEN
251 #define MEMP_NUM_TCP_PCB_LISTEN 8
255 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
256 * (requires the LWIP_TCP option)
258 #ifndef MEMP_NUM_TCP_SEG
259 #define MEMP_NUM_TCP_SEG 16
263 * MEMP_NUM_REASSDATA: the number of simultaneously IP packets queued for
264 * reassembly (whole packets, not fragments!)
266 #ifndef MEMP_NUM_REASSDATA
267 #define MEMP_NUM_REASSDATA 5
271 * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
272 * packets (pbufs) that are waiting for an ARP request (to resolve
273 * their destination address) to finish.
274 * (requires the ARP_QUEUEING option)
276 #ifndef MEMP_NUM_ARP_QUEUE
277 #define MEMP_NUM_ARP_QUEUE 30
281 * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces
282 * can be members et the same time (one per netif - allsystems group -, plus one
283 * per netif membership).
284 * (requires the LWIP_IGMP option)
286 #ifndef MEMP_NUM_IGMP_GROUP
287 #define MEMP_NUM_IGMP_GROUP 8
291 * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
292 * (requires NO_SYS==0)
294 #ifndef MEMP_NUM_SYS_TIMEOUT
295 #define MEMP_NUM_SYS_TIMEOUT 3
299 * MEMP_NUM_NETBUF: the number of struct netbufs.
300 * (only needed if you use the sequential API, like api_lib.c)
302 #ifndef MEMP_NUM_NETBUF
303 #define MEMP_NUM_NETBUF 2
307 * MEMP_NUM_NETCONN: the number of struct netconns.
308 * (only needed if you use the sequential API, like api_lib.c)
310 #ifndef MEMP_NUM_NETCONN
311 #define MEMP_NUM_NETCONN 4
315 * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
316 * for callback/timeout API communication.
317 * (only needed if you use tcpip.c)
319 #ifndef MEMP_NUM_TCPIP_MSG_API
320 #define MEMP_NUM_TCPIP_MSG_API 8
324 * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
325 * for incoming packets.
326 * (only needed if you use tcpip.c)
328 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
329 #define MEMP_NUM_TCPIP_MSG_INPKT 8
333 * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree.
335 #ifndef MEMP_NUM_SNMP_NODE
336 #define MEMP_NUM_SNMP_NODE 50
340 * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree.
341 * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least!
343 #ifndef MEMP_NUM_SNMP_ROOTNODE
344 #define MEMP_NUM_SNMP_ROOTNODE 30
348 * MEMP_NUM_SNMP_VARBIND: the number of concurrent requests (does not have to
349 * be changed normally) - 2 of these are used per request (1 for input,
352 #ifndef MEMP_NUM_SNMP_VARBIND
353 #define MEMP_NUM_SNMP_VARBIND 2
357 * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used
358 * (does not have to be changed normally) - 3 of these are used per request
359 * (1 for the value read and 2 for OIDs - input and output)
361 #ifndef MEMP_NUM_SNMP_VALUE
362 #define MEMP_NUM_SNMP_VALUE 3
366 * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls
367 * (before freeing the corresponding memory using lwip_freeaddrinfo()).
369 #ifndef MEMP_NUM_NETDB
370 #define MEMP_NUM_NETDB 1
374 * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list
375 * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.
377 #ifndef MEMP_NUM_LOCALHOSTLIST
378 #define MEMP_NUM_LOCALHOSTLIST 1
382 * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE
383 * interfaces (only used with PPPOE_SUPPORT==1)
385 #ifndef MEMP_NUM_PPPOE_INTERFACES
386 #define MEMP_NUM_PPPOE_INTERFACES 1
390 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
392 #ifndef PBUF_POOL_SIZE
393 #define PBUF_POOL_SIZE 16
397 ---------------------------------
398 ---------- ARP options ----------
399 ---------------------------------
402 * LWIP_ARP==1: Enable ARP functionality.
409 * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
411 #ifndef ARP_TABLE_SIZE
412 #define ARP_TABLE_SIZE 10
416 * ARP_QUEUEING==1: Outgoing packets are queued during hardware address
420 #define ARP_QUEUEING 1
424 * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
425 * updated with the source MAC and IP addresses supplied in the packet.
426 * You may want to disable this if you do not trust LAN peers to have the
427 * correct addresses, or as a limited approach to attempt to handle
428 * spoofing. If disabled, lwIP will need to make a new ARP request if
429 * the peer is not already in the ARP table, adding a little latency.
430 * The peer *is* in the ARP table if it requested our address before.
431 * Also notice that this slows down input processing of every IP packet!
433 #ifndef ETHARP_TRUST_IP_MAC
434 #define ETHARP_TRUST_IP_MAC 0
438 * ETHARP_SUPPORT_VLAN==1: support receiving ethernet packets with VLAN header.
439 * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check.
440 * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
441 * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted.
443 #ifndef ETHARP_SUPPORT_VLAN
444 #define ETHARP_SUPPORT_VLAN 0
447 /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP
450 #ifndef LWIP_ETHERNET
451 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT)
454 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure
455 * alignment of payload after that header. Since the header is 14 bytes long,
456 * without this padding e.g. addresses in the IP header will not be aligned
457 * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
460 #define ETH_PAD_SIZE 0
463 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table
464 * entries (using etharp_add_static_entry/etharp_remove_static_entry).
466 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES
467 #define ETHARP_SUPPORT_STATIC_ENTRIES 0
472 --------------------------------
473 ---------- IP options ----------
474 --------------------------------
477 * IP_FORWARD==1: Enables the ability to forward IP packets across network
478 * interfaces. If you are going to run lwIP on a device with only one network
479 * interface, define this to 0.
486 * IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
487 * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
488 * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
490 #ifndef IP_OPTIONS_ALLOWED
491 #define IP_OPTIONS_ALLOWED 1
495 * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
496 * this option does not affect outgoing packet sizes, which can be controlled
499 #ifndef IP_REASSEMBLY
500 #define IP_REASSEMBLY 1
504 * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
505 * that this option does not affect incoming packet sizes, which can be
506 * controlled via IP_REASSEMBLY.
513 * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
514 * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
515 * in this time, the whole packet is discarded.
517 #ifndef IP_REASS_MAXAGE
518 #define IP_REASS_MAXAGE 3
522 * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
523 * Since the received pbufs are enqueued, be sure to configure
524 * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
525 * packets even if the maximum amount of fragments is enqueued for reassembly!
527 #ifndef IP_REASS_MAX_PBUFS
528 #define IP_REASS_MAX_PBUFS 10
532 * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
533 * fragmentation. Otherwise pbufs are allocated and reference the original
534 * packet data to be fragmented.
536 #ifndef IP_FRAG_USES_STATIC_BUF
537 #define IP_FRAG_USES_STATIC_BUF 1
541 * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer
542 * (requires IP_FRAG_USES_STATIC_BUF==1)
544 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
545 #define IP_FRAG_MAX_MTU 1500
549 * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
551 #ifndef IP_DEFAULT_TTL
552 #define IP_DEFAULT_TTL 255
556 * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast
557 * filter per pcb on udp and raw send operations. To enable broadcast filter
558 * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1.
560 #ifndef IP_SOF_BROADCAST
561 #define IP_SOF_BROADCAST 0
565 * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
566 * filter on recv operations.
568 #ifndef IP_SOF_BROADCAST_RECV
569 #define IP_SOF_BROADCAST_RECV 0
573 ----------------------------------
574 ---------- ICMP options ----------
575 ----------------------------------
578 * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
579 * Be careful, disable that make your product non-compliant to RFC1122
586 * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
589 #define ICMP_TTL (IP_DEFAULT_TTL)
593 * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
595 #ifndef LWIP_BROADCAST_PING
596 #define LWIP_BROADCAST_PING 0
600 * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only)
602 #ifndef LWIP_MULTICAST_PING
603 #define LWIP_MULTICAST_PING 0
607 ---------------------------------
608 ---------- RAW options ----------
609 ---------------------------------
612 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
619 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
622 #define RAW_TTL (IP_DEFAULT_TTL)
626 ----------------------------------
627 ---------- DHCP options ----------
628 ----------------------------------
631 * LWIP_DHCP==1: Enable DHCP module.
638 * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
640 #ifndef DHCP_DOES_ARP_CHECK
641 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
645 ------------------------------------
646 ---------- AUTOIP options ----------
647 ------------------------------------
650 * LWIP_AUTOIP==1: Enable AUTOIP module.
653 #define LWIP_AUTOIP 0
657 * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
658 * the same interface at the same time.
660 #ifndef LWIP_DHCP_AUTOIP_COOP
661 #define LWIP_DHCP_AUTOIP_COOP 0
665 * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes
666 * that should be sent before falling back on AUTOIP. This can be set
667 * as low as 1 to get an AutoIP address very quickly, but you should
668 * be prepared to handle a changing IP address when DHCP overrides
671 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES
672 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9
676 ----------------------------------
677 ---------- SNMP options ----------
678 ----------------------------------
681 * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
689 * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will
690 * allow. At least one request buffer is required.
691 * Does not have to be changed unless external MIBs answer request asynchronously
693 #ifndef SNMP_CONCURRENT_REQUESTS
694 #define SNMP_CONCURRENT_REQUESTS 1
698 * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
699 * destination is required
701 #ifndef SNMP_TRAP_DESTINATIONS
702 #define SNMP_TRAP_DESTINATIONS 1
707 * When using a private MIB, you have to create a file 'private_mib.h' that contains
708 * a 'struct mib_array_node mib_private' which contains your MIB.
710 #ifndef SNMP_PRIVATE_MIB
711 #define SNMP_PRIVATE_MIB 0
715 * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not
716 * a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
717 * Unsafe requests are disabled by default!
719 #ifndef SNMP_SAFE_REQUESTS
720 #define SNMP_SAFE_REQUESTS 1
724 * The maximum length of strings used. This affects the size of
725 * MEMP_SNMP_VALUE elements.
727 #ifndef SNMP_MAX_OCTET_STRING_LEN
728 #define SNMP_MAX_OCTET_STRING_LEN 127
732 * The maximum depth of the SNMP tree.
733 * With private MIBs enabled, this depends on your MIB!
734 * This affects the size of MEMP_SNMP_VALUE elements.
736 #ifndef SNMP_MAX_TREE_DEPTH
737 #define SNMP_MAX_TREE_DEPTH 15
741 * The size of the MEMP_SNMP_VALUE elements, normally calculated from
742 * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH.
744 #ifndef SNMP_MAX_VALUE_SIZE
745 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH))
749 ----------------------------------
750 ---------- IGMP options ----------
751 ----------------------------------
754 * LWIP_IGMP==1: Turn on IGMP module.
761 ----------------------------------
762 ---------- DNS options -----------
763 ----------------------------------
766 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
773 /** DNS maximum number of entries to maintain locally. */
774 #ifndef DNS_TABLE_SIZE
775 #define DNS_TABLE_SIZE 4
778 /** DNS maximum host name length supported in the name table. */
779 #ifndef DNS_MAX_NAME_LENGTH
780 #define DNS_MAX_NAME_LENGTH 256
783 /** The maximum of DNS servers */
784 #ifndef DNS_MAX_SERVERS
785 #define DNS_MAX_SERVERS 2
788 /** DNS do a name checking between the query and the response. */
789 #ifndef DNS_DOES_NAME_CHECK
790 #define DNS_DOES_NAME_CHECK 1
793 /** DNS message max. size. Default value is RFC compliant. */
795 #define DNS_MSG_SIZE 512
798 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled,
800 * #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}}
801 * (an array of structs name/address, where address is an u32_t in network
804 * Instead, you can also use an external function:
805 * #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name)
806 * that returns the IP address or INADDR_NONE if not found.
808 #ifndef DNS_LOCAL_HOSTLIST
809 #define DNS_LOCAL_HOSTLIST 0
810 #endif /* DNS_LOCAL_HOSTLIST */
812 /** If this is turned on, the local host-list can be dynamically changed
814 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
815 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
816 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
819 ---------------------------------
820 ---------- UDP options ----------
821 ---------------------------------
824 * LWIP_UDP==1: Turn on UDP.
831 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
834 #define LWIP_UDPLITE 0
838 * UDP_TTL: Default Time-To-Live value.
841 #define UDP_TTL (IP_DEFAULT_TTL)
845 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf.
847 #ifndef LWIP_NETBUF_RECVINFO
848 #define LWIP_NETBUF_RECVINFO 0
852 ---------------------------------
853 ---------- TCP options ----------
854 ---------------------------------
857 * LWIP_TCP==1: Turn on TCP.
864 * TCP_TTL: Default Time-To-Live value.
867 #define TCP_TTL (IP_DEFAULT_TTL)
871 * TCP_WND: The size of a TCP window. This must be at least
872 * (2 * TCP_MSS) for things to work well
875 #define TCP_WND (4 * TCP_MSS)
879 * TCP_MAXRTX: Maximum number of retransmissions of data segments.
882 #define TCP_MAXRTX 12
886 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
888 #ifndef TCP_SYNMAXRTX
889 #define TCP_SYNMAXRTX 6
893 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
894 * Define to 0 if your device is low on memory.
896 #ifndef TCP_QUEUE_OOSEQ
897 #define TCP_QUEUE_OOSEQ (LWIP_TCP)
901 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
902 * you might want to increase this.)
903 * For the receive side, this MSS is advertised to the remote side
904 * when opening a connection. For the transmit size, this MSS sets
905 * an upper limit on the MSS advertised by the remote host.
912 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really
913 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which
914 * reflects the available reassembly buffer size at the remote host) and the
915 * largest size permitted by the IP layer" (RFC 1122)
916 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the
917 * netif used for a connection and limits the MSS if it would be too big otherwise.
919 #ifndef TCP_CALCULATE_EFF_SEND_MSS
920 #define TCP_CALCULATE_EFF_SEND_MSS 1
925 * TCP_SND_BUF: TCP sender buffer space (bytes).
928 #define TCP_SND_BUF 256
932 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
933 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
935 #ifndef TCP_SND_QUEUELEN
936 #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS))
940 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than
941 * TCP_SND_BUF. It is the amount of space which must be available in the
942 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
945 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2)
949 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be grater
950 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below
951 * this number, select returns writable (combined with TCP_SNDLOWAT).
953 #ifndef TCP_SNDQUEUELOWAT
954 #define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2)
958 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
960 #ifndef TCP_LISTEN_BACKLOG
961 #define TCP_LISTEN_BACKLOG 0
965 * The maximum allowed backlog for TCP listen netconns.
966 * This backlog is used unless another is explicitly specified.
967 * 0xff is the maximum (u8_t).
969 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
970 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff
974 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may
975 * allocate ahead of time in an attempt to create shorter pbuf chains
976 * for transmission. The meaningful range is 0 to TCP_MSS. Some
977 * suggested values are:
979 * 0: Disable oversized allocation. Each tcp_write() allocates a new
980 pbuf (old behaviour).
981 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your
982 * scatter-gather DMA requires aligned fragments.
983 * 128: Limit the pbuf/memory overhead to 20%.
984 * TCP_MSS: Try to create unfragmented TCP packets.
985 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
988 #define TCP_OVERSIZE TCP_MSS
992 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option.
994 #ifndef LWIP_TCP_TIMESTAMPS
995 #define LWIP_TCP_TIMESTAMPS 0
999 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an
1000 * explicit window update
1002 #ifndef TCP_WND_UPDATE_THRESHOLD
1003 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4)
1007 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
1008 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
1009 * events (accept, sent, etc) that happen in the system.
1010 * LWIP_CALLBACK_API==1: The PCB callback function is called directly
1013 #ifndef LWIP_EVENT_API
1014 #define LWIP_EVENT_API 0
1015 #define LWIP_CALLBACK_API 1
1017 #define LWIP_EVENT_API 1
1018 #define LWIP_CALLBACK_API 0
1023 ----------------------------------
1024 ---------- Pbuf options ----------
1025 ----------------------------------
1028 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
1029 * link level header. The default is 14, the standard value for
1032 #ifndef PBUF_LINK_HLEN
1033 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
1037 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
1038 * designed to accomodate single full size TCP frame in one pbuf, including
1039 * TCP_MSS, IP header, and link header.
1041 #ifndef PBUF_POOL_BUFSIZE
1042 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
1046 ------------------------------------------------
1047 ---------- Network Interfaces options ----------
1048 ------------------------------------------------
1051 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
1054 #ifndef LWIP_NETIF_HOSTNAME
1055 #define LWIP_NETIF_HOSTNAME 0
1059 * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
1061 #ifndef LWIP_NETIF_API
1062 #define LWIP_NETIF_API 0
1066 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
1067 * changes its up/down status (i.e., due to DHCP IP acquistion)
1069 #ifndef LWIP_NETIF_STATUS_CALLBACK
1070 #define LWIP_NETIF_STATUS_CALLBACK 0
1074 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
1075 * whenever the link changes (i.e., link down)
1077 #ifndef LWIP_NETIF_LINK_CALLBACK
1078 #define LWIP_NETIF_LINK_CALLBACK 0
1082 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table
1083 * indices) in struct netif. TCP and UDP can make use of this to prevent
1084 * scanning the ARP table for every sent packet. While this is faster for big
1085 * ARP tables or many concurrent connections, it might be counterproductive
1086 * if you have a tiny ARP table or if there never are concurrent connections.
1088 #ifndef LWIP_NETIF_HWADDRHINT
1089 #define LWIP_NETIF_HWADDRHINT 0
1093 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
1094 * address equal to the netif IP address, looping them back up the stack.
1096 #ifndef LWIP_NETIF_LOOPBACK
1097 #define LWIP_NETIF_LOOPBACK 0
1101 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
1102 * sending for each netif (0 = disabled)
1104 #ifndef LWIP_LOOPBACK_MAX_PBUFS
1105 #define LWIP_LOOPBACK_MAX_PBUFS 0
1109 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in
1110 * the system, as netifs must change how they behave depending on this setting
1111 * for the LWIP_NETIF_LOOPBACK option to work.
1112 * Setting this is needed to avoid reentering non-reentrant functions like
1114 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a
1115 * multithreaded environment like tcpip.c. In this case, netif->input()
1116 * is called directly.
1117 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
1118 * The packets are put on a list and netif_poll() must be called in
1119 * the main application loop.
1121 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
1122 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
1126 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
1127 * to be sent into one single pbuf. This is for compatibility with DMA-enabled
1128 * MACs that do not support scatter-gather.
1129 * Beware that this might involve CPU-memcpy before transmitting that would not
1130 * be needed without this flag! Use this only if you need to!
1132 * @todo: TCP and IP-frag do not work with this, yet:
1134 #ifndef LWIP_NETIF_TX_SINGLE_PBUF
1135 #define LWIP_NETIF_TX_SINGLE_PBUF 0
1136 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
1139 ------------------------------------
1140 ---------- LOOPIF options ----------
1141 ------------------------------------
1144 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
1146 #ifndef LWIP_HAVE_LOOPIF
1147 #define LWIP_HAVE_LOOPIF 0
1151 ------------------------------------
1152 ---------- SLIPIF options ----------
1153 ------------------------------------
1156 * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c
1158 #ifndef LWIP_HAVE_SLIPIF
1159 #define LWIP_HAVE_SLIPIF 0
1163 ------------------------------------
1164 ---------- Thread options ----------
1165 ------------------------------------
1168 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
1170 #ifndef TCPIP_THREAD_NAME
1171 #define TCPIP_THREAD_NAME "tcpip_thread"
1175 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread.
1176 * The stack size value itself is platform-dependent, but is passed to
1177 * sys_thread_new() when the thread is created.
1179 #ifndef TCPIP_THREAD_STACKSIZE
1180 #define TCPIP_THREAD_STACKSIZE 0
1184 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
1185 * The priority value itself is platform-dependent, but is passed to
1186 * sys_thread_new() when the thread is created.
1188 #ifndef TCPIP_THREAD_PRIO
1189 #define TCPIP_THREAD_PRIO 1
1193 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages
1194 * The queue size value itself is platform-dependent, but is passed to
1195 * sys_mbox_new() when tcpip_init is called.
1197 #ifndef TCPIP_MBOX_SIZE
1198 #define TCPIP_MBOX_SIZE 0
1202 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
1204 #ifndef SLIPIF_THREAD_NAME
1205 #define SLIPIF_THREAD_NAME "slipif_loop"
1209 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
1210 * The stack size value itself is platform-dependent, but is passed to
1211 * sys_thread_new() when the thread is created.
1213 #ifndef SLIPIF_THREAD_STACKSIZE
1214 #define SLIPIF_THREAD_STACKSIZE 0
1218 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
1219 * The priority value itself is platform-dependent, but is passed to
1220 * sys_thread_new() when the thread is created.
1222 #ifndef SLIPIF_THREAD_PRIO
1223 #define SLIPIF_THREAD_PRIO 1
1227 * PPP_THREAD_NAME: The name assigned to the pppInputThread.
1229 #ifndef PPP_THREAD_NAME
1230 #define PPP_THREAD_NAME "pppInputThread"
1234 * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread.
1235 * The stack size value itself is platform-dependent, but is passed to
1236 * sys_thread_new() when the thread is created.
1238 #ifndef PPP_THREAD_STACKSIZE
1239 #define PPP_THREAD_STACKSIZE 0
1243 * PPP_THREAD_PRIO: The priority assigned to the pppInputThread.
1244 * The priority value itself is platform-dependent, but is passed to
1245 * sys_thread_new() when the thread is created.
1247 #ifndef PPP_THREAD_PRIO
1248 #define PPP_THREAD_PRIO 1
1252 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
1254 #ifndef DEFAULT_THREAD_NAME
1255 #define DEFAULT_THREAD_NAME "lwIP"
1259 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
1260 * The stack size value itself is platform-dependent, but is passed to
1261 * sys_thread_new() when the thread is created.
1263 #ifndef DEFAULT_THREAD_STACKSIZE
1264 #define DEFAULT_THREAD_STACKSIZE 0
1268 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
1269 * The priority value itself is platform-dependent, but is passed to
1270 * sys_thread_new() when the thread is created.
1272 #ifndef DEFAULT_THREAD_PRIO
1273 #define DEFAULT_THREAD_PRIO 1
1277 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1278 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed
1279 * to sys_mbox_new() when the recvmbox is created.
1281 #ifndef DEFAULT_RAW_RECVMBOX_SIZE
1282 #define DEFAULT_RAW_RECVMBOX_SIZE 0
1286 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1287 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed
1288 * to sys_mbox_new() when the recvmbox is created.
1290 #ifndef DEFAULT_UDP_RECVMBOX_SIZE
1291 #define DEFAULT_UDP_RECVMBOX_SIZE 0
1295 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1296 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed
1297 * to sys_mbox_new() when the recvmbox is created.
1299 #ifndef DEFAULT_TCP_RECVMBOX_SIZE
1300 #define DEFAULT_TCP_RECVMBOX_SIZE 0
1304 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections.
1305 * The queue size value itself is platform-dependent, but is passed to
1306 * sys_mbox_new() when the acceptmbox is created.
1308 #ifndef DEFAULT_ACCEPTMBOX_SIZE
1309 #define DEFAULT_ACCEPTMBOX_SIZE 0
1313 ----------------------------------------------
1314 ---------- Sequential layer options ----------
1315 ----------------------------------------------
1318 * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
1319 * Don't use it if you're not an active lwIP project member
1321 #ifndef LWIP_TCPIP_CORE_LOCKING
1322 #define LWIP_TCPIP_CORE_LOCKING 0
1326 * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!)
1327 * Don't use it if you're not an active lwIP project member
1329 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
1330 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
1334 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
1336 #ifndef LWIP_NETCONN
1337 #define LWIP_NETCONN 1
1340 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create
1341 * timers running in tcpip_thread from another thread.
1343 #ifndef LWIP_TCPIP_TIMEOUT
1344 #define LWIP_TCPIP_TIMEOUT 1
1348 ------------------------------------
1349 ---------- Socket options ----------
1350 ------------------------------------
1353 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
1356 #define LWIP_SOCKET 1
1360 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
1361 * (only used if you use sockets.c)
1363 #ifndef LWIP_COMPAT_SOCKETS
1364 #define LWIP_COMPAT_SOCKETS 1
1368 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
1369 * Disable this option if you use a POSIX operating system that uses the same
1370 * names (read, write & close). (only used if you use sockets.c)
1372 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
1373 #define LWIP_POSIX_SOCKETS_IO_NAMES 1
1377 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
1378 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
1379 * in seconds. (does not require sockets.c, and will affect tcp.c)
1381 #ifndef LWIP_TCP_KEEPALIVE
1382 #define LWIP_TCP_KEEPALIVE 0
1386 * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing.
1388 #ifndef LWIP_SO_RCVTIMEO
1389 #define LWIP_SO_RCVTIMEO 0
1393 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
1395 #ifndef LWIP_SO_RCVBUF
1396 #define LWIP_SO_RCVBUF 0
1400 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
1402 #ifndef RECV_BUFSIZE_DEFAULT
1403 #define RECV_BUFSIZE_DEFAULT INT_MAX
1407 * SO_REUSE==1: Enable SO_REUSEADDR option.
1414 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets
1415 * to all local matches if SO_REUSEADDR is turned on.
1416 * WARNING: Adds a memcpy for every packet if passing to more than one pcb!
1418 #ifndef SO_REUSE_RXTOALL
1419 #define SO_REUSE_RXTOALL 0
1423 ----------------------------------------
1424 ---------- Statistics options ----------
1425 ----------------------------------------
1428 * LWIP_STATS==1: Enable statistics collection in lwip_stats.
1431 #define LWIP_STATS 1
1437 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
1439 #ifndef LWIP_STATS_DISPLAY
1440 #define LWIP_STATS_DISPLAY 0
1444 * LINK_STATS==1: Enable link stats.
1447 #define LINK_STATS 1
1451 * ETHARP_STATS==1: Enable etharp stats.
1453 #ifndef ETHARP_STATS
1454 #define ETHARP_STATS (LWIP_ARP)
1458 * IP_STATS==1: Enable IP stats.
1465 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
1466 * on if using either frag or reass.
1468 #ifndef IPFRAG_STATS
1469 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
1473 * ICMP_STATS==1: Enable ICMP stats.
1476 #define ICMP_STATS 1
1480 * IGMP_STATS==1: Enable IGMP stats.
1483 #define IGMP_STATS (LWIP_IGMP)
1487 * UDP_STATS==1: Enable UDP stats. Default is on if
1488 * UDP enabled, otherwise off.
1491 #define UDP_STATS (LWIP_UDP)
1495 * TCP_STATS==1: Enable TCP stats. Default is on if TCP
1496 * enabled, otherwise off.
1499 #define TCP_STATS (LWIP_TCP)
1503 * MEM_STATS==1: Enable mem.c stats.
1506 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
1510 * MEMP_STATS==1: Enable memp.c pool stats.
1513 #define MEMP_STATS (MEMP_MEM_MALLOC == 0)
1517 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
1520 #define SYS_STATS (NO_SYS == 0)
1525 #define LINK_STATS 0
1527 #define IPFRAG_STATS 0
1528 #define ICMP_STATS 0
1529 #define IGMP_STATS 0
1533 #define MEMP_STATS 0
1535 #define LWIP_STATS_DISPLAY 0
1537 #endif /* LWIP_STATS */
1540 ---------------------------------
1541 ---------- PPP options ----------
1542 ---------------------------------
1545 * PPP_SUPPORT==1: Enable PPP.
1548 #define PPP_SUPPORT 0
1552 * PPPOE_SUPPORT==1: Enable PPP Over Ethernet
1554 #ifndef PPPOE_SUPPORT
1555 #define PPPOE_SUPPORT 0
1559 * PPPOS_SUPPORT==1: Enable PPP Over Serial
1561 #ifndef PPPOS_SUPPORT
1562 #define PPPOS_SUPPORT PPP_SUPPORT
1568 * NUM_PPP: Max PPP sessions.
1575 * PAP_SUPPORT==1: Support PAP.
1578 #define PAP_SUPPORT 0
1582 * CHAP_SUPPORT==1: Support CHAP.
1584 #ifndef CHAP_SUPPORT
1585 #define CHAP_SUPPORT 0
1589 * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1591 #ifndef MSCHAP_SUPPORT
1592 #define MSCHAP_SUPPORT 0
1596 * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1598 #ifndef CBCP_SUPPORT
1599 #define CBCP_SUPPORT 0
1603 * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1606 #define CCP_SUPPORT 0
1610 * VJ_SUPPORT==1: Support VJ header compression.
1613 #define VJ_SUPPORT 0
1617 * MD5_SUPPORT==1: Support MD5 (see also CHAP).
1620 #define MD5_SUPPORT 0
1626 #ifndef FSM_DEFTIMEOUT
1627 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
1630 #ifndef FSM_DEFMAXTERMREQS
1631 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
1634 #ifndef FSM_DEFMAXCONFREQS
1635 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
1638 #ifndef FSM_DEFMAXNAKLOOPS
1639 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
1642 #ifndef UPAP_DEFTIMEOUT
1643 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
1646 #ifndef UPAP_DEFREQTIME
1647 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
1650 #ifndef CHAP_DEFTIMEOUT
1651 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
1654 #ifndef CHAP_DEFTRANSMITS
1655 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
1658 /* Interval in seconds between keepalive echo requests, 0 to disable. */
1659 #ifndef LCP_ECHOINTERVAL
1660 #define LCP_ECHOINTERVAL 0
1663 /* Number of unanswered echo requests before failure. */
1664 #ifndef LCP_MAXECHOFAILS
1665 #define LCP_MAXECHOFAILS 3
1668 /* Max Xmit idle time (in jiffies) before resend flag char. */
1669 #ifndef PPP_MAXIDLEFLAG
1670 #define PPP_MAXIDLEFLAG 100
1676 * Note - lcp shouldn't be allowed to negotiate stuff outside these
1677 * limits. See lcp.h in the pppd directory.
1678 * (XXX - these constants should simply be shared by lcp.c instead
1679 * of living in lcp.h)
1681 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
1683 /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */
1684 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
1686 #define PPP_MINMTU 64
1687 #define PPP_MRU 1500 /* default MRU = max length of info field */
1688 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
1690 #define PPP_DEFMRU 296 /* Try for this */
1692 #define PPP_MINMRU 128 /* No MRUs below this */
1695 #define MAXNAMELEN 256 /* max length of hostname or name for auth */
1697 #ifndef MAXSECRETLEN
1698 #define MAXSECRETLEN 256 /* max length of password or secret */
1701 #endif /* PPP_SUPPORT */
1704 --------------------------------------
1705 ---------- Checksum options ----------
1706 --------------------------------------
1709 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
1711 #ifndef CHECKSUM_GEN_IP
1712 #define CHECKSUM_GEN_IP 1
1716 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
1718 #ifndef CHECKSUM_GEN_UDP
1719 #define CHECKSUM_GEN_UDP 1
1723 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
1725 #ifndef CHECKSUM_GEN_TCP
1726 #define CHECKSUM_GEN_TCP 1
1730 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
1732 #ifndef CHECKSUM_CHECK_IP
1733 #define CHECKSUM_CHECK_IP 1
1737 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
1739 #ifndef CHECKSUM_CHECK_UDP
1740 #define CHECKSUM_CHECK_UDP 1
1744 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
1746 #ifndef CHECKSUM_CHECK_TCP
1747 #define CHECKSUM_CHECK_TCP 1
1751 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from
1752 * application buffers to pbufs.
1754 #ifndef LWIP_CHECKSUM_ON_COPY
1755 #define LWIP_CHECKSUM_ON_COPY 0
1759 ---------------------------------------
1760 ---------- Debugging options ----------
1761 ---------------------------------------
1764 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
1765 * compared against this value. If it is smaller, then debugging
1766 * messages are written.
1768 #ifndef LWIP_DBG_MIN_LEVEL
1769 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
1773 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
1774 * debug messages of certain types.
1776 #ifndef LWIP_DBG_TYPES_ON
1777 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
1781 * ETHARP_DEBUG: Enable debugging in etharp.c.
1783 #ifndef ETHARP_DEBUG
1784 #define ETHARP_DEBUG LWIP_DBG_OFF
1788 * NETIF_DEBUG: Enable debugging in netif.c.
1791 #define NETIF_DEBUG LWIP_DBG_OFF
1795 * PBUF_DEBUG: Enable debugging in pbuf.c.
1798 #define PBUF_DEBUG LWIP_DBG_OFF
1802 * API_LIB_DEBUG: Enable debugging in api_lib.c.
1804 #ifndef API_LIB_DEBUG
1805 #define API_LIB_DEBUG LWIP_DBG_OFF
1809 * API_MSG_DEBUG: Enable debugging in api_msg.c.
1811 #ifndef API_MSG_DEBUG
1812 #define API_MSG_DEBUG LWIP_DBG_OFF
1816 * SOCKETS_DEBUG: Enable debugging in sockets.c.
1818 #ifndef SOCKETS_DEBUG
1819 #define SOCKETS_DEBUG LWIP_DBG_OFF
1823 * ICMP_DEBUG: Enable debugging in icmp.c.
1826 #define ICMP_DEBUG LWIP_DBG_OFF
1830 * IGMP_DEBUG: Enable debugging in igmp.c.
1833 #define IGMP_DEBUG LWIP_DBG_OFF
1837 * INET_DEBUG: Enable debugging in inet.c.
1840 #define INET_DEBUG LWIP_DBG_OFF
1844 * IP_DEBUG: Enable debugging for IP.
1847 #define IP_DEBUG LWIP_DBG_OFF
1851 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
1853 #ifndef IP_REASS_DEBUG
1854 #define IP_REASS_DEBUG LWIP_DBG_OFF
1858 * RAW_DEBUG: Enable debugging in raw.c.
1861 #define RAW_DEBUG LWIP_DBG_OFF
1865 * MEM_DEBUG: Enable debugging in mem.c.
1868 #define MEM_DEBUG LWIP_DBG_OFF
1872 * MEMP_DEBUG: Enable debugging in memp.c.
1875 #define MEMP_DEBUG LWIP_DBG_OFF
1879 * SYS_DEBUG: Enable debugging in sys.c.
1882 #define SYS_DEBUG LWIP_DBG_OFF
1886 * TIMERS_DEBUG: Enable debugging in timers.c.
1888 #ifndef TIMERS_DEBUG
1889 #define TIMERS_DEBUG LWIP_DBG_OFF
1893 * TCP_DEBUG: Enable debugging for TCP.
1896 #define TCP_DEBUG LWIP_DBG_OFF
1900 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
1902 #ifndef TCP_INPUT_DEBUG
1903 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
1907 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
1909 #ifndef TCP_FR_DEBUG
1910 #define TCP_FR_DEBUG LWIP_DBG_OFF
1914 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
1917 #ifndef TCP_RTO_DEBUG
1918 #define TCP_RTO_DEBUG LWIP_DBG_OFF
1922 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
1924 #ifndef TCP_CWND_DEBUG
1925 #define TCP_CWND_DEBUG LWIP_DBG_OFF
1929 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
1931 #ifndef TCP_WND_DEBUG
1932 #define TCP_WND_DEBUG LWIP_DBG_OFF
1936 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
1938 #ifndef TCP_OUTPUT_DEBUG
1939 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
1943 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
1945 #ifndef TCP_RST_DEBUG
1946 #define TCP_RST_DEBUG LWIP_DBG_OFF
1950 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
1952 #ifndef TCP_QLEN_DEBUG
1953 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
1957 * UDP_DEBUG: Enable debugging in UDP.
1960 #define UDP_DEBUG LWIP_DBG_OFF
1964 * TCPIP_DEBUG: Enable debugging in tcpip.c.
1967 #define TCPIP_DEBUG LWIP_DBG_OFF
1971 * PPP_DEBUG: Enable debugging for PPP.
1974 #define PPP_DEBUG LWIP_DBG_OFF
1978 * SLIP_DEBUG: Enable debugging in slipif.c.
1981 #define SLIP_DEBUG LWIP_DBG_OFF
1985 * DHCP_DEBUG: Enable debugging in dhcp.c.
1988 #define DHCP_DEBUG LWIP_DBG_OFF
1992 * AUTOIP_DEBUG: Enable debugging in autoip.c.
1994 #ifndef AUTOIP_DEBUG
1995 #define AUTOIP_DEBUG LWIP_DBG_OFF
1999 * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
2001 #ifndef SNMP_MSG_DEBUG
2002 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
2006 * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
2008 #ifndef SNMP_MIB_DEBUG
2009 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
2013 * DNS_DEBUG: Enable debugging for DNS.
2016 #define DNS_DEBUG LWIP_DBG_OFF
2019 #endif /* __LWIP_OPT_H__ */