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