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