MeterLogger
opt.h
Go to the documentation of this file.
1 /**
2  * @file
3  *
4  * lwIP Options Configuration
5  */
6 
7 /*
8  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without modification,
12  * are permitted provided that the following conditions are met:
13  *
14  * 1. Redistributions of source code must retain the above copyright notice,
15  * this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  * 3. The name of the author may not be used to endorse or promote products
20  * derived from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31  * OF SUCH DAMAGE.
32  *
33  * This file is part of the lwIP TCP/IP stack.
34  *
35  * Author: Adam Dunkels <adam@sics.se>
36  *
37  */
38 #ifndef __LWIP_OPT_H__
39 #define __LWIP_OPT_H__
40 
41 /*
42  * Include user defined options first. Anything not defined in these files
43  * will be set to standard values. Override anything you dont like!
44  */
45 #include "lwipopts.h"
46 #include "lwip/debug.h"
47 
48 /*
49  -----------------------------------------------
50  ---------- Platform specific locking ----------
51  -----------------------------------------------
52 */
53 
54 /**
55  * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
56  * critical regions during buffer allocation, deallocation and memory
57  * allocation and deallocation.
58  */
59 #ifndef SYS_LIGHTWEIGHT_PROT
60 #define SYS_LIGHTWEIGHT_PROT 0
61 #endif
62 
63 /**
64  * NO_SYS==1: Provides VERY minimal functionality. Otherwise,
65  * use lwIP facilities.
66  */
67 #ifndef NO_SYS
68 #define NO_SYS 1
69 #endif
70 
71 /**
72  * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1
73  * Mainly for compatibility to old versions.
74  */
75 #ifndef NO_SYS_NO_TIMERS
76 #define NO_SYS_NO_TIMERS 1
77 #endif
78 
79 /**
80  * MEMCPY: override this if you have a faster implementation at hand than the
81  * one included in your C library
82  */
83 #ifndef MEMCPY
84 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
85 #endif
86 
87 /**
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.
90  */
91 #ifndef SMEMCPY
92 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
93 #endif
94 
95 /*
96  ------------------------------------
97  ---------- Memory options ----------
98  ------------------------------------
99 */
100 /**
101  * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
102  * instead of the lwip internal allocator. Can save code size if you
103  * already use it.
104  */
105 #ifndef MEM_LIBC_MALLOC
106 #define MEM_LIBC_MALLOC 0
107 #endif
108 
109 /**
110 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.
111 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution
112 * speed and usage from interrupts!
113 */
114 #ifndef MEMP_MEM_MALLOC
115 #define MEMP_MEM_MALLOC 0
116 #endif
117 
118 /**
119  * MEM_ALIGNMENT: should be set to the alignment of the CPU
120  * 4 byte alignment -> #define MEM_ALIGNMENT 4
121  * 2 byte alignment -> #define MEM_ALIGNMENT 2
122  */
123 #ifndef MEM_ALIGNMENT
124 #define MEM_ALIGNMENT 1
125 #endif
126 
127 /**
128  * MEM_SIZE: the size of the heap memory. If the application will send
129  * a lot of data that needs to be copied, this should be set high.
130  */
131 #ifndef MEM_SIZE
132 #define MEM_SIZE 1600
133 #endif
134 
135 /**
136  * MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array.
137  * This can be used to individually change the location of each pool.
138  * Default is one big array for all pools
139  */
140 #ifndef MEMP_SEPARATE_POOLS
141 #define MEMP_SEPARATE_POOLS 0
142 #endif
143 
144 /**
145  * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
146  * amount of bytes before and after each memp element in every pool and fills
147  * it with a prominent default value.
148  * MEMP_OVERFLOW_CHECK == 0 no checking
149  * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
150  * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
151  * memp_malloc() or memp_free() is called (useful but slow!)
152  */
153 #ifndef MEMP_OVERFLOW_CHECK
154 #define MEMP_OVERFLOW_CHECK 0
155 #endif
156 
157 /**
158  * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
159  * sure that there are no cycles in the linked lists.
160  */
161 #ifndef MEMP_SANITY_CHECK
162 #define MEMP_SANITY_CHECK 0
163 #endif
164 
165 /**
166  * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set
167  * of memory pools of various sizes. When mem_malloc is called, an element of
168  * the smallest pool that can provide the length needed is returned.
169  * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled.
170  */
171 #ifndef MEM_USE_POOLS
172 #define MEM_USE_POOLS 0
173 #endif
174 
175 /**
176  * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next
177  * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more
178  * reliable. */
179 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL
180 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0
181 #endif
182 
183 /**
184  * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h
185  * that defines additional pools beyond the "standard" ones required
186  * by lwIP. If you set this to 1, you must have lwippools.h in your
187  * inlude path somewhere.
188  */
189 #ifndef MEMP_USE_CUSTOM_POOLS
190 #define MEMP_USE_CUSTOM_POOLS 0
191 #endif
192 
193 /**
194  * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from
195  * interrupt context (or another context that doesn't allow waiting for a
196  * semaphore).
197  * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT,
198  * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs
199  * with each loop so that mem_free can run.
200  *
201  * ATTENTION: As you can see from the above description, this leads to dis-/
202  * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc
203  * can need longer.
204  *
205  * If you don't want that, at least for NO_SYS=0, you can still use the following
206  * functions to enqueue a deallocation call which then runs in the tcpip_thread
207  * context:
208  * - pbuf_free_callback(p);
209  * - mem_free_callback(m);
210  */
211 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
212 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
213 #endif
214 
215 /*
216  ------------------------------------------------
217  ---------- Internal Memory Pool Sizes ----------
218  ------------------------------------------------
219 */
220 /**
221  * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
222  * If the application sends a lot of data out of ROM (or other static memory),
223  * this should be set high.
224  */
225 #ifndef MEMP_NUM_PBUF
226 #define MEMP_NUM_PBUF 16
227 #endif
228 
229 /**
230  * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
231  * (requires the LWIP_RAW option)
232  */
233 #ifndef MEMP_NUM_RAW_PCB
234 #define MEMP_NUM_RAW_PCB 4
235 #endif
236 
237 /**
238  * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
239  * per active UDP "connection".
240  * (requires the LWIP_UDP option)
241  */
242 #ifndef MEMP_NUM_UDP_PCB
243 #define MEMP_NUM_UDP_PCB 4
244 #endif
245 
246 /**
247  * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
248  * (requires the LWIP_TCP option)
249  */
250 #ifndef MEMP_NUM_TCP_PCB
251 #define MEMP_NUM_TCP_PCB 5
252 #endif
253 
254 /**
255  * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
256  * (requires the LWIP_TCP option)
257  */
258 #ifndef MEMP_NUM_TCP_PCB_LISTEN
259 #define MEMP_NUM_TCP_PCB_LISTEN 8
260 #endif
261 
262 /**
263  * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
264  * (requires the LWIP_TCP option)
265  */
266 #ifndef MEMP_NUM_TCP_SEG
267 #define MEMP_NUM_TCP_SEG 16
268 #endif
269 
270 /**
271  * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for
272  * reassembly (whole packets, not fragments!)
273  */
274 #ifndef MEMP_NUM_REASSDATA
275 #define MEMP_NUM_REASSDATA 5
276 #endif
277 
278 /**
279  * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent
280  * (fragments, not whole packets!).
281  * This is only used with IP_FRAG_USES_STATIC_BUF==0 and
282  * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs
283  * where the packet is not yet sent when netif->output returns.
284  */
285 #ifndef MEMP_NUM_FRAG_PBUF
286 #define MEMP_NUM_FRAG_PBUF 15
287 #endif
288 
289 /**
290  * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
291  * packets (pbufs) that are waiting for an ARP request (to resolve
292  * their destination address) to finish.
293  * (requires the ARP_QUEUEING option)
294  */
295 #ifndef MEMP_NUM_ARP_QUEUE
296 #define MEMP_NUM_ARP_QUEUE 30
297 #endif
298 
299 /**
300  * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces
301  * can be members et the same time (one per netif - allsystems group -, plus one
302  * per netif membership).
303  * (requires the LWIP_IGMP option)
304  */
305 #ifndef MEMP_NUM_IGMP_GROUP
306 #define MEMP_NUM_IGMP_GROUP 8
307 #endif
308 
309 /**
310  * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
311  * (requires NO_SYS==0)
312  */
313 #ifndef MEMP_NUM_SYS_TIMEOUT
314 #define MEMP_NUM_SYS_TIMEOUT 3
315 #endif
316 
317 /**
318  * MEMP_NUM_NETBUF: the number of struct netbufs.
319  * (only needed if you use the sequential API, like api_lib.c)
320  */
321 #ifndef MEMP_NUM_NETBUF
322 #define MEMP_NUM_NETBUF 2
323 #endif
324 
325 /**
326  * MEMP_NUM_NETCONN: the number of struct netconns.
327  * (only needed if you use the sequential API, like api_lib.c)
328  */
329 #ifndef MEMP_NUM_NETCONN
330 #define MEMP_NUM_NETCONN 4
331 #endif
332 
333 /**
334  * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
335  * for callback/timeout API communication.
336  * (only needed if you use tcpip.c)
337  */
338 #ifndef MEMP_NUM_TCPIP_MSG_API
339 #define MEMP_NUM_TCPIP_MSG_API 8
340 #endif
341 
342 /**
343  * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
344  * for incoming packets.
345  * (only needed if you use tcpip.c)
346  */
347 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
348 #define MEMP_NUM_TCPIP_MSG_INPKT 8
349 #endif
350 
351 /**
352  * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree.
353  */
354 #ifndef MEMP_NUM_SNMP_NODE
355 #define MEMP_NUM_SNMP_NODE 50
356 #endif
357 
358 /**
359  * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree.
360  * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least!
361  */
362 #ifndef MEMP_NUM_SNMP_ROOTNODE
363 #define MEMP_NUM_SNMP_ROOTNODE 30
364 #endif
365 
366 /**
367  * MEMP_NUM_SNMP_VARBIND: the number of concurrent requests (does not have to
368  * be changed normally) - 2 of these are used per request (1 for input,
369  * 1 for output)
370  */
371 #ifndef MEMP_NUM_SNMP_VARBIND
372 #define MEMP_NUM_SNMP_VARBIND 2
373 #endif
374 
375 /**
376  * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used
377  * (does not have to be changed normally) - 3 of these are used per request
378  * (1 for the value read and 2 for OIDs - input and output)
379  */
380 #ifndef MEMP_NUM_SNMP_VALUE
381 #define MEMP_NUM_SNMP_VALUE 3
382 #endif
383 
384 /**
385  * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls
386  * (before freeing the corresponding memory using lwip_freeaddrinfo()).
387  */
388 #ifndef MEMP_NUM_NETDB
389 #define MEMP_NUM_NETDB 1
390 #endif
391 
392 /**
393  * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list
394  * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.
395  */
396 #ifndef MEMP_NUM_LOCALHOSTLIST
397 #define MEMP_NUM_LOCALHOSTLIST 1
398 #endif
399 
400 /**
401  * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE
402  * interfaces (only used with PPPOE_SUPPORT==1)
403  */
404 #ifndef MEMP_NUM_PPPOE_INTERFACES
405 #define MEMP_NUM_PPPOE_INTERFACES 1
406 #endif
407 
408 /**
409  * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
410  */
411 #ifndef PBUF_POOL_SIZE
412 #define PBUF_POOL_SIZE 16
413 #endif
414 
415 /*
416  ---------------------------------
417  ---------- ARP options ----------
418  ---------------------------------
419 */
420 /**
421  * LWIP_ARP==1: Enable ARP functionality.
422  */
423 #ifndef LWIP_ARP
424 #define LWIP_ARP 1
425 #endif
426 
427 /**
428  * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
429  */
430 #ifndef ARP_TABLE_SIZE
431 #define ARP_TABLE_SIZE 10
432 #endif
433 
434 /**
435  * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address
436  * resolution. By default, only the most recent packet is queued per IP address.
437  * This is sufficient for most protocols and mainly reduces TCP connection
438  * startup time. Set this to 1 if you know your application sends more than one
439  * packet in a row to an IP address that is not in the ARP cache.
440  */
441 #ifndef ARP_QUEUEING
442 #define ARP_QUEUEING 0
443 #endif
444 
445 /**
446  * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
447  * updated with the source MAC and IP addresses supplied in the packet.
448  * You may want to disable this if you do not trust LAN peers to have the
449  * correct addresses, or as a limited approach to attempt to handle
450  * spoofing. If disabled, lwIP will need to make a new ARP request if
451  * the peer is not already in the ARP table, adding a little latency.
452  * The peer *is* in the ARP table if it requested our address before.
453  * Also notice that this slows down input processing of every IP packet!
454  */
455 #ifndef ETHARP_TRUST_IP_MAC
456 #define ETHARP_TRUST_IP_MAC 0
457 #endif
458 
459 /**
460  * ETHARP_SUPPORT_VLAN==1: support receiving ethernet packets with VLAN header.
461  * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check.
462  * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
463  * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted.
464  */
465 #ifndef ETHARP_SUPPORT_VLAN
466 #define ETHARP_SUPPORT_VLAN 0
467 #endif
468 
469 /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP
470  * might be disabled
471  */
472 #ifndef LWIP_ETHERNET
473 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT)
474 #endif
475 
476 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure
477  * alignment of payload after that header. Since the header is 14 bytes long,
478  * without this padding e.g. addresses in the IP header will not be aligned
479  * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
480  */
481 #ifndef ETH_PAD_SIZE
482 #define ETH_PAD_SIZE 0
483 #endif
484 
485 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table
486  * entries (using etharp_add_static_entry/etharp_remove_static_entry).
487  */
488 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES
489 #define ETHARP_SUPPORT_STATIC_ENTRIES 0
490 #endif
491 
492 
493 /*
494  --------------------------------
495  ---------- IP options ----------
496  --------------------------------
497 */
498 /**
499  * IP_FORWARD==1: Enables the ability to forward IP packets across network
500  * interfaces. If you are going to run lwIP on a device with only one network
501  * interface, define this to 0.
502  */
503 #ifndef IP_FORWARD
504 #define IP_FORWARD 1
505 #endif
506 
507 #ifndef IP_NAPT
508 #define IP_NAPT 1
509 #endif
510 
511 /**
512  * IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
513  * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
514  * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
515  */
516 #ifndef IP_OPTIONS_ALLOWED
517 #define IP_OPTIONS_ALLOWED 1
518 #endif
519 
520 /**
521  * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
522  * this option does not affect outgoing packet sizes, which can be controlled
523  * via IP_FRAG.
524  */
525 #ifndef IP_REASSEMBLY
526 #define IP_REASSEMBLY 0
527 #endif
528 
529 /**
530  * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
531  * that this option does not affect incoming packet sizes, which can be
532  * controlled via IP_REASSEMBLY.
533  */
534 #ifndef IP_FRAG
535 #define IP_FRAG 1
536 #endif
537 
538 /**
539  * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
540  * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
541  * in this time, the whole packet is discarded.
542  */
543 #ifndef IP_REASS_MAXAGE
544 #define IP_REASS_MAXAGE 3
545 #endif
546 
547 /**
548  * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
549  * Since the received pbufs are enqueued, be sure to configure
550  * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
551  * packets even if the maximum amount of fragments is enqueued for reassembly!
552  */
553 #ifndef IP_REASS_MAX_PBUFS
554 #define IP_REASS_MAX_PBUFS 10
555 #endif
556 
557 /**
558  * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
559  * fragmentation. Otherwise pbufs are allocated and reference the original
560  * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1,
561  * new PBUF_RAM pbufs are used for fragments).
562  * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs!
563  */
564 #ifndef IP_FRAG_USES_STATIC_BUF
565 #define IP_FRAG_USES_STATIC_BUF 0
566 #endif
567 
568 /**
569  * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer
570  * (requires IP_FRAG_USES_STATIC_BUF==1)
571  */
572 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
573 #define IP_FRAG_MAX_MTU 1500
574 #endif
575 
576 /**
577  * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
578  */
579 #ifndef IP_DEFAULT_TTL
580 #define IP_DEFAULT_TTL 255
581 #endif
582 
583 /**
584  * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast
585  * filter per pcb on udp and raw send operations. To enable broadcast filter
586  * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1.
587  */
588 #ifndef IP_SOF_BROADCAST
589 #define IP_SOF_BROADCAST 0
590 #endif
591 
592 /**
593  * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
594  * filter on recv operations.
595  */
596 #ifndef IP_SOF_BROADCAST_RECV
597 #define IP_SOF_BROADCAST_RECV 0
598 #endif
599 
600 /*
601  ----------------------------------
602  ---------- ICMP options ----------
603  ----------------------------------
604 */
605 /**
606  * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
607  * Be careful, disable that make your product non-compliant to RFC1122
608  */
609 #ifndef LWIP_ICMP
610 #define LWIP_ICMP 1
611 #endif
612 
613 /**
614  * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
615  */
616 #ifndef ICMP_TTL
617 #define ICMP_TTL (IP_DEFAULT_TTL)
618 #endif
619 
620 /**
621  * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
622  */
623 #ifndef LWIP_BROADCAST_PING
624 #define LWIP_BROADCAST_PING 0
625 #endif
626 
627 /**
628  * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only)
629  */
630 #ifndef LWIP_MULTICAST_PING
631 #define LWIP_MULTICAST_PING 0
632 #endif
633 
634 /*
635  ---------------------------------
636  ---------- RAW options ----------
637  ---------------------------------
638 */
639 /**
640  * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
641  */
642 #ifndef LWIP_RAW
643 #define LWIP_RAW 1
644 #endif
645 
646 /**
647  * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
648  */
649 #ifndef RAW_TTL
650 #define RAW_TTL (IP_DEFAULT_TTL)
651 #endif
652 
653 /*
654  ----------------------------------
655  ---------- DHCP options ----------
656  ----------------------------------
657 */
658 /**
659  * LWIP_DHCP==1: Enable DHCP module.
660  */
661 #ifndef LWIP_DHCP
662 #define LWIP_DHCP 0
663 #endif
664 
665 /**
666  * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
667  */
668 #ifndef DHCP_DOES_ARP_CHECK
669 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
670 #endif
671 
672 /*
673  ------------------------------------
674  ---------- AUTOIP options ----------
675  ------------------------------------
676 */
677 /**
678  * LWIP_AUTOIP==1: Enable AUTOIP module.
679  */
680 #ifndef LWIP_AUTOIP
681 #define LWIP_AUTOIP 0
682 #endif
683 
684 /**
685  * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
686  * the same interface at the same time.
687  */
688 #ifndef LWIP_DHCP_AUTOIP_COOP
689 #define LWIP_DHCP_AUTOIP_COOP 0
690 #endif
691 
692 /**
693  * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes
694  * that should be sent before falling back on AUTOIP. This can be set
695  * as low as 1 to get an AutoIP address very quickly, but you should
696  * be prepared to handle a changing IP address when DHCP overrides
697  * AutoIP.
698  */
699 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES
700 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9
701 #endif
702 
703 /*
704  ----------------------------------
705  ---------- SNMP options ----------
706  ----------------------------------
707 */
708 /**
709  * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
710  * transport.
711  */
712 #ifndef LWIP_SNMP
713 #define LWIP_SNMP 0
714 #endif
715 
716 /**
717  * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will
718  * allow. At least one request buffer is required.
719  * Does not have to be changed unless external MIBs answer request asynchronously
720  */
721 #ifndef SNMP_CONCURRENT_REQUESTS
722 #define SNMP_CONCURRENT_REQUESTS 1
723 #endif
724 
725 /**
726  * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
727  * destination is required
728  */
729 #ifndef SNMP_TRAP_DESTINATIONS
730 #define SNMP_TRAP_DESTINATIONS 1
731 #endif
732 
733 /**
734  * SNMP_PRIVATE_MIB:
735  * When using a private MIB, you have to create a file 'private_mib.h' that contains
736  * a 'struct mib_array_node mib_private' which contains your MIB.
737  */
738 #ifndef SNMP_PRIVATE_MIB
739 #define SNMP_PRIVATE_MIB 0
740 #endif
741 
742 /**
743  * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not
744  * a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
745  * Unsafe requests are disabled by default!
746  */
747 #ifndef SNMP_SAFE_REQUESTS
748 #define SNMP_SAFE_REQUESTS 1
749 #endif
750 
751 /**
752  * The maximum length of strings used. This affects the size of
753  * MEMP_SNMP_VALUE elements.
754  */
755 #ifndef SNMP_MAX_OCTET_STRING_LEN
756 #define SNMP_MAX_OCTET_STRING_LEN 127
757 #endif
758 
759 /**
760  * The maximum depth of the SNMP tree.
761  * With private MIBs enabled, this depends on your MIB!
762  * This affects the size of MEMP_SNMP_VALUE elements.
763  */
764 #ifndef SNMP_MAX_TREE_DEPTH
765 #define SNMP_MAX_TREE_DEPTH 15
766 #endif
767 
768 /**
769  * The size of the MEMP_SNMP_VALUE elements, normally calculated from
770  * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH.
771  */
772 #ifndef SNMP_MAX_VALUE_SIZE
773 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH))
774 #endif
775 
776 /*
777  ----------------------------------
778  ---------- IGMP options ----------
779  ----------------------------------
780 */
781 /**
782  * LWIP_IGMP==1: Turn on IGMP module.
783  */
784 #ifndef LWIP_IGMP
785 #define LWIP_IGMP 0
786 #endif
787 
788 /*
789  ----------------------------------
790  ---------- DNS options -----------
791  ----------------------------------
792 */
793 /**
794  * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
795  * transport.
796  */
797 #ifndef LWIP_DNS
798 #define LWIP_DNS 0
799 #endif
800 
801 /** DNS maximum number of entries to maintain locally. */
802 #ifndef DNS_TABLE_SIZE
803 #define DNS_TABLE_SIZE 4
804 #endif
805 
806 /** DNS maximum host name length supported in the name table. */
807 #ifndef DNS_MAX_NAME_LENGTH
808 #define DNS_MAX_NAME_LENGTH 256
809 #endif
810 
811 /** The maximum of DNS servers */
812 #ifndef DNS_MAX_SERVERS
813 #define DNS_MAX_SERVERS 2
814 #endif
815 
816 /** DNS do a name checking between the query and the response. */
817 #ifndef DNS_DOES_NAME_CHECK
818 #define DNS_DOES_NAME_CHECK 1
819 #endif
820 
821 /** DNS message max. size. Default value is RFC compliant. */
822 #ifndef DNS_MSG_SIZE
823 #define DNS_MSG_SIZE 512
824 #endif
825 
826 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled,
827  * you have to define
828  * #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}}
829  * (an array of structs name/address, where address is an u32_t in network
830  * byte order).
831  *
832  * Instead, you can also use an external function:
833  * #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name)
834  * that returns the IP address or INADDR_NONE if not found.
835  */
836 #ifndef DNS_LOCAL_HOSTLIST
837 #define DNS_LOCAL_HOSTLIST 0
838 #endif /* DNS_LOCAL_HOSTLIST */
839 
840 /** If this is turned on, the local host-list can be dynamically changed
841  * at runtime. */
842 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
843 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
844 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
845 
846 /*
847  ---------------------------------
848  ---------- UDP options ----------
849  ---------------------------------
850 */
851 /**
852  * LWIP_UDP==1: Turn on UDP.
853  */
854 #ifndef LWIP_UDP
855 #define LWIP_UDP 1
856 #endif
857 
858 /**
859  * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
860  */
861 #ifndef LWIP_UDPLITE
862 #define LWIP_UDPLITE 0
863 #endif
864 
865 /**
866  * UDP_TTL: Default Time-To-Live value.
867  */
868 #ifndef UDP_TTL
869 #define UDP_TTL (IP_DEFAULT_TTL)
870 #endif
871 
872 /**
873  * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf.
874  */
875 #ifndef LWIP_NETBUF_RECVINFO
876 #define LWIP_NETBUF_RECVINFO 0
877 #endif
878 
879 /*
880  ---------------------------------
881  ---------- TCP options ----------
882  ---------------------------------
883 */
884 /**
885  * LWIP_TCP==1: Turn on TCP.
886  */
887 #ifndef LWIP_TCP
888 #define LWIP_TCP 1
889 #endif
890 
891 /**
892  * TCP_TTL: Default Time-To-Live value.
893  */
894 #ifndef TCP_TTL
895 #define TCP_TTL (IP_DEFAULT_TTL)
896 #endif
897 
898 /**
899  * TCP_WND: The size of a TCP window. This must be at least
900  * (2 * TCP_MSS) for things to work well
901  */
902 #ifndef TCP_WND
903 #define TCP_WND (4 * TCP_MSS)
904 #endif
905 
906 /**
907  * TCP_MAXRTX: Maximum number of retransmissions of data segments.
908  */
909 #ifndef TCP_MAXRTX
910 #define TCP_MAXRTX 12
911 #endif
912 
913 /**
914  * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
915  */
916 #ifndef TCP_SYNMAXRTX
917 #define TCP_SYNMAXRTX 6
918 #endif
919 
920 /**
921  * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
922  * Define to 0 if your device is low on memory.
923  */
924 #ifndef TCP_QUEUE_OOSEQ
925 #define TCP_QUEUE_OOSEQ (LWIP_TCP)
926 #endif
927 
928 /**
929  * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
930  * you might want to increase this.)
931  * For the receive side, this MSS is advertised to the remote side
932  * when opening a connection. For the transmit size, this MSS sets
933  * an upper limit on the MSS advertised by the remote host.
934  */
935 #ifndef TCP_MSS
936 #define TCP_MSS 536
937 #endif
938 
939 /**
940  * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really
941  * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which
942  * reflects the available reassembly buffer size at the remote host) and the
943  * largest size permitted by the IP layer" (RFC 1122)
944  * Setting this to 1 enables code that checks TCP_MSS against the MTU of the
945  * netif used for a connection and limits the MSS if it would be too big otherwise.
946  */
947 #ifndef TCP_CALCULATE_EFF_SEND_MSS
948 #define TCP_CALCULATE_EFF_SEND_MSS 1
949 #endif
950 
951 
952 /**
953  * TCP_SND_BUF: TCP sender buffer space (bytes).
954  */
955 #ifndef TCP_SND_BUF
956 #define TCP_SND_BUF 256
957 #endif
958 
959 /**
960  * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
961  * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
962  */
963 #ifndef TCP_SND_QUEUELEN
964 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
965 #endif
966 
967 /**
968  * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than
969  * TCP_SND_BUF. It is the amount of space which must be available in the
970  * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
971  */
972 #ifndef TCP_SNDLOWAT
973 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2)
974 #endif
975 
976 /**
977  * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be grater
978  * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below
979  * this number, select returns writable (combined with TCP_SNDLOWAT).
980  */
981 #ifndef TCP_SNDQUEUELOWAT
982 #define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2)
983 #endif
984 
985 /**
986  * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
987  */
988 #ifndef TCP_LISTEN_BACKLOG
989 #define TCP_LISTEN_BACKLOG 0
990 #endif
991 
992 /**
993  * The maximum allowed backlog for TCP listen netconns.
994  * This backlog is used unless another is explicitly specified.
995  * 0xff is the maximum (u8_t).
996  */
997 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
998 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff
999 #endif
1000 
1001 /**
1002  * TCP_OVERSIZE: The maximum number of bytes that tcp_write may
1003  * allocate ahead of time in an attempt to create shorter pbuf chains
1004  * for transmission. The meaningful range is 0 to TCP_MSS. Some
1005  * suggested values are:
1006  *
1007  * 0: Disable oversized allocation. Each tcp_write() allocates a new
1008  pbuf (old behaviour).
1009  * 1: Allocate size-aligned pbufs with minimal excess. Use this if your
1010  * scatter-gather DMA requires aligned fragments.
1011  * 128: Limit the pbuf/memory overhead to 20%.
1012  * TCP_MSS: Try to create unfragmented TCP packets.
1013  * TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
1014  */
1015 #ifndef TCP_OVERSIZE
1016 #define TCP_OVERSIZE TCP_MSS
1017 #endif
1018 
1019 /**
1020  * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option.
1021  */
1022 #ifndef LWIP_TCP_TIMESTAMPS
1023 #define LWIP_TCP_TIMESTAMPS 0
1024 #endif
1025 
1026 /**
1027  * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an
1028  * explicit window update
1029  */
1030 #ifndef TCP_WND_UPDATE_THRESHOLD
1031 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4)
1032 #endif
1033 
1034 /**
1035  * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
1036  * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
1037  * events (accept, sent, etc) that happen in the system.
1038  * LWIP_CALLBACK_API==1: The PCB callback function is called directly
1039  * for the event.
1040  */
1041 //#ifndef LWIP_EVENT_API
1042 //#define LWIP_EVENT_API 0
1043 //#define LWIP_CALLBACK_API 1
1044 //#else
1045 //#define LWIP_EVENT_API 1
1046 //#define LWIP_CALLBACK_API 0
1047 //#endif
1048 
1049 
1050 /*
1051  ----------------------------------
1052  ---------- Pbuf options ----------
1053  ----------------------------------
1054 */
1055 /**
1056  * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
1057  * link level header. The default is 14, the standard value for
1058  * Ethernet.
1059  */
1060 #ifndef PBUF_LINK_HLEN
1061 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
1062 #endif
1063 
1064 /**
1065  * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
1066  * designed to accomodate single full size TCP frame in one pbuf, including
1067  * TCP_MSS, IP header, and link header.
1068  */
1069 #ifndef PBUF_POOL_BUFSIZE
1070 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
1071 #endif
1072 
1073 /*
1074  ------------------------------------------------
1075  ---------- Network Interfaces options ----------
1076  ------------------------------------------------
1077 */
1078 /**
1079  * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
1080  * field.
1081  */
1082 #ifndef LWIP_NETIF_HOSTNAME
1083 #define LWIP_NETIF_HOSTNAME 0
1084 #endif
1085 
1086 /**
1087  * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
1088  */
1089 #ifndef LWIP_NETIF_API
1090 #define LWIP_NETIF_API 0
1091 #endif
1092 
1093 /**
1094  * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
1095  * changes its up/down status (i.e., due to DHCP IP acquistion)
1096  */
1097 #ifndef LWIP_NETIF_STATUS_CALLBACK
1098 #define LWIP_NETIF_STATUS_CALLBACK 0
1099 #endif
1100 
1101 /**
1102  * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
1103  * whenever the link changes (i.e., link down)
1104  */
1105 #ifndef LWIP_NETIF_LINK_CALLBACK
1106 #define LWIP_NETIF_LINK_CALLBACK 0
1107 #endif
1108 
1109 /**
1110  * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table
1111  * indices) in struct netif. TCP and UDP can make use of this to prevent
1112  * scanning the ARP table for every sent packet. While this is faster for big
1113  * ARP tables or many concurrent connections, it might be counterproductive
1114  * if you have a tiny ARP table or if there never are concurrent connections.
1115  */
1116 #ifndef LWIP_NETIF_HWADDRHINT
1117 #define LWIP_NETIF_HWADDRHINT 0
1118 #endif
1119 
1120 /**
1121  * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
1122  * address equal to the netif IP address, looping them back up the stack.
1123  */
1124 #ifndef LWIP_NETIF_LOOPBACK
1125 #define LWIP_NETIF_LOOPBACK 1
1126 #endif
1127 
1128 /**
1129  * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
1130  * sending for each netif (0 = disabled)
1131  */
1132 #ifndef LWIP_LOOPBACK_MAX_PBUFS
1133 #define LWIP_LOOPBACK_MAX_PBUFS 0
1134 #endif
1135 
1136 /**
1137  * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in
1138  * the system, as netifs must change how they behave depending on this setting
1139  * for the LWIP_NETIF_LOOPBACK option to work.
1140  * Setting this is needed to avoid reentering non-reentrant functions like
1141  * tcp_input().
1142  * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a
1143  * multithreaded environment like tcpip.c. In this case, netif->input()
1144  * is called directly.
1145  * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
1146  * The packets are put on a list and netif_poll() must be called in
1147  * the main application loop.
1148  */
1149 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
1150 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
1151 #endif
1152 
1153 /**
1154  * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
1155  * to be sent into one single pbuf. This is for compatibility with DMA-enabled
1156  * MACs that do not support scatter-gather.
1157  * Beware that this might involve CPU-memcpy before transmitting that would not
1158  * be needed without this flag! Use this only if you need to!
1159  *
1160  * @todo: TCP and IP-frag do not work with this, yet:
1161  */
1162 #ifndef LWIP_NETIF_TX_SINGLE_PBUF
1163 #define LWIP_NETIF_TX_SINGLE_PBUF 0
1164 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
1165 
1166 /*
1167  ------------------------------------
1168  ---------- LOOPIF options ----------
1169  ------------------------------------
1170 */
1171 /**
1172  * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
1173  */
1174 #ifndef LWIP_HAVE_LOOPIF
1175 #define LWIP_HAVE_LOOPIF 1
1176 #endif
1177 
1178 /*
1179  ------------------------------------
1180  ---------- SLIPIF options ----------
1181  ------------------------------------
1182 */
1183 /**
1184  * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c
1185  */
1186 #ifndef LWIP_HAVE_SLIPIF
1187 #define LWIP_HAVE_SLIPIF 0
1188 #endif
1189 
1190 /*
1191  ------------------------------------
1192  ---------- Thread options ----------
1193  ------------------------------------
1194 */
1195 /**
1196  * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
1197  */
1198 #ifndef TCPIP_THREAD_NAME
1199 #define TCPIP_THREAD_NAME "tcpip_thread"
1200 #endif
1201 
1202 /**
1203  * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread.
1204  * The stack size value itself is platform-dependent, but is passed to
1205  * sys_thread_new() when the thread is created.
1206  */
1207 #ifndef TCPIP_THREAD_STACKSIZE
1208 #define TCPIP_THREAD_STACKSIZE 0
1209 #endif
1210 
1211 /**
1212  * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
1213  * The priority value itself is platform-dependent, but is passed to
1214  * sys_thread_new() when the thread is created.
1215  */
1216 #ifndef TCPIP_THREAD_PRIO
1217 #define TCPIP_THREAD_PRIO 1
1218 #endif
1219 
1220 /**
1221  * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages
1222  * The queue size value itself is platform-dependent, but is passed to
1223  * sys_mbox_new() when tcpip_init is called.
1224  */
1225 #ifndef TCPIP_MBOX_SIZE
1226 #define TCPIP_MBOX_SIZE 0
1227 #endif
1228 
1229 /**
1230  * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
1231  */
1232 #ifndef SLIPIF_THREAD_NAME
1233 #define SLIPIF_THREAD_NAME "slipif_loop"
1234 #endif
1235 
1236 /**
1237  * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
1238  * The stack size value itself is platform-dependent, but is passed to
1239  * sys_thread_new() when the thread is created.
1240  */
1241 #ifndef SLIPIF_THREAD_STACKSIZE
1242 #define SLIPIF_THREAD_STACKSIZE 0
1243 #endif
1244 
1245 /**
1246  * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
1247  * The priority value itself is platform-dependent, but is passed to
1248  * sys_thread_new() when the thread is created.
1249  */
1250 #ifndef SLIPIF_THREAD_PRIO
1251 #define SLIPIF_THREAD_PRIO 1
1252 #endif
1253 
1254 /**
1255  * PPP_THREAD_NAME: The name assigned to the pppInputThread.
1256  */
1257 #ifndef PPP_THREAD_NAME
1258 #define PPP_THREAD_NAME "pppInputThread"
1259 #endif
1260 
1261 /**
1262  * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread.
1263  * The stack size value itself is platform-dependent, but is passed to
1264  * sys_thread_new() when the thread is created.
1265  */
1266 #ifndef PPP_THREAD_STACKSIZE
1267 #define PPP_THREAD_STACKSIZE 0
1268 #endif
1269 
1270 /**
1271  * PPP_THREAD_PRIO: The priority assigned to the pppInputThread.
1272  * The priority value itself is platform-dependent, but is passed to
1273  * sys_thread_new() when the thread is created.
1274  */
1275 #ifndef PPP_THREAD_PRIO
1276 #define PPP_THREAD_PRIO 1
1277 #endif
1278 
1279 /**
1280  * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
1281  */
1282 #ifndef DEFAULT_THREAD_NAME
1283 #define DEFAULT_THREAD_NAME "lwIP"
1284 #endif
1285 
1286 /**
1287  * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
1288  * The stack size value itself is platform-dependent, but is passed to
1289  * sys_thread_new() when the thread is created.
1290  */
1291 #ifndef DEFAULT_THREAD_STACKSIZE
1292 #define DEFAULT_THREAD_STACKSIZE 0
1293 #endif
1294 
1295 /**
1296  * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
1297  * The priority value itself is platform-dependent, but is passed to
1298  * sys_thread_new() when the thread is created.
1299  */
1300 #ifndef DEFAULT_THREAD_PRIO
1301 #define DEFAULT_THREAD_PRIO 1
1302 #endif
1303 
1304 /**
1305  * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1306  * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed
1307  * to sys_mbox_new() when the recvmbox is created.
1308  */
1309 #ifndef DEFAULT_RAW_RECVMBOX_SIZE
1310 #define DEFAULT_RAW_RECVMBOX_SIZE 0
1311 #endif
1312 
1313 /**
1314  * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1315  * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed
1316  * to sys_mbox_new() when the recvmbox is created.
1317  */
1318 #ifndef DEFAULT_UDP_RECVMBOX_SIZE
1319 #define DEFAULT_UDP_RECVMBOX_SIZE 0
1320 #endif
1321 
1322 /**
1323  * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
1324  * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed
1325  * to sys_mbox_new() when the recvmbox is created.
1326  */
1327 #ifndef DEFAULT_TCP_RECVMBOX_SIZE
1328 #define DEFAULT_TCP_RECVMBOX_SIZE 0
1329 #endif
1330 
1331 /**
1332  * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections.
1333  * The queue size value itself is platform-dependent, but is passed to
1334  * sys_mbox_new() when the acceptmbox is created.
1335  */
1336 #ifndef DEFAULT_ACCEPTMBOX_SIZE
1337 #define DEFAULT_ACCEPTMBOX_SIZE 0
1338 #endif
1339 
1340 /*
1341  ----------------------------------------------
1342  ---------- Sequential layer options ----------
1343  ----------------------------------------------
1344 */
1345 /**
1346  * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
1347  * Don't use it if you're not an active lwIP project member
1348  */
1349 #ifndef LWIP_TCPIP_CORE_LOCKING
1350 #define LWIP_TCPIP_CORE_LOCKING 0
1351 #endif
1352 
1353 /**
1354  * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!)
1355  * Don't use it if you're not an active lwIP project member
1356  */
1357 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
1358 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
1359 #endif
1360 
1361 /**
1362  * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
1363  */
1364 #ifndef LWIP_NETCONN
1365 #define LWIP_NETCONN 0
1366 #endif
1367 
1368 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create
1369  * timers running in tcpip_thread from another thread.
1370  */
1371 #ifndef LWIP_TCPIP_TIMEOUT
1372 #define LWIP_TCPIP_TIMEOUT 1
1373 #endif
1374 
1375 /*
1376  ------------------------------------
1377  ---------- Socket options ----------
1378  ------------------------------------
1379 */
1380 /**
1381  * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
1382  */
1383 #ifndef LWIP_SOCKET
1384 #define LWIP_SOCKET 0
1385 #endif
1386 
1387 /**
1388  * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
1389  * (only used if you use sockets.c)
1390  */
1391 #ifndef LWIP_COMPAT_SOCKETS
1392 #define LWIP_COMPAT_SOCKETS 1
1393 #endif
1394 
1395 /**
1396  * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
1397  * Disable this option if you use a POSIX operating system that uses the same
1398  * names (read, write & close). (only used if you use sockets.c)
1399  */
1400 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
1401 #define LWIP_POSIX_SOCKETS_IO_NAMES 1
1402 #endif
1403 
1404 /**
1405  * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
1406  * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
1407  * in seconds. (does not require sockets.c, and will affect tcp.c)
1408  */
1409 #ifndef LWIP_TCP_KEEPALIVE
1410 #define LWIP_TCP_KEEPALIVE 0
1411 #endif
1412 
1413 /**
1414  * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing.
1415  */
1416 #ifndef LWIP_SO_RCVTIMEO
1417 #define LWIP_SO_RCVTIMEO 0
1418 #endif
1419 
1420 /**
1421  * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
1422  */
1423 #ifndef LWIP_SO_RCVBUF
1424 #define LWIP_SO_RCVBUF 0
1425 #endif
1426 
1427 /**
1428  * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
1429  */
1430 #ifndef RECV_BUFSIZE_DEFAULT
1431 #define RECV_BUFSIZE_DEFAULT INT_MAX
1432 #endif
1433 
1434 /**
1435  * SO_REUSE==1: Enable SO_REUSEADDR option.
1436  */
1437 #ifndef SO_REUSE
1438 #define SO_REUSE 0
1439 #endif
1440 
1441 /**
1442  * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets
1443  * to all local matches if SO_REUSEADDR is turned on.
1444  * WARNING: Adds a memcpy for every packet if passing to more than one pcb!
1445  */
1446 #ifndef SO_REUSE_RXTOALL
1447 #define SO_REUSE_RXTOALL 0
1448 #endif
1449 
1450 /*
1451  ----------------------------------------
1452  ---------- Statistics options ----------
1453  ----------------------------------------
1454 */
1455 /**
1456  * LWIP_STATS==1: Enable statistics collection in lwip_stats.
1457  */
1458 #ifndef LWIP_STATS
1459 #define LWIP_STATS 1
1460 #endif
1461 
1462 #if LWIP_STATS
1463 
1464 /**
1465  * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
1466  */
1467 #ifndef LWIP_STATS_DISPLAY
1468 #define LWIP_STATS_DISPLAY 0
1469 #endif
1470 
1471 /**
1472  * LINK_STATS==1: Enable link stats.
1473  */
1474 #ifndef LINK_STATS
1475 #define LINK_STATS 1
1476 #endif
1477 
1478 /**
1479  * ETHARP_STATS==1: Enable etharp stats.
1480  */
1481 #ifndef ETHARP_STATS
1482 #define ETHARP_STATS (LWIP_ARP)
1483 #endif
1484 
1485 /**
1486  * IP_STATS==1: Enable IP stats.
1487  */
1488 #ifndef IP_STATS
1489 #define IP_STATS 1
1490 #endif
1491 
1492 /**
1493  * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
1494  * on if using either frag or reass.
1495  */
1496 #ifndef IPFRAG_STATS
1497 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
1498 #endif
1499 
1500 /**
1501  * ICMP_STATS==1: Enable ICMP stats.
1502  */
1503 #ifndef ICMP_STATS
1504 #define ICMP_STATS 1
1505 #endif
1506 
1507 /**
1508  * IGMP_STATS==1: Enable IGMP stats.
1509  */
1510 #ifndef IGMP_STATS
1511 #define IGMP_STATS (LWIP_IGMP)
1512 #endif
1513 
1514 /**
1515  * UDP_STATS==1: Enable UDP stats. Default is on if
1516  * UDP enabled, otherwise off.
1517  */
1518 #ifndef UDP_STATS
1519 #define UDP_STATS (LWIP_UDP)
1520 #endif
1521 
1522 /**
1523  * TCP_STATS==1: Enable TCP stats. Default is on if TCP
1524  * enabled, otherwise off.
1525  */
1526 #ifndef TCP_STATS
1527 #define TCP_STATS (LWIP_TCP)
1528 #endif
1529 
1530 /**
1531  * MEM_STATS==1: Enable mem.c stats.
1532  */
1533 #ifndef MEM_STATS
1534 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
1535 #endif
1536 
1537 /**
1538  * MEMP_STATS==1: Enable memp.c pool stats.
1539  */
1540 #ifndef MEMP_STATS
1541 #define MEMP_STATS (MEMP_MEM_MALLOC == 0)
1542 #endif
1543 
1544 /**
1545  * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
1546  */
1547 #ifndef SYS_STATS
1548 #define SYS_STATS (NO_SYS == 0)
1549 #endif
1550 
1551 #else
1552 
1553 #define LINK_STATS 0
1554 #define IP_STATS 0
1555 #define IPFRAG_STATS 0
1556 #define ICMP_STATS 0
1557 #define IGMP_STATS 0
1558 #define UDP_STATS 0
1559 #define TCP_STATS 0
1560 #define MEM_STATS 0
1561 #define MEMP_STATS 0
1562 #define SYS_STATS 0
1563 #define LWIP_STATS_DISPLAY 0
1564 
1565 #endif /* LWIP_STATS */
1566 
1567 /*
1568  ---------------------------------
1569  ---------- PPP options ----------
1570  ---------------------------------
1571 */
1572 /**
1573  * PPP_SUPPORT==1: Enable PPP.
1574  */
1575 #ifndef PPP_SUPPORT
1576 #define PPP_SUPPORT 0
1577 #endif
1578 
1579 /**
1580  * PPPOE_SUPPORT==1: Enable PPP Over Ethernet
1581  */
1582 #ifndef PPPOE_SUPPORT
1583 #define PPPOE_SUPPORT 0
1584 #endif
1585 
1586 /**
1587  * PPPOS_SUPPORT==1: Enable PPP Over Serial
1588  */
1589 #ifndef PPPOS_SUPPORT
1590 #define PPPOS_SUPPORT PPP_SUPPORT
1591 #endif
1592 
1593 #if PPP_SUPPORT
1594 
1595 /**
1596  * NUM_PPP: Max PPP sessions.
1597  */
1598 #ifndef NUM_PPP
1599 #define NUM_PPP 1
1600 #endif
1601 
1602 /**
1603  * PAP_SUPPORT==1: Support PAP.
1604  */
1605 #ifndef PAP_SUPPORT
1606 #define PAP_SUPPORT 0
1607 #endif
1608 
1609 /**
1610  * CHAP_SUPPORT==1: Support CHAP.
1611  */
1612 #ifndef CHAP_SUPPORT
1613 #define CHAP_SUPPORT 0
1614 #endif
1615 
1616 /**
1617  * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1618  */
1619 #ifndef MSCHAP_SUPPORT
1620 #define MSCHAP_SUPPORT 0
1621 #endif
1622 
1623 /**
1624  * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1625  */
1626 #ifndef CBCP_SUPPORT
1627 #define CBCP_SUPPORT 0
1628 #endif
1629 
1630 /**
1631  * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1632  */
1633 #ifndef CCP_SUPPORT
1634 #define CCP_SUPPORT 0
1635 #endif
1636 
1637 /**
1638  * VJ_SUPPORT==1: Support VJ header compression.
1639  */
1640 #ifndef VJ_SUPPORT
1641 #define VJ_SUPPORT 0
1642 #endif
1643 
1644 /**
1645  * MD5_SUPPORT==1: Support MD5 (see also CHAP).
1646  */
1647 #ifndef MD5_SUPPORT
1648 #define MD5_SUPPORT 0
1649 #endif
1650 
1651 /*
1652  * Timeouts
1653  */
1654 #ifndef FSM_DEFTIMEOUT
1655 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
1656 #endif
1657 
1658 #ifndef FSM_DEFMAXTERMREQS
1659 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
1660 #endif
1661 
1662 #ifndef FSM_DEFMAXCONFREQS
1663 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
1664 #endif
1665 
1666 #ifndef FSM_DEFMAXNAKLOOPS
1667 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
1668 #endif
1669 
1670 #ifndef UPAP_DEFTIMEOUT
1671 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
1672 #endif
1673 
1674 #ifndef UPAP_DEFREQTIME
1675 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
1676 #endif
1677 
1678 #ifndef CHAP_DEFTIMEOUT
1679 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
1680 #endif
1681 
1682 #ifndef CHAP_DEFTRANSMITS
1683 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
1684 #endif
1685 
1686 /* Interval in seconds between keepalive echo requests, 0 to disable. */
1687 #ifndef LCP_ECHOINTERVAL
1688 #define LCP_ECHOINTERVAL 0
1689 #endif
1690 
1691 /* Number of unanswered echo requests before failure. */
1692 #ifndef LCP_MAXECHOFAILS
1693 #define LCP_MAXECHOFAILS 3
1694 #endif
1695 
1696 /* Max Xmit idle time (in jiffies) before resend flag char. */
1697 #ifndef PPP_MAXIDLEFLAG
1698 #define PPP_MAXIDLEFLAG 100
1699 #endif
1700 
1701 /*
1702  * Packet sizes
1703  *
1704  * Note - lcp shouldn't be allowed to negotiate stuff outside these
1705  * limits. See lcp.h in the pppd directory.
1706  * (XXX - these constants should simply be shared by lcp.c instead
1707  * of living in lcp.h)
1708  */
1709 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
1710 #ifndef PPP_MAXMTU
1711 /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */
1712 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
1713 #endif
1714 #define PPP_MINMTU 64
1715 #define PPP_MRU 1500 /* default MRU = max length of info field */
1716 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
1717 #ifndef PPP_DEFMRU
1718 #define PPP_DEFMRU 296 /* Try for this */
1719 #endif
1720 #define PPP_MINMRU 128 /* No MRUs below this */
1721 
1722 #ifndef MAXNAMELEN
1723 #define MAXNAMELEN 256 /* max length of hostname or name for auth */
1724 #endif
1725 #ifndef MAXSECRETLEN
1726 #define MAXSECRETLEN 256 /* max length of password or secret */
1727 #endif
1728 
1729 #endif /* PPP_SUPPORT */
1730 
1731 /*
1732  --------------------------------------
1733  ---------- Checksum options ----------
1734  --------------------------------------
1735 */
1736 /**
1737  * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
1738  */
1739 #ifndef CHECKSUM_GEN_IP
1740 #define CHECKSUM_GEN_IP 1
1741 #endif
1742 
1743 /**
1744  * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
1745  */
1746 #ifndef CHECKSUM_GEN_UDP
1747 #define CHECKSUM_GEN_UDP 1
1748 #endif
1749 
1750 /**
1751  * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
1752  */
1753 #ifndef CHECKSUM_GEN_TCP
1754 #define CHECKSUM_GEN_TCP 1
1755 #endif
1756 
1757 /**
1758  * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
1759  */
1760 #ifndef CHECKSUM_CHECK_IP
1761 #define CHECKSUM_CHECK_IP 1
1762 #endif
1763 
1764 /**
1765  * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
1766  */
1767 #ifndef CHECKSUM_CHECK_UDP
1768 #define CHECKSUM_CHECK_UDP 1
1769 #endif
1770 
1771 /**
1772  * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
1773  */
1774 #ifndef CHECKSUM_CHECK_TCP
1775 #define CHECKSUM_CHECK_TCP 1
1776 #endif
1777 
1778 /**
1779  * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from
1780  * application buffers to pbufs.
1781  */
1782 #ifndef LWIP_CHECKSUM_ON_COPY
1783 #define LWIP_CHECKSUM_ON_COPY 0
1784 #endif
1785 
1786 /*
1787  ---------------------------------------
1788  ---------- Debugging options ----------
1789  ---------------------------------------
1790 */
1791 /**
1792  * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
1793  * compared against this value. If it is smaller, then debugging
1794  * messages are written.
1795  */
1796 #ifndef LWIP_DBG_MIN_LEVEL
1797 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
1798 #endif
1799 
1800 /**
1801  * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
1802  * debug messages of certain types.
1803  */
1804 #ifndef LWIP_DBG_TYPES_ON
1805 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
1806 #endif
1807 
1808 /**
1809  * ETHARP_DEBUG: Enable debugging in etharp.c.
1810  */
1811 #ifndef ETHARP_DEBUG
1812 #define ETHARP_DEBUG LWIP_DBG_OFF
1813 #endif
1814 
1815 /**
1816  * NETIF_DEBUG: Enable debugging in netif.c.
1817  */
1818 #ifndef NETIF_DEBUG
1819 #define NETIF_DEBUG LWIP_DBG_OFF
1820 #endif
1821 
1822 /**
1823  * PBUF_DEBUG: Enable debugging in pbuf.c.
1824  */
1825 #ifndef PBUF_DEBUG
1826 #define PBUF_DEBUG LWIP_DBG_OFF
1827 #endif
1828 
1829 /**
1830  * API_LIB_DEBUG: Enable debugging in api_lib.c.
1831  */
1832 #ifndef API_LIB_DEBUG
1833 #define API_LIB_DEBUG LWIP_DBG_OFF
1834 #endif
1835 
1836 /**
1837  * API_MSG_DEBUG: Enable debugging in api_msg.c.
1838  */
1839 #ifndef API_MSG_DEBUG
1840 #define API_MSG_DEBUG LWIP_DBG_OFF
1841 #endif
1842 
1843 /**
1844  * SOCKETS_DEBUG: Enable debugging in sockets.c.
1845  */
1846 #ifndef SOCKETS_DEBUG
1847 #define SOCKETS_DEBUG LWIP_DBG_OFF
1848 #endif
1849 
1850 /**
1851  * ICMP_DEBUG: Enable debugging in icmp.c.
1852  */
1853 #ifndef ICMP_DEBUG
1854 #define ICMP_DEBUG LWIP_DBG_OFF
1855 #endif
1856 
1857 /**
1858  * IGMP_DEBUG: Enable debugging in igmp.c.
1859  */
1860 #ifndef IGMP_DEBUG
1861 #define IGMP_DEBUG LWIP_DBG_OFF
1862 #endif
1863 
1864 /**
1865  * INET_DEBUG: Enable debugging in inet.c.
1866  */
1867 #ifndef INET_DEBUG
1868 #define INET_DEBUG LWIP_DBG_OFF
1869 #endif
1870 
1871 /**
1872  * IP_DEBUG: Enable debugging for IP.
1873  */
1874 #ifndef IP_DEBUG
1875 #define IP_DEBUG LWIP_DBG_OFF
1876 #endif
1877 
1878 /**
1879  * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
1880  */
1881 #ifndef IP_REASS_DEBUG
1882 #define IP_REASS_DEBUG LWIP_DBG_OFF
1883 #endif
1884 
1885 /**
1886  * RAW_DEBUG: Enable debugging in raw.c.
1887  */
1888 #ifndef RAW_DEBUG
1889 #define RAW_DEBUG LWIP_DBG_OFF
1890 #endif
1891 
1892 /**
1893  * MEM_DEBUG: Enable debugging in mem.c.
1894  */
1895 #ifndef MEM_DEBUG
1896 #define MEM_DEBUG LWIP_DBG_OFF
1897 #endif
1898 
1899 /**
1900  * MEMP_DEBUG: Enable debugging in memp.c.
1901  */
1902 #ifndef MEMP_DEBUG
1903 #define MEMP_DEBUG LWIP_DBG_OFF
1904 #endif
1905 
1906 /**
1907  * SYS_DEBUG: Enable debugging in sys.c.
1908  */
1909 #ifndef SYS_DEBUG
1910 #define SYS_DEBUG LWIP_DBG_OFF
1911 #endif
1912 
1913 /**
1914  * TIMERS_DEBUG: Enable debugging in timers.c.
1915  */
1916 #ifndef TIMERS_DEBUG
1917 #define TIMERS_DEBUG LWIP_DBG_OFF
1918 #endif
1919 
1920 /**
1921  * TCP_DEBUG: Enable debugging for TCP.
1922  */
1923 #ifndef TCP_DEBUG
1924 #define TCP_DEBUG LWIP_DBG_OFF
1925 #endif
1926 
1927 /**
1928  * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
1929  */
1930 #ifndef TCP_INPUT_DEBUG
1931 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
1932 #endif
1933 
1934 /**
1935  * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
1936  */
1937 #ifndef TCP_FR_DEBUG
1938 #define TCP_FR_DEBUG LWIP_DBG_OFF
1939 #endif
1940 
1941 /**
1942  * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
1943  * timeout.
1944  */
1945 #ifndef TCP_RTO_DEBUG
1946 #define TCP_RTO_DEBUG LWIP_DBG_OFF
1947 #endif
1948 
1949 /**
1950  * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
1951  */
1952 #ifndef TCP_CWND_DEBUG
1953 #define TCP_CWND_DEBUG LWIP_DBG_OFF
1954 #endif
1955 
1956 /**
1957  * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
1958  */
1959 #ifndef TCP_WND_DEBUG
1960 #define TCP_WND_DEBUG LWIP_DBG_OFF
1961 #endif
1962 
1963 /**
1964  * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
1965  */
1966 #ifndef TCP_OUTPUT_DEBUG
1967 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
1968 #endif
1969 
1970 /**
1971  * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
1972  */
1973 #ifndef TCP_RST_DEBUG
1974 #define TCP_RST_DEBUG LWIP_DBG_OFF
1975 #endif
1976 
1977 /**
1978  * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
1979  */
1980 #ifndef TCP_QLEN_DEBUG
1981 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
1982 #endif
1983 
1984 /**
1985  * UDP_DEBUG: Enable debugging in UDP.
1986  */
1987 #ifndef UDP_DEBUG
1988 #define UDP_DEBUG LWIP_DBG_OFF
1989 #endif
1990 
1991 /**
1992  * TCPIP_DEBUG: Enable debugging in tcpip.c.
1993  */
1994 #ifndef TCPIP_DEBUG
1995 #define TCPIP_DEBUG LWIP_DBG_OFF
1996 #endif
1997 
1998 /**
1999  * PPP_DEBUG: Enable debugging for PPP.
2000  */
2001 #ifndef PPP_DEBUG
2002 #define PPP_DEBUG LWIP_DBG_OFF
2003 #endif
2004 
2005 /**
2006  * SLIP_DEBUG: Enable debugging in slipif.c.
2007  */
2008 #ifndef SLIP_DEBUG
2009 #define SLIP_DEBUG LWIP_DBG_OFF
2010 #endif
2011 
2012 /**
2013  * DHCP_DEBUG: Enable debugging in dhcp.c.
2014  */
2015 #ifndef DHCP_DEBUG
2016 #define DHCP_DEBUG LWIP_DBG_OFF
2017 #endif
2018 
2019 /**
2020  * AUTOIP_DEBUG: Enable debugging in autoip.c.
2021  */
2022 #ifndef AUTOIP_DEBUG
2023 #define AUTOIP_DEBUG LWIP_DBG_OFF
2024 #endif
2025 
2026 /**
2027  * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
2028  */
2029 #ifndef SNMP_MSG_DEBUG
2030 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
2031 #endif
2032 
2033 /**
2034  * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
2035  */
2036 #ifndef SNMP_MIB_DEBUG
2037 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
2038 #endif
2039 
2040 /**
2041  * DNS_DEBUG: Enable debugging for DNS.
2042  */
2043 #ifndef DNS_DEBUG
2044 #define DNS_DEBUG LWIP_DBG_OFF
2045 #endif
2046 
2047 #endif /* __LWIP_OPT_H__ */