]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blob - src/include/lwip/opt.h
sys_arch.txt, api.h, api_lib.c, api_msg.h, api_msg.c, tcpip.c, sys.h, opt.h: Introduc...
[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  * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages
879  * The queue size value itself is platform-dependent, but is passed to
880  * sys_mbox_new() when tcpip_init is called.
881  */
882 #ifndef TCPIP_MBOX_SIZE
883 #define TCPIP_MBOX_SIZE                 0
884 #endif
885
886 /**
887  * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
888  */
889 #ifndef SLIPIF_THREAD_NAME
890 #define SLIPIF_THREAD_NAME             "slipif_loop"
891 #endif
892
893 /**
894  * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
895  * The stack size value itself is platform-dependent, but is passed to
896  * sys_thread_new() when the thread is created.
897  */
898 #ifndef SLIPIF_THREAD_STACKSIZE
899 #define SLIPIF_THREAD_STACKSIZE         0
900 #endif
901
902 /**
903  * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
904  * The priority value itself is platform-dependent, but is passed to
905  * sys_thread_new() when the thread is created.
906  */
907 #ifndef SLIPIF_THREAD_PRIO
908 #define SLIPIF_THREAD_PRIO              1
909 #endif
910
911 /**
912  * PPP_THREAD_NAME: The name assigned to the pppMain thread.
913  */
914 #ifndef PPP_THREAD_NAME
915 #define PPP_THREAD_NAME                "pppMain"
916 #endif
917
918 /**
919  * PPP_THREAD_STACKSIZE: The stack size used by the pppMain thread.
920  * The stack size value itself is platform-dependent, but is passed to
921  * sys_thread_new() when the thread is created.
922  */
923 #ifndef PPP_THREAD_STACKSIZE
924 #define PPP_THREAD_STACKSIZE            0
925 #endif
926
927 /**
928  * PPP_THREAD_PRIO: The priority assigned to the pppMain thread.
929  * The priority value itself is platform-dependent, but is passed to
930  * sys_thread_new() when the thread is created.
931  */
932 #ifndef PPP_THREAD_PRIO
933 #define PPP_THREAD_PRIO                 1
934 #endif
935
936 /**
937  * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
938  */
939 #ifndef DEFAULT_THREAD_NAME
940 #define DEFAULT_THREAD_NAME            "lwIP"
941 #endif
942
943 /**
944  * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
945  * The stack size value itself is platform-dependent, but is passed to
946  * sys_thread_new() when the thread is created.
947  */
948 #ifndef DEFAULT_THREAD_STACKSIZE
949 #define DEFAULT_THREAD_STACKSIZE        0
950 #endif
951
952 /**
953  * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
954  * The priority value itself is platform-dependent, but is passed to
955  * sys_thread_new() when the thread is created.
956  */
957 #ifndef DEFAULT_THREAD_PRIO
958 #define DEFAULT_THREAD_PRIO             1
959 #endif
960
961 /**
962  * DEFAULT_RECVMBOX_SIZE: The mailbox size for the incoming packets.
963  * The queue size value itself is platform-dependent, but is passed to
964  * sys_mbox_new() when the recvmbox is created.
965  */
966 #ifndef DEFAULT_RECVMBOX_SIZE
967 #define DEFAULT_RECVMBOX_SIZE           0
968 #endif
969
970 /**
971  * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections.
972  * The queue size value itself is platform-dependent, but is passed to
973  * sys_mbox_new() when the acceptmbox is created.
974  */
975 #ifndef DEFAULT_ACCEPTMBOX_SIZE
976 #define DEFAULT_ACCEPTMBOX_SIZE         0
977 #endif
978
979 /*
980    ----------------------------------------------
981    ---------- Sequential layer options ----------
982    ----------------------------------------------
983 */
984 /**
985  * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
986  * Don't use it if you're not an active lwIP project member
987  */
988 #ifndef LWIP_TCPIP_CORE_LOCKING
989 #define LWIP_TCPIP_CORE_LOCKING         0
990 #endif
991
992 /**
993  * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
994  */
995 #ifndef LWIP_NETCONN
996 #define LWIP_NETCONN                    1
997 #endif
998
999 /*
1000    ------------------------------------
1001    ---------- Socket options ----------
1002    ------------------------------------
1003 */
1004 /**
1005  * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
1006  */
1007 #ifndef LWIP_SOCKET
1008 #define LWIP_SOCKET                     1
1009 #endif
1010
1011 /**
1012  * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
1013  * (only used if you use sockets.c)
1014  */
1015 #ifndef LWIP_COMPAT_SOCKETS
1016 #define LWIP_COMPAT_SOCKETS             1
1017 #endif
1018
1019 /**
1020  * LWIP_COMPAT_SOCKETS==1: Enable POSIX-style sockets functions names. Disable
1021  * this option if you use a POSIX operating system that uses the same names
1022  * (read, write & close). (only used if you use sockets.c)
1023  */
1024 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
1025 #define LWIP_POSIX_SOCKETS_IO_NAMES     1
1026 #endif
1027
1028 /**
1029  * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
1030  * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
1031  * in seconds. (does not require sockets.c, and will affect tcp.c)
1032  */
1033 #ifndef LWIP_TCP_KEEPALIVE
1034 #define LWIP_TCP_KEEPALIVE              0
1035 #endif
1036
1037 /**
1038  * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing.
1039  */
1040 #ifndef LWIP_SO_RCVTIMEO
1041 #define LWIP_SO_RCVTIMEO                0
1042 #endif
1043
1044 /**
1045  * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
1046  */
1047 #ifndef LWIP_SO_RCVBUF
1048 #define LWIP_SO_RCVBUF                  0
1049 #endif
1050
1051 /**
1052  * SO_REUSE==1: Enable SO_REUSEADDR and SO_REUSEPORT options. DO NOT USE!
1053  */
1054 #ifndef SO_REUSE
1055 #define SO_REUSE                        0
1056 #endif
1057
1058 /*
1059    ----------------------------------------
1060    ---------- Statistics options ----------
1061    ----------------------------------------
1062 */
1063 /**
1064  * LWIP_STATS==1: Enable statistics collection in lwip_stats.
1065  */
1066 #ifndef LWIP_STATS
1067 #define LWIP_STATS                      1
1068 #endif
1069
1070 #if LWIP_STATS
1071
1072 /**
1073  * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
1074  */
1075 #ifndef LWIP_STATS_DISPLAY
1076 #define LWIP_STATS_DISPLAY              0
1077 #endif
1078
1079 /**
1080  * LINK_STATS==1: Enable link stats.
1081  */
1082 #ifndef LINK_STATS
1083 #define LINK_STATS                      1
1084 #endif
1085
1086 /**
1087  * ETHARP_STATS==1: Enable etharp stats.
1088  */
1089 #ifndef ETHARP_STATS
1090 #define ETHARP_STATS                    (LWIP_ARP)
1091 #endif
1092
1093 /**
1094  * IP_STATS==1: Enable IP stats.
1095  */
1096 #ifndef IP_STATS
1097 #define IP_STATS                        1
1098 #endif
1099
1100 /**
1101  * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
1102  * on if using either frag or reass.
1103  */
1104 #ifndef IPFRAG_STATS
1105 #define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)
1106 #endif
1107
1108 /**
1109  * ICMP_STATS==1: Enable ICMP stats.
1110  */
1111 #ifndef ICMP_STATS
1112 #define ICMP_STATS                      1
1113 #endif
1114
1115 /**
1116  * IGMP_STATS==1: Enable IGMP stats.
1117  */
1118 #ifndef IGMP_STATS
1119 #define IGMP_STATS                      (LWIP_IGMP)
1120 #endif
1121
1122 /**
1123  * UDP_STATS==1: Enable UDP stats. Default is on if
1124  * UDP enabled, otherwise off.
1125  */
1126 #ifndef UDP_STATS
1127 #define UDP_STATS                       (LWIP_UDP)
1128 #endif
1129
1130 /**
1131  * TCP_STATS==1: Enable TCP stats. Default is on if TCP
1132  * enabled, otherwise off.
1133  */
1134 #ifndef TCP_STATS
1135 #define TCP_STATS                       (LWIP_TCP)
1136 #endif
1137
1138 /**
1139  * MEM_STATS==1: Enable mem.c stats.
1140  */
1141 #ifndef MEM_STATS
1142 #define MEM_STATS                       1
1143 #endif
1144
1145 /**
1146  * MEMP_STATS==1: Enable memp.c pool stats.
1147  */
1148 #ifndef MEMP_STATS
1149 #define MEMP_STATS                      1
1150 #endif
1151
1152 /**
1153  * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
1154  */
1155 #ifndef SYS_STATS
1156 #define SYS_STATS                       1
1157 #endif
1158
1159 #else
1160
1161 #define LINK_STATS                      0
1162 #define IP_STATS                        0
1163 #define IPFRAG_STATS                    0
1164 #define ICMP_STATS                      0
1165 #define IGMP_STATS                      0
1166 #define UDP_STATS                       0
1167 #define TCP_STATS                       0
1168 #define MEM_STATS                       0
1169 #define MEMP_STATS                      0
1170 #define SYS_STATS                       0
1171 #define LWIP_STATS_DISPLAY              0
1172
1173 #endif /* LWIP_STATS */
1174
1175 /*
1176    ---------------------------------
1177    ---------- PPP options ----------
1178    ---------------------------------
1179 */
1180 /**
1181  * PPP_SUPPORT==1: Enable PPP.
1182  */
1183 #ifndef PPP_SUPPORT
1184 #define PPP_SUPPORT                     0
1185 #endif
1186
1187 /**
1188  * PPPOE_SUPPORT==1: Enable PPP Over Ethernet
1189  */
1190 #ifndef PPPOE_SUPPORT
1191 #define PPPOE_SUPPORT                   0
1192 #endif
1193
1194 /**
1195  * PPPOS_SUPPORT==1: Enable PPP Over Serial
1196  */
1197 #ifndef PPPOS_SUPPORT
1198 #define PPPOS_SUPPORT                   PPP_SUPPORT
1199 #endif
1200
1201 #if PPP_SUPPORT
1202
1203 /**
1204  * NUM_PPP: Max PPP sessions.
1205  */
1206 #ifndef NUM_PPP
1207 #define NUM_PPP                         1
1208 #endif
1209
1210 /**
1211  * PAP_SUPPORT==1: Support PAP.
1212  */
1213 #ifndef PAP_SUPPORT
1214 #define PAP_SUPPORT                     0
1215 #endif
1216
1217 /**
1218  * CHAP_SUPPORT==1: Support CHAP.
1219  */
1220 #ifndef CHAP_SUPPORT
1221 #define CHAP_SUPPORT                    0
1222 #endif
1223
1224 /**
1225  * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1226  */
1227 #ifndef MSCHAP_SUPPORT
1228 #define MSCHAP_SUPPORT                  0
1229 #endif
1230
1231 /**
1232  * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1233  */
1234 #ifndef CBCP_SUPPORT
1235 #define CBCP_SUPPORT                    0
1236 #endif
1237
1238 /**
1239  * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
1240  */
1241 #ifndef CCP_SUPPORT
1242 #define CCP_SUPPORT                     0
1243 #endif
1244
1245 /**
1246  * VJ_SUPPORT==1: Support VJ header compression.
1247  */
1248 #ifndef VJ_SUPPORT
1249 #define VJ_SUPPORT                      0
1250 #endif
1251
1252 /**
1253  * MD5_SUPPORT==1: Support MD5 (see also CHAP).
1254  */
1255 #ifndef MD5_SUPPORT
1256 #define MD5_SUPPORT                     0
1257 #endif
1258
1259 /*
1260  * Timeouts
1261  */
1262 #ifndef FSM_DEFTIMEOUT
1263 #define FSM_DEFTIMEOUT                  6       /* Timeout time in seconds */
1264 #endif
1265
1266 #ifndef FSM_DEFMAXTERMREQS
1267 #define FSM_DEFMAXTERMREQS              2       /* Maximum Terminate-Request transmissions */
1268 #endif
1269
1270 #ifndef FSM_DEFMAXCONFREQS
1271 #define FSM_DEFMAXCONFREQS              10      /* Maximum Configure-Request transmissions */
1272 #endif
1273
1274 #ifndef FSM_DEFMAXNAKLOOPS
1275 #define FSM_DEFMAXNAKLOOPS              5       /* Maximum number of nak loops */
1276 #endif
1277
1278 #ifndef UPAP_DEFTIMEOUT
1279 #define UPAP_DEFTIMEOUT                 6       /* Timeout (seconds) for retransmitting req */
1280 #endif
1281
1282 #ifndef UPAP_DEFREQTIME
1283 #define UPAP_DEFREQTIME                 30      /* Time to wait for auth-req from peer */
1284 #endif
1285
1286 #ifndef CHAP_DEFTIMEOUT
1287 #define CHAP_DEFTIMEOUT                 6       /* Timeout time in seconds */
1288 #endif
1289
1290 #ifndef CHAP_DEFTRANSMITS
1291 #define CHAP_DEFTRANSMITS               10      /* max # times to send challenge */
1292 #endif
1293
1294 /* Interval in seconds between keepalive echo requests, 0 to disable. */
1295 #ifndef LCP_ECHOINTERVAL
1296 #define LCP_ECHOINTERVAL                0
1297 #endif
1298
1299 /* Number of unanswered echo requests before failure. */
1300 #ifndef LCP_MAXECHOFAILS
1301 #define LCP_MAXECHOFAILS                3
1302 #endif
1303
1304 /* Max Xmit idle time (in jiffies) before resend flag char. */
1305 #ifndef PPP_MAXIDLEFLAG
1306 #define PPP_MAXIDLEFLAG                 100
1307 #endif
1308
1309 /*
1310  * Packet sizes
1311  *
1312  * Note - lcp shouldn't be allowed to negotiate stuff outside these
1313  *    limits.  See lcp.h in the pppd directory.
1314  * (XXX - these constants should simply be shared by lcp.c instead
1315  *    of living in lcp.h)
1316  */
1317 #define PPP_MTU                         1500     /* Default MTU (size of Info field) */
1318 #ifndef PPP_MAXMTU
1319 /* #define PPP_MAXMTU  65535 - (PPP_HDRLEN + PPP_FCSLEN) */
1320 #define PPP_MAXMTU                      1500 /* Largest MTU we allow */
1321 #endif
1322 #define PPP_MINMTU                      64
1323 #define PPP_MRU                         1500     /* default MRU = max length of info field */
1324 #define PPP_MAXMRU                      1500     /* Largest MRU we allow */
1325 #ifndef PPP_DEFMRU
1326 #define PPP_DEFMRU                      296             /* Try for this */
1327 #endif
1328 #define PPP_MINMRU                      128             /* No MRUs below this */
1329
1330
1331 #define MAXNAMELEN                      256     /* max length of hostname or name for auth */
1332 #define MAXSECRETLEN                    256     /* max length of password or secret */
1333
1334 #endif /* PPP_SUPPORT */
1335
1336 /*
1337    --------------------------------------
1338    ---------- Checksum options ----------
1339    --------------------------------------
1340 */
1341 /**
1342  * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
1343  */
1344 #ifndef CHECKSUM_GEN_IP
1345 #define CHECKSUM_GEN_IP                 1
1346 #endif
1347  
1348 /**
1349  * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
1350  */
1351 #ifndef CHECKSUM_GEN_UDP
1352 #define CHECKSUM_GEN_UDP                1
1353 #endif
1354  
1355 /**
1356  * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
1357  */
1358 #ifndef CHECKSUM_GEN_TCP
1359 #define CHECKSUM_GEN_TCP                1
1360 #endif
1361  
1362 /**
1363  * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
1364  */
1365 #ifndef CHECKSUM_CHECK_IP
1366 #define CHECKSUM_CHECK_IP               1
1367 #endif
1368  
1369 /**
1370  * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
1371  */
1372 #ifndef CHECKSUM_CHECK_UDP
1373 #define CHECKSUM_CHECK_UDP              1
1374 #endif
1375
1376 /**
1377  * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
1378  */
1379 #ifndef CHECKSUM_CHECK_TCP
1380 #define CHECKSUM_CHECK_TCP              1
1381 #endif
1382
1383 /*
1384    ---------------------------------------
1385    ---------- Debugging options ----------
1386    ---------------------------------------
1387 */
1388 /**
1389  * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
1390  * compared against this value. If it is smaller, then debugging
1391  * messages are written.
1392  */
1393 #ifndef LWIP_DBG_MIN_LEVEL
1394 #define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_OFF
1395 #endif
1396
1397 /**
1398  * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
1399  * debug messages of certain types.
1400  */
1401 #ifndef LWIP_DBG_TYPES_ON
1402 #define LWIP_DBG_TYPES_ON               LWIP_DBG_ON
1403 #endif
1404
1405 /**
1406  * ETHARP_DEBUG: Enable debugging in etharp.c.
1407  */
1408 #ifndef ETHARP_DEBUG
1409 #define ETHARP_DEBUG                    LWIP_DBG_OFF
1410 #endif
1411
1412 /**
1413  * NETIF_DEBUG: Enable debugging in netif.c.
1414  */
1415 #ifndef NETIF_DEBUG
1416 #define NETIF_DEBUG                     LWIP_DBG_OFF
1417 #endif
1418
1419 /**
1420  * PBUF_DEBUG: Enable debugging in pbuf.c.
1421  */
1422 #ifndef PBUF_DEBUG
1423 #define PBUF_DEBUG                      LWIP_DBG_OFF
1424 #endif
1425
1426 /**
1427  * API_LIB_DEBUG: Enable debugging in api_lib.c.
1428  */
1429 #ifndef API_LIB_DEBUG
1430 #define API_LIB_DEBUG                   LWIP_DBG_OFF
1431 #endif
1432
1433 /**
1434  * API_MSG_DEBUG: Enable debugging in api_msg.c.
1435  */
1436 #ifndef API_MSG_DEBUG
1437 #define API_MSG_DEBUG                   LWIP_DBG_OFF
1438 #endif
1439
1440 /**
1441  * SOCKETS_DEBUG: Enable debugging in sockets.c.
1442  */
1443 #ifndef SOCKETS_DEBUG
1444 #define SOCKETS_DEBUG                   LWIP_DBG_OFF
1445 #endif
1446
1447 /**
1448  * ICMP_DEBUG: Enable debugging in icmp.c.
1449  */
1450 #ifndef ICMP_DEBUG
1451 #define ICMP_DEBUG                      LWIP_DBG_OFF
1452 #endif
1453
1454 /**
1455  * IGMP_DEBUG: Enable debugging in igmp.c.
1456  */
1457 #ifndef IGMP_DEBUG
1458 #define IGMP_DEBUG                      LWIP_DBG_OFF
1459 #endif
1460
1461 /**
1462  * INET_DEBUG: Enable debugging in inet.c.
1463  */
1464 #ifndef INET_DEBUG
1465 #define INET_DEBUG                      LWIP_DBG_OFF
1466 #endif
1467
1468 /**
1469  * IP_DEBUG: Enable debugging for IP.
1470  */
1471 #ifndef IP_DEBUG
1472 #define IP_DEBUG                        LWIP_DBG_OFF
1473 #endif
1474
1475 /**
1476  * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
1477  */
1478 #ifndef IP_REASS_DEBUG
1479 #define IP_REASS_DEBUG                  LWIP_DBG_OFF
1480 #endif
1481
1482 /**
1483  * RAW_DEBUG: Enable debugging in raw.c.
1484  */
1485 #ifndef RAW_DEBUG
1486 #define RAW_DEBUG                       LWIP_DBG_OFF
1487 #endif
1488
1489 /**
1490  * MEM_DEBUG: Enable debugging in mem.c.
1491  */
1492 #ifndef MEM_DEBUG
1493 #define MEM_DEBUG                       LWIP_DBG_OFF
1494 #endif
1495
1496 /**
1497  * MEMP_DEBUG: Enable debugging in memp.c.
1498  */
1499 #ifndef MEMP_DEBUG
1500 #define MEMP_DEBUG                      LWIP_DBG_OFF
1501 #endif
1502
1503 /**
1504  * SYS_DEBUG: Enable debugging in sys.c.
1505  */
1506 #ifndef SYS_DEBUG
1507 #define SYS_DEBUG                       LWIP_DBG_OFF
1508 #endif
1509
1510 /**
1511  * TCP_DEBUG: Enable debugging for TCP.
1512  */
1513 #ifndef TCP_DEBUG
1514 #define TCP_DEBUG                       LWIP_DBG_OFF
1515 #endif
1516
1517 /**
1518  * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
1519  */
1520 #ifndef TCP_INPUT_DEBUG
1521 #define TCP_INPUT_DEBUG                 LWIP_DBG_OFF
1522 #endif
1523
1524 /**
1525  * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
1526  */
1527 #ifndef TCP_FR_DEBUG
1528 #define TCP_FR_DEBUG                    LWIP_DBG_OFF
1529 #endif
1530
1531 /**
1532  * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
1533  * timeout.
1534  */
1535 #ifndef TCP_RTO_DEBUG
1536 #define TCP_RTO_DEBUG                   LWIP_DBG_OFF
1537 #endif
1538
1539 /**
1540  * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
1541  */
1542 #ifndef TCP_CWND_DEBUG
1543 #define TCP_CWND_DEBUG                  LWIP_DBG_OFF
1544 #endif
1545
1546 /**
1547  * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
1548  */
1549 #ifndef TCP_WND_DEBUG
1550 #define TCP_WND_DEBUG                   LWIP_DBG_OFF
1551 #endif
1552
1553 /**
1554  * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
1555  */
1556 #ifndef TCP_OUTPUT_DEBUG
1557 #define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF
1558 #endif
1559
1560 /**
1561  * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
1562  */
1563 #ifndef TCP_RST_DEBUG
1564 #define TCP_RST_DEBUG                   LWIP_DBG_OFF
1565 #endif
1566
1567 /**
1568  * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
1569  */
1570 #ifndef TCP_QLEN_DEBUG
1571 #define TCP_QLEN_DEBUG                  LWIP_DBG_OFF
1572 #endif
1573
1574 /**
1575  * UDP_DEBUG: Enable debugging in UDP.
1576  */
1577 #ifndef UDP_DEBUG
1578 #define UDP_DEBUG                       LWIP_DBG_OFF
1579 #endif
1580
1581 /**
1582  * TCPIP_DEBUG: Enable debugging in tcpip.c.
1583  */
1584 #ifndef TCPIP_DEBUG
1585 #define TCPIP_DEBUG                     LWIP_DBG_OFF
1586 #endif
1587
1588 /**
1589  * PPP_DEBUG: Enable debugging for PPP.
1590  */
1591 #ifndef PPP_DEBUG
1592 #define PPP_DEBUG                       LWIP_DBG_OFF
1593 #endif
1594
1595 /**
1596  * SLIP_DEBUG: Enable debugging in slipif.c.
1597  */
1598 #ifndef SLIP_DEBUG
1599 #define SLIP_DEBUG                      LWIP_DBG_OFF
1600 #endif
1601
1602 /**
1603  * DHCP_DEBUG: Enable debugging in dhcp.c.
1604  */
1605 #ifndef DHCP_DEBUG
1606 #define DHCP_DEBUG                      LWIP_DBG_OFF
1607 #endif
1608
1609 /**
1610  * AUTOIP_DEBUG: Enable debugging in autoip.c.
1611  */
1612 #ifndef AUTOIP_DEBUG
1613 #define AUTOIP_DEBUG                    LWIP_DBG_OFF
1614 #endif
1615
1616 /**
1617  * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
1618  */
1619 #ifndef SNMP_MSG_DEBUG
1620 #define SNMP_MSG_DEBUG                  LWIP_DBG_OFF
1621 #endif
1622
1623 /**
1624  * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
1625  */
1626 #ifndef SNMP_MIB_DEBUG
1627 #define SNMP_MIB_DEBUG                  LWIP_DBG_OFF
1628 #endif
1629
1630 /**
1631  * DNS_DEBUG: Enable debugging for DNS.
1632  */
1633 #ifndef DNS_DEBUG
1634 #define DNS_DEBUG                       LWIP_DBG_OFF
1635 #endif
1636
1637 #endif /* __LWIP_OPT_H__ */