Go to the documentation of this file. 38 #ifndef __LWIP_OPT_H__ 39 #define __LWIP_OPT_H__ 59 #ifndef SYS_LIGHTWEIGHT_PROT 60 #define SYS_LIGHTWEIGHT_PROT 0 75 #ifndef NO_SYS_NO_TIMERS 76 #define NO_SYS_NO_TIMERS 1 84 #define MEMCPY(dst,src,len) memcpy(dst,src,len) 92 #define SMEMCPY(dst,src,len) memcpy(dst,src,len) 105 #ifndef MEM_LIBC_MALLOC 106 #define MEM_LIBC_MALLOC 0 114 #ifndef MEMP_MEM_MALLOC 115 #define MEMP_MEM_MALLOC 0 123 #ifndef MEM_ALIGNMENT 124 #define MEM_ALIGNMENT 1 132 #define MEM_SIZE 1600 140 #ifndef MEMP_SEPARATE_POOLS 141 #define MEMP_SEPARATE_POOLS 0 153 #ifndef MEMP_OVERFLOW_CHECK 154 #define MEMP_OVERFLOW_CHECK 0 161 #ifndef MEMP_SANITY_CHECK 162 #define MEMP_SANITY_CHECK 0 171 #ifndef MEM_USE_POOLS 172 #define MEM_USE_POOLS 0 179 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL 180 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 189 #ifndef MEMP_USE_CUSTOM_POOLS 190 #define MEMP_USE_CUSTOM_POOLS 0 211 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 212 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 225 #ifndef MEMP_NUM_PBUF 226 #define MEMP_NUM_PBUF 16 233 #ifndef MEMP_NUM_RAW_PCB 234 #define MEMP_NUM_RAW_PCB 4 242 #ifndef MEMP_NUM_UDP_PCB 243 #define MEMP_NUM_UDP_PCB 4 250 #ifndef MEMP_NUM_TCP_PCB 251 #define MEMP_NUM_TCP_PCB 5 258 #ifndef MEMP_NUM_TCP_PCB_LISTEN 259 #define MEMP_NUM_TCP_PCB_LISTEN 8 266 #ifndef MEMP_NUM_TCP_SEG 267 #define MEMP_NUM_TCP_SEG 16 274 #ifndef MEMP_NUM_REASSDATA 275 #define MEMP_NUM_REASSDATA 5 285 #ifndef MEMP_NUM_FRAG_PBUF 286 #define MEMP_NUM_FRAG_PBUF 15 295 #ifndef MEMP_NUM_ARP_QUEUE 296 #define MEMP_NUM_ARP_QUEUE 30 305 #ifndef MEMP_NUM_IGMP_GROUP 306 #define MEMP_NUM_IGMP_GROUP 8 313 #ifndef MEMP_NUM_SYS_TIMEOUT 314 #define MEMP_NUM_SYS_TIMEOUT 3 321 #ifndef MEMP_NUM_NETBUF 322 #define MEMP_NUM_NETBUF 2 329 #ifndef MEMP_NUM_NETCONN 330 #define MEMP_NUM_NETCONN 4 338 #ifndef MEMP_NUM_TCPIP_MSG_API 339 #define MEMP_NUM_TCPIP_MSG_API 8 347 #ifndef MEMP_NUM_TCPIP_MSG_INPKT 348 #define MEMP_NUM_TCPIP_MSG_INPKT 8 354 #ifndef MEMP_NUM_SNMP_NODE 355 #define MEMP_NUM_SNMP_NODE 50 362 #ifndef MEMP_NUM_SNMP_ROOTNODE 363 #define MEMP_NUM_SNMP_ROOTNODE 30 371 #ifndef MEMP_NUM_SNMP_VARBIND 372 #define MEMP_NUM_SNMP_VARBIND 2 380 #ifndef MEMP_NUM_SNMP_VALUE 381 #define MEMP_NUM_SNMP_VALUE 3 388 #ifndef MEMP_NUM_NETDB 389 #define MEMP_NUM_NETDB 1 396 #ifndef MEMP_NUM_LOCALHOSTLIST 397 #define MEMP_NUM_LOCALHOSTLIST 1 404 #ifndef MEMP_NUM_PPPOE_INTERFACES 405 #define MEMP_NUM_PPPOE_INTERFACES 1 411 #ifndef PBUF_POOL_SIZE 412 #define PBUF_POOL_SIZE 16 430 #ifndef ARP_TABLE_SIZE 431 #define ARP_TABLE_SIZE 10 442 #define ARP_QUEUEING 0 455 #ifndef ETHARP_TRUST_IP_MAC 456 #define ETHARP_TRUST_IP_MAC 0 465 #ifndef ETHARP_SUPPORT_VLAN 466 #define ETHARP_SUPPORT_VLAN 0 472 #ifndef LWIP_ETHERNET 473 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT) 482 #define ETH_PAD_SIZE 0 488 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES 489 #define ETHARP_SUPPORT_STATIC_ENTRIES 0 516 #ifndef IP_OPTIONS_ALLOWED 517 #define IP_OPTIONS_ALLOWED 1 525 #ifndef IP_REASSEMBLY 526 #define IP_REASSEMBLY 0 543 #ifndef IP_REASS_MAXAGE 544 #define IP_REASS_MAXAGE 3 553 #ifndef IP_REASS_MAX_PBUFS 554 #define IP_REASS_MAX_PBUFS 10 564 #ifndef IP_FRAG_USES_STATIC_BUF 565 #define IP_FRAG_USES_STATIC_BUF 0 572 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) 573 #define IP_FRAG_MAX_MTU 1500 579 #ifndef IP_DEFAULT_TTL 580 #define IP_DEFAULT_TTL 255 588 #ifndef IP_SOF_BROADCAST 589 #define IP_SOF_BROADCAST 0 596 #ifndef IP_SOF_BROADCAST_RECV 597 #define IP_SOF_BROADCAST_RECV 0 617 #define ICMP_TTL (IP_DEFAULT_TTL) 623 #ifndef LWIP_BROADCAST_PING 624 #define LWIP_BROADCAST_PING 0 630 #ifndef LWIP_MULTICAST_PING 631 #define LWIP_MULTICAST_PING 0 650 #define RAW_TTL (IP_DEFAULT_TTL) 668 #ifndef DHCP_DOES_ARP_CHECK 669 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) 681 #define LWIP_AUTOIP 0 688 #ifndef LWIP_DHCP_AUTOIP_COOP 689 #define LWIP_DHCP_AUTOIP_COOP 0 699 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES 700 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 721 #ifndef SNMP_CONCURRENT_REQUESTS 722 #define SNMP_CONCURRENT_REQUESTS 1 729 #ifndef SNMP_TRAP_DESTINATIONS 730 #define SNMP_TRAP_DESTINATIONS 1 738 #ifndef SNMP_PRIVATE_MIB 739 #define SNMP_PRIVATE_MIB 0 747 #ifndef SNMP_SAFE_REQUESTS 748 #define SNMP_SAFE_REQUESTS 1 755 #ifndef SNMP_MAX_OCTET_STRING_LEN 756 #define SNMP_MAX_OCTET_STRING_LEN 127 764 #ifndef SNMP_MAX_TREE_DEPTH 765 #define SNMP_MAX_TREE_DEPTH 15 772 #ifndef SNMP_MAX_VALUE_SIZE 773 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH)) 802 #ifndef DNS_TABLE_SIZE 803 #define DNS_TABLE_SIZE 4 807 #ifndef DNS_MAX_NAME_LENGTH 808 #define DNS_MAX_NAME_LENGTH 256 812 #ifndef DNS_MAX_SERVERS 813 #define DNS_MAX_SERVERS 2 817 #ifndef DNS_DOES_NAME_CHECK 818 #define DNS_DOES_NAME_CHECK 1 823 #define DNS_MSG_SIZE 512 836 #ifndef DNS_LOCAL_HOSTLIST 837 #define DNS_LOCAL_HOSTLIST 0 842 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC 843 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 862 #define LWIP_UDPLITE 0 869 #define UDP_TTL (IP_DEFAULT_TTL) 875 #ifndef LWIP_NETBUF_RECVINFO 876 #define LWIP_NETBUF_RECVINFO 0 895 #define TCP_TTL (IP_DEFAULT_TTL) 903 #define TCP_WND (4 * TCP_MSS) 910 #define TCP_MAXRTX 12 916 #ifndef TCP_SYNMAXRTX 917 #define TCP_SYNMAXRTX 6 924 #ifndef TCP_QUEUE_OOSEQ 925 #define TCP_QUEUE_OOSEQ (LWIP_TCP) 947 #ifndef TCP_CALCULATE_EFF_SEND_MSS 948 #define TCP_CALCULATE_EFF_SEND_MSS 1 956 #define TCP_SND_BUF 256 963 #ifndef TCP_SND_QUEUELEN 964 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) 973 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2) 981 #ifndef TCP_SNDQUEUELOWAT 982 #define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2) 988 #ifndef TCP_LISTEN_BACKLOG 989 #define TCP_LISTEN_BACKLOG 0 997 #ifndef TCP_DEFAULT_LISTEN_BACKLOG 998 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff 1015 #ifndef TCP_OVERSIZE 1016 #define TCP_OVERSIZE TCP_MSS 1022 #ifndef LWIP_TCP_TIMESTAMPS 1023 #define LWIP_TCP_TIMESTAMPS 0 1030 #ifndef TCP_WND_UPDATE_THRESHOLD 1031 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4) 1060 #ifndef PBUF_LINK_HLEN 1061 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 1069 #ifndef PBUF_POOL_BUFSIZE 1070 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN) 1082 #ifndef LWIP_NETIF_HOSTNAME 1083 #define LWIP_NETIF_HOSTNAME 0 1089 #ifndef LWIP_NETIF_API 1090 #define LWIP_NETIF_API 0 1097 #ifndef LWIP_NETIF_STATUS_CALLBACK 1098 #define LWIP_NETIF_STATUS_CALLBACK 0 1105 #ifndef LWIP_NETIF_LINK_CALLBACK 1106 #define LWIP_NETIF_LINK_CALLBACK 0 1116 #ifndef LWIP_NETIF_HWADDRHINT 1117 #define LWIP_NETIF_HWADDRHINT 0 1124 #ifndef LWIP_NETIF_LOOPBACK 1125 #define LWIP_NETIF_LOOPBACK 1 1132 #ifndef LWIP_LOOPBACK_MAX_PBUFS 1133 #define LWIP_LOOPBACK_MAX_PBUFS 0 1149 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING 1150 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) 1162 #ifndef LWIP_NETIF_TX_SINGLE_PBUF 1163 #define LWIP_NETIF_TX_SINGLE_PBUF 0 1174 #ifndef LWIP_HAVE_LOOPIF 1175 #define LWIP_HAVE_LOOPIF 1 1186 #ifndef LWIP_HAVE_SLIPIF 1187 #define LWIP_HAVE_SLIPIF 0 1198 #ifndef TCPIP_THREAD_NAME 1199 #define TCPIP_THREAD_NAME "tcpip_thread" 1207 #ifndef TCPIP_THREAD_STACKSIZE 1208 #define TCPIP_THREAD_STACKSIZE 0 1216 #ifndef TCPIP_THREAD_PRIO 1217 #define TCPIP_THREAD_PRIO 1 1225 #ifndef TCPIP_MBOX_SIZE 1226 #define TCPIP_MBOX_SIZE 0 1232 #ifndef SLIPIF_THREAD_NAME 1233 #define SLIPIF_THREAD_NAME "slipif_loop" 1241 #ifndef SLIPIF_THREAD_STACKSIZE 1242 #define SLIPIF_THREAD_STACKSIZE 0 1250 #ifndef SLIPIF_THREAD_PRIO 1251 #define SLIPIF_THREAD_PRIO 1 1257 #ifndef PPP_THREAD_NAME 1258 #define PPP_THREAD_NAME "pppInputThread" 1266 #ifndef PPP_THREAD_STACKSIZE 1267 #define PPP_THREAD_STACKSIZE 0 1275 #ifndef PPP_THREAD_PRIO 1276 #define PPP_THREAD_PRIO 1 1282 #ifndef DEFAULT_THREAD_NAME 1283 #define DEFAULT_THREAD_NAME "lwIP" 1291 #ifndef DEFAULT_THREAD_STACKSIZE 1292 #define DEFAULT_THREAD_STACKSIZE 0 1300 #ifndef DEFAULT_THREAD_PRIO 1301 #define DEFAULT_THREAD_PRIO 1 1309 #ifndef DEFAULT_RAW_RECVMBOX_SIZE 1310 #define DEFAULT_RAW_RECVMBOX_SIZE 0 1318 #ifndef DEFAULT_UDP_RECVMBOX_SIZE 1319 #define DEFAULT_UDP_RECVMBOX_SIZE 0 1327 #ifndef DEFAULT_TCP_RECVMBOX_SIZE 1328 #define DEFAULT_TCP_RECVMBOX_SIZE 0 1336 #ifndef DEFAULT_ACCEPTMBOX_SIZE 1337 #define DEFAULT_ACCEPTMBOX_SIZE 0 1349 #ifndef LWIP_TCPIP_CORE_LOCKING 1350 #define LWIP_TCPIP_CORE_LOCKING 0 1357 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT 1358 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 1364 #ifndef LWIP_NETCONN 1365 #define LWIP_NETCONN 0 1371 #ifndef LWIP_TCPIP_TIMEOUT 1372 #define LWIP_TCPIP_TIMEOUT 1 1384 #define LWIP_SOCKET 0 1391 #ifndef LWIP_COMPAT_SOCKETS 1392 #define LWIP_COMPAT_SOCKETS 1 1400 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES 1401 #define LWIP_POSIX_SOCKETS_IO_NAMES 1 1409 #ifndef LWIP_TCP_KEEPALIVE 1410 #define LWIP_TCP_KEEPALIVE 0 1416 #ifndef LWIP_SO_RCVTIMEO 1417 #define LWIP_SO_RCVTIMEO 0 1423 #ifndef LWIP_SO_RCVBUF 1424 #define LWIP_SO_RCVBUF 0 1430 #ifndef RECV_BUFSIZE_DEFAULT 1431 #define RECV_BUFSIZE_DEFAULT INT_MAX 1446 #ifndef SO_REUSE_RXTOALL 1447 #define SO_REUSE_RXTOALL 0 1459 #define LWIP_STATS 1 1467 #ifndef LWIP_STATS_DISPLAY 1468 #define LWIP_STATS_DISPLAY 0 1475 #define LINK_STATS 1 1481 #ifndef ETHARP_STATS 1482 #define ETHARP_STATS (LWIP_ARP) 1496 #ifndef IPFRAG_STATS 1497 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) 1504 #define ICMP_STATS 1 1511 #define IGMP_STATS (LWIP_IGMP) 1519 #define UDP_STATS (LWIP_UDP) 1527 #define TCP_STATS (LWIP_TCP) 1534 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) 1541 #define MEMP_STATS (MEMP_MEM_MALLOC == 0) 1548 #define SYS_STATS (NO_SYS == 0) 1553 #define LINK_STATS 0 1555 #define IPFRAG_STATS 0 1556 #define ICMP_STATS 0 1557 #define IGMP_STATS 0 1561 #define MEMP_STATS 0 1563 #define LWIP_STATS_DISPLAY 0 1576 #define PPP_SUPPORT 0 1582 #ifndef PPPOE_SUPPORT 1583 #define PPPOE_SUPPORT 0 1589 #ifndef PPPOS_SUPPORT 1590 #define PPPOS_SUPPORT PPP_SUPPORT 1606 #define PAP_SUPPORT 0 1612 #ifndef CHAP_SUPPORT 1613 #define CHAP_SUPPORT 0 1619 #ifndef MSCHAP_SUPPORT 1620 #define MSCHAP_SUPPORT 0 1626 #ifndef CBCP_SUPPORT 1627 #define CBCP_SUPPORT 0 1634 #define CCP_SUPPORT 0 1641 #define VJ_SUPPORT 0 1648 #define MD5_SUPPORT 0 1654 #ifndef FSM_DEFTIMEOUT 1655 #define FSM_DEFTIMEOUT 6 1658 #ifndef FSM_DEFMAXTERMREQS 1659 #define FSM_DEFMAXTERMREQS 2 1662 #ifndef FSM_DEFMAXCONFREQS 1663 #define FSM_DEFMAXCONFREQS 10 1666 #ifndef FSM_DEFMAXNAKLOOPS 1667 #define FSM_DEFMAXNAKLOOPS 5 1670 #ifndef UPAP_DEFTIMEOUT 1671 #define UPAP_DEFTIMEOUT 6 1674 #ifndef UPAP_DEFREQTIME 1675 #define UPAP_DEFREQTIME 30 1678 #ifndef CHAP_DEFTIMEOUT 1679 #define CHAP_DEFTIMEOUT 6 1682 #ifndef CHAP_DEFTRANSMITS 1683 #define CHAP_DEFTRANSMITS 10 1687 #ifndef LCP_ECHOINTERVAL 1688 #define LCP_ECHOINTERVAL 0 1692 #ifndef LCP_MAXECHOFAILS 1693 #define LCP_MAXECHOFAILS 3 1697 #ifndef PPP_MAXIDLEFLAG 1698 #define PPP_MAXIDLEFLAG 100 1709 #define PPP_MTU 1500 1712 #define PPP_MAXMTU 1500 1714 #define PPP_MINMTU 64 1715 #define PPP_MRU 1500 1716 #define PPP_MAXMRU 1500 1718 #define PPP_DEFMRU 296 1720 #define PPP_MINMRU 128 1723 #define MAXNAMELEN 256 1725 #ifndef MAXSECRETLEN 1726 #define MAXSECRETLEN 256 1739 #ifndef CHECKSUM_GEN_IP 1740 #define CHECKSUM_GEN_IP 1 1746 #ifndef CHECKSUM_GEN_UDP 1747 #define CHECKSUM_GEN_UDP 1 1753 #ifndef CHECKSUM_GEN_TCP 1754 #define CHECKSUM_GEN_TCP 1 1760 #ifndef CHECKSUM_CHECK_IP 1761 #define CHECKSUM_CHECK_IP 1 1767 #ifndef CHECKSUM_CHECK_UDP 1768 #define CHECKSUM_CHECK_UDP 1 1774 #ifndef CHECKSUM_CHECK_TCP 1775 #define CHECKSUM_CHECK_TCP 1 1782 #ifndef LWIP_CHECKSUM_ON_COPY 1783 #define LWIP_CHECKSUM_ON_COPY 0 1796 #ifndef LWIP_DBG_MIN_LEVEL 1797 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL 1804 #ifndef LWIP_DBG_TYPES_ON 1805 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON 1811 #ifndef ETHARP_DEBUG 1812 #define ETHARP_DEBUG LWIP_DBG_OFF 1819 #define NETIF_DEBUG LWIP_DBG_OFF 1826 #define PBUF_DEBUG LWIP_DBG_OFF 1832 #ifndef API_LIB_DEBUG 1833 #define API_LIB_DEBUG LWIP_DBG_OFF 1839 #ifndef API_MSG_DEBUG 1840 #define API_MSG_DEBUG LWIP_DBG_OFF 1846 #ifndef SOCKETS_DEBUG 1847 #define SOCKETS_DEBUG LWIP_DBG_OFF 1854 #define ICMP_DEBUG LWIP_DBG_OFF 1861 #define IGMP_DEBUG LWIP_DBG_OFF 1868 #define INET_DEBUG LWIP_DBG_OFF 1875 #define IP_DEBUG LWIP_DBG_OFF 1881 #ifndef IP_REASS_DEBUG 1882 #define IP_REASS_DEBUG LWIP_DBG_OFF 1889 #define RAW_DEBUG LWIP_DBG_OFF 1896 #define MEM_DEBUG LWIP_DBG_OFF 1903 #define MEMP_DEBUG LWIP_DBG_OFF 1910 #define SYS_DEBUG LWIP_DBG_OFF 1916 #ifndef TIMERS_DEBUG 1917 #define TIMERS_DEBUG LWIP_DBG_OFF 1924 #define TCP_DEBUG LWIP_DBG_OFF 1930 #ifndef TCP_INPUT_DEBUG 1931 #define TCP_INPUT_DEBUG LWIP_DBG_OFF 1937 #ifndef TCP_FR_DEBUG 1938 #define TCP_FR_DEBUG LWIP_DBG_OFF 1945 #ifndef TCP_RTO_DEBUG 1946 #define TCP_RTO_DEBUG LWIP_DBG_OFF 1952 #ifndef TCP_CWND_DEBUG 1953 #define TCP_CWND_DEBUG LWIP_DBG_OFF 1959 #ifndef TCP_WND_DEBUG 1960 #define TCP_WND_DEBUG LWIP_DBG_OFF 1966 #ifndef TCP_OUTPUT_DEBUG 1967 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF 1973 #ifndef TCP_RST_DEBUG 1974 #define TCP_RST_DEBUG LWIP_DBG_OFF 1980 #ifndef TCP_QLEN_DEBUG 1981 #define TCP_QLEN_DEBUG LWIP_DBG_OFF 1988 #define UDP_DEBUG LWIP_DBG_OFF 1995 #define TCPIP_DEBUG LWIP_DBG_OFF 2002 #define PPP_DEBUG LWIP_DBG_OFF 2009 #define SLIP_DEBUG LWIP_DBG_OFF 2016 #define DHCP_DEBUG LWIP_DBG_OFF 2022 #ifndef AUTOIP_DEBUG 2023 #define AUTOIP_DEBUG LWIP_DBG_OFF 2029 #ifndef SNMP_MSG_DEBUG 2030 #define SNMP_MSG_DEBUG LWIP_DBG_OFF 2036 #ifndef SNMP_MIB_DEBUG 2037 #define SNMP_MIB_DEBUG LWIP_DBG_OFF 2044 #define DNS_DEBUG LWIP_DBG_OFF