]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blob - src/include/lwip/opt.h
9ec3a4264111edc2efd5c13a2ceb85d051582266
[pes-rpp/rpp-lwip.git] / src / include / lwip / opt.h
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                          0
69 #endif
70
71 /**
72  * MEMCPY: override this if you have a faster implementation at hand than the
73  * one included in your C library
74  */
75 #ifndef MEMCPY
76 #define MEMCPY(dst,src,len)             memcpy(dst,src,len)
77 #endif
78
79 /**
80  * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a
81  * call to memcpy() if the length is known at compile time and is small.
82  */
83 #ifndef SMEMCPY
84 #define SMEMCPY(dst,src,len)            memcpy(dst,src,len)
85 #endif
86
87 /*
88    ------------------------------------
89    ---------- Memory options ----------
90    ------------------------------------
91 */
92 /**
93  * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
94  * instead of the lwip internal allocator. Can save code size if you
95  * already use it.
96  */
97 #ifndef MEM_LIBC_MALLOC
98 #define MEM_LIBC_MALLOC                 0
99 #endif
100
101 /**
102  * MEM_ALIGNMENT: should be set to the alignment of the CPU
103  *    4 byte alignment -> #define MEM_ALIGNMENT 4
104  *    2 byte alignment -> #define MEM_ALIGNMENT 2
105  */
106 #ifndef MEM_ALIGNMENT
107 #define MEM_ALIGNMENT                   1
108 #endif
109
110 /**
111  * MEM_SIZE: the size of the heap memory. If the application will send
112  * a lot of data that needs to be copied, this should be set high.
113  */
114 #ifndef MEM_SIZE
115 #define MEM_SIZE                        1600
116 #endif
117
118 /**
119  * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
120  * amount of bytes before and after each memp element in every pool and fills
121  * it with a prominent default value.
122  *    MEMP_OVERFLOW_CHECK == 0 no checking
123  *    MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
124  *    MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
125  *      memp_malloc() or memp_free() is called (useful but slow!)
126  */
127 #ifndef MEMP_OVERFLOW_CHECK
128 #define MEMP_OVERFLOW_CHECK             0
129 #endif
130
131 /**
132  * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
133  * sure that there are no cycles in the linked lists.
134  */
135 #ifndef MEMP_SANITY_CHECK
136 #define MEMP_SANITY_CHECK               0
137 #endif
138
139 /**
140  * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set
141  * of memory pools of various sizes. When mem_malloc is called, an element of
142  * the smallest pool that can provide the lenght needed is returned.
143  */
144 #ifndef MEM_USE_POOLS
145 #define MEM_USE_POOLS                   0
146 #endif
147
148 /**
149  * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h
150  * that defines additional pools beyond the "standard" ones required
151  * by lwIP. If you set this to 1, you must have lwippools.h in your 
152  * inlude path somewhere. 
153  */
154 #ifndef MEMP_USE_CUSTOM_POOLS
155 #define MEMP_USE_CUSTOM_POOLS           0
156 #endif
157
158
159 /*
160    ------------------------------------------------
161    ---------- Internal Memory Pool Sizes ----------
162    ------------------------------------------------
163 */
164 /**
165  * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
166  * If the application sends a lot of data out of ROM (or other static memory),
167  * this should be set high.
168  */
169 #ifndef MEMP_NUM_PBUF
170 #define MEMP_NUM_PBUF                   16
171 #endif
172
173 /**
174  * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
175  * (requires the LWIP_RAW option)
176  */
177 #ifndef MEMP_NUM_RAW_PCB
178 #define MEMP_NUM_RAW_PCB                4
179 #endif
180
181 /**
182  * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
183  * per active UDP "connection".
184  * (requires the LWIP_UDP option)
185  */
186 #ifndef MEMP_NUM_UDP_PCB
187 #define MEMP_NUM_UDP_PCB                4
188 #endif
189
190 /**
191  * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
192  * (requires the LWIP_TCP option)
193  */
194 #ifndef MEMP_NUM_TCP_PCB
195 #define MEMP_NUM_TCP_PCB                5
196 #endif
197
198 /**
199  * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
200  * (requires the LWIP_TCP option)
201  */
202 #ifndef MEMP_NUM_TCP_PCB_LISTEN
203 #define MEMP_NUM_TCP_PCB_LISTEN         8
204 #endif
205
206 /**
207  * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
208  * (requires the LWIP_TCP option)
209  */
210 #ifndef MEMP_NUM_TCP_SEG
211 #define MEMP_NUM_TCP_SEG                16
212 #endif
213
214 /**
215  * MEMP_NUM_REASSDATA: the number of simultaneously IP packets queued for
216  * reassembly (whole packets, not fragments!)
217  */
218 #ifndef MEMP_NUM_REASSDATA
219 #define MEMP_NUM_REASSDATA              5
220 #endif
221
222 /**
223  * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
224  * packets (pbufs) that are waiting for an ARP request (to resolve
225  * their destination address) to finish.
226  * (requires the ARP_QUEUEING option)
227  */
228 #ifndef MEMP_NUM_ARP_QUEUE
229 #define MEMP_NUM_ARP_QUEUE              30
230 #endif
231
232 /**
233  * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces
234  * can be members et the same time (one per netif - allsystems group -, plus one
235  * per netif membership).
236  * (requires the LWIP_IGMP option)
237  */
238 #ifndef MEMP_NUM_IGMP_GROUP
239 #define MEMP_NUM_IGMP_GROUP             8
240 #endif
241
242 /**
243  * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
244  * (requires NO_SYS==0)
245  */
246 #ifndef MEMP_NUM_SYS_TIMEOUT
247 #define MEMP_NUM_SYS_TIMEOUT            3
248 #endif
249
250 /**
251  * MEMP_NUM_NETBUF: the number of struct netbufs.
252  * (only needed if you use the sequential API, like api_lib.c)
253  */
254 #ifndef MEMP_NUM_NETBUF
255 #define MEMP_NUM_NETBUF                 2
256 #endif
257
258 /**
259  * MEMP_NUM_NETCONN: the number of struct netconns.
260  * (only needed if you use the sequential API, like api_lib.c)
261  */
262 #ifndef MEMP_NUM_NETCONN
263 #define MEMP_NUM_NETCONN                4
264 #endif
265
266 /**
267  * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
268  * for callback/timeout API communication. 
269  * (only needed if you use tcpip.c)
270  */
271 #ifndef MEMP_NUM_TCPIP_MSG_API
272 #define MEMP_NUM_TCPIP_MSG_API          8
273 #endif
274
275 /**
276  * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
277  * for incoming packets. 
278  * (only needed if you use tcpip.c)
279  */
280 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
281 #define MEMP_NUM_TCPIP_MSG_INPKT        8
282 #endif
283
284 /**
285  * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. 
286  */
287 #ifndef PBUF_POOL_SIZE
288 #define PBUF_POOL_SIZE                  16
289 #endif
290
291 /*
292    ---------------------------------
293    ---------- ARP options ----------
294    ---------------------------------
295 */
296 /**
297  * LWIP_ARP==1: Enable ARP functionality.
298  */
299 #ifndef LWIP_ARP
300 #define LWIP_ARP                        1
301 #endif
302
303 /**
304  * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
305  */
306 #ifndef ARP_TABLE_SIZE
307 #define ARP_TABLE_SIZE                  10
308 #endif
309
310 /**
311  * ARP_QUEUEING==1: Outgoing packets are queued during hardware address
312  * resolution.
313  */
314 #ifndef ARP_QUEUEING
315 #define ARP_QUEUEING                    1
316 #endif
317
318 /**
319  * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
320  * updated with the source MAC and IP addresses supplied in the packet.
321  * You may want to disable this if you do not trust LAN peers to have the
322  * correct addresses, or as a limited approach to attempt to handle
323  * spoofing. If disabled, lwIP will need to make a new ARP request if
324  * the peer is not already in the ARP table, adding a little latency.
325  */
326 #ifndef ETHARP_TRUST_IP_MAC
327 #define ETHARP_TRUST_IP_MAC             1
328 #endif
329
330 /*
331    --------------------------------
332    ---------- IP options ----------
333    --------------------------------
334 */
335 /**
336  * IP_FORWARD==1: Enables the ability to forward IP packets across network
337  * interfaces. If you are going to run lwIP on a device with only one network
338  * interface, define this to 0.
339  */
340 #ifndef IP_FORWARD
341 #define IP_FORWARD                      0
342 #endif
343
344 /**
345  * IP_OPTIONS: Defines the behavior for IP options.
346  *      IP_OPTIONS==0: All packets with IP options are dropped.
347  *      IP_OPTIONS==1: IP options are allowed (but not parsed).
348  */
349 #ifndef IP_OPTIONS
350 #define IP_OPTIONS                      1
351 #endif
352
353 /**
354  * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
355  * this option does not affect outgoing packet sizes, which can be controlled
356  * via IP_FRAG.
357  */
358 #ifndef IP_REASSEMBLY
359 #define IP_REASSEMBLY                   1
360 #endif
361
362 /**
363  * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
364  * that this option does not affect incoming packet sizes, which can be
365  * controlled via IP_REASSEMBLY.
366  */
367 #ifndef IP_FRAG
368 #define IP_FRAG                         1
369 #endif
370
371 /**
372  * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
373  * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
374  * in this time, the whole packet is discarded.
375  */
376 #ifndef IP_REASS_MAXAGE
377 #define IP_REASS_MAXAGE                 3
378 #endif
379
380 /**
381  * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
382  * Since the received pbufs are enqueued, be sure to configure
383  * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
384  * packets even if the maximum amount of fragments is enqueued for reassembly!
385  */
386 #ifndef IP_REASS_MAX_PBUFS
387 #define IP_REASS_MAX_PBUFS              10
388 #endif
389
390 /**
391  * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
392  * fragmentation. Otherwise pbufs are allocated and reference the original
393     * packet data to be fragmented.
394 */
395 #ifndef IP_FRAG_USES_STATIC_BUF
396 #define IP_FRAG_USES_STATIC_BUF         1
397 #endif
398
399 /**
400  * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer
401  * (requires IP_FRAG_USES_STATIC_BUF==1)
402  */
403 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
404 #define IP_FRAG_MAX_MTU                 1500
405 #endif
406
407 /**
408  * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
409  */
410 #ifndef IP_DEFAULT_TTL
411 #define IP_DEFAULT_TTL                  255
412 #endif
413
414 /*
415    ----------------------------------
416    ---------- ICMP options ----------
417    ----------------------------------
418 */
419 /**
420  * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
421  * Be careful, disable that make your product non-compliant to RFC1122
422  */
423 #ifndef LWIP_ICMP
424 #define LWIP_ICMP                       1
425 #endif
426
427 /**
428  * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
429  */
430 #ifndef ICMP_TTL
431 #define ICMP_TTL                       (IP_DEFAULT_TTL)
432 #endif
433
434 /*
435    ---------------------------------
436    ---------- RAW options ----------
437    ---------------------------------
438 */
439 /**
440  * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
441  */
442 #ifndef LWIP_RAW
443 #define LWIP_RAW                        1
444 #endif
445
446 /**
447  * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
448  */
449 #ifndef RAW_TTL
450 #define RAW_TTL                        (IP_DEFAULT_TTL)
451 #endif
452
453 /*
454    ----------------------------------
455    ---------- DHCP options ----------
456    ----------------------------------
457 */
458 /**
459  * LWIP_DHCP==1: Enable DHCP module.
460  */
461 #ifndef LWIP_DHCP
462 #define LWIP_DHCP                       0
463 #endif
464
465 /**
466  * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
467  */
468 #ifndef DHCP_DOES_ARP_CHECK
469 #define DHCP_DOES_ARP_CHECK             ((LWIP_DHCP) && (LWIP_ARP))
470 #endif
471
472 /*
473    ------------------------------------
474    ---------- AUTOIP options ----------
475    ------------------------------------
476 */
477 /**
478  * LWIP_AUTOIP==1: Enable AUTOIP module.
479  */
480 #ifndef LWIP_AUTOIP
481 #define LWIP_AUTOIP                     0
482 #endif
483
484 /**
485  * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
486  * the same interface at the same time.
487  */
488 #ifndef LWIP_DHCP_AUTOIP_COOP
489 #define LWIP_DHCP_AUTOIP_COOP           0
490 #endif
491
492 /*
493    ----------------------------------
494    ---------- SNMP options ----------
495    ----------------------------------
496 */
497 /**
498  * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
499  * transport.
500  */
501 #ifndef LWIP_SNMP
502 #define LWIP_SNMP                       0
503 #endif
504
505 /**
506  * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will
507  * allow. At least one request buffer is required. 
508  */
509 #ifndef SNMP_CONCURRENT_REQUESTS
510 #define SNMP_CONCURRENT_REQUESTS        1
511 #endif
512
513 /**
514  * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
515  * destination is required
516  */
517 #ifndef SNMP_TRAP_DESTINATIONS
518 #define SNMP_TRAP_DESTINATIONS          1
519 #endif
520
521 /**
522  * SNMP_PRIVATE_MIB: 
523  */
524 #ifndef SNMP_PRIVATE_MIB
525 #define SNMP_PRIVATE_MIB                0
526 #endif
527
528 /**
529  * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not
530  * a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
531  * Unsafe requests are disabled by default!
532  */
533 #ifndef SNMP_SAFE_REQUESTS
534 #define SNMP_SAFE_REQUESTS              1
535 #endif
536
537 /*
538    ----------------------------------
539    ---------- IGMP options ----------
540    ----------------------------------
541 */
542 /**
543  * LWIP_IGMP==1: Turn on IGMP module. 
544  */
545 #ifndef LWIP_IGMP
546 #define LWIP_IGMP                       0
547 #endif
548
549 /*
550    ----------------------------------
551    ---------- DNS options -----------
552    ----------------------------------
553 */
554 /**
555  * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
556  * transport.
557  */
558 #ifndef LWIP_DNS
559 #define LWIP_DNS                        0
560 #endif
561
562 /** DNS maximum number of entries to maintain locally. */
563 #ifndef DNS_TABLE_SIZE
564 #define DNS_TABLE_SIZE                  4
565 #endif
566
567 /** DNS maximum host name length supported in the name table. */
568 #ifndef DNS_MAX_NAME_LENGTH
569 #define DNS_MAX_NAME_LENGTH             256
570 #endif
571
572 /** The maximum of DNS servers */
573 #ifndef DNS_MAX_SERVERS
574 #define DNS_MAX_SERVERS                 2
575 #endif
576
577 /** DNS do a name checking between the query and the response. */
578 #ifndef DNS_DOES_NAME_CHECK
579 #define DNS_DOES_NAME_CHECK             1
580 #endif
581
582 /** DNS use a local buffer if DNS_USES_STATIC_BUF=0, a static one if
583     DNS_USES_STATIC_BUF=1, or a dynamic one if DNS_USES_STATIC_BUF=2.
584     The buffer will be of size DNS_MSG_SIZE */
585 #ifndef DNS_USES_STATIC_BUF
586 #define DNS_USES_STATIC_BUF             1
587 #endif
588
589 /** DNS message max. size. Default value is RFC compliant. */
590 #ifndef DNS_MSG_SIZE
591 #define DNS_MSG_SIZE                    512
592 #endif
593
594 /*
595    ---------------------------------
596    ---------- UDP options ----------
597    ---------------------------------
598 */
599 /**
600  * LWIP_UDP==1: Turn on UDP.
601  */
602 #ifndef LWIP_UDP
603 #define LWIP_UDP                        1
604 #endif
605
606 /**
607  * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
608  */
609 #ifndef LWIP_UDPLITE
610 #define LWIP_UDPLITE                    0
611 #endif
612
613 /**
614  * UDP_TTL: Default Time-To-Live value.
615  */
616 #ifndef UDP_TTL
617 #define UDP_TTL                         (IP_DEFAULT_TTL)
618 #endif
619
620 /*
621    ---------------------------------
622    ---------- TCP options ----------
623    ---------------------------------
624 */
625 /**
626  * LWIP_TCP==1: Turn on TCP.
627  */
628 #ifndef LWIP_TCP
629 #define LWIP_TCP                        1
630 #endif
631
632 /**
633  * TCP_TTL: Default Time-To-Live value.
634  */
635 #ifndef TCP_TTL
636 #define TCP_TTL                         (IP_DEFAULT_TTL)
637 #endif
638
639 /**
640  * TCP_WND: The size of a TCP window.
641  */
642 #ifndef TCP_WND
643 #define TCP_WND                         2048
644 #endif 
645
646 /**
647  * TCP_MAXRTX: Maximum number of retransmissions of data segments.
648  */
649 #ifndef TCP_MAXRTX
650 #define TCP_MAXRTX                      12
651 #endif
652
653 /**
654  * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
655  */
656 #ifndef TCP_SYNMAXRTX
657 #define TCP_SYNMAXRTX                   6
658 #endif
659
660 /**
661  * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
662  * Define to 0 if your device is low on memory.
663  */
664 #ifndef TCP_QUEUE_OOSEQ
665 #define TCP_QUEUE_OOSEQ                 1
666 #endif
667
668 /**
669  * TCP_MSS: TCP Maximum segment size. (default is 128, a *very*
670  * conservative default.)
671  * For the receive side, this MSS is advertised to the remote side
672  * when opening a connection. For the transmit size, this MSS sets
673  * an upper limit on the MSS advertised by the remote host.
674  */
675 #ifndef TCP_MSS
676 #define TCP_MSS                         128
677 #endif
678
679 /**
680  * LWIP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really
681  * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which
682  * reflects the available reassembly buffer size at the remote host) and the
683  * largest size permitted by the IP layer" (RFC 1122)
684  * Setting this to 1 enables code that checks TCP_MSS against the MTU of the
685  * netif used for a connection and limits the MSS it would be too big otherwise.
686  */
687 #ifndef LWIP_CALCULATE_EFF_SEND_MSS
688 #define LWIP_CALCULATE_EFF_SEND_MSS     1
689 #endif
690
691
692 /**
693  * TCP_SND_BUF: TCP sender buffer space (bytes). 
694  */
695 #ifndef TCP_SND_BUF
696 #define TCP_SND_BUF                     256
697 #endif
698
699 /**
700  * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
701  * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
702  */
703 #ifndef TCP_SND_QUEUELEN
704 #define TCP_SND_QUEUELEN                (4 * (TCP_SND_BUF/TCP_MSS))
705 #endif
706
707 /**
708  * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than or equal
709  * to TCP_SND_BUF. It is the amount of space which must be available in the
710  * TCP snd_buf for select to return writable.
711  */
712 #ifndef TCP_SNDLOWAT
713 #define TCP_SNDLOWAT                    (TCP_SND_BUF/2)
714 #endif
715
716 /**
717  * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
718  */
719 #ifndef TCP_LISTEN_BACKLOG
720 #define TCP_LISTEN_BACKLOG              0
721 #endif
722
723 /**
724  * The maximum allowed backlog for TCP listen netconns.
725  * This backlog is used unless another is explicitly specified.
726  * 0xff is the maximum (u8_t).
727  */
728 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
729 #define TCP_DEFAULT_LISTEN_BACKLOG      0xff
730 #endif
731
732 /**
733  * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
734  *     LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
735  *         events (accept, sent, etc) that happen in the system.
736  *     LWIP_CALLBACK_API==1: The PCB callback function is called directly
737  *         for the event.
738  */
739 #ifndef LWIP_EVENT_API
740 #define LWIP_EVENT_API                  0
741 #define LWIP_CALLBACK_API               1
742 #else 
743 #define LWIP_EVENT_API                  1
744 #define LWIP_CALLBACK_API               0
745 #endif
746
747
748 /*
749    ----------------------------------
750    ---------- Pbuf options ----------
751    ----------------------------------
752 */
753 /**
754  * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
755  * link level header. The default is 14, the standard value for
756  * Ethernet.
757  */
758 #ifndef PBUF_LINK_HLEN
759 #define PBUF_LINK_HLEN                  14
760 #endif
761
762 /**
763  * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
764  * designed to accomodate single full size TCP frame in one pbuf, including
765  * TCP_MSS, IP header, and link header.
766 *
767  */
768 #ifndef PBUF_POOL_BUFSIZE
769 #define PBUF_POOL_BUFSIZE               LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
770 #endif
771
772 /*
773    ------------------------------------------------
774    ---------- Network Interfaces options ----------
775    ------------------------------------------------
776 */
777 /**
778  * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
779  * field.
780  */
781 #ifndef LWIP_NETIF_HOSTNAME
782 #define LWIP_NETIF_HOSTNAME             0
783 #endif
784
785 /**
786  * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
787  */
788 #ifndef LWIP_NETIF_API
789 #define LWIP_NETIF_API                  0
790 #endif
791
792 /**
793  * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
794  * changes its up/down status (i.e., due to DHCP IP acquistion)
795  */
796 #ifndef LWIP_NETIF_STATUS_CALLBACK
797 #define LWIP_NETIF_STATUS_CALLBACK      0
798 #endif
799
800 /**
801  * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
802  * whenever the link changes (i.e., link down)
803  */
804 #ifndef LWIP_NETIF_LINK_CALLBACK
805 #define LWIP_NETIF_LINK_CALLBACK        0
806 #endif
807
808 /**
809  * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table
810  * indices) in struct netif. TCP and UDP can make use of this to prevent
811  * scanning the ARP table for every sent packet. While this is faster for big
812  * ARP tables or many concurrent connections, it might be counterproductive
813  * if you have a tiny ARP table or if there never are concurrent connections.
814  */
815 #ifndef LWIP_NETIF_HWADDRHINT
816 #define LWIP_NETIF_HWADDRHINT           0
817 #endif
818
819 /*
820    ------------------------------------
821    ---------- LOOPIF options ----------
822    ------------------------------------
823 */
824 /**
825  * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
826  */
827 #ifndef LWIP_HAVE_LOOPIF
828 #define LWIP_HAVE_LOOPIF                0
829 #endif
830
831 /**
832  * LWIP_LOOPIF_MULTITHREADING: Indicates whether threading is enabled in
833  * the system, as LOOPIF must change how it behaves depending on this setting.
834  * Setting this is needed to avoid reentering non-reentrant functions like
835  * tcp_input().
836  *    LWIP_LOOPIF_MULTITHREADING==1: Indicates that the user is using a
837  *       multithreaded environment like tcpip.c. In this case, netif->input()
838  *       is called directly.
839  *    LWIP_LOOPIF_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
840  *       The packets are put on a list and loopif_poll() must be called in
841  *       the main application loop.
842  */
843 #ifndef LWIP_LOOPIF_MULTITHREADING
844 #define LWIP_LOOPIF_MULTITHREADING      1
845 #endif
846
847 /*
848    ------------------------------------
849    ---------- Thread options ----------
850    ------------------------------------
851 */
852 /**
853  * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
854  */
855 #ifndef TCPIP_THREAD_NAME
856 #define TCPIP_THREAD_NAME              "tcpip_thread"
857 #endif
858
859 /**
860  * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread.
861  * The stack size value itself is platform-dependent, but is passed to
862  * sys_thread_new() when the thread is created.
863  */
864 #ifndef TCPIP_THREAD_STACKSIZE
865 #define TCPIP_THREAD_STACKSIZE          0
866 #endif
867
868 /**
869  * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
870  * The priority value itself is platform-dependent, but is passed to
871  * sys_thread_new() when the thread is created.
872  */
873 #ifndef TCPIP_THREAD_PRIO
874 #define TCPIP_THREAD_PRIO               1
875 #endif
876
877 /**
878  * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
879  */
880 #ifndef SLIPIF_THREAD_NAME
881 #define SLIPIF_THREAD_NAME             "slipif_loop"
882 #endif
883
884 /**
885  * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
886  * The stack size value itself is platform-dependent, but is passed to
887  * sys_thread_new() when the thread is created.
888  */
889 #ifndef SLIPIF_THREAD_STACKSIZE
890 #define SLIPIF_THREAD_STACKSIZE         0
891 #endif
892
893 /**
894  * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
895  * The priority value itself is platform-dependent, but is passed to
896  * sys_thread_new() when the thread is created.
897  */
898 #ifndef SLIPIF_THREAD_PRIO
899 #define SLIPIF_THREAD_PRIO              1
900 #endif
901
902 /**
903  * PPP_THREAD_NAME: The name assigned to the pppMain thread.
904  */
905 #ifndef PPP_THREAD_NAME
906 #define PPP_THREAD_NAME                "pppMain"
907 #endif
908
909 /**
910  * PPP_THREAD_STACKSIZE: The stack size used by the pppMain thread.
911  * The stack size value itself is platform-dependent, but is passed to
912  * sys_thread_new() when the thread is created.
913  */
914 #ifndef PPP_THREAD_STACKSIZE
915 #define PPP_THREAD_STACKSIZE            0
916 #endif
917
918 /**
919  * PPP_THREAD_PRIO: The priority assigned to the pppMain thread.
920  * The priority value itself is platform-dependent, but is passed to
921  * sys_thread_new() when the thread is created.
922  */
923 #ifndef PPP_THREAD_PRIO
924 #define PPP_THREAD_PRIO                 1
925 #endif
926
927 /**
928  * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
929  */
930 #ifndef DEFAULT_THREAD_NAME
931 #define DEFAULT_THREAD_NAME            "lwIP"
932 #endif
933
934 /**
935  * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
936  * The stack size value itself is platform-dependent, but is passed to
937  * sys_thread_new() when the thread is created.
938  */
939 #ifndef DEFAULT_THREAD_STACKSIZE
940 #define DEFAULT_THREAD_STACKSIZE        0
941 #endif
942
943 /**
944  * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
945  * The priority value itself is platform-dependent, but is passed to
946  * sys_thread_new() when the thread is created.
947  */
948 #ifndef DEFAULT_THREAD_PRIO
949 #define DEFAULT_THREAD_PRIO             1
950 #endif
951
952 /*
953    ----------------------------------------------
954    ---------- Sequential layer options ----------
955    ----------------------------------------------
956 */
957 /**
958  * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
959  * Don't use it if you're not an active lwIP project member
960  */
961 #ifndef LWIP_TCPIP_CORE_LOCKING
962 #define LWIP_TCPIP_CORE_LOCKING         0
963 #endif
964
965 /**
966  * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
967  */
968 #ifndef LWIP_NETCONN
969 #define LWIP_NETCONN                    1
970 #endif
971
972 /*
973    ------------------------------------
974    ---------- Socket options ----------
975    ------------------------------------
976 */
977 /**
978  * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
979  */
980 #ifndef LWIP_SOCKET
981 #define LWIP_SOCKET                     1
982 #endif
983
984 /**
985  * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
986  * (only used if you use sockets.c)
987  */
988 #ifndef LWIP_COMPAT_SOCKETS
989 #define LWIP_COMPAT_SOCKETS             1
990 #endif
991
992 /**
993  * LWIP_COMPAT_SOCKETS==1: Enable POSIX-style sockets functions names. Disable
994  * this option if you use a POSIX operating system that uses the same names
995  * (read, write & close). (only used if you use sockets.c)
996  */
997 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
998 #define LWIP_POSIX_SOCKETS_IO_NAMES     1
999 #endif
1000
1001 /**
1002  * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
1003  * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
1004  * in seconds. (does not require sockets.c, and will affect tcp.c)
1005  */
1006 #ifndef LWIP_TCP_KEEPALIVE
1007 #define LWIP_TCP_KEEPALIVE              0
1008 #endif
1009
1010 /**
1011  * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing.
1012  */
1013 #ifndef LWIP_SO_RCVTIMEO
1014 #define LWIP_SO_RCVTIMEO                0
1015 #endif
1016
1017 /**
1018  * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
1019  */
1020 #ifndef LWIP_SO_RCVBUF
1021 #define LWIP_SO_RCVBUF                  0
1022 #endif
1023
1024 /**
1025  * SO_REUSE==1: Enable SO_REUSEADDR and SO_REUSEPORT options. DO NOT USE!
1026  */
1027 #ifndef SO_REUSE
1028 #define SO_REUSE                        0
1029 #endif
1030
1031 /*
1032    ----------------------------------------
1033    ---------- Statistics options ----------
1034    ----------------------------------------
1035 */
1036 /**
1037  * LWIP_STATS==1: Enable statistics collection in lwip_stats.
1038  */
1039 #ifndef LWIP_STATS
1040 #define LWIP_STATS                      1
1041 #endif
1042
1043 #if LWIP_STATS
1044
1045 /**
1046  * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
1047  */
1048 #ifndef LWIP_STATS_DISPLAY
1049 #define LWIP_STATS_DISPLAY              0
1050 #endif
1051
1052 /**
1053  * LINK_STATS==1: Enable link stats.
1054  */
1055 #ifndef LINK_STATS
1056 #define LINK_STATS                      1
1057 #endif
1058
1059 /**
1060  * ETHARP_STATS==1: Enable etharp stats.
1061  */
1062 #ifndef ETHARP_STATS
1063 #define ETHARP_STATS                    (LWIP_ARP)
1064 #endif
1065
1066 /**
1067  * IP_STATS==1: Enable IP stats.
1068  */
1069 #ifndef IP_STATS
1070 #define IP_STATS                        1
1071 #endif
1072
1073 /**
1074  * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
1075  * on if using either frag or reass.
1076  */
1077 #ifndef IPFRAG_STATS
1078 #define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)
1079 #endif
1080
1081 /**
1082  * ICMP_STATS==1: Enable ICMP stats.
1083  */
1084 #ifndef ICMP_STATS
1085 #define ICMP_STATS                      1
1086 #endif
1087
1088 /**
1089  * IGMP_STATS==1: Enable IGMP stats.
1090  */
1091 #ifndef IGMP_STATS
1092 #define IGMP_STATS                      (LWIP_IGMP)
1093 #endif
1094
1095 /**
1096  * UDP_STATS==1: Enable UDP stats. Default is on if
1097  * UDP enabled, otherwise off.
1098  */
1099 #ifndef UDP_STATS
1100 #define UDP_STATS                       (LWIP_UDP)
1101 #endif
1102
1103 /**
1104  * TCP_STATS==1: Enable TCP stats. Default is on if TCP
1105  * enabled, otherwise off.
1106  */
1107 #ifndef TCP_STATS
1108 #define TCP_STATS                       (LWIP_TCP)
1109 #endif
1110
1111 /**
1112  * MEM_STATS==1: Enable mem.c stats.
1113  */
1114 #ifndef MEM_STATS
1115 #define MEM_STATS                       1
1116 #endif
1117
1118 /**
1119  * MEMP_STATS==1: Enable memp.c pool stats.
1120  */
1121 #ifndef MEMP_STATS
1122 #define MEMP_STATS                      1
1123 #endif
1124
1125 /**
1126  * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
1127  */
1128 #ifndef SYS_STATS
1129 #define SYS_STATS                       1
1130 #endif
1131
1132 #else
1133
1134 #define LINK_STATS                      0
1135 #define IP_STATS                        0
1136 #define IPFRAG_STATS                    0
1137 #define ICMP_STATS                      0
1138 #define IGMP_STATS                      0
1139 #define UDP_STATS                       0
1140 #define TCP_STATS                       0
1141 #define MEM_STATS                       0
1142 #define MEMP_STATS                      0
1143 #define SYS_STATS                       0
1144 #define LWIP_STATS_DISPLAY              0
1145
1146 #endif /* LWIP_STATS */
1147
1148 /*
1149    ---------------------------------
1150    ---------- PPP options ----------
1151    ---------------------------------
1152 */
1153 /**
1154  * PPP_SUPPORT==1: Enable PPP.
1155  */
1156 #ifndef PPP_SUPPORT
1157 #define PPP_SUPPORT                     0
1158 #endif
1159
1160 /**
1161  * PPPOE_SUPPORT==1: Enable PPP Over Ethernet
1162  */
1163 #ifndef PPPOE_SUPPORT
1164 #define PPPOE_SUPPORT                   0
1165 #endif
1166
1167 /**
1168  * PPPOS_SUPPORT==1: Enable PPP Over Serial
1169  */
1170 #ifndef PPPOS_SUPPORT
1171 #define PPPOS_SUPPORT                   PPP_SUPPORT
1172 #endif
1173
1174 #if PPP_SUPPORT
1175
1176 /**
1177  * NUM_PPP: Max PPP sessions.
1178  */
1179 #ifndef NUM_PPP
1180 #define NUM_PPP                         1
1181 #endif
1182
1183 /**
1184  * PAP_SUPPORT==1: Support PAP.
1185  */
1186 #ifndef PAP_SUPPORT
1187 #define PAP_SUPPORT                     0
1188 #endif
1189
1190 /**
1191  * CHAP_SUPPORT==1: Support CHAP.
1192  */
1193 #ifndef CHAP_SUPPORT
1194 #define CHAP_SUPPORT                    0
1195 #endif
1196
1197 /**
1198  * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1199  */
1200 #ifndef MSCHAP_SUPPORT
1201 #define MSCHAP_SUPPORT                  0
1202 #endif
1203
1204 /**
1205  * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1206  */
1207 #ifndef CBCP_SUPPORT
1208 #define CBCP_SUPPORT                    0
1209 #endif
1210
1211 /**
1212  * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1213  */
1214 #ifndef CCP_SUPPORT
1215 #define CCP_SUPPORT                     0
1216 #endif
1217
1218 /**
1219  * VJ_SUPPORT==1: Support VJ header compression.
1220  */
1221 #ifndef VJ_SUPPORT
1222 #define VJ_SUPPORT                      0
1223 #endif
1224
1225 /**
1226  * MD5_SUPPORT==1: Support MD5 (see also CHAP).
1227  */
1228 #ifndef MD5_SUPPORT
1229 #define MD5_SUPPORT                     0
1230 #endif
1231
1232 /*
1233  * Timeouts
1234  */
1235 #ifndef FSM_DEFTIMEOUT
1236 #define FSM_DEFTIMEOUT                  6       /* Timeout time in seconds */
1237 #endif
1238
1239 #ifndef FSM_DEFMAXTERMREQS
1240 #define FSM_DEFMAXTERMREQS              2       /* Maximum Terminate-Request transmissions */
1241 #endif
1242
1243 #ifndef FSM_DEFMAXCONFREQS
1244 #define FSM_DEFMAXCONFREQS              10      /* Maximum Configure-Request transmissions */
1245 #endif
1246
1247 #ifndef FSM_DEFMAXNAKLOOPS
1248 #define FSM_DEFMAXNAKLOOPS              5       /* Maximum number of nak loops */
1249 #endif
1250
1251 #ifndef UPAP_DEFTIMEOUT
1252 #define UPAP_DEFTIMEOUT                 6       /* Timeout (seconds) for retransmitting req */
1253 #endif
1254
1255 #ifndef UPAP_DEFREQTIME
1256 #define UPAP_DEFREQTIME                 30      /* Time to wait for auth-req from peer */
1257 #endif
1258
1259 #ifndef CHAP_DEFTIMEOUT
1260 #define CHAP_DEFTIMEOUT                 6       /* Timeout time in seconds */
1261 #endif
1262
1263 #ifndef CHAP_DEFTRANSMITS
1264 #define CHAP_DEFTRANSMITS               10      /* max # times to send challenge */
1265 #endif
1266
1267 /* Interval in seconds between keepalive echo requests, 0 to disable. */
1268 #ifndef LCP_ECHOINTERVAL
1269 #define LCP_ECHOINTERVAL                0
1270 #endif
1271
1272 /* Number of unanswered echo requests before failure. */
1273 #ifndef LCP_MAXECHOFAILS
1274 #define LCP_MAXECHOFAILS                3
1275 #endif
1276
1277 /* Max Xmit idle time (in jiffies) before resend flag char. */
1278 #ifndef PPP_MAXIDLEFLAG
1279 #define PPP_MAXIDLEFLAG                 100
1280 #endif
1281
1282 /*
1283  * Packet sizes
1284  *
1285  * Note - lcp shouldn't be allowed to negotiate stuff outside these
1286  *    limits.  See lcp.h in the pppd directory.
1287  * (XXX - these constants should simply be shared by lcp.c instead
1288  *    of living in lcp.h)
1289  */
1290 #define PPP_MTU                         1500     /* Default MTU (size of Info field) */
1291 #ifndef PPP_MAXMTU
1292 /* #define PPP_MAXMTU  65535 - (PPP_HDRLEN + PPP_FCSLEN) */
1293 #define PPP_MAXMTU                      1500 /* Largest MTU we allow */
1294 #endif
1295 #define PPP_MINMTU                      64
1296 #define PPP_MRU                         1500     /* default MRU = max length of info field */
1297 #define PPP_MAXMRU                      1500     /* Largest MRU we allow */
1298 #ifndef PPP_DEFMRU
1299 #define PPP_DEFMRU                      296             /* Try for this */
1300 #endif
1301 #define PPP_MINMRU                      128             /* No MRUs below this */
1302
1303
1304 #define MAXNAMELEN                      256     /* max length of hostname or name for auth */
1305 #define MAXSECRETLEN                    256     /* max length of password or secret */
1306
1307 #endif /* PPP_SUPPORT */
1308
1309 /*
1310    --------------------------------------
1311    ---------- Checksum options ----------
1312    --------------------------------------
1313 */
1314 /**
1315  * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
1316  */
1317 #ifndef CHECKSUM_GEN_IP
1318 #define CHECKSUM_GEN_IP                 1
1319 #endif
1320  
1321 /**
1322  * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
1323  */
1324 #ifndef CHECKSUM_GEN_UDP
1325 #define CHECKSUM_GEN_UDP                1
1326 #endif
1327  
1328 /**
1329  * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
1330  */
1331 #ifndef CHECKSUM_GEN_TCP
1332 #define CHECKSUM_GEN_TCP                1
1333 #endif
1334  
1335 /**
1336  * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
1337  */
1338 #ifndef CHECKSUM_CHECK_IP
1339 #define CHECKSUM_CHECK_IP               1
1340 #endif
1341  
1342 /**
1343  * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
1344  */
1345 #ifndef CHECKSUM_CHECK_UDP
1346 #define CHECKSUM_CHECK_UDP              1
1347 #endif
1348
1349 /**
1350  * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
1351  */
1352 #ifndef CHECKSUM_CHECK_TCP
1353 #define CHECKSUM_CHECK_TCP              1
1354 #endif
1355
1356 /*
1357    ---------------------------------------
1358    ---------- Debugging options ----------
1359    ---------------------------------------
1360 */
1361 /**
1362  * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
1363  * compared against this value. If it is smaller, then debugging
1364  * messages are written.
1365  */
1366 #ifndef LWIP_DBG_MIN_LEVEL
1367 #define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_OFF
1368 #endif
1369
1370 /**
1371  * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
1372  * debug messages of certain types.
1373  */
1374 #ifndef LWIP_DBG_TYPES_ON
1375 #define LWIP_DBG_TYPES_ON               LWIP_DBG_ON
1376 #endif
1377
1378 /**
1379  * ETHARP_DEBUG: Enable debugging in etharp.c.
1380  */
1381 #ifndef ETHARP_DEBUG
1382 #define ETHARP_DEBUG                    LWIP_DBG_OFF
1383 #endif
1384
1385 /**
1386  * NETIF_DEBUG: Enable debugging in netif.c.
1387  */
1388 #ifndef NETIF_DEBUG
1389 #define NETIF_DEBUG                     LWIP_DBG_OFF
1390 #endif
1391
1392 /**
1393  * PBUF_DEBUG: Enable debugging in pbuf.c.
1394  */
1395 #ifndef PBUF_DEBUG
1396 #define PBUF_DEBUG                      LWIP_DBG_OFF
1397 #endif
1398
1399 /**
1400  * API_LIB_DEBUG: Enable debugging in api_lib.c.
1401  */
1402 #ifndef API_LIB_DEBUG
1403 #define API_LIB_DEBUG                   LWIP_DBG_OFF
1404 #endif
1405
1406 /**
1407  * API_MSG_DEBUG: Enable debugging in api_msg.c.
1408  */
1409 #ifndef API_MSG_DEBUG
1410 #define API_MSG_DEBUG                   LWIP_DBG_OFF
1411 #endif
1412
1413 /**
1414  * SOCKETS_DEBUG: Enable debugging in sockets.c.
1415  */
1416 #ifndef SOCKETS_DEBUG
1417 #define SOCKETS_DEBUG                   LWIP_DBG_OFF
1418 #endif
1419
1420 /**
1421  * ICMP_DEBUG: Enable debugging in icmp.c.
1422  */
1423 #ifndef ICMP_DEBUG
1424 #define ICMP_DEBUG                      LWIP_DBG_OFF
1425 #endif
1426
1427 /**
1428  * IGMP_DEBUG: Enable debugging in igmp.c.
1429  */
1430 #ifndef IGMP_DEBUG
1431 #define IGMP_DEBUG                      LWIP_DBG_OFF
1432 #endif
1433
1434 /**
1435  * INET_DEBUG: Enable debugging in inet.c.
1436  */
1437 #ifndef INET_DEBUG
1438 #define INET_DEBUG                      LWIP_DBG_OFF
1439 #endif
1440
1441 /**
1442  * IP_DEBUG: Enable debugging for IP.
1443  */
1444 #ifndef IP_DEBUG
1445 #define IP_DEBUG                        LWIP_DBG_OFF
1446 #endif
1447
1448 /**
1449  * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
1450  */
1451 #ifndef IP_REASS_DEBUG
1452 #define IP_REASS_DEBUG                  LWIP_DBG_OFF
1453 #endif
1454
1455 /**
1456  * RAW_DEBUG: Enable debugging in raw.c.
1457  */
1458 #ifndef RAW_DEBUG
1459 #define RAW_DEBUG                       LWIP_DBG_OFF
1460 #endif
1461
1462 /**
1463  * MEM_DEBUG: Enable debugging in mem.c.
1464  */
1465 #ifndef MEM_DEBUG
1466 #define MEM_DEBUG                       LWIP_DBG_OFF
1467 #endif
1468
1469 /**
1470  * MEMP_DEBUG: Enable debugging in memp.c.
1471  */
1472 #ifndef MEMP_DEBUG
1473 #define MEMP_DEBUG                      LWIP_DBG_OFF
1474 #endif
1475
1476 /**
1477  * SYS_DEBUG: Enable debugging in sys.c.
1478  */
1479 #ifndef SYS_DEBUG
1480 #define SYS_DEBUG                       LWIP_DBG_OFF
1481 #endif
1482
1483 /**
1484  * TCP_DEBUG: Enable debugging for TCP.
1485  */
1486 #ifndef TCP_DEBUG
1487 #define TCP_DEBUG                       LWIP_DBG_OFF
1488 #endif
1489
1490 /**
1491  * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
1492  */
1493 #ifndef TCP_INPUT_DEBUG
1494 #define TCP_INPUT_DEBUG                 LWIP_DBG_OFF
1495 #endif
1496
1497 /**
1498  * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
1499  */
1500 #ifndef TCP_FR_DEBUG
1501 #define TCP_FR_DEBUG                    LWIP_DBG_OFF
1502 #endif
1503
1504 /**
1505  * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
1506  * timeout.
1507  */
1508 #ifndef TCP_RTO_DEBUG
1509 #define TCP_RTO_DEBUG                   LWIP_DBG_OFF
1510 #endif
1511
1512 /**
1513  * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
1514  */
1515 #ifndef TCP_CWND_DEBUG
1516 #define TCP_CWND_DEBUG                  LWIP_DBG_OFF
1517 #endif
1518
1519 /**
1520  * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
1521  */
1522 #ifndef TCP_WND_DEBUG
1523 #define TCP_WND_DEBUG                   LWIP_DBG_OFF
1524 #endif
1525
1526 /**
1527  * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
1528  */
1529 #ifndef TCP_OUTPUT_DEBUG
1530 #define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF
1531 #endif
1532
1533 /**
1534  * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
1535  */
1536 #ifndef TCP_RST_DEBUG
1537 #define TCP_RST_DEBUG                   LWIP_DBG_OFF
1538 #endif
1539
1540 /**
1541  * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
1542  */
1543 #ifndef TCP_QLEN_DEBUG
1544 #define TCP_QLEN_DEBUG                  LWIP_DBG_OFF
1545 #endif
1546
1547 /**
1548  * UDP_DEBUG: Enable debugging in UDP.
1549  */
1550 #ifndef UDP_DEBUG
1551 #define UDP_DEBUG                       LWIP_DBG_OFF
1552 #endif
1553
1554 /**
1555  * TCPIP_DEBUG: Enable debugging in tcpip.c.
1556  */
1557 #ifndef TCPIP_DEBUG
1558 #define TCPIP_DEBUG                     LWIP_DBG_OFF
1559 #endif
1560
1561 /**
1562  * PPP_DEBUG: Enable debugging for PPP.
1563  */
1564 #ifndef PPP_DEBUG
1565 #define PPP_DEBUG                       LWIP_DBG_OFF
1566 #endif
1567
1568 /**
1569  * SLIP_DEBUG: Enable debugging in slipif.c.
1570  */
1571 #ifndef SLIP_DEBUG
1572 #define SLIP_DEBUG                      LWIP_DBG_OFF
1573 #endif
1574
1575 /**
1576  * DHCP_DEBUG: Enable debugging in dhcp.c.
1577  */
1578 #ifndef DHCP_DEBUG
1579 #define DHCP_DEBUG                      LWIP_DBG_OFF
1580 #endif
1581
1582 /**
1583  * AUTOIP_DEBUG: Enable debugging in autoip.c.
1584  */
1585 #ifndef AUTOIP_DEBUG
1586 #define AUTOIP_DEBUG                    LWIP_DBG_OFF
1587 #endif
1588
1589 /**
1590  * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
1591  */
1592 #ifndef SNMP_MSG_DEBUG
1593 #define SNMP_MSG_DEBUG                  LWIP_DBG_OFF
1594 #endif
1595
1596 /**
1597  * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
1598  */
1599 #ifndef SNMP_MIB_DEBUG
1600 #define SNMP_MIB_DEBUG                  LWIP_DBG_OFF
1601 #endif
1602
1603 /**
1604  * DNS_DEBUG: Enable debugging for DNS.
1605  */
1606 #ifndef DNS_DEBUG
1607 #define DNS_DEBUG                       LWIP_DBG_OFF
1608 #endif
1609
1610 #endif /* __LWIP_OPT_H__ */