ESP8266
lwipopts.h
1 
7 /*
8  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without modification,
12  * are permitted provided that the following conditions are met:
13  *
14  * 1. Redistributions of source code must retain the above copyright notice,
15  * this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  * 3. The name of the author may not be used to endorse or promote products
20  * derived from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31  * OF SUCH DAMAGE.
32  *
33  * This file is part of the lwIP TCP/IP stack.
34  *
35  * Author: Adam Dunkels <adam@sics.se>
36  *
37  */
38 #ifndef __LWIPOPTS_H__
39 #define __LWIPOPTS_H__
40 
41 
42 #define EBUF_LWIP 1
43 #define LWIP_ESP 1
44 #define EP_OFFSET 36
45 /*
46  -----------------------------------------------
47  ---------- Platform specific locking ----------
48  -----------------------------------------------
49 */
50 
56 #ifndef SYS_LIGHTWEIGHT_PROT
57 #define SYS_LIGHTWEIGHT_PROT 0
58 #endif
59 
64 #ifndef NO_SYS
65 #define NO_SYS 1
66 #endif
67 
72 #ifndef NO_SYS_NO_TIMERS
73 #define NO_SYS_NO_TIMERS 0
74 #endif
75 
80 #ifndef MEMCPY
81 #define MEMCPY(dst,src,len) os_memcpy(dst,src,len)
82 #endif
83 
88 #ifndef SMEMCPY
89 #define SMEMCPY(dst,src,len) os_memcpy(dst,src,len)
90 #endif
91 
92 /*
93  ------------------------------------
94  ---------- Memory options ----------
95  ------------------------------------
96 */
102 #ifndef MEM_LIBC_MALLOC
103 #define MEM_LIBC_MALLOC 1
104 #endif
105 
111 #ifndef MEMP_MEM_MALLOC
112 #define MEMP_MEM_MALLOC 1
113 #endif
114 
120 #ifndef MEM_ALIGNMENT
121 #define MEM_ALIGNMENT 4
122 #endif
123 
128 #ifndef MEM_SIZE
129 #define MEM_SIZE 16000
130 #endif
131 
137 #ifndef MEMP_SEPARATE_POOLS
138 #define MEMP_SEPARATE_POOLS 1
139 #endif
140 
150 #ifndef MEMP_OVERFLOW_CHECK
151 #define MEMP_OVERFLOW_CHECK 0
152 #endif
153 
158 #ifndef MEMP_SANITY_CHECK
159 #define MEMP_SANITY_CHECK 1
160 #endif
161 
168 #ifndef MEM_USE_POOLS
169 #define MEM_USE_POOLS 0
170 #endif
171 
176 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL
177 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0
178 #endif
179 
186 #ifndef MEMP_USE_CUSTOM_POOLS
187 #define MEMP_USE_CUSTOM_POOLS 0
188 #endif
189 
208 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
209 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
210 #endif
211 
212 /*
213  ------------------------------------------------
214  ---------- Internal Memory Pool Sizes ----------
215  ------------------------------------------------
216 */
222 #ifndef MEMP_NUM_PBUF
223 #define MEMP_NUM_PBUF 10
224 #endif
225 
230 #ifndef MEMP_NUM_RAW_PCB
231 #define MEMP_NUM_RAW_PCB 4
232 #endif
233 
239 #ifndef MEMP_NUM_UDP_PCB
240 #define MEMP_NUM_UDP_PCB 4
241 #endif
242 
247 #ifndef MEMP_NUM_TCP_PCB
248 #define MEMP_NUM_TCP_PCB (*((volatile uint32*)0x600011FC))
249 #endif
250 
255 #ifndef MEMP_NUM_TCP_PCB_LISTEN
256 #define MEMP_NUM_TCP_PCB_LISTEN 2
257 #endif
258 
263 #ifndef MEMP_NUM_TCP_SEG
264 #define MEMP_NUM_TCP_SEG 16
265 #endif
266 
271 #ifndef MEMP_NUM_REASSDATA
272 #define MEMP_NUM_REASSDATA 0
273 #endif
274 
282 #ifndef MEMP_NUM_FRAG_PBUF
283 #define MEMP_NUM_FRAG_PBUF 0
284 #endif
285 
292 #ifndef MEMP_NUM_ARP_QUEUE
293 #define MEMP_NUM_ARP_QUEUE 10
294 #endif
295 
302 #ifndef MEMP_NUM_IGMP_GROUP
303 #define MEMP_NUM_IGMP_GROUP 8
304 #endif
305 
310 #ifndef MEMP_NUM_SYS_TIMEOUT
311 #define MEMP_NUM_SYS_TIMEOUT 6
312 #endif
313 
318 #ifndef MEMP_NUM_NETBUF
319 #define MEMP_NUM_NETBUF 0
320 #endif
321 
326 #ifndef MEMP_NUM_NETCONN
327 #define MEMP_NUM_NETCONN 0
328 #endif
329 
335 #ifndef MEMP_NUM_TCPIP_MSG_API
336 #define MEMP_NUM_TCPIP_MSG_API 4
337 #endif
338 
344 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
345 #define MEMP_NUM_TCPIP_MSG_INPKT 4
346 #endif
347 
351 #ifndef MEMP_NUM_SNMP_NODE
352 #define MEMP_NUM_SNMP_NODE 0
353 #endif
354 
359 #ifndef MEMP_NUM_SNMP_ROOTNODE
360 #define MEMP_NUM_SNMP_ROOTNODE 0
361 #endif
362 
368 #ifndef MEMP_NUM_SNMP_VARBIND
369 #define MEMP_NUM_SNMP_VARBIND 0
370 #endif
371 
377 #ifndef MEMP_NUM_SNMP_VALUE
378 #define MEMP_NUM_SNMP_VALUE 0
379 #endif
380 
385 #ifndef MEMP_NUM_NETDB
386 #define MEMP_NUM_NETDB 0
387 #endif
388 
393 #ifndef MEMP_NUM_LOCALHOSTLIST
394 #define MEMP_NUM_LOCALHOSTLIST 0
395 #endif
396 
401 #ifndef MEMP_NUM_PPPOE_INTERFACES
402 #define MEMP_NUM_PPPOE_INTERFACES 0
403 #endif
404 
408 #ifndef PBUF_POOL_SIZE
409 #define PBUF_POOL_SIZE 10
410 #endif
411 
412 /*
413  ---------------------------------
414  ---------- ARP options ----------
415  ---------------------------------
416 */
420 #ifndef LWIP_ARP
421 #define LWIP_ARP 1
422 #endif
423 
427 #ifndef ARP_TABLE_SIZE
428 #define ARP_TABLE_SIZE 10
429 #endif
430 
438 #ifndef ARP_QUEUEING
439 #define ARP_QUEUEING 1
440 #endif
441 
452 #ifndef ETHARP_TRUST_IP_MAC
453 #define ETHARP_TRUST_IP_MAC 1
454 #endif
455 
462 #ifndef ETHARP_SUPPORT_VLAN
463 #define ETHARP_SUPPORT_VLAN 0
464 #endif
465 
469 #ifndef LWIP_ETHERNET
470 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT)
471 #endif
472 
478 #ifndef ETH_PAD_SIZE
479 #define ETH_PAD_SIZE 0
480 #endif
481 
485 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES
486 #define ETHARP_SUPPORT_STATIC_ENTRIES 0
487 #endif
488 
489 
490 /*
491  --------------------------------
492  ---------- IP options ----------
493  --------------------------------
494 */
500 #ifndef IP_FORWARD
501 #define IP_FORWARD 0
502 #endif
503 
509 #ifndef IP_OPTIONS_ALLOWED
510 #define IP_OPTIONS_ALLOWED 1
511 #endif
512 
518 #ifndef IP_REASSEMBLY
519 #define IP_REASSEMBLY 0
520 #endif
521 
527 #ifndef IP_FRAG
528 #define IP_FRAG 0
529 #endif
530 
536 #ifndef IP_REASS_MAXAGE
537 #define IP_REASS_MAXAGE 0
538 #endif
539 
546 #ifndef IP_REASS_MAX_PBUFS
547 #define IP_REASS_MAX_PBUFS 0
548 #endif
549 
557 #ifndef IP_FRAG_USES_STATIC_BUF
558 #define IP_FRAG_USES_STATIC_BUF 1
559 #endif
560 
565 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
566 #define IP_FRAG_MAX_MTU 1500
567 #endif
568 
572 #ifndef IP_DEFAULT_TTL
573 #define IP_DEFAULT_TTL 255
574 #endif
575 
581 #ifndef IP_SOF_BROADCAST
582 #define IP_SOF_BROADCAST 0
583 #endif
584 
589 #ifndef IP_SOF_BROADCAST_RECV
590 #define IP_SOF_BROADCAST_RECV 0
591 #endif
592 
593 /*
594  ----------------------------------
595  ---------- ICMP options ----------
596  ----------------------------------
597 */
602 #ifndef LWIP_ICMP
603 #define LWIP_ICMP 1
604 #endif
605 
609 #ifndef ICMP_TTL
610 #define ICMP_TTL (IP_DEFAULT_TTL)
611 #endif
612 
616 #ifndef LWIP_BROADCAST_PING
617 #define LWIP_BROADCAST_PING 0
618 #endif
619 
623 #ifndef LWIP_MULTICAST_PING
624 #define LWIP_MULTICAST_PING 0
625 #endif
626 
627 /*
628  ---------------------------------
629  ---------- RAW options ----------
630  ---------------------------------
631 */
635 #ifndef LWIP_RAW
636 #define LWIP_RAW 0
637 #endif
638 
642 #ifndef RAW_TTL
643 #define RAW_TTL (IP_DEFAULT_TTL)
644 #endif
645 
646 /*
647  ----------------------------------
648  ---------- DHCP options ----------
649  ----------------------------------
650 */
654 #ifndef LWIP_DHCP
655 #define LWIP_DHCP 1
656 #endif
657 
661 #ifndef DHCP_DOES_ARP_CHECK
662 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
663 #endif
664 
665 /*
666  ------------------------------------
667  ---------- AUTOIP options ----------
668  ------------------------------------
669 */
673 #ifndef LWIP_AUTOIP
674 #define LWIP_AUTOIP 0
675 #endif
676 
681 #ifndef LWIP_DHCP_AUTOIP_COOP
682 #define LWIP_DHCP_AUTOIP_COOP 0
683 #endif
684 
692 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES
693 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9
694 #endif
695 
696 /*
697  ----------------------------------
698  ---------- SNMP options ----------
699  ----------------------------------
700 */
705 #ifndef LWIP_SNMP
706 #define LWIP_SNMP 0
707 #endif
708 
713 #ifndef SNMP_CONCURRENT_REQUESTS
714 #define SNMP_CONCURRENT_REQUESTS 0
715 #endif
716 
721 #ifndef SNMP_TRAP_DESTINATIONS
722 #define SNMP_TRAP_DESTINATIONS 0
723 #endif
724 
728 #ifndef SNMP_PRIVATE_MIB
729 #define SNMP_PRIVATE_MIB 0
730 #endif
731 
737 #ifndef SNMP_SAFE_REQUESTS
738 #define SNMP_SAFE_REQUESTS 0
739 #endif
740 
745 #ifndef SNMP_MAX_OCTET_STRING_LEN
746 #define SNMP_MAX_OCTET_STRING_LEN 127
747 #endif
748 
754 #ifndef SNMP_MAX_TREE_DEPTH
755 #define SNMP_MAX_TREE_DEPTH 15
756 #endif
757 
762 #ifndef SNMP_MAX_VALUE_SIZE
763 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH))
764 #endif
765 
766 /*
767  ----------------------------------
768  ---------- IGMP options ----------
769  ----------------------------------
770 */
774 #ifndef LWIP_IGMP
775 #define LWIP_IGMP 1
776 #endif
777 
778 /*
779  ----------------------------------
780  ---------- DNS options -----------
781  ----------------------------------
782 */
787 #ifndef LWIP_DNS
788 #define LWIP_DNS 1
789 #endif
790 
792 #ifndef DNS_TABLE_SIZE
793 #define DNS_TABLE_SIZE 4
794 #endif
795 
797 #ifndef DNS_MAX_NAME_LENGTH
798 #define DNS_MAX_NAME_LENGTH 256
799 #endif
800 
802 #ifndef DNS_MAX_SERVERS
803 #define DNS_MAX_SERVERS 2
804 #endif
805 
807 #ifndef DNS_DOES_NAME_CHECK
808 #define DNS_DOES_NAME_CHECK 1
809 #endif
810 
812 #ifndef DNS_MSG_SIZE
813 #define DNS_MSG_SIZE 512
814 #endif
815 
826 #ifndef DNS_LOCAL_HOSTLIST
827 #define DNS_LOCAL_HOSTLIST 0
828 #endif /* DNS_LOCAL_HOSTLIST */
829 
832 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
833 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
834 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
835 
836 /*
837  ---------------------------------
838  ---------- UDP options ----------
839  ---------------------------------
840 */
844 #ifndef LWIP_UDP
845 #define LWIP_UDP 1
846 #endif
847 
851 #ifndef LWIP_UDPLITE
852 #define LWIP_UDPLITE 0
853 #endif
854 
858 #ifndef UDP_TTL
859 #define UDP_TTL (IP_DEFAULT_TTL)
860 #endif
861 
865 #ifndef LWIP_NETBUF_RECVINFO
866 #define LWIP_NETBUF_RECVINFO 0
867 #endif
868 
869 /*
870  ---------------------------------
871  ---------- TCP options ----------
872  ---------------------------------
873 */
877 #ifndef LWIP_TCP
878 #define LWIP_TCP 1
879 #endif
880 
884 #ifndef TCP_TTL
885 #define TCP_TTL (IP_DEFAULT_TTL)
886 #endif
887 
892 #ifndef TCP_WND
893 #define TCP_WND (4 * TCP_MSS)
894 #endif
895 
899 #ifndef TCP_MAXRTX
900 #define TCP_MAXRTX 5
901 #endif
902 
906 #ifndef TCP_SYNMAXRTX
907 #define TCP_SYNMAXRTX 5
908 #endif
909 
914 #ifndef TCP_QUEUE_OOSEQ
915 #define TCP_QUEUE_OOSEQ 0
916 #endif
917 
925 #ifndef TCP_MSS
926 #define TCP_MSS 1460
927 #endif
928 
937 #ifndef TCP_CALCULATE_EFF_SEND_MSS
938 #define TCP_CALCULATE_EFF_SEND_MSS 1
939 #endif
940 
941 
945 #ifndef TCP_SND_BUF
946 #define TCP_SND_BUF 2 * TCP_MSS
947 #endif
948 
953 #ifndef TCP_SND_QUEUELEN
954 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
955 #endif
956 
962 #ifndef TCP_SNDLOWAT
963 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2)
964 #endif
965 
971 #ifndef TCP_SNDQUEUELOWAT
972 #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5)
973 #endif
974 
978 #ifndef TCP_LISTEN_BACKLOG
979 #define TCP_LISTEN_BACKLOG 0
980 #endif
981 
987 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
988 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff
989 #endif
990 
1005 #ifndef TCP_OVERSIZE
1006 #define TCP_OVERSIZE TCP_MSS
1007 #endif
1008 
1012 #ifndef LWIP_TCP_TIMESTAMPS
1013 #define LWIP_TCP_TIMESTAMPS 0
1014 #endif
1015 
1020 #ifndef TCP_WND_UPDATE_THRESHOLD
1021 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4)
1022 #endif
1023 
1031 #ifndef LWIP_EVENT_API
1032 #define LWIP_EVENT_API 0
1033 #define LWIP_CALLBACK_API 1
1034 #else
1035 #define LWIP_EVENT_API 1
1036 #define LWIP_CALLBACK_API 0
1037 #endif
1038 
1039 
1040 /*
1041  ----------------------------------
1042  ---------- Pbuf options ----------
1043  ----------------------------------
1044 */
1050 #ifndef PBUF_LINK_HLEN
1051 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
1052 #endif
1053 
1059 #ifndef PBUF_POOL_BUFSIZE
1060 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
1061 #endif
1062 
1063 /*
1064  ------------------------------------------------
1065  ---------- Network Interfaces options ----------
1066  ------------------------------------------------
1067 */
1072 #ifndef LWIP_NETIF_HOSTNAME
1073 #define LWIP_NETIF_HOSTNAME 0
1074 #endif
1075 
1079 #ifndef LWIP_NETIF_API
1080 #define LWIP_NETIF_API 0
1081 #endif
1082 
1087 #ifndef LWIP_NETIF_STATUS_CALLBACK
1088 #define LWIP_NETIF_STATUS_CALLBACK 0
1089 #endif
1090 
1095 #ifndef LWIP_NETIF_LINK_CALLBACK
1096 #define LWIP_NETIF_LINK_CALLBACK 0
1097 #endif
1098 
1106 #ifndef LWIP_NETIF_HWADDRHINT
1107 #define LWIP_NETIF_HWADDRHINT 0
1108 #endif
1109 
1114 #ifndef LWIP_NETIF_LOOPBACK
1115 #define LWIP_NETIF_LOOPBACK 0
1116 #endif
1117 
1122 #ifndef LWIP_LOOPBACK_MAX_PBUFS
1123 #define LWIP_LOOPBACK_MAX_PBUFS 0
1124 #endif
1125 
1139 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
1140 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
1141 #endif
1142 
1152 #ifndef LWIP_NETIF_TX_SINGLE_PBUF
1153 #define LWIP_NETIF_TX_SINGLE_PBUF 1
1154 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
1155 
1156 /*
1157  ------------------------------------
1158  ---------- LOOPIF options ----------
1159  ------------------------------------
1160 */
1164 #ifndef LWIP_HAVE_LOOPIF
1165 #define LWIP_HAVE_LOOPIF 0
1166 #endif
1167 
1168 /*
1169  ------------------------------------
1170  ---------- SLIPIF options ----------
1171  ------------------------------------
1172 */
1176 #ifndef LWIP_HAVE_SLIPIF
1177 #define LWIP_HAVE_SLIPIF 0
1178 #endif
1179 
1180 /*
1181  ------------------------------------
1182  ---------- Thread options ----------
1183  ------------------------------------
1184 */
1188 #ifndef TCPIP_THREAD_NAME
1189 #define TCPIP_THREAD_NAME "tcpip_thread"
1190 #endif
1191 
1197 #ifndef TCPIP_THREAD_STACKSIZE
1198 #define TCPIP_THREAD_STACKSIZE 0
1199 #endif
1200 
1206 #ifndef TCPIP_THREAD_PRIO
1207 #define TCPIP_THREAD_PRIO 1
1208 #endif
1209 
1215 #ifndef TCPIP_MBOX_SIZE
1216 #define TCPIP_MBOX_SIZE 0
1217 #endif
1218 
1222 #ifndef SLIPIF_THREAD_NAME
1223 #define SLIPIF_THREAD_NAME "slipif_loop"
1224 #endif
1225 
1231 #ifndef SLIPIF_THREAD_STACKSIZE
1232 #define SLIPIF_THREAD_STACKSIZE 0
1233 #endif
1234 
1240 #ifndef SLIPIF_THREAD_PRIO
1241 #define SLIPIF_THREAD_PRIO 1
1242 #endif
1243 
1247 #ifndef PPP_THREAD_NAME
1248 #define PPP_THREAD_NAME "pppInputThread"
1249 #endif
1250 
1256 #ifndef PPP_THREAD_STACKSIZE
1257 #define PPP_THREAD_STACKSIZE 0
1258 #endif
1259 
1265 #ifndef PPP_THREAD_PRIO
1266 #define PPP_THREAD_PRIO 1
1267 #endif
1268 
1272 #ifndef DEFAULT_THREAD_NAME
1273 #define DEFAULT_THREAD_NAME "lwIP"
1274 #endif
1275 
1281 #ifndef DEFAULT_THREAD_STACKSIZE
1282 #define DEFAULT_THREAD_STACKSIZE 0
1283 #endif
1284 
1290 #ifndef DEFAULT_THREAD_PRIO
1291 #define DEFAULT_THREAD_PRIO 1
1292 #endif
1293 
1299 #ifndef DEFAULT_RAW_RECVMBOX_SIZE
1300 #define DEFAULT_RAW_RECVMBOX_SIZE 0
1301 #endif
1302 
1308 #ifndef DEFAULT_UDP_RECVMBOX_SIZE
1309 #define DEFAULT_UDP_RECVMBOX_SIZE 0
1310 #endif
1311 
1317 #ifndef DEFAULT_TCP_RECVMBOX_SIZE
1318 #define DEFAULT_TCP_RECVMBOX_SIZE 0
1319 #endif
1320 
1326 #ifndef DEFAULT_ACCEPTMBOX_SIZE
1327 #define DEFAULT_ACCEPTMBOX_SIZE 0
1328 #endif
1329 
1330 /*
1331  ----------------------------------------------
1332  ---------- Sequential layer options ----------
1333  ----------------------------------------------
1334 */
1339 #ifndef LWIP_TCPIP_CORE_LOCKING
1340 #define LWIP_TCPIP_CORE_LOCKING 0
1341 #endif
1342 
1347 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
1348 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
1349 #endif
1350 
1354 #ifndef LWIP_NETCONN
1355 #define LWIP_NETCONN 0
1356 #endif
1357 
1361 #ifndef LWIP_TCPIP_TIMEOUT
1362 #define LWIP_TCPIP_TIMEOUT 1
1363 #endif
1364 
1365 /*
1366  ------------------------------------
1367  ---------- Socket options ----------
1368  ------------------------------------
1369 */
1373 #ifndef LWIP_SOCKET
1374 #define LWIP_SOCKET 0
1375 #endif
1376 
1381 #ifndef LWIP_COMPAT_SOCKETS
1382 #define LWIP_COMPAT_SOCKETS 0
1383 #endif
1384 
1390 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
1391 #define LWIP_POSIX_SOCKETS_IO_NAMES 0
1392 #endif
1393 
1399 #ifndef LWIP_TCP_KEEPALIVE
1400 #define LWIP_TCP_KEEPALIVE 1
1401 #endif
1402 
1406 #ifndef LWIP_SO_RCVTIMEO
1407 #define LWIP_SO_RCVTIMEO 0
1408 #endif
1409 
1413 #ifndef LWIP_SO_RCVBUF
1414 #define LWIP_SO_RCVBUF 0
1415 #endif
1416 
1420 #ifndef RECV_BUFSIZE_DEFAULT
1421 #define RECV_BUFSIZE_DEFAULT INT_MAX
1422 #endif
1423 
1427 #ifndef SO_REUSE
1428 #define SO_REUSE 0
1429 #endif
1430 
1436 #ifndef SO_REUSE_RXTOALL
1437 #define SO_REUSE_RXTOALL 0
1438 #endif
1439 
1440 /*
1441  ----------------------------------------
1442  ---------- Statistics options ----------
1443  ----------------------------------------
1444 */
1448 #ifndef LWIP_STATS
1449 #define LWIP_STATS 0
1450 #endif
1451 
1452 #if LWIP_STATS
1453 
1457 #ifndef LWIP_STATS_DISPLAY
1458 #define LWIP_STATS_DISPLAY 0
1459 #endif
1460 
1464 #ifndef LINK_STATS
1465 #define LINK_STATS 1
1466 #endif
1467 
1471 #ifndef ETHARP_STATS
1472 #define ETHARP_STATS (LWIP_ARP)
1473 #endif
1474 
1478 #ifndef IP_STATS
1479 #define IP_STATS 1
1480 #endif
1481 
1486 #ifndef IPFRAG_STATS
1487 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
1488 #endif
1489 
1493 #ifndef ICMP_STATS
1494 #define ICMP_STATS 1
1495 #endif
1496 
1500 #ifndef IGMP_STATS
1501 #define IGMP_STATS (LWIP_IGMP)
1502 #endif
1503 
1508 #ifndef UDP_STATS
1509 #define UDP_STATS (LWIP_UDP)
1510 #endif
1511 
1516 #ifndef TCP_STATS
1517 #define TCP_STATS (LWIP_TCP)
1518 #endif
1519 
1523 #ifndef MEM_STATS
1524 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
1525 #endif
1526 
1530 #ifndef MEMP_STATS
1531 #define MEMP_STATS (MEMP_MEM_MALLOC == 0)
1532 #endif
1533 
1537 #ifndef SYS_STATS
1538 #define SYS_STATS (NO_SYS == 0)
1539 #endif
1540 
1541 #else
1542 #define ETHARP_STATS 0
1543 #define LINK_STATS 0
1544 #define IP_STATS 0
1545 #define IPFRAG_STATS 0
1546 #define ICMP_STATS 0
1547 #define IGMP_STATS 0
1548 #define UDP_STATS 0
1549 #define TCP_STATS 0
1550 #define MEM_STATS 0
1551 #define MEMP_STATS 0
1552 #define SYS_STATS 0
1553 #define LWIP_STATS_DISPLAY 0
1554 
1555 #endif /* LWIP_STATS */
1556 
1557 /*
1558  ---------------------------------
1559  ---------- PPP options ----------
1560  ---------------------------------
1561 */
1565 #ifndef PPP_SUPPORT
1566 #define PPP_SUPPORT 0
1567 #endif
1568 
1572 #ifndef PPPOE_SUPPORT
1573 #define PPPOE_SUPPORT 0
1574 #endif
1575 
1579 #ifndef PPPOS_SUPPORT
1580 #define PPPOS_SUPPORT PPP_SUPPORT
1581 #endif
1582 
1583 #if PPP_SUPPORT
1584 
1588 #ifndef NUM_PPP
1589 #define NUM_PPP 1
1590 #endif
1591 
1595 #ifndef PAP_SUPPORT
1596 #define PAP_SUPPORT 0
1597 #endif
1598 
1602 #ifndef CHAP_SUPPORT
1603 #define CHAP_SUPPORT 0
1604 #endif
1605 
1609 #ifndef MSCHAP_SUPPORT
1610 #define MSCHAP_SUPPORT 0
1611 #endif
1612 
1616 #ifndef CBCP_SUPPORT
1617 #define CBCP_SUPPORT 0
1618 #endif
1619 
1623 #ifndef CCP_SUPPORT
1624 #define CCP_SUPPORT 0
1625 #endif
1626 
1630 #ifndef VJ_SUPPORT
1631 #define VJ_SUPPORT 0
1632 #endif
1633 
1637 #ifndef MD5_SUPPORT
1638 #define MD5_SUPPORT 0
1639 #endif
1640 
1641 /*
1642  * Timeouts
1643  */
1644 #ifndef FSM_DEFTIMEOUT
1645 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
1646 #endif
1647 
1648 #ifndef FSM_DEFMAXTERMREQS
1649 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
1650 #endif
1651 
1652 #ifndef FSM_DEFMAXCONFREQS
1653 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
1654 #endif
1655 
1656 #ifndef FSM_DEFMAXNAKLOOPS
1657 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
1658 #endif
1659 
1660 #ifndef UPAP_DEFTIMEOUT
1661 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
1662 #endif
1663 
1664 #ifndef UPAP_DEFREQTIME
1665 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
1666 #endif
1667 
1668 #ifndef CHAP_DEFTIMEOUT
1669 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
1670 #endif
1671 
1672 #ifndef CHAP_DEFTRANSMITS
1673 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
1674 #endif
1675 
1676 /* Interval in seconds between keepalive echo requests, 0 to disable. */
1677 #ifndef LCP_ECHOINTERVAL
1678 #define LCP_ECHOINTERVAL 0
1679 #endif
1680 
1681 /* Number of unanswered echo requests before failure. */
1682 #ifndef LCP_MAXECHOFAILS
1683 #define LCP_MAXECHOFAILS 3
1684 #endif
1685 
1686 /* Max Xmit idle time (in jiffies) before resend flag char. */
1687 #ifndef PPP_MAXIDLEFLAG
1688 #define PPP_MAXIDLEFLAG 100
1689 #endif
1690 
1691 /*
1692  * Packet sizes
1693  *
1694  * Note - lcp shouldn't be allowed to negotiate stuff outside these
1695  * limits. See lcp.h in the pppd directory.
1696  * (XXX - these constants should simply be shared by lcp.c instead
1697  * of living in lcp.h)
1698  */
1699 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
1700 #ifndef PPP_MAXMTU
1701 /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */
1702 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
1703 #endif
1704 #define PPP_MINMTU 64
1705 #define PPP_MRU 1500 /* default MRU = max length of info field */
1706 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
1707 #ifndef PPP_DEFMRU
1708 #define PPP_DEFMRU 296 /* Try for this */
1709 #endif
1710 #define PPP_MINMRU 128 /* No MRUs below this */
1711 
1712 #ifndef MAXNAMELEN
1713 #define MAXNAMELEN 256 /* max length of hostname or name for auth */
1714 #endif
1715 #ifndef MAXSECRETLEN
1716 #define MAXSECRETLEN 256 /* max length of password or secret */
1717 #endif
1718 
1719 #endif /* PPP_SUPPORT */
1720 
1721 /*
1722  --------------------------------------
1723  ---------- Checksum options ----------
1724  --------------------------------------
1725 */
1729 #ifndef CHECKSUM_GEN_IP
1730 #define CHECKSUM_GEN_IP 1
1731 #endif
1732 
1736 #ifndef CHECKSUM_GEN_UDP
1737 #define CHECKSUM_GEN_UDP 1
1738 #endif
1739 
1743 #ifndef CHECKSUM_GEN_TCP
1744 #define CHECKSUM_GEN_TCP 1
1745 #endif
1746 
1750 #ifndef CHECKSUM_CHECK_IP
1751 #define CHECKSUM_CHECK_IP 1
1752 #endif
1753 
1757 #ifndef CHECKSUM_CHECK_UDP
1758 #define CHECKSUM_CHECK_UDP 1
1759 #endif
1760 
1764 #ifndef CHECKSUM_CHECK_TCP
1765 #define CHECKSUM_CHECK_TCP 1
1766 #endif
1767 
1772 #ifndef LWIP_CHECKSUM_ON_COPY
1773 #define LWIP_CHECKSUM_ON_COPY 0
1774 #endif
1775 
1776 /*
1777  ---------------------------------------
1778  ---------- Debugging options ----------
1779  ---------------------------------------
1780 */
1786 #ifndef LWIP_DBG_MIN_LEVEL
1787 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
1788 #endif
1789 
1794 #ifndef LWIP_DBG_TYPES_ON
1795 #define LWIP_DBG_TYPES_ON LWIP_DBG_OFF
1796 #endif
1797 
1801 #ifndef ETHARP_DEBUG
1802 #define ETHARP_DEBUG LWIP_DBG_OFF
1803 #endif
1804 
1808 #ifndef NETIF_DEBUG
1809 #define NETIF_DEBUG LWIP_DBG_OFF
1810 #endif
1811 
1815 #ifndef PBUF_DEBUG
1816 #define PBUF_DEBUG LWIP_DBG_OFF
1817 #endif
1818 
1822 #ifndef API_LIB_DEBUG
1823 #define API_LIB_DEBUG LWIP_DBG_OFF
1824 #endif
1825 
1829 #ifndef API_MSG_DEBUG
1830 #define API_MSG_DEBUG LWIP_DBG_OFF
1831 #endif
1832 
1836 #ifndef SOCKETS_DEBUG
1837 #define SOCKETS_DEBUG LWIP_DBG_OFF
1838 #endif
1839 
1843 #ifndef ICMP_DEBUG
1844 #define ICMP_DEBUG LWIP_DBG_OFF
1845 #endif
1846 
1850 #ifndef IGMP_DEBUG
1851 #define IGMP_DEBUG LWIP_DBG_OFF
1852 #endif
1853 
1857 #ifndef INET_DEBUG
1858 #define INET_DEBUG LWIP_DBG_OFF
1859 #endif
1860 
1864 #ifndef IP_DEBUG
1865 #define IP_DEBUG LWIP_DBG_OFF
1866 #endif
1867 
1871 #ifndef IP_REASS_DEBUG
1872 #define IP_REASS_DEBUG LWIP_DBG_OFF
1873 #endif
1874 
1878 #ifndef RAW_DEBUG
1879 #define RAW_DEBUG LWIP_DBG_OFF
1880 #endif
1881 
1885 #ifndef MEM_DEBUG
1886 #define MEM_DEBUG LWIP_DBG_OFF
1887 #endif
1888 
1892 #ifndef MEMP_DEBUG
1893 #define MEMP_DEBUG LWIP_DBG_OFF
1894 #endif
1895 
1899 #ifndef SYS_DEBUG
1900 #define SYS_DEBUG LWIP_DBG_OFF
1901 #endif
1902 
1906 #ifndef TIMERS_DEBUG
1907 #define TIMERS_DEBUG LWIP_DBG_OFF
1908 #endif
1909 
1913 #ifndef TCP_DEBUG
1914 #define TCP_DEBUG LWIP_DBG_OFF
1915 #endif
1916 
1920 #ifndef TCP_INPUT_DEBUG
1921 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
1922 #endif
1923 
1927 #ifndef TCP_FR_DEBUG
1928 #define TCP_FR_DEBUG LWIP_DBG_OFF
1929 #endif
1930 
1935 #ifndef TCP_RTO_DEBUG
1936 #define TCP_RTO_DEBUG LWIP_DBG_OFF
1937 #endif
1938 
1942 #ifndef TCP_CWND_DEBUG
1943 #define TCP_CWND_DEBUG LWIP_DBG_OFF
1944 #endif
1945 
1949 #ifndef TCP_WND_DEBUG
1950 #define TCP_WND_DEBUG LWIP_DBG_OFF
1951 #endif
1952 
1956 #ifndef TCP_OUTPUT_DEBUG
1957 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
1958 #endif
1959 
1963 #ifndef TCP_RST_DEBUG
1964 #define TCP_RST_DEBUG LWIP_DBG_OFF
1965 #endif
1966 
1970 #ifndef TCP_QLEN_DEBUG
1971 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
1972 #endif
1973 
1977 #ifndef UDP_DEBUG
1978 #define UDP_DEBUG LWIP_DBG_OFF
1979 #endif
1980 
1984 #ifndef TCPIP_DEBUG
1985 #define TCPIP_DEBUG LWIP_DBG_OFF
1986 #endif
1987 
1991 #ifndef PPP_DEBUG
1992 #define PPP_DEBUG LWIP_DBG_OFF
1993 #endif
1994 
1998 #ifndef SLIP_DEBUG
1999 #define SLIP_DEBUG LWIP_DBG_OFF
2000 #endif
2001 
2005 #ifndef DHCP_DEBUG
2006 #define DHCP_DEBUG LWIP_DBG_OFF
2007 #endif
2008 
2012 #ifndef AUTOIP_DEBUG
2013 #define AUTOIP_DEBUG LWIP_DBG_OFF
2014 #endif
2015 
2019 #ifndef SNMP_MSG_DEBUG
2020 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
2021 #endif
2022 
2026 #ifndef SNMP_MIB_DEBUG
2027 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
2028 #endif
2029 
2033 #ifndef DNS_DEBUG
2034 #define DNS_DEBUG LWIP_DBG_OFF
2035 #endif
2036 
2037 #endif /* __LWIP_OPT_H__ */