ESP8266
opt.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 __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 "include/lwipopts.h"
46 #include "lwip/debug.h"
47 
48 /*
49  -----------------------------------------------
50  ---------- Platform specific locking ----------
51  -----------------------------------------------
52 */
53 
59 #ifndef SYS_LIGHTWEIGHT_PROT
60 #define SYS_LIGHTWEIGHT_PROT 0
61 #endif
62 
67 #ifndef NO_SYS
68 #define NO_SYS 1
69 #endif
70 
75 #ifndef NO_SYS_NO_TIMERS
76 #define NO_SYS_NO_TIMERS 1
77 #endif
78 
83 #ifndef MEMCPY
84 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
85 #endif
86 
91 #ifndef SMEMCPY
92 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
93 #endif
94 
95 /*
96  ------------------------------------
97  ---------- Memory options ----------
98  ------------------------------------
99 */
105 #ifndef MEM_LIBC_MALLOC
106 #define MEM_LIBC_MALLOC 0
107 #endif
108 
114 #ifndef MEMP_MEM_MALLOC
115 #define MEMP_MEM_MALLOC 0
116 #endif
117 
123 #ifndef MEM_ALIGNMENT
124 #define MEM_ALIGNMENT 1
125 #endif
126 
131 #ifndef MEM_SIZE
132 #define MEM_SIZE 1600
133 #endif
134 
140 #ifndef MEMP_SEPARATE_POOLS
141 #define MEMP_SEPARATE_POOLS 0
142 #endif
143 
153 #ifndef MEMP_OVERFLOW_CHECK
154 #define MEMP_OVERFLOW_CHECK 0
155 #endif
156 
161 #ifndef MEMP_SANITY_CHECK
162 #define MEMP_SANITY_CHECK 0
163 #endif
164 
171 #ifndef MEM_USE_POOLS
172 #define MEM_USE_POOLS 0
173 #endif
174 
179 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL
180 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0
181 #endif
182 
189 #ifndef MEMP_USE_CUSTOM_POOLS
190 #define MEMP_USE_CUSTOM_POOLS 0
191 #endif
192 
211 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
212 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
213 #endif
214 
215 /*
216  ------------------------------------------------
217  ---------- Internal Memory Pool Sizes ----------
218  ------------------------------------------------
219 */
225 #ifndef MEMP_NUM_PBUF
226 #define MEMP_NUM_PBUF 16
227 #endif
228 
233 #ifndef MEMP_NUM_RAW_PCB
234 #define MEMP_NUM_RAW_PCB 4
235 #endif
236 
242 #ifndef MEMP_NUM_UDP_PCB
243 #define MEMP_NUM_UDP_PCB 4
244 #endif
245 
250 #ifndef MEMP_NUM_TCP_PCB
251 #define MEMP_NUM_TCP_PCB 5
252 #endif
253 
258 #ifndef MEMP_NUM_TCP_PCB_LISTEN
259 #define MEMP_NUM_TCP_PCB_LISTEN 8
260 #endif
261 
266 #ifndef MEMP_NUM_TCP_SEG
267 #define MEMP_NUM_TCP_SEG 16
268 #endif
269 
274 #ifndef MEMP_NUM_REASSDATA
275 #define MEMP_NUM_REASSDATA 5
276 #endif
277 
285 #ifndef MEMP_NUM_FRAG_PBUF
286 #define MEMP_NUM_FRAG_PBUF 15
287 #endif
288 
295 #ifndef MEMP_NUM_ARP_QUEUE
296 #define MEMP_NUM_ARP_QUEUE 30
297 #endif
298 
305 #ifndef MEMP_NUM_IGMP_GROUP
306 #define MEMP_NUM_IGMP_GROUP 8
307 #endif
308 
313 #ifndef MEMP_NUM_SYS_TIMEOUT
314 #define MEMP_NUM_SYS_TIMEOUT 3
315 #endif
316 
321 #ifndef MEMP_NUM_NETBUF
322 #define MEMP_NUM_NETBUF 2
323 #endif
324 
329 #ifndef MEMP_NUM_NETCONN
330 #define MEMP_NUM_NETCONN 4
331 #endif
332 
338 #ifndef MEMP_NUM_TCPIP_MSG_API
339 #define MEMP_NUM_TCPIP_MSG_API 8
340 #endif
341 
347 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
348 #define MEMP_NUM_TCPIP_MSG_INPKT 8
349 #endif
350 
354 #ifndef MEMP_NUM_SNMP_NODE
355 #define MEMP_NUM_SNMP_NODE 50
356 #endif
357 
362 #ifndef MEMP_NUM_SNMP_ROOTNODE
363 #define MEMP_NUM_SNMP_ROOTNODE 30
364 #endif
365 
371 #ifndef MEMP_NUM_SNMP_VARBIND
372 #define MEMP_NUM_SNMP_VARBIND 2
373 #endif
374 
380 #ifndef MEMP_NUM_SNMP_VALUE
381 #define MEMP_NUM_SNMP_VALUE 3
382 #endif
383 
388 #ifndef MEMP_NUM_NETDB
389 #define MEMP_NUM_NETDB 1
390 #endif
391 
396 #ifndef MEMP_NUM_LOCALHOSTLIST
397 #define MEMP_NUM_LOCALHOSTLIST 1
398 #endif
399 
404 #ifndef MEMP_NUM_PPPOE_INTERFACES
405 #define MEMP_NUM_PPPOE_INTERFACES 1
406 #endif
407 
411 #ifndef PBUF_POOL_SIZE
412 #define PBUF_POOL_SIZE 16
413 #endif
414 
415 /*
416  ---------------------------------
417  ---------- ARP options ----------
418  ---------------------------------
419 */
423 #ifndef LWIP_ARP
424 #define LWIP_ARP 1
425 #endif
426 
430 #ifndef ARP_TABLE_SIZE
431 #define ARP_TABLE_SIZE 10
432 #endif
433 
441 #ifndef ARP_QUEUEING
442 #define ARP_QUEUEING 0
443 #endif
444 
455 #ifndef ETHARP_TRUST_IP_MAC
456 #define ETHARP_TRUST_IP_MAC 0
457 #endif
458 
465 #ifndef ETHARP_SUPPORT_VLAN
466 #define ETHARP_SUPPORT_VLAN 0
467 #endif
468 
472 #ifndef LWIP_ETHERNET
473 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT)
474 #endif
475 
481 #ifndef ETH_PAD_SIZE
482 #define ETH_PAD_SIZE 0
483 #endif
484 
488 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES
489 #define ETHARP_SUPPORT_STATIC_ENTRIES 0
490 #endif
491 
492 
493 /*
494  --------------------------------
495  ---------- IP options ----------
496  --------------------------------
497 */
503 #ifndef IP_FORWARD
504 #define IP_FORWARD 0
505 #endif
506 
512 #ifndef IP_OPTIONS_ALLOWED
513 #define IP_OPTIONS_ALLOWED 1
514 #endif
515 
521 #ifndef IP_REASSEMBLY
522 #define IP_REASSEMBLY 0
523 #endif
524 
530 #ifndef IP_FRAG
531 #define IP_FRAG 1
532 #endif
533 
539 #ifndef IP_REASS_MAXAGE
540 #define IP_REASS_MAXAGE 3
541 #endif
542 
549 #ifndef IP_REASS_MAX_PBUFS
550 #define IP_REASS_MAX_PBUFS 10
551 #endif
552 
560 #ifndef IP_FRAG_USES_STATIC_BUF
561 #define IP_FRAG_USES_STATIC_BUF 0
562 #endif
563 
568 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
569 #define IP_FRAG_MAX_MTU 1500
570 #endif
571 
575 #ifndef IP_DEFAULT_TTL
576 #define IP_DEFAULT_TTL 255
577 #endif
578 
584 #ifndef IP_SOF_BROADCAST
585 #define IP_SOF_BROADCAST 0
586 #endif
587 
592 #ifndef IP_SOF_BROADCAST_RECV
593 #define IP_SOF_BROADCAST_RECV 0
594 #endif
595 
596 /*
597  ----------------------------------
598  ---------- ICMP options ----------
599  ----------------------------------
600 */
605 #ifndef LWIP_ICMP
606 #define LWIP_ICMP 1
607 #endif
608 
612 #ifndef ICMP_TTL
613 #define ICMP_TTL (IP_DEFAULT_TTL)
614 #endif
615 
619 #ifndef LWIP_BROADCAST_PING
620 #define LWIP_BROADCAST_PING 0
621 #endif
622 
626 #ifndef LWIP_MULTICAST_PING
627 #define LWIP_MULTICAST_PING 0
628 #endif
629 
630 /*
631  ---------------------------------
632  ---------- RAW options ----------
633  ---------------------------------
634 */
638 #ifndef LWIP_RAW
639 #define LWIP_RAW 1
640 #endif
641 
645 #ifndef RAW_TTL
646 #define RAW_TTL (IP_DEFAULT_TTL)
647 #endif
648 
649 /*
650  ----------------------------------
651  ---------- DHCP options ----------
652  ----------------------------------
653 */
657 #ifndef LWIP_DHCP
658 #define LWIP_DHCP 0
659 #endif
660 
664 #ifndef DHCP_DOES_ARP_CHECK
665 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
666 #endif
667 
668 /*
669  ------------------------------------
670  ---------- AUTOIP options ----------
671  ------------------------------------
672 */
676 #ifndef LWIP_AUTOIP
677 #define LWIP_AUTOIP 0
678 #endif
679 
684 #ifndef LWIP_DHCP_AUTOIP_COOP
685 #define LWIP_DHCP_AUTOIP_COOP 0
686 #endif
687 
695 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES
696 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9
697 #endif
698 
699 /*
700  ----------------------------------
701  ---------- SNMP options ----------
702  ----------------------------------
703 */
708 #ifndef LWIP_SNMP
709 #define LWIP_SNMP 0
710 #endif
711 
717 #ifndef SNMP_CONCURRENT_REQUESTS
718 #define SNMP_CONCURRENT_REQUESTS 1
719 #endif
720 
725 #ifndef SNMP_TRAP_DESTINATIONS
726 #define SNMP_TRAP_DESTINATIONS 1
727 #endif
728 
734 #ifndef SNMP_PRIVATE_MIB
735 #define SNMP_PRIVATE_MIB 0
736 #endif
737 
743 #ifndef SNMP_SAFE_REQUESTS
744 #define SNMP_SAFE_REQUESTS 1
745 #endif
746 
751 #ifndef SNMP_MAX_OCTET_STRING_LEN
752 #define SNMP_MAX_OCTET_STRING_LEN 127
753 #endif
754 
760 #ifndef SNMP_MAX_TREE_DEPTH
761 #define SNMP_MAX_TREE_DEPTH 15
762 #endif
763 
768 #ifndef SNMP_MAX_VALUE_SIZE
769 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH))
770 #endif
771 
772 /*
773  ----------------------------------
774  ---------- IGMP options ----------
775  ----------------------------------
776 */
780 #ifndef LWIP_IGMP
781 #define LWIP_IGMP 0
782 #endif
783 
784 /*
785  ----------------------------------
786  ---------- DNS options -----------
787  ----------------------------------
788 */
793 #ifndef LWIP_DNS
794 #define LWIP_DNS 0
795 #endif
796 
798 #ifndef DNS_TABLE_SIZE
799 #define DNS_TABLE_SIZE 4
800 #endif
801 
803 #ifndef DNS_MAX_NAME_LENGTH
804 #define DNS_MAX_NAME_LENGTH 256
805 #endif
806 
808 #ifndef DNS_MAX_SERVERS
809 #define DNS_MAX_SERVERS 2
810 #endif
811 
813 #ifndef DNS_DOES_NAME_CHECK
814 #define DNS_DOES_NAME_CHECK 1
815 #endif
816 
818 #ifndef DNS_MSG_SIZE
819 #define DNS_MSG_SIZE 512
820 #endif
821 
832 #ifndef DNS_LOCAL_HOSTLIST
833 #define DNS_LOCAL_HOSTLIST 0
834 #endif /* DNS_LOCAL_HOSTLIST */
835 
838 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
839 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
840 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
841 
842 /*
843  ---------------------------------
844  ---------- UDP options ----------
845  ---------------------------------
846 */
850 #ifndef LWIP_UDP
851 #define LWIP_UDP 1
852 #endif
853 
857 #ifndef LWIP_UDPLITE
858 #define LWIP_UDPLITE 0
859 #endif
860 
864 #ifndef UDP_TTL
865 #define UDP_TTL (IP_DEFAULT_TTL)
866 #endif
867 
871 #ifndef LWIP_NETBUF_RECVINFO
872 #define LWIP_NETBUF_RECVINFO 0
873 #endif
874 
875 /*
876  ---------------------------------
877  ---------- TCP options ----------
878  ---------------------------------
879 */
883 #ifndef LWIP_TCP
884 #define LWIP_TCP 1
885 #endif
886 
890 #ifndef TCP_TTL
891 #define TCP_TTL (IP_DEFAULT_TTL)
892 #endif
893 
898 #ifndef TCP_WND
899 #define TCP_WND (4 * TCP_MSS)
900 #endif
901 
905 #ifndef TCP_MAXRTX
906 #define TCP_MAXRTX 12
907 #endif
908 
912 #ifndef TCP_SYNMAXRTX
913 #define TCP_SYNMAXRTX 6
914 #endif
915 
920 #ifndef TCP_QUEUE_OOSEQ
921 #define TCP_QUEUE_OOSEQ (LWIP_TCP)
922 #endif
923 
931 #ifndef TCP_MSS
932 #define TCP_MSS 536
933 #endif
934 
943 #ifndef TCP_CALCULATE_EFF_SEND_MSS
944 #define TCP_CALCULATE_EFF_SEND_MSS 1
945 #endif
946 
947 
951 #ifndef TCP_SND_BUF
952 #define TCP_SND_BUF 256
953 #endif
954 
959 #ifndef TCP_SND_QUEUELEN
960 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
961 #endif
962 
968 #ifndef TCP_SNDLOWAT
969 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2)
970 #endif
971 
977 #ifndef TCP_SNDQUEUELOWAT
978 #define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2)
979 #endif
980 
984 #ifndef TCP_LISTEN_BACKLOG
985 #define TCP_LISTEN_BACKLOG 0
986 #endif
987 
993 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
994 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff
995 #endif
996 
1011 #ifndef TCP_OVERSIZE
1012 #define TCP_OVERSIZE TCP_MSS
1013 #endif
1014 
1018 #ifndef LWIP_TCP_TIMESTAMPS
1019 #define LWIP_TCP_TIMESTAMPS 0
1020 #endif
1021 
1026 #ifndef TCP_WND_UPDATE_THRESHOLD
1027 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4)
1028 #endif
1029 
1037 //#ifndef LWIP_EVENT_API
1038 //#define LWIP_EVENT_API 0
1039 //#define LWIP_CALLBACK_API 1
1040 //#else
1041 //#define LWIP_EVENT_API 1
1042 //#define LWIP_CALLBACK_API 0
1043 //#endif
1044 
1045 
1046 /*
1047  ----------------------------------
1048  ---------- Pbuf options ----------
1049  ----------------------------------
1050 */
1056 #ifndef PBUF_LINK_HLEN
1057 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
1058 #endif
1059 
1065 #ifndef PBUF_POOL_BUFSIZE
1066 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
1067 #endif
1068 
1069 /*
1070  ------------------------------------------------
1071  ---------- Network Interfaces options ----------
1072  ------------------------------------------------
1073 */
1078 #ifndef LWIP_NETIF_HOSTNAME
1079 #define LWIP_NETIF_HOSTNAME 0
1080 #endif
1081 
1085 #ifndef LWIP_NETIF_API
1086 #define LWIP_NETIF_API 0
1087 #endif
1088 
1093 #ifndef LWIP_NETIF_STATUS_CALLBACK
1094 #define LWIP_NETIF_STATUS_CALLBACK 0
1095 #endif
1096 
1101 #ifndef LWIP_NETIF_LINK_CALLBACK
1102 #define LWIP_NETIF_LINK_CALLBACK 0
1103 #endif
1104 
1112 #ifndef LWIP_NETIF_HWADDRHINT
1113 #define LWIP_NETIF_HWADDRHINT 0
1114 #endif
1115 
1120 #ifndef LWIP_NETIF_LOOPBACK
1121 #define LWIP_NETIF_LOOPBACK 1
1122 #endif
1123 
1128 #ifndef LWIP_LOOPBACK_MAX_PBUFS
1129 #define LWIP_LOOPBACK_MAX_PBUFS 0
1130 #endif
1131 
1145 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
1146 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
1147 #endif
1148 
1158 #ifndef LWIP_NETIF_TX_SINGLE_PBUF
1159 #define LWIP_NETIF_TX_SINGLE_PBUF 0
1160 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
1161 
1162 /*
1163  ------------------------------------
1164  ---------- LOOPIF options ----------
1165  ------------------------------------
1166 */
1170 #ifndef LWIP_HAVE_LOOPIF
1171 #define LWIP_HAVE_LOOPIF 1
1172 #endif
1173 
1174 /*
1175  ------------------------------------
1176  ---------- SLIPIF options ----------
1177  ------------------------------------
1178 */
1182 #ifndef LWIP_HAVE_SLIPIF
1183 #define LWIP_HAVE_SLIPIF 0
1184 #endif
1185 
1186 /*
1187  ------------------------------------
1188  ---------- Thread options ----------
1189  ------------------------------------
1190 */
1194 #ifndef TCPIP_THREAD_NAME
1195 #define TCPIP_THREAD_NAME "tcpip_thread"
1196 #endif
1197 
1203 #ifndef TCPIP_THREAD_STACKSIZE
1204 #define TCPIP_THREAD_STACKSIZE 0
1205 #endif
1206 
1212 #ifndef TCPIP_THREAD_PRIO
1213 #define TCPIP_THREAD_PRIO 1
1214 #endif
1215 
1221 #ifndef TCPIP_MBOX_SIZE
1222 #define TCPIP_MBOX_SIZE 0
1223 #endif
1224 
1228 #ifndef SLIPIF_THREAD_NAME
1229 #define SLIPIF_THREAD_NAME "slipif_loop"
1230 #endif
1231 
1237 #ifndef SLIPIF_THREAD_STACKSIZE
1238 #define SLIPIF_THREAD_STACKSIZE 0
1239 #endif
1240 
1246 #ifndef SLIPIF_THREAD_PRIO
1247 #define SLIPIF_THREAD_PRIO 1
1248 #endif
1249 
1253 #ifndef PPP_THREAD_NAME
1254 #define PPP_THREAD_NAME "pppInputThread"
1255 #endif
1256 
1262 #ifndef PPP_THREAD_STACKSIZE
1263 #define PPP_THREAD_STACKSIZE 0
1264 #endif
1265 
1271 #ifndef PPP_THREAD_PRIO
1272 #define PPP_THREAD_PRIO 1
1273 #endif
1274 
1278 #ifndef DEFAULT_THREAD_NAME
1279 #define DEFAULT_THREAD_NAME "lwIP"
1280 #endif
1281 
1287 #ifndef DEFAULT_THREAD_STACKSIZE
1288 #define DEFAULT_THREAD_STACKSIZE 0
1289 #endif
1290 
1296 #ifndef DEFAULT_THREAD_PRIO
1297 #define DEFAULT_THREAD_PRIO 1
1298 #endif
1299 
1305 #ifndef DEFAULT_RAW_RECVMBOX_SIZE
1306 #define DEFAULT_RAW_RECVMBOX_SIZE 0
1307 #endif
1308 
1314 #ifndef DEFAULT_UDP_RECVMBOX_SIZE
1315 #define DEFAULT_UDP_RECVMBOX_SIZE 0
1316 #endif
1317 
1323 #ifndef DEFAULT_TCP_RECVMBOX_SIZE
1324 #define DEFAULT_TCP_RECVMBOX_SIZE 0
1325 #endif
1326 
1332 #ifndef DEFAULT_ACCEPTMBOX_SIZE
1333 #define DEFAULT_ACCEPTMBOX_SIZE 0
1334 #endif
1335 
1336 /*
1337  ----------------------------------------------
1338  ---------- Sequential layer options ----------
1339  ----------------------------------------------
1340 */
1345 #ifndef LWIP_TCPIP_CORE_LOCKING
1346 #define LWIP_TCPIP_CORE_LOCKING 0
1347 #endif
1348 
1353 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
1354 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
1355 #endif
1356 
1360 #ifndef LWIP_NETCONN
1361 #define LWIP_NETCONN 0
1362 #endif
1363 
1367 #ifndef LWIP_TCPIP_TIMEOUT
1368 #define LWIP_TCPIP_TIMEOUT 1
1369 #endif
1370 
1371 /*
1372  ------------------------------------
1373  ---------- Socket options ----------
1374  ------------------------------------
1375 */
1379 #ifndef LWIP_SOCKET
1380 #define LWIP_SOCKET 0
1381 #endif
1382 
1387 #ifndef LWIP_COMPAT_SOCKETS
1388 #define LWIP_COMPAT_SOCKETS 1
1389 #endif
1390 
1396 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
1397 #define LWIP_POSIX_SOCKETS_IO_NAMES 1
1398 #endif
1399 
1405 #ifndef LWIP_TCP_KEEPALIVE
1406 #define LWIP_TCP_KEEPALIVE 0
1407 #endif
1408 
1412 #ifndef LWIP_SO_RCVTIMEO
1413 #define LWIP_SO_RCVTIMEO 0
1414 #endif
1415 
1419 #ifndef LWIP_SO_RCVBUF
1420 #define LWIP_SO_RCVBUF 0
1421 #endif
1422 
1426 #ifndef RECV_BUFSIZE_DEFAULT
1427 #define RECV_BUFSIZE_DEFAULT INT_MAX
1428 #endif
1429 
1433 #ifndef SO_REUSE
1434 #define SO_REUSE 0
1435 #endif
1436 
1442 #ifndef SO_REUSE_RXTOALL
1443 #define SO_REUSE_RXTOALL 0
1444 #endif
1445 
1446 /*
1447  ----------------------------------------
1448  ---------- Statistics options ----------
1449  ----------------------------------------
1450 */
1454 #ifndef LWIP_STATS
1455 #define LWIP_STATS 1
1456 #endif
1457 
1458 #if LWIP_STATS
1459 
1463 #ifndef LWIP_STATS_DISPLAY
1464 #define LWIP_STATS_DISPLAY 0
1465 #endif
1466 
1470 #ifndef LINK_STATS
1471 #define LINK_STATS 1
1472 #endif
1473 
1477 #ifndef ETHARP_STATS
1478 #define ETHARP_STATS (LWIP_ARP)
1479 #endif
1480 
1484 #ifndef IP_STATS
1485 #define IP_STATS 1
1486 #endif
1487 
1492 #ifndef IPFRAG_STATS
1493 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
1494 #endif
1495 
1499 #ifndef ICMP_STATS
1500 #define ICMP_STATS 1
1501 #endif
1502 
1506 #ifndef IGMP_STATS
1507 #define IGMP_STATS (LWIP_IGMP)
1508 #endif
1509 
1514 #ifndef UDP_STATS
1515 #define UDP_STATS (LWIP_UDP)
1516 #endif
1517 
1522 #ifndef TCP_STATS
1523 #define TCP_STATS (LWIP_TCP)
1524 #endif
1525 
1529 #ifndef MEM_STATS
1530 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
1531 #endif
1532 
1536 #ifndef MEMP_STATS
1537 #define MEMP_STATS (MEMP_MEM_MALLOC == 0)
1538 #endif
1539 
1543 #ifndef SYS_STATS
1544 #define SYS_STATS (NO_SYS == 0)
1545 #endif
1546 
1547 #else
1548 
1549 #define LINK_STATS 0
1550 #define IP_STATS 0
1551 #define IPFRAG_STATS 0
1552 #define ICMP_STATS 0
1553 #define IGMP_STATS 0
1554 #define UDP_STATS 0
1555 #define TCP_STATS 0
1556 #define MEM_STATS 0
1557 #define MEMP_STATS 0
1558 #define SYS_STATS 0
1559 #define LWIP_STATS_DISPLAY 0
1560 
1561 #endif /* LWIP_STATS */
1562 
1563 /*
1564  ---------------------------------
1565  ---------- PPP options ----------
1566  ---------------------------------
1567 */
1571 #ifndef PPP_SUPPORT
1572 #define PPP_SUPPORT 0
1573 #endif
1574 
1578 #ifndef PPPOE_SUPPORT
1579 #define PPPOE_SUPPORT 0
1580 #endif
1581 
1585 #ifndef PPPOS_SUPPORT
1586 #define PPPOS_SUPPORT PPP_SUPPORT
1587 #endif
1588 
1589 #if PPP_SUPPORT
1590 
1594 #ifndef NUM_PPP
1595 #define NUM_PPP 1
1596 #endif
1597 
1601 #ifndef PAP_SUPPORT
1602 #define PAP_SUPPORT 0
1603 #endif
1604 
1608 #ifndef CHAP_SUPPORT
1609 #define CHAP_SUPPORT 0
1610 #endif
1611 
1615 #ifndef MSCHAP_SUPPORT
1616 #define MSCHAP_SUPPORT 0
1617 #endif
1618 
1622 #ifndef CBCP_SUPPORT
1623 #define CBCP_SUPPORT 0
1624 #endif
1625 
1629 #ifndef CCP_SUPPORT
1630 #define CCP_SUPPORT 0
1631 #endif
1632 
1636 #ifndef VJ_SUPPORT
1637 #define VJ_SUPPORT 0
1638 #endif
1639 
1643 #ifndef MD5_SUPPORT
1644 #define MD5_SUPPORT 0
1645 #endif
1646 
1647 /*
1648  * Timeouts
1649  */
1650 #ifndef FSM_DEFTIMEOUT
1651 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
1652 #endif
1653 
1654 #ifndef FSM_DEFMAXTERMREQS
1655 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
1656 #endif
1657 
1658 #ifndef FSM_DEFMAXCONFREQS
1659 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
1660 #endif
1661 
1662 #ifndef FSM_DEFMAXNAKLOOPS
1663 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
1664 #endif
1665 
1666 #ifndef UPAP_DEFTIMEOUT
1667 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
1668 #endif
1669 
1670 #ifndef UPAP_DEFREQTIME
1671 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
1672 #endif
1673 
1674 #ifndef CHAP_DEFTIMEOUT
1675 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
1676 #endif
1677 
1678 #ifndef CHAP_DEFTRANSMITS
1679 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
1680 #endif
1681 
1682 /* Interval in seconds between keepalive echo requests, 0 to disable. */
1683 #ifndef LCP_ECHOINTERVAL
1684 #define LCP_ECHOINTERVAL 0
1685 #endif
1686 
1687 /* Number of unanswered echo requests before failure. */
1688 #ifndef LCP_MAXECHOFAILS
1689 #define LCP_MAXECHOFAILS 3
1690 #endif
1691 
1692 /* Max Xmit idle time (in jiffies) before resend flag char. */
1693 #ifndef PPP_MAXIDLEFLAG
1694 #define PPP_MAXIDLEFLAG 100
1695 #endif
1696 
1697 /*
1698  * Packet sizes
1699  *
1700  * Note - lcp shouldn't be allowed to negotiate stuff outside these
1701  * limits. See lcp.h in the pppd directory.
1702  * (XXX - these constants should simply be shared by lcp.c instead
1703  * of living in lcp.h)
1704  */
1705 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
1706 #ifndef PPP_MAXMTU
1707 /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */
1708 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
1709 #endif
1710 #define PPP_MINMTU 64
1711 #define PPP_MRU 1500 /* default MRU = max length of info field */
1712 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
1713 #ifndef PPP_DEFMRU
1714 #define PPP_DEFMRU 296 /* Try for this */
1715 #endif
1716 #define PPP_MINMRU 128 /* No MRUs below this */
1717 
1718 #ifndef MAXNAMELEN
1719 #define MAXNAMELEN 256 /* max length of hostname or name for auth */
1720 #endif
1721 #ifndef MAXSECRETLEN
1722 #define MAXSECRETLEN 256 /* max length of password or secret */
1723 #endif
1724 
1725 #endif /* PPP_SUPPORT */
1726 
1727 /*
1728  --------------------------------------
1729  ---------- Checksum options ----------
1730  --------------------------------------
1731 */
1735 #ifndef CHECKSUM_GEN_IP
1736 #define CHECKSUM_GEN_IP 1
1737 #endif
1738 
1742 #ifndef CHECKSUM_GEN_UDP
1743 #define CHECKSUM_GEN_UDP 1
1744 #endif
1745 
1749 #ifndef CHECKSUM_GEN_TCP
1750 #define CHECKSUM_GEN_TCP 1
1751 #endif
1752 
1756 #ifndef CHECKSUM_CHECK_IP
1757 #define CHECKSUM_CHECK_IP 1
1758 #endif
1759 
1763 #ifndef CHECKSUM_CHECK_UDP
1764 #define CHECKSUM_CHECK_UDP 1
1765 #endif
1766 
1770 #ifndef CHECKSUM_CHECK_TCP
1771 #define CHECKSUM_CHECK_TCP 1
1772 #endif
1773 
1778 #ifndef LWIP_CHECKSUM_ON_COPY
1779 #define LWIP_CHECKSUM_ON_COPY 0
1780 #endif
1781 
1782 /*
1783  ---------------------------------------
1784  ---------- Debugging options ----------
1785  ---------------------------------------
1786 */
1792 #ifndef LWIP_DBG_MIN_LEVEL
1793 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
1794 #endif
1795 
1800 #ifndef LWIP_DBG_TYPES_ON
1801 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
1802 #endif
1803 
1807 #ifndef ETHARP_DEBUG
1808 #define ETHARP_DEBUG LWIP_DBG_OFF
1809 #endif
1810 
1814 #ifndef NETIF_DEBUG
1815 #define NETIF_DEBUG LWIP_DBG_OFF
1816 #endif
1817 
1821 #ifndef PBUF_DEBUG
1822 #define PBUF_DEBUG LWIP_DBG_OFF
1823 #endif
1824 
1828 #ifndef API_LIB_DEBUG
1829 #define API_LIB_DEBUG LWIP_DBG_OFF
1830 #endif
1831 
1835 #ifndef API_MSG_DEBUG
1836 #define API_MSG_DEBUG LWIP_DBG_OFF
1837 #endif
1838 
1842 #ifndef SOCKETS_DEBUG
1843 #define SOCKETS_DEBUG LWIP_DBG_OFF
1844 #endif
1845 
1849 #ifndef ICMP_DEBUG
1850 #define ICMP_DEBUG LWIP_DBG_OFF
1851 #endif
1852 
1856 #ifndef IGMP_DEBUG
1857 #define IGMP_DEBUG LWIP_DBG_OFF
1858 #endif
1859 
1863 #ifndef INET_DEBUG
1864 #define INET_DEBUG LWIP_DBG_OFF
1865 #endif
1866 
1870 #ifndef IP_DEBUG
1871 #define IP_DEBUG LWIP_DBG_OFF
1872 #endif
1873 
1877 #ifndef IP_REASS_DEBUG
1878 #define IP_REASS_DEBUG LWIP_DBG_OFF
1879 #endif
1880 
1884 #ifndef RAW_DEBUG
1885 #define RAW_DEBUG LWIP_DBG_OFF
1886 #endif
1887 
1891 #ifndef MEM_DEBUG
1892 #define MEM_DEBUG LWIP_DBG_OFF
1893 #endif
1894 
1898 #ifndef MEMP_DEBUG
1899 #define MEMP_DEBUG LWIP_DBG_OFF
1900 #endif
1901 
1905 #ifndef SYS_DEBUG
1906 #define SYS_DEBUG LWIP_DBG_OFF
1907 #endif
1908 
1912 #ifndef TIMERS_DEBUG
1913 #define TIMERS_DEBUG LWIP_DBG_OFF
1914 #endif
1915 
1919 #ifndef TCP_DEBUG
1920 #define TCP_DEBUG LWIP_DBG_OFF
1921 #endif
1922 
1926 #ifndef TCP_INPUT_DEBUG
1927 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
1928 #endif
1929 
1933 #ifndef TCP_FR_DEBUG
1934 #define TCP_FR_DEBUG LWIP_DBG_OFF
1935 #endif
1936 
1941 #ifndef TCP_RTO_DEBUG
1942 #define TCP_RTO_DEBUG LWIP_DBG_OFF
1943 #endif
1944 
1948 #ifndef TCP_CWND_DEBUG
1949 #define TCP_CWND_DEBUG LWIP_DBG_OFF
1950 #endif
1951 
1955 #ifndef TCP_WND_DEBUG
1956 #define TCP_WND_DEBUG LWIP_DBG_OFF
1957 #endif
1958 
1962 #ifndef TCP_OUTPUT_DEBUG
1963 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
1964 #endif
1965 
1969 #ifndef TCP_RST_DEBUG
1970 #define TCP_RST_DEBUG LWIP_DBG_OFF
1971 #endif
1972 
1976 #ifndef TCP_QLEN_DEBUG
1977 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
1978 #endif
1979 
1983 #ifndef UDP_DEBUG
1984 #define UDP_DEBUG LWIP_DBG_OFF
1985 #endif
1986 
1990 #ifndef TCPIP_DEBUG
1991 #define TCPIP_DEBUG LWIP_DBG_OFF
1992 #endif
1993 
1997 #ifndef PPP_DEBUG
1998 #define PPP_DEBUG LWIP_DBG_OFF
1999 #endif
2000 
2004 #ifndef SLIP_DEBUG
2005 #define SLIP_DEBUG LWIP_DBG_OFF
2006 #endif
2007 
2011 #ifndef DHCP_DEBUG
2012 #define DHCP_DEBUG LWIP_DBG_OFF
2013 #endif
2014 
2018 #ifndef AUTOIP_DEBUG
2019 #define AUTOIP_DEBUG LWIP_DBG_OFF
2020 #endif
2021 
2025 #ifndef SNMP_MSG_DEBUG
2026 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
2027 #endif
2028 
2032 #ifndef SNMP_MIB_DEBUG
2033 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
2034 #endif
2035 
2039 #ifndef DNS_DEBUG
2040 #define DNS_DEBUG LWIP_DBG_OFF
2041 #endif
2042 
2043 #endif /* __LWIP_OPT_H__ */