1 /* 2 * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without modification, 6 * are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright notice, 11 * this list of conditions and the following disclaimer in the documentation 12 * and/or other materials provided with the distribution. 13 * 3. The name of the author may not be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 * OF SUCH DAMAGE. 26 * 27 * This file is part of the lwIP TCP/IP stack. 28 * 29 * Author: Simon Goldschmidt 30 * 31 */ 32 33 #ifndef __LWIPOPTS_H__ 34 #define __LWIPOPTS_H__ 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif /* __cplusplus */ 39 #ifndef LWIP_PLATFORM_PRINT 40 #define LWIP_PLATFORM_PRINT PRINTK 41 #endif 42 43 /* 44 To support the CMSIS interface, you need to enable this macro. 45 By default, this macro is not supported. 46 */ 47 #ifndef LWIP_ALIOS_COMPAT 48 #define LWIP_ALIOS_COMPAT 0 49 #endif 50 51 #ifndef LWIP_CMSIS_SUPPORT 52 #define LWIP_CMSIS_SUPPORT 0 53 #endif 54 55 #ifndef LWIP_FREERTOS_COMPAT 56 #define LWIP_FREERTOS_COMPAT 0 57 #endif 58 59 #ifndef LWIP_GETHOSTBYNAME 60 #define LWIP_GETHOSTBYNAME 1 61 #endif 62 63 #ifndef LWIP_GETPEERNAME 64 #define LWIP_GETPEERNAME 1 65 #endif 66 67 #ifndef LWIP_GETSOCKNAME 68 #define LWIP_GETSOCKNAME 1 69 #endif 70 71 #ifndef LWIP_SMALL_SIZE 72 #define LWIP_SMALL_SIZE 1 73 #endif 74 75 /* only valid when LWIP_SMALL_SIZE is 1, mean small size with MESH function */ 76 #ifndef LWIP_SMALL_SIZE_MESH 77 #define LWIP_SMALL_SIZE_MESH 1 78 #endif 79 80 #if LWIP_SMALL_SIZE 81 82 #if LWIP_SMALL_SIZE_MESH 83 84 #ifndef LWIP_L3_EVENT_MSG 85 #define LWIP_L3_EVENT_MSG 1 86 #endif 87 88 #ifndef LWIP_ENABLE_MESH_SHELL_CMD 89 #define LWIP_ENABLE_MESH_SHELL_CMD 1 90 #endif 91 92 #ifndef LWIP_RPL 93 #define LWIP_RPL 0 94 #endif 95 96 #ifndef LWIP_RIPPLE 97 #define LWIP_RIPPLE 0 98 #endif 99 100 #ifndef LWIP_MMBR 101 #define LWIP_MMBR 0 102 #endif 103 104 #ifndef LWIP_NA_PROXY 105 #define LWIP_NA_PROXY 1 106 #endif 107 108 #ifndef LWIP_RA_PREFIX_DYNAMIC 109 #define LWIP_RA_PREFIX_DYNAMIC 1 110 #endif 111 112 #ifndef LWIP_IPV6 113 #define LWIP_IPV6 1 114 #endif 115 116 #ifndef LWIP_IPV6_MLD 117 #define LWIP_IPV6_MLD 0 118 #endif 119 120 #ifndef LWIP_IPV6_MLD_QUERIER 121 #define LWIP_IPV6_MLD_QUERIER 0 122 #endif 123 124 #ifndef LWIP_MPL 125 #define LWIP_MPL 0 126 #endif 127 128 #ifndef LWIP_MPL_IPV4 129 #define LWIP_MPL_IPV4 0 130 #endif 131 132 #ifndef LWIP_MPL_IPV4_BCAST 133 #define LWIP_MPL_IPV4_BCAST 0 134 #endif 135 136 #ifndef LWIP_6LOWPAN 137 #define LWIP_6LOWPAN 0 138 #endif 139 140 #ifndef ETH_6LOWPAN 141 #define ETH_6LOWPAN 1 142 #endif 143 144 #ifndef LWIP_IPV6_AUTOCONFIG_DEFAULT 145 #define LWIP_IPV6_AUTOCONFIG_DEFAULT 1 146 #endif 147 148 #ifndef LWIP_DHCP_SUBSTITUTE 149 #define LWIP_DHCP_SUBSTITUTE 0 150 #endif 151 152 #ifndef LWIP_DHCP_LIMIT_CONCURRENT_REQUESTS 153 #define LWIP_DHCP_LIMIT_CONCURRENT_REQUESTS 1 154 #endif 155 156 #ifndef LWIP_NAT64 157 #define LWIP_NAT64 1 158 #endif 159 160 #ifndef LWIP_NAT64_MIN_SUBSTITUTE 161 #define LWIP_NAT64_MIN_SUBSTITUTE 0 162 #endif 163 164 #ifndef LWIP_DNS64 165 #define LWIP_DNS64 LWIP_IPV6 166 #endif 167 168 #ifndef LWIP_ND6_ROUTER 169 #define LWIP_ND6_ROUTER 1 170 #endif 171 172 #ifndef LWIP_ND6_DAG_PREFIX 173 #define LWIP_ND6_DAG_PREFIX 1 174 #endif 175 176 #ifndef LWIP_USE_L2_METRICS 177 #define LWIP_USE_L2_METRICS 1 178 #endif 179 180 #ifndef LWIP_SO_PRIORITY 181 #define LWIP_SO_PRIORITY 1 182 #endif 183 184 #ifndef LWIP_ENABLE_ROUTER 185 #define LWIP_ENABLE_ROUTER 1 186 #endif 187 188 /* maximum that an AP can associate with others */ 189 #ifndef LWIP_AP_ASSOCIATE_NUM 190 #define LWIP_AP_ASSOCIATE_NUM 5 191 #endif 192 193 /* maximum of MBRs */ 194 #ifndef LWIP_MULTI_MBR_NUM 195 #define LWIP_MULTI_MBR_NUM 3 196 #endif 197 198 /* number of nodes at Router side */ 199 #ifndef LWIP_ROUTER_NBR_NUM 200 #define LWIP_ROUTER_NBR_NUM 11 201 #endif 202 203 #ifndef LWIP_ND6_NUM_DESTINATIONS 204 #define LWIP_ND6_NUM_DESTINATIONS \ 205 (LWIP_ND6_NUM_ROUTERS + LWIP_AP_ASSOCIATE_NUM + (LWIP_MULTI_MBR_NUM - 1) + LWIP_ROUTER_NBR_NUM) 206 #endif /* LWIP_ND6_NUM_DESTINATIONS */ 207 208 #ifndef LWIP_ND6_NUM_NEIGHBORS 209 #define LWIP_ND6_NUM_NEIGHBORS LWIP_ND6_NUM_DESTINATIONS 210 #endif 211 212 #ifndef LWIP_ND6_DESTINATIONS_OLDTIME 213 #define LWIP_ND6_DESTINATIONS_OLDTIME 180 214 #endif 215 216 #else /* LWIP_SMALL_SIZE_MESH */ 217 #undef LWIP_MMBR 218 #define LWIP_MMBR 0 219 220 #endif /* LWIP_SMALL_SIZE_MESH */ 221 222 #ifndef LWIP_L3_EVENT_MSG 223 #define LWIP_L3_EVENT_MSG 0 224 #endif 225 226 #if defined (LOSCFG_CONFIG_MQTT) 227 #ifndef CONFIG_NFILE_DESCRIPTORS 228 #define CONFIG_NFILE_DESCRIPTORS 1 229 #endif 230 #endif 231 232 #ifndef LWIP_API_MESH 233 #define LWIP_API_MESH 0 234 #endif 235 236 #ifndef LWIP_API_RICH 237 #define LWIP_API_RICH 0 238 #endif 239 240 #ifndef LWIP_ICMP6_ERR_RT_LMT 241 #define LWIP_ICMP6_ERR_RT_LMT 0 242 #endif 243 244 #ifndef LWIP_DHCPS_AGENT_INFO 245 #define LWIP_DHCPS_AGENT_INFO 0 246 #endif 247 248 #ifndef LWIP_SOCK_OPT_ICMP6_FILTER 249 #define LWIP_SOCK_OPT_ICMP6_FILTER 0 250 #endif 251 252 #ifndef LWIP_IPV6_PER_PROTO_CHKSUM 253 #define LWIP_IPV6_PER_PROTO_CHKSUM 0 254 #endif 255 256 #ifndef LWIP_SOCK_OPT_IPV6_UNICAST_HOPS 257 #define LWIP_SOCK_OPT_IPV6_UNICAST_HOPS 0 258 #endif 259 260 #ifndef LWIP_SOCK_OPT_TCP_QUEUE_SEQ 261 #define LWIP_SOCK_OPT_TCP_QUEUE_SEQ 0 262 #endif 263 264 #ifndef LWIP_LINK_MCAST_FILTER 265 #define LWIP_LINK_MCAST_FILTER 0 266 #endif 267 268 #ifndef LWIP_IOCTL_IPV6DPCTD 269 #define LWIP_IOCTL_IPV6DPCTD 0 270 #endif 271 272 #ifndef LWIP_IOCTL_ROUTE 273 #define LWIP_IOCTL_ROUTE 0 274 #endif 275 276 #ifndef LWIP_IOCTL_IF 277 #define LWIP_IOCTL_IF 0 278 #endif 279 280 #ifndef LWIP_IPV6_DUP_DETECT_ATTEMPTS 281 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 282 #endif 283 284 #ifndef LWIP_NETIFAPI_DHCPS_IP 285 #define LWIP_NETIFAPI_DHCPS_IP 0 286 #endif 287 288 #ifndef LWIP_NETIFAPI_GET_ADDR 289 #define LWIP_NETIFAPI_GET_ADDR 1 290 #endif 291 292 #ifndef LWIP_DROP_PKT_WHEN_NETIF_DOWN 293 #define LWIP_DROP_PKT_WHEN_NETIF_DOWN 1 294 #endif 295 296 #ifndef LWIP_NETIFAPI_LINK_CALLBACK 297 #define LWIP_NETIFAPI_LINK_CALLBACK 0 298 #endif 299 300 #ifndef LWIP_NETIFAPI_MTU 301 #define LWIP_NETIFAPI_MTU 0 302 #endif 303 304 #ifndef LWIP_NETIFAPI_IF_NUM 305 #define LWIP_NETIFAPI_IF_NUM 0 306 #endif 307 308 #ifndef LWIP_NETIFAPI_IF_INDEX 309 #define LWIP_NETIFAPI_IF_INDEX 0 310 #endif 311 312 #ifndef LWIP_NETIFAPI_IF_HW 313 #define LWIP_NETIFAPI_IF_HW 0 314 #endif 315 316 #ifndef LWIP_NETIFAPI_IP6_ADDR 317 #define LWIP_NETIFAPI_IP6_ADDR 0 318 #endif 319 320 #ifndef LWIP_NETIFAPI_MLD6 321 #define LWIP_NETIFAPI_MLD6 0 322 #endif 323 324 #ifndef LWIP_NETIFAPI_IF_GET_DEFAULT 325 #define LWIP_NETIFAPI_IF_GET_DEFAULT 0 326 #endif 327 328 #ifndef LWIP_IP_FILTER 329 #define LWIP_IP_FILTER 0 330 #endif 331 332 #ifndef LWIP_IPV6_FILTER 333 #define LWIP_IPV6_FILTER 0 334 #endif 335 336 #ifndef LWIP_NETIF_NBR_CACHE_API 337 #define LWIP_NETIF_NBR_CACHE_API 0 338 #endif 339 340 #if defined (CONFIG_NETIF_HOSTNAME) 341 342 #ifndef LWIP_NETIF_HOSTNAME 343 #define LWIP_NETIF_HOSTNAME 1 344 #endif 345 346 #ifndef LWIP_NETIF_GET_HOSTNAME 347 #define LWIP_NETIF_GET_HOSTNAME 0 348 #endif 349 350 #else 351 352 #ifndef LWIP_NETIF_HOSTNAME 353 #define LWIP_NETIF_HOSTNAME 0 354 #endif 355 #endif 356 357 #ifndef LWIP_IFADDRS 358 #define LWIP_IFADDRS 0 359 #endif 360 361 #ifndef LWIP_ALLOW_SOCKET_CONFIG 362 #define LWIP_ALLOW_SOCKET_CONFIG 0 363 #endif 364 365 #if defined (CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER) 366 #ifndef LWIP_DHCP_VENDOR_CLASS_IDENTIFIER 367 #define LWIP_DHCP_VENDOR_CLASS_IDENTIFIER 1 368 #endif 369 370 #ifndef LWIP_DHCP_GET_VENDOR_CLASS_IDENTIFIER 371 #define LWIP_DHCP_GET_VENDOR_CLASS_IDENTIFIER 0 372 #endif 373 374 #else 375 376 #ifndef LWIP_DHCP_VENDOR_CLASS_IDENTIFIER 377 #define LWIP_DHCP_VENDOR_CLASS_IDENTIFIER 0 378 #endif 379 #endif 380 381 #ifndef LWIP_IPV6_DHCP6 382 #define LWIP_IPV6_DHCP6 0 383 #endif 384 385 #ifndef LWIP_TCP_TLP_SUPPORT 386 #define LWIP_TCP_TLP_SUPPORT 0 387 #endif 388 389 #ifndef LWIP_WND_SCALE 390 #define LWIP_WND_SCALE 1 391 #endif 392 393 #ifndef TCP_RCV_SCALE 394 #define TCP_RCV_SCALE 1 395 #endif 396 397 #ifndef LWIP_SNTP 398 #define LWIP_SNTP 0 399 #endif 400 401 #ifndef LWIP_SOCK_FILTER 402 #define LWIP_SOCK_FILTER 0 403 #endif 404 405 #ifndef DRIVER_STATUS_CHECK 406 #define DRIVER_STATUS_CHECK 1 407 #endif 408 409 #ifndef IP6_DEBUG 410 #define IP6_DEBUG 0 411 #endif 412 413 #ifndef LWIP_DEBUG_TIMERNAMES 414 #define LWIP_DEBUG_TIMERNAMES 0 415 #endif 416 417 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES 418 #define ETHARP_SUPPORT_STATIC_ENTRIES 1 419 #endif 420 421 #ifndef LWIP_DHCPS 422 #define LWIP_DHCPS 1 423 #endif 424 425 #ifndef LWIP_STATS 426 #define LWIP_STATS 0 427 #endif 428 429 #ifndef ICMP6_STATS 430 #define ICMP6_STATS 0 431 #endif 432 433 #ifndef LWIP_TCP_INFO 434 #define LWIP_TCP_INFO 0 435 #endif 436 437 #ifndef LWIP_NETIF_ETHTOOL 438 #define LWIP_NETIF_ETHTOOL 0 439 #endif 440 441 #ifndef LWIP_ENABLE_LOS_SHELL_CMD 442 #define LWIP_ENABLE_LOS_SHELL_CMD 0 443 #endif 444 445 #ifndef LWIP_ENABLE_BASIC_SHELL_CMD 446 #define LWIP_ENABLE_BASIC_SHELL_CMD 1 447 #endif 448 449 #ifndef LWIP_ENABLE_MESH_SHELL_CMD 450 #define LWIP_ENABLE_MESH_SHELL_CMD 0 451 #endif 452 453 #ifndef LWIP_RIPPLE 454 #define LWIP_RIPPLE 0 455 #endif 456 457 #ifndef LWIP_RA_PREFIX_DYNAMIC 458 #define LWIP_RA_PREFIX_DYNAMIC 0 459 #endif 460 461 #ifndef LWIP_DHCP_COAP_RELAY 462 #define LWIP_DHCP_COAP_RELAY 0 463 #endif 464 465 #ifndef LWIP_MPL_IPV4_BCAST 466 #define LWIP_MPL_IPV4_BCAST 0 467 #endif 468 469 #ifndef LWIP_6LOWPAN 470 #define LWIP_6LOWPAN 0 471 #endif 472 473 #ifndef ETH_6LOWPAN 474 #define ETH_6LOWPAN 0 475 #endif 476 477 #ifndef LWIP_DHCP_SUBSTITUTE 478 #define LWIP_DHCP_SUBSTITUTE 0 479 #endif 480 481 #ifndef LWIP_DHCPS_MAX_LEASE 482 #define LWIP_DHCPS_MAX_LEASE 6 483 #endif 484 485 #ifndef LWIP_NAT64 486 #define LWIP_NAT64 0 487 #endif 488 489 #ifndef LWIP_DNS64 490 #define LWIP_DNS64 0 491 #endif 492 493 #ifndef LWIP_ND6_ROUTER 494 #define LWIP_ND6_ROUTER 0 495 #endif 496 497 #ifndef LWIP_RPL_RS_DAO 498 #define LWIP_RPL_RS_DAO 0 499 #endif 500 501 #ifndef LWIP_SO_BINDTODEVICE 502 #define LWIP_SO_BINDTODEVICE 1 503 #endif 504 505 #ifndef LWIP_SO_DONTROUTE 506 #define LWIP_SO_DONTROUTE 1 507 #endif 508 509 #ifndef LWIP_NUM_SOCKETS_MAX 510 #define LWIP_NUM_SOCKETS_MAX 9 511 #endif 512 513 #ifndef DEFAULT_LWIP_NUM_SOCKETS 514 #define DEFAULT_LWIP_NUM_SOCKETS 12 515 #endif /* DEFAULT_LWIP_NUM_SOCKETS */ 516 517 #ifndef MEMP_NUM_PBUF 518 #define MEMP_NUM_PBUF 8 519 #endif 520 521 #ifndef MEMP_NUM_RAW_PCB 522 #define MEMP_NUM_RAW_PCB 1 523 #endif 524 525 #ifndef MEMP_NUM_TCPIP_MSG_API 526 #define MEMP_NUM_TCPIP_MSG_API 16 527 #endif 528 529 #ifndef MEMP_NUM_TCPIP_MSG_INPKT 530 #define MEMP_NUM_TCPIP_MSG_INPKT 32 531 #endif 532 533 #ifndef MEMP_NUM_NETCONN 534 #define MEMP_NUM_NETCONN LWIP_CONFIG_NUM_SOCKETS 535 #endif 536 537 #ifndef MEMP_NUM_NETBUF 538 #if LWIP_MMBR 539 #define MEMP_NUM_NETBUF 24 540 #else 541 #ifdef WIFI_TCM_OPTIMIZE 542 #define MEMP_NUM_NETBUF 132 543 #else 544 #define MEMP_NUM_NETBUF 24 545 #endif 546 #endif 547 #endif 548 549 #ifndef MEMP_NUM_ARP_QUEUE 550 #define MEMP_NUM_ARP_QUEUE 12 551 #endif 552 553 #ifndef MEMP_NUM_UDP_PCB 554 #define MEMP_NUM_UDP_PCB (7 + LWIP_MPL) 555 #endif 556 557 #ifndef MEMP_NUM_TCP_PCB 558 #define MEMP_NUM_TCP_PCB 6 559 #endif 560 561 #ifndef MEMP_NUM_TCP_PCB_LISTEN 562 #define MEMP_NUM_TCP_PCB_LISTEN 9 563 #endif 564 565 #ifndef MEMP_NUM_TCP_SEG 566 #ifdef _PRE_WLAN_FEATURE_WS53 567 #define MEMP_NUM_TCP_SEG 32 568 #else 569 #define MEMP_NUM_TCP_SEG 64 570 #endif 571 #endif 572 573 #ifndef PBUF_POOL_SIZE 574 #define PBUF_POOL_SIZE 1 575 #endif 576 577 #if defined (CONFIG_LWIP_FOR_WIFI_SIGMA) 578 #ifndef MEMP_NUM_REASSDATA 579 #define MEMP_NUM_REASSDATA 64 580 #endif 581 #if !defined IP_REASS_MAXAGE 582 #define IP_REASS_MAXAGE 1 583 #endif 584 #else 585 #ifndef MEMP_NUM_REASSDATA 586 #define MEMP_NUM_REASSDATA 5 587 #endif 588 #endif 589 590 #ifndef TCP_SND_BUF 591 #if defined(WIFI_TCM_OPTIMIZE) || defined(_PRE_WLAN_FEATURE_WS53) 592 #define TCP_SND_BUF 65535 593 #else 594 #define TCP_SND_BUF (65535 / 3) 595 #endif 596 #endif 597 598 #ifndef TCP_SND_QUEUELEN 599 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) 600 #endif 601 602 #ifndef TCP_WND 603 #ifdef _PRE_WLAN_FEATURE_WS53 604 #define TCP_WND (TCP_SND_BUF / 3) 605 #else 606 #define TCP_WND (98304) 607 #endif 608 #endif 609 610 #ifndef LWIP_IGMP 611 #define LWIP_IGMP 1 612 #endif 613 614 #ifndef LWIP_DNS_REVERSE 615 #define LWIP_DNS_REVERSE 0 616 #endif 617 618 #ifndef PF_PKT_SUPPORT 619 #define PF_PKT_SUPPORT 0 620 #endif 621 622 #ifndef LWIP_SO_RCVBUF 623 #define LWIP_SO_RCVBUF 0 624 #endif 625 626 #ifndef LWIP_IPV6_MLD 627 #define LWIP_IPV6_MLD 0 628 #endif 629 630 #ifndef LWIP_IPV6_MLD_QUERIER 631 #define LWIP_IPV6_MLD_QUERIER 0 632 #endif 633 634 #ifndef LWIP_ND6_NUM_NEIGHBORS 635 #define LWIP_ND6_NUM_NEIGHBORS 5 636 #endif 637 638 #ifndef LWIP_SO_PRIORITY 639 #define LWIP_SO_PRIORITY 0 640 #endif 641 642 #ifndef LWIP_NETIF_PROMISC 643 #define LWIP_NETIF_PROMISC 0 644 #endif 645 646 #ifndef LWIP_NETBUF_RECVINFO 647 #define LWIP_NETBUF_RECVINFO 0 648 #endif 649 650 #ifndef LWIP_ND6_STATIC_PREFIX 651 #define LWIP_ND6_STATIC_PREFIX 0 652 #endif 653 654 #ifndef LWIP_USE_L2_METRICS 655 #define LWIP_USE_L2_METRICS 0 656 #endif 657 658 #ifndef MEMP_NUM_NETDB 659 #define MEMP_NUM_NETDB 1 660 #endif 661 662 #ifndef DNS_TABLE_SIZE 663 #define DNS_TABLE_SIZE 2 664 #endif 665 666 #ifndef DNS_MAX_IPADDR 667 #define DNS_MAX_IPADDR 1 668 #endif 669 670 #ifndef LWIP_DNS_SECURE 671 #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) 672 #endif 673 674 #ifndef LWIP_ENABLE_ROUTER 675 #define LWIP_ENABLE_ROUTER 0 676 #endif 677 678 #ifndef LWIP_ND6_NUM_ROUTERS 679 #define LWIP_ND6_NUM_ROUTERS 1 680 #endif 681 682 #endif /* LWIP_SMALL_SIZE */ 683 684 #ifndef RPL_CONF_SWITCH_MBR_BY_AUTOLINK 685 #define RPL_CONF_SWITCH_MBR_BY_AUTOLINK LWIP_MMBR 686 #endif 687 688 #ifndef RPL_CONF_MMBR_MNID 689 #define RPL_CONF_MMBR_MNID LWIP_MMBR 690 #endif 691 692 #ifndef LWIP_IP6IN4 693 #define LWIP_IP6IN4 LWIP_MMBR 694 #endif 695 696 #ifndef LWIP_DHCP_SUBSTITUTE_MMBR 697 #if defined(LWIP_DHCP_SUBSTITUTE) && LWIP_DHCP_SUBSTITUTE && LWIP_MMBR 698 #define LWIP_DHCP_SUBSTITUTE_MMBR 1 699 #else 700 #define LWIP_DHCP_SUBSTITUTE_MMBR 0 701 #endif 702 #endif /* LWIP_DHCP_SUBSTITUTE_MMBR */ 703 704 #ifndef LWIP_IGMP_REPORT_TIMES 705 #define LWIP_IGMP_REPORT_TIMES 5 706 #endif 707 708 #ifndef LWIP_LIBCOAP 709 #define LWIP_LIBCOAP 0 710 #endif 711 712 #ifndef LWIP_FCNTL 713 #define LWIP_FCNTL 0 714 #endif 715 716 #ifndef LWIP_API_MESH 717 #define LWIP_API_MESH 1 718 #endif 719 720 #ifndef LWIP_L2_NETDEV_STATUS_CALLBACK 721 #define LWIP_L2_NETDEV_STATUS_CALLBACK 1 722 #endif 723 724 #ifndef LWIP_NETIF_STATUS_CALLBACK 725 #define LWIP_NETIF_STATUS_CALLBACK 1 726 #endif 727 728 #ifndef LWIP_TCP_TLP_SUPPORT 729 #define LWIP_TCP_TLP_SUPPORT 0 730 #endif 731 732 #ifndef LWIP_WND_SCALE 733 #define LWIP_WND_SCALE 0 734 #endif 735 736 #ifndef LWIP_TCP_INFO 737 #define LWIP_TCP_INFO 0 738 #endif 739 740 #ifndef LWIP_API_RICH 741 #define LWIP_API_RICH 1 742 #endif 743 744 #ifndef LWIP_DHCPS_AGENT_INFO 745 #define LWIP_DHCPS_AGENT_INFO 1 746 #endif 747 748 #ifndef LWIP_SOCK_OPT_ICMP6_FILTER 749 #define LWIP_SOCK_OPT_ICMP6_FILTER 1 750 #endif 751 752 #ifndef LWIP_IPV6_PER_PROTO_CHKSUM 753 #define LWIP_IPV6_PER_PROTO_CHKSUM 1 754 #endif 755 756 #ifndef LWIP_SOCK_OPT_IPV6_UNICAST_HOPS 757 #define LWIP_SOCK_OPT_IPV6_UNICAST_HOPS 1 758 #endif 759 760 #ifndef LWIP_SOCK_OPT_TCP_QUEUE_SEQ 761 #define LWIP_SOCK_OPT_TCP_QUEUE_SEQ 1 762 #endif 763 764 #ifndef LWIP_LINK_MCAST_FILTER 765 #define LWIP_LINK_MCAST_FILTER 1 766 #endif 767 768 #ifndef LWIP_IOCTL_IPV6DPCTD 769 #define LWIP_IOCTL_IPV6DPCTD 1 770 #endif 771 772 #ifndef LWIP_IOCTL_ROUTE 773 #define LWIP_IOCTL_ROUTE 1 774 #endif 775 776 #ifndef LWIP_IOCTL_IF 777 #define LWIP_IOCTL_IF 1 778 #endif 779 780 #ifndef LWIP_IPV6_DUP_DETECT_ATTEMPTS 781 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 782 #endif 783 784 #ifndef LWIP_NETIFAPI_DHCPS_IP 785 #define LWIP_NETIFAPI_DHCPS_IP 1 786 #endif 787 788 #ifndef LWIP_NETIFAPI_GET_ADDR 789 #define LWIP_NETIFAPI_GET_ADDR 1 790 #endif 791 792 #ifndef LWIP_NETIFAPI_LINK_CALLBACK 793 #define LWIP_NETIFAPI_LINK_CALLBACK 1 794 #endif 795 796 #ifndef LWIP_NETIFAPI_MTU 797 #define LWIP_NETIFAPI_MTU 1 798 #endif 799 800 #ifndef LWIP_NETIFAPI_IF_NUM 801 #define LWIP_NETIFAPI_IF_NUM 1 802 #endif 803 804 #ifndef LWIP_NETIFAPI_IF_INDEX 805 #define LWIP_NETIFAPI_IF_INDEX 1 806 #endif 807 808 #ifndef LWIP_NETIFAPI_IF_HW 809 #define LWIP_NETIFAPI_IF_HW 1 810 #endif 811 812 #ifndef LWIP_NETIFAPI_IP6_ADDR 813 #define LWIP_NETIFAPI_IP6_ADDR 1 814 #endif 815 816 #ifndef LWIP_NETIFAPI_MLD6 817 #define LWIP_NETIFAPI_MLD6 1 818 #endif 819 820 #ifndef LWIP_NETIFAPI_IF_GET_DEFAULT 821 #define LWIP_NETIFAPI_IF_GET_DEFAULT 1 822 #endif 823 824 #ifndef LWIP_IFADDRS 825 #define LWIP_IFADDRS 1 826 #endif 827 828 #ifndef LWIP_ENABLE_BASIC_SHELL_CMD 829 #define LWIP_ENABLE_BASIC_SHELL_CMD 1 830 #endif 831 832 #ifndef LWIP_ENABLE_MESH_SHELL_CMD 833 #define LWIP_ENABLE_MESH_SHELL_CMD 1 834 #endif 835 836 #ifndef LWIP_NETIF_ETHTOOL 837 #define LWIP_NETIF_ETHTOOL 0 838 #endif 839 840 #ifndef LWIP_RPL_CTX 841 #define LWIP_RPL_CTX 0 842 #endif 843 844 #ifndef LWIP_TFTP 845 #define LWIP_TFTP 0 846 #endif 847 848 #ifndef IP_REASSEMBLY 849 #define IP_REASSEMBLY 1 850 #endif 851 852 #ifndef LWIP_RPL 853 #define LWIP_RPL 0 854 #endif 855 856 #ifndef LWIP_RIPPLE 857 #define LWIP_RIPPLE 1 858 #endif 859 860 #ifndef LWIP_LITEOS_TASK 861 #define LWIP_LITEOS_TASK 1 862 #endif 863 864 #ifndef LWIP_DHCP_COAP_RELAY 865 #define LWIP_DHCP_COAP_RELAY 0 866 #endif 867 868 #ifndef LWIP_NA_PROXY 869 #define LWIP_NA_PROXY 1 870 #endif 871 872 #ifndef LWIP_RA_PREFIX_DYNAMIC 873 #define LWIP_RA_PREFIX_DYNAMIC 1 874 #endif 875 876 #if LWIP_RIPPLE 877 #if !defined(LWIP_MPL) 878 #define LWIP_MPL 1 879 #endif 880 #else 881 #if !defined(LWIP_MPL) 882 #define LWIP_MPL 0 883 #endif 884 #endif 885 886 #if LWIP_MPL 887 #if !defined(LWIP_MPL_IPV4) 888 #define LWIP_MPL_IPV4 1 889 #endif 890 #else 891 #if !defined(LWIP_MPL_IPV4) 892 #define LWIP_MPL_IPV4 0 893 #endif 894 #endif 895 896 #ifndef LWIP_MPL_IPV4_BCAST 897 #define LWIP_MPL_IPV4_BCAST 1 898 #endif 899 900 #ifndef LWIP_6LOWPAN 901 #define LWIP_6LOWPAN 0 902 #endif 903 904 #ifndef ETH_6LOWPAN 905 #define ETH_6LOWPAN 1 906 #endif 907 908 #ifndef LWIP_IPV6_AUTOCONFIG_DEFAULT 909 #define LWIP_IPV6_AUTOCONFIG_DEFAULT 1 910 #endif 911 /** 912 * LWIP_DHCP_SUBSTITUTE==1: Enables MBR Querying IPv4 address for non-mesh IPv6 STA. 913 */ 914 #ifndef LWIP_DHCP_SUBSTITUTE 915 #define LWIP_DHCP_SUBSTITUTE 1 916 #endif 917 918 #ifndef LWIP_DHCP_LIMIT_CONCURRENT_REQUESTS 919 #define LWIP_DHCP_LIMIT_CONCURRENT_REQUESTS 1 920 #endif 921 922 #ifndef MEM_SIZE 923 #define MEM_SIZE (512*1024) 924 #endif 925 926 #ifndef LWIP_PLC 927 #define LWIP_PLC 0 928 #endif 929 930 #ifndef LWIP_IEEE802154 931 #define LWIP_IEEE802154 0 932 #endif 933 934 #ifndef LWIP_NAT64 935 #define LWIP_NAT64 1 936 #endif 937 938 #ifndef LWIP_DNS64 939 #define LWIP_DNS64 1 940 #endif 941 942 #ifndef LWIP_ND6_ROUTER 943 #define LWIP_ND6_ROUTER 1 944 #endif 945 946 #ifndef LWIP_ND6_DAG_PREFIX 947 #define LWIP_ND6_DAG_PREFIX 1 948 #endif 949 950 #ifndef LWIP_ND6_RDNSS_MAX_DNS_SERVERS 951 #define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 2 952 #endif 953 954 #ifndef LWIP_COMPAT_SOCKETS 955 #define LWIP_COMPAT_SOCKETS 2 956 #endif 957 958 #define LWIP_PLATFORM_BYTESWAP 0 959 960 961 #ifndef LWIP_GETHOSTBYNAME 962 #define LWIP_GETHOSTBYNAME 1 963 #endif 964 965 #ifndef LWIP_GETPEERNAME 966 #define LWIP_GETPEERNAME 1 967 #endif 968 969 #ifndef LWIP_GETSOCKNAME 970 #define LWIP_GETSOCKNAME 1 971 #endif 972 973 #ifndef LWIP_SMALL_SIZE 974 #define LWIP_SMALL_SIZE 1 975 #endif 976 #ifndef LWIP_L2_NETDEV_STATUS_CALLBACK 977 #define LWIP_L2_NETDEV_STATUS_CALLBACK 1 978 #endif 979 980 #ifndef LWIP_RIPPLE 981 #define LWIP_RIPPLE 0 982 #endif 983 984 #ifndef LWIP_NAT64 985 #define LWIP_NAT64 0 986 #endif 987 988 #ifndef LWIP_ND6_ROUTER 989 #define LWIP_ND6_ROUTER 0 990 #endif 991 992 #ifndef LWIP_ND6_DAG_PREFIX 993 #define LWIP_ND6_DAG_PREFIX 1 994 #endif 995 996 #ifndef LWIP_USE_L2_METRICS 997 #define LWIP_USE_L2_METRICS 1 998 #endif 999 1000 #ifndef LWIP_ENABLE_ROUTER 1001 #define LWIP_ENABLE_ROUTER 0 1002 #endif 1003 1004 #ifndef LWIP_RPL_RS_DAO 1005 #define LWIP_RPL_RS_DAO 0 1006 #endif 1007 1008 #ifndef LWIP_API_MESH 1009 #define LWIP_API_MESH 1 1010 #endif 1011 1012 #ifndef LWIP_DHCP_SUBSTITUTE 1013 #define LWIP_DHCP_SUBSTITUTE 1 1014 #endif 1015 1016 #ifndef LWIP_DHCP_LIMIT_CONCURRENT_REQUESTS 1017 #define LWIP_DHCP_LIMIT_CONCURRENT_REQUESTS 0 1018 #endif 1019 1020 #ifndef LWIP_ENABLE_BASIC_SHELL_CMD 1021 #define LWIP_ENABLE_BASIC_SHELL_CMD 1 1022 #endif 1023 1024 #ifndef LWIP_NA_PROXY 1025 #define LWIP_NA_PROXY 1 1026 #endif 1027 1028 #ifndef LWIP_LITEOS_COMPAT 1029 #define LWIP_LITEOS_COMPAT 1 1030 #endif 1031 1032 /* Set to 1 if target platform is linux */ 1033 #ifndef LWIP_LINUX_COMPAT 1034 #define LWIP_LINUX_COMPAT 0 1035 #endif 1036 1037 /* Set to 1 if target platform provides non-volatile ram APIs via <xx_nv.h> */ 1038 #ifndef LWIP_PLATFORM_PROVIDE_NV_API 1039 #define LWIP_PLATFORM_PROVIDE_NV_API 0 1040 #endif 1041 1042 #ifndef LWIP_COMPAT_SOCKETS 1043 #define LWIP_COMPAT_SOCKETS 2 1044 #define LWIP_POSIX_SOCKETS_IO_NAMES 0 1045 #endif 1046 1047 1048 #define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 1 1049 1050 1051 #define VALUE_TO_STRING(x) #x 1052 #define VALUE(x) VALUE_TO_STRING(x) 1053 #define VAR_NAME_VALUE(var) #var "=" VALUE(var) 1054 1055 #ifndef LWIP_CHKSUM_ALGORITHM 1056 #define LWIP_CHKSUM_ALGORITHM 3 1057 #endif 1058 1059 #ifndef LWIP_NETIF_IFINDEX_MAX 1060 #define LWIP_NETIF_IFINDEX_MAX 0xFE 1061 #endif 1062 1063 #ifndef LWIP_NEIGHBOR_CLEANUP_WHILE_NETIF_LINK_DOWN 1064 #define LWIP_NEIGHBOR_CLEANUP_WHILE_NETIF_LINK_DOWN LWIP_RIPPLE 1065 #endif 1066 1067 #ifndef LWIP_PROVIDE_ERRNO 1068 #define LWIP_PROVIDE_ERRNO 1 1069 #endif 1070 1071 #ifndef LWIP_COMPAT_MUTEX_ALLOWED 1072 #define LWIP_COMPAT_MUTEX_ALLOWED 1 1073 #endif 1074 1075 /** 1076 * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and 1077 * SO_SNDTIMEO processing. 1078 */ 1079 #ifndef LWIP_SO_SNDTIMEO 1080 #define LWIP_SO_SNDTIMEO 1 1081 #endif 1082 1083 /** 1084 * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and 1085 * SO_RCVTIMEO processing. 1086 */ 1087 #ifndef LWIP_SO_RCVTIMEO 1088 #define LWIP_SO_RCVTIMEO 1 1089 #endif 1090 1091 /** 1092 * LWIP_SO_BINDTODEVICE==1: Enable bind sockets/netconns to specific netif 1093 */ 1094 #ifndef LWIP_SO_BINDTODEVICE 1095 #define LWIP_SO_BINDTODEVICE 1 1096 #endif 1097 1098 /** 1099 * LWIP_SO_DONTROUTE==1: Enable don't use universal route entry 1100 */ 1101 #ifndef LWIP_SO_DONTROUTE 1102 #define LWIP_SO_DONTROUTE 1 1103 #endif 1104 1105 #ifndef LWIP_SACK 1106 #define LWIP_SACK 1 1107 #endif 1108 1109 #if LWIP_SACK 1110 #ifndef LWIP_SACK_PERF_OPT 1111 #define LWIP_SACK_PERF_OPT 1 1112 #endif 1113 #else 1114 #define LWIP_SACK_PERF_OPT 0 1115 #endif 1116 1117 #ifndef LWIP_SACK_CWND_OPT 1118 #define LWIP_SACK_CWND_OPT LWIP_SACK_PERF_OPT 1119 #endif 1120 1121 #ifndef LWIP_SACK_DATA_SEG_PIGGYBACK 1122 #define LWIP_SACK_DATA_SEG_PIGGYBACK (LWIP_SACK & 1) 1123 #endif 1124 1125 1126 /* 1127 @page RFC-5827 1128 @par RFC-5827 Appendix A. Compliance Information 1129 @par Compliant Sections 1130 <Appendix A. Research Issues in Adjusting the Duplicate ACK Threshold> 1131 @par Behavior Description 1132 <Behavior: Reducing the number of duplicate acks for fast retransmit has drawback during minor \n 1133 network reordering.\n 1134 Our node do not realize the mitigations proposed. So MITIGATION A.1, MITIGATION A.2 and \n 1135 MITIGATION A.3 are not implemented.> 1136 */ 1137 #ifndef LWIP_TCP_ER_SUPPORT 1138 #define LWIP_TCP_ER_SUPPORT 1 1139 #endif 1140 1141 #if LWIP_SACK 1142 #ifndef LWIP_TCP_TLP_SUPPORT 1143 #define LWIP_TCP_TLP_SUPPORT 0 1144 #endif 1145 #else 1146 #define LWIP_TCP_TLP_SUPPORT 0 1147 #endif 1148 1149 #if LWIP_SACK 1150 #ifndef LWIP_FACK_THRESHOLD_BASED_FR 1151 #define LWIP_FACK_THRESHOLD_BASED_FR 1 1152 #endif 1153 #else 1154 #define LWIP_FACK_THRESHOLD_BASED_FR 0 1155 #endif 1156 1157 #ifndef LWIP_WND_SCALE 1158 #define LWIP_WND_SCALE 0 1159 #endif 1160 #ifndef TCP_OOSEQ_MAX_PBUFS 1161 #define TCP_OOSEQ_MAX_PBUFS 8 1162 #endif 1163 1164 1165 /** 1166 * NO_SYS==1: Provides very minimal functionality. Otherwise, 1167 * use lwIP facilities. 1168 */ 1169 #define NO_SYS 0 1170 1171 #ifndef LWIP_NOASSERT 1172 #define LWIP_NOASSERT 1173 #endif 1174 1175 /* ---------- DEBUG options --------- */ 1176 /* LWIP_DEBUG_INFO is opened by default. */ 1177 #ifndef LWIP_DEBUG_INFO 1178 #define LWIP_DEBUG_INFO 1179 #endif 1180 1181 /** 1182 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable 1183 * debug messages of certain types. 1184 */ 1185 #ifndef LWIP_DBG_TYPES_ON 1186 #define LWIP_DBG_TYPES_ON LWIP_DBG_OFF 1187 #endif 1188 1189 #ifndef IP_DEBUG 1190 #define IP_DEBUG LWIP_DBG_OFF 1191 #endif 1192 1193 #ifndef ETHARP_DEBUG 1194 #define ETHARP_DEBUG LWIP_DBG_OFF 1195 #endif 1196 1197 #ifndef NETIF_DEBUG 1198 #define NETIF_DEBUG LWIP_DBG_OFF 1199 #endif 1200 1201 #ifndef L3_EVENT_MSG_DEBUG 1202 #define L3_EVENT_MSG_DEBUG LWIP_DBG_OFF 1203 #endif 1204 1205 #ifndef MLD6_DEBUG 1206 #define MLD6_DEBUG LWIP_DBG_OFF 1207 #endif 1208 1209 #ifndef LWIP_NETIF_PROMISC 1210 #define LWIP_NETIF_PROMISC 0 1211 #endif 1212 1213 /* ---------- Memory options ---------- */ 1214 1215 #if LWIP_LITEOS_COMPAT 1216 /** 1217 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library 1218 * instead of the lwIP internal allocator. Can save code size if you 1219 * already use it. 1220 */ 1221 #define MEM_LIBC_MALLOC 1 1222 #ifndef MEM_SIZE 1223 #define MEM_SIZE (4 * 1024 * 1024) 1224 #endif 1225 1226 #ifndef MEM_LIBC_MALLOC_TOTAL_SIZE_LIMIT 1227 #define MEM_LIBC_MALLOC_TOTAL_SIZE_LIMIT 0 1228 #endif 1229 1230 #define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 1 1231 #else 1232 /* MEM_SIZE: the size of the heap memory. If the application will send 1233 a lot of data that needs to be copied, this should be set high. */ 1234 #ifndef MEM_SIZE 1235 #define MEM_SIZE (512 * 1024) 1236 #endif 1237 1238 #endif 1239 1240 #if MEM_LIBC_MALLOC 1241 #ifndef MEM_PBUF_RAM_SIZE_LIMIT 1242 #define MEM_PBUF_RAM_SIZE_LIMIT 1 1243 #endif 1244 #endif 1245 1246 #ifndef MAX_NUM_PID 1247 #define MAX_NUM_PID 128 1248 #endif 1249 1250 /** 1251 * Defines the align size of the DMA memory. If set to 1, then not using DMA. 1252 */ 1253 #ifndef MEM_MALLOC_DMA_ALIGN 1254 #if LWIP_LITEOS_COMPAT 1255 #define MEM_MALLOC_DMA_ALIGN 1 1256 #else 1257 #define MEM_MALLOC_DMA_ALIGN 1 1258 #endif 1259 #endif 1260 1261 1262 /** 1263 * Attention: Be careful while configure large sockets number, i.e, greater than 128, for that 1264 * LWIP_NUM_SOCKETS is bind with file system descriptons CONFIG_NFILE_DESCRIPTORS. 1265 * If socket num is large, file descriptions for file system would be small. See vfs_config.h 1266 * for detail. 1267 */ 1268 #ifndef LWIP_NUM_SOCKETS_MAX 1269 #define LWIP_NUM_SOCKETS_MAX 8 // 128 1270 #endif 1271 1272 1273 /** 1274 * LWIP_NUM_SOCKETS can be used to override DEFAULT_LWIP_NUM_SOCKETS in lwipopts_*.h 1275 */ 1276 #ifndef LWIP_NUM_SOCKETS 1277 1278 /** 1279 * DEFAULT_LWIP_NUM_SOCKETS is default number of sockets. 1280 */ 1281 #ifndef DEFAULT_LWIP_NUM_SOCKETS 1282 #define DEFAULT_LWIP_NUM_SOCKETS 8 1283 #endif /* DEFAULT_LWIP_NUM_SOCKETS */ 1284 1285 #else /* else LWIP_NUM_SOCKETS*/ 1286 1287 #ifndef DEFAULT_LWIP_NUM_SOCKETS 1288 1289 #if LWIP_NUM_SOCKETS > 0 1290 #define DEFAULT_LWIP_NUM_SOCKETS LWIP_NUM_SOCKETS 1291 #else /* else LWIP_NUM_SOCKETS > 0*/ 1292 #define DEFAULT_LWIP_NUM_SOCKETS 8 1293 #endif /* LWIP_NUM_SOCKETS*/ 1294 1295 #endif /* DEFAULT_LWIP_NUM_SOCKETS*/ 1296 #endif /* LWIP_NUM_SOCKETS*/ 1297 1298 /* 1299 * Provides flexibility to use configured values to spread across code 1300 */ 1301 #ifndef LWIP_ALLOW_SOCKET_CONFIG 1302 #define LWIP_ALLOW_SOCKET_CONFIG 1 1303 #endif 1304 1305 #if LWIP_ALLOW_SOCKET_CONFIG == 0 1306 #ifndef LWIP_CONFIG_NUM_SOCKETS 1307 #define LWIP_CONFIG_NUM_SOCKETS DEFAULT_LWIP_NUM_SOCKETS 1308 #endif 1309 1310 #else /* LWIP_ALLOW_SOCKET_CONFIG */ 1311 #ifndef LWIP_CONFIG_NUM_SOCKETS 1312 extern unsigned int g_lwip_num_sockets; 1313 #define LWIP_CONFIG_NUM_SOCKETS ((int)g_lwip_num_sockets) 1314 #endif 1315 #endif /* LWIP_ALLOW_SOCKET_CONFIG */ 1316 1317 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application 1318 sends a lot of data out of ROM (or other static memory), this 1319 should be set high. */ 1320 #ifndef MEMP_NUM_PBUF 1321 #define MEMP_NUM_PBUF LWIP_CONFIG_NUM_SOCKETS*2 1322 #endif 1323 1324 /* 1325 * Defines the number of raw connection PCBs 1326 * (requires the LWIP_RAW option). 1327 */ 1328 #ifndef MEMP_NUM_RAW_PCB 1329 #define MEMP_NUM_RAW_PCB 1 1330 #endif 1331 1332 /* 1333 * Defines the number of struct tcpip_msg, which are used 1334 * for callback/timeout API communication. 1335 * (only needed if you use tcpip.c) 1336 */ 1337 #ifndef MEMP_NUM_TCPIP_MSG_API 1338 #define MEMP_NUM_TCPIP_MSG_API 64 1339 #endif 1340 1341 /* 1342 * Defines the number of struct tcpip_msg, which are used 1343 * for incoming packets. 1344 * (only needed if you use tcpip.c) 1345 */ 1346 #ifndef MEMP_NUM_TCPIP_MSG_INPKT 1347 #define MEMP_NUM_TCPIP_MSG_INPKT 512 1348 #endif 1349 1350 #ifndef MEMP_NUM_NETCONN 1351 #define MEMP_NUM_NETCONN (LWIP_CONFIG_NUM_SOCKETS * 4) 1352 #endif 1353 1354 /* 1355 * Defines the number of struct netbufs. 1356 * (only needed if you use the sequential API, like api_lib.c) 1357 */ 1358 #ifndef MEMP_NUM_NETBUF 1359 #define MEMP_NUM_NETBUF (65535 * 3 * LWIP_CONFIG_NUM_SOCKETS / (IP_FRAG_MAX_MTU - 20 - 8)) 1360 #endif 1361 1362 /* 1363 * Defines the number of simulateously queued outgoing 1364 * packets (pbufs) that are waiting for an ARP request (to resolve 1365 * their destination address) to finish. 1366 * (requires the ARP_QUEUEING option) 1367 */ 1368 #ifndef MEMP_NUM_ARP_QUEUE 1369 #define MEMP_NUM_ARP_QUEUE 30 1370 #endif 1371 1372 /** Indicates the number of UDP protocol control blocks. One 1373 per active UDP "connection". */ 1374 #ifndef MEMP_NUM_UDP_PCB 1375 #define MEMP_NUM_UDP_PCB LWIP_CONFIG_NUM_SOCKETS + LWIP_MPL 1376 #endif 1377 1378 /** MEMP_NUM_TCP_PCB: Indicates the number of simultaneously active TCP 1379 connections. */ 1380 #ifndef MEMP_NUM_TCP_PCB 1381 #define MEMP_NUM_TCP_PCB LWIP_CONFIG_NUM_SOCKETS 1382 #endif 1383 1384 /** MEMP_NUM_TCP_PCB_LISTEN: Indicates the number of listening TCP 1385 connections. */ 1386 #ifndef MEMP_NUM_TCP_PCB_LISTEN 1387 #define MEMP_NUM_TCP_PCB_LISTEN LWIP_CONFIG_NUM_SOCKETS 1388 #endif 1389 1390 #ifndef IP_FRAG_MAX_MTU 1391 #define IP_FRAG_MAX_MTU 1500 1392 #endif 1393 1394 /* As per RFC 791, "Every internet module must be able to forward a datagram of 68 1395 * octets without further fragmentation. This is because an internet header 1396 * may be up to 60 octets, and the minimum fragment is 8 octets." */ 1397 #ifndef IP_FRAG_MIN_MTU 1398 #define IP_FRAG_MIN_MTU 68 1399 #endif 1400 1401 #ifndef IP_REASS_MAX_MEM_SIZE 1402 #define IP_REASS_MAX_MEM_SIZE (MEM_SIZE / 4) 1403 #endif 1404 1405 #ifndef MEMP_NUM_REASSDATA 1406 #define MEMP_NUM_REASSDATA (IP_REASS_MAX_MEM_SIZE / 65535) 1407 #endif 1408 1409 #ifndef IP_REASS_MAX_PBUFS 1410 #define IP_REASS_MAX_PBUFS ((65535 * 2 * (LWIP_CONFIG_NUM_SOCKETS)) / ((IP_FRAG_MAX_MTU) - 20 - 8)) 1411 #endif 1412 /* Max size(65535 + extra buffer(8192) per MAX MTU) */ 1413 #ifndef IP_REASS_MAX_PBUFS_PER_PKT 1414 #define IP_REASS_MAX_PBUFS_PER_PKT ((65535 + 8192) / (IP_FRAG_MAX_MTU - 20 - 8)) 1415 #endif 1416 1417 /* TCP Maximum segment size. */ 1418 #ifdef LWIP_TCP_MSS 1419 #undef TCP_MSS /* ensure TCP_MSS value is overridden by LWIP_TCP_MSS */ 1420 #define TCP_MSS LWIP_TCP_MSS 1421 #else /*LWIP_TCP_MSS */ 1422 #ifndef TCP_MSS 1423 #define TCP_MSS (IP_FRAG_MAX_MTU - 20 - 20) 1424 #endif /*TCP_MSS*/ 1425 #endif /* LWIP_TCP_MSS*/ 1426 1427 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP 1428 segments. */ 1429 #ifndef MEMP_NUM_TCP_SEG 1430 #ifdef WIFI_TCM_OPTIMIZE 1431 #define MEMP_NUM_TCP_SEG 64 1432 #else 1433 #define MEMP_NUM_TCP_SEG 32 1434 #endif 1435 #endif 1436 1437 /* ---------- Pbuf options ---------- */ 1438 /** PBUF_POOL_SIZE: Indicates the number of buffers in the pbuf pool. */ 1439 #ifndef PBUF_POOL_SIZE 1440 #define PBUF_POOL_SIZE 64 1441 #endif 1442 1443 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ 1444 #ifndef PBUF_POOL_BUFSIZE 1445 #define PBUF_POOL_BUFSIZE 1550 1446 #endif 1447 1448 #ifndef PBUF_LINK_CHKSUM_LEN 1449 #define PBUF_LINK_CHKSUM_LEN 0 1450 #endif 1451 1452 #ifndef PBUF_ZERO_COPY_RESERVE 1453 #define PBUF_ZERO_COPY_RESERVE 80 1454 #endif 1455 1456 #ifndef PBUF_ZERO_COPY_TAILROOM 1457 #define PBUF_ZERO_COPY_TAILROOM 4 1458 #endif 1459 1460 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT 1461 #define LWIP_TCPIP_CORE_LOCKING_INPUT 1 1462 #endif 1463 /* ---------- ARP options ---------- */ 1464 /** 1465 * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address 1466 * resolution. By default, only the most recent packet is queued per IP_add 1467 * This is sufficient for most protocols and mainly reduces TCP connection 1468 * startup time. Set this to 1 if you know that your application sends more than one 1469 * packet in a row to an IP_add that is not in the ARP cache. 1470 */ 1471 #ifndef ARP_QUEUEING 1472 #define ARP_QUEUEING 1 1473 #endif 1474 1475 /** 1476 * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be 1477 * updated with the source MAC and IP address supplied in the packet. 1478 * You may want to disable this if you do not trust LAN peers to have the 1479 * correct addresses, or as a limited approach to attempt to handle 1480 * spoofing. If disabled, lwIP will need to make a new ARP request if 1481 * the peer is not already in the ARP table, adding a little latency. 1482 * The peer is in the ARP table if it requested our address before. 1483 * Also notice that this slows down input processing of every IP packet. 1484 */ 1485 #ifndef ETHARP_TRUST_IP_MAC 1486 #define ETHARP_TRUST_IP_MAC 1 1487 #endif 1488 1489 /** Defines the number of bytes added before the ethernet header to ensure 1490 * alignment of payload after that header. Since the header is 14 bytes long, 1491 * without this padding, addresses in the IP header will not be aligned 1492 * on a 32-bit boundary. So setting this to 2 can speed up 32-bit-platforms. 1493 */ 1494 #ifndef ETH_PAD_SIZE 1495 #define ETH_PAD_SIZE 2 1496 #endif 1497 1498 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: Enables code to support static ARP table 1499 * entries (using etharp_add_static_entry/etharp_remove_static_entry). 1500 */ 1501 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES 1502 #define ETHARP_SUPPORT_STATIC_ENTRIES 1 1503 #endif 1504 1505 /* ---------- TCP options ---------- */ 1506 1507 #ifndef LWIP_TCP 1508 #define LWIP_TCP 1 1509 #endif 1510 /* @ingroup Config_TCP 1511 * Defines the TCP TTL value. 1512 */ 1513 #ifndef TCP_TTL 1514 #define TCP_TTL 255 1515 #endif 1516 1517 /** 1518 * Defines the mailbox size for the tcpip thread messages 1519 * The queue size value itself is platform-dependent, but is passed to 1520 * sys_mbox_new() when tcpip_init is called. 1521 */ 1522 #ifndef TCPIP_MBOX_SIZE 1523 #define TCPIP_MBOX_SIZE 64 1524 #endif 1525 1526 /** 1527 * Defines the mailbox size for the incoming packets on a 1528 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed 1529 * to sys_mbox_new() when the recvmbox is created. 1530 */ 1531 #ifndef DEFAULT_TCP_RECVMBOX_SIZE 1532 #define DEFAULT_TCP_RECVMBOX_SIZE 128 1533 #endif 1534 1535 /** 1536 * Defines the mailbox size for the incoming connections. 1537 * The queue size value itself is platform-dependent, but is passed to 1538 * sys_mbox_new() when the acceptmbox is created. 1539 */ 1540 #ifndef DEFAULT_ACCEPTMBOX_SIZE 1541 #define DEFAULT_ACCEPTMBOX_SIZE 32 1542 #endif 1543 1544 #ifndef MEMP_NUM_REASSDATA 1545 #define MEMP_NUM_REASSDATA (2*LWIP_CONFIG_NUM_SOCKETS) 1546 #endif 1547 1548 #ifdef LWIP_DBG_PREPROCESSOR 1549 #pragma message(VAR_NAME_VALUE(TCP_MSS)) 1550 #endif 1551 1552 /* @ingroup Config_TCP 1553 * TCP sender buffer space (bytes). */ 1554 #ifndef TCP_SND_BUF 1555 #define TCP_SND_BUF 65535 1556 #endif 1557 1558 /* @ingroup Config_TCP 1559 TCP sender buffer space (pbufs). This must be at least = 2 * 1560 TCP_SND_BUF/TCP_MSS for things to work. */ 1561 #ifndef TCP_SND_QUEUELEN 1562 #define TCP_SND_QUEUELEN (8 * TCP_SND_BUF) / TCP_MSS 1563 #endif 1564 /** 1565 1566 * Defines the size of a TCP receive window. */ 1567 1568 #ifndef TCP_WND 1569 #define TCP_WND 32768 1570 #endif 1571 1572 /** 1573 * Defines the Maximum number of retransmissions of data segments. 1574 */ 1575 #ifndef TCP_MAXRTX 1576 #define TCP_MAXRTX 15 1577 #endif 1578 1579 /** 1580 * User define tcp wnd. default is 0 1581 */ 1582 #ifndef LWIP_TCP_USRWND 1583 #define LWIP_TCP_USRWND 0 1584 #endif /* LWIP_TCP_USRWND */ 1585 1586 /* ---------- IP options ---------- */ 1587 /** 1588 * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP 1589 * fragmentation. Otherwise pbufs are allocated and reference the original 1590 * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1, 1591 * new PBUF_RAM pbufs are used for fragments). 1592 * Note: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs. 1593 */ 1594 #ifndef IP_FRAG_USES_STATIC_BUF 1595 #define IP_FRAG_USES_STATIC_BUF 1 1596 #endif 1597 1598 /* 1599 * Defines the assumed maximum MTU on any interface for IP fragment buffer 1600 * (requires IP_FRAG_USES_STATIC_BUF==1) 1601 */ 1602 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) 1603 #define IP_FRAG_MAX_MTU 1500 1604 #endif 1605 1606 /* As per RFC 791, "Every internet module must be able to forward a datagram of 68 1607 * octets without further fragmentation. This is because an internet header 1608 * may be up to 60 octets, and the minimum fragment is 8 octets." */ 1609 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MIN_MTU) 1610 #define IP_FRAG_MIN_MTU 68 1611 #endif 1612 1613 /* ---------- ICMP options ---------- */ 1614 /** 1615 * LWIP_ICMP==1: Enables the ICMP module inside the IP stack. 1616 */ 1617 #ifndef LWIP_ICMP 1618 #define LWIP_ICMP 1 1619 #endif 1620 1621 /* ---------- IGMP options ---------- */ 1622 #ifndef LWIP_IGMP 1623 #define LWIP_IGMP 1 1624 #endif 1625 1626 /* ---------- DHCP options ---------- */ 1627 /** 1628 * LWIP_DHCP==1: Enables the DHCP module. 1629 */ 1630 #ifndef LWIP_DHCP 1631 #define LWIP_DHCP 1 1632 #endif 1633 1634 /* ---------- DNS options ---------- */ 1635 /** 1636 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS 1637 * transport. 1638 */ 1639 #ifndef LWIP_DNS 1640 #define LWIP_DNS 1 1641 #endif 1642 1643 #if LWIP_DNS 1644 #ifndef LWIP_DNS_REVERSE 1645 #define LWIP_DNS_REVERSE 1 1646 #endif 1647 #else 1648 #undef LWIP_DNS_REVERSE 1649 #define LWIP_DNS_REVERSE 0 1650 #endif 1651 1652 #if !defined DNS_MAX_RETRIES && LWIP_SMALL_SIZE 1653 #define DNS_MAX_RETRIES 2 1654 #endif 1655 1656 /* ---------- UDP options ---------- */ 1657 /** 1658 * LWIP_UDP==1: Turns on UDP. 1659 */ 1660 #ifndef LWIP_UDP 1661 #define LWIP_UDP 1 1662 #endif 1663 1664 #ifndef UDP_TTL 1665 #define UDP_TTL 255 1666 #endif 1667 1668 #ifndef MC_TTL 1669 #define MC_TTL 1 1670 #endif 1671 1672 /** 1673 * Defines the mailbox size for the incoming packets on a 1674 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed 1675 * to sys_mbox_new() when the recvmbox is created. 1676 */ 1677 1678 1679 #ifndef DEFAULT_UDP_RECVMBOX_SIZE 1680 #define DEFAULT_UDP_RECVMBOX_SIZE 128 1681 #endif 1682 1683 /* -----------RAW options -----------*/ 1684 #ifndef DEFAULT_RAW_RECVMBOX_SIZE 1685 1686 /** 1687 * LWIP_RAW==1: Enables the application layer to hook into the IP layer itself. 1688 */ 1689 #if !defined LWIP_RAW || defined __DOXYGEN__ 1690 #define LWIP_RAW 1 1691 #endif 1692 1693 /** 1694 * Enable to support PF_PACKET RAW sockets 1695 */ 1696 #if defined(LWIP_RAW) && LWIP_RAW 1697 #ifndef PF_PKT_SUPPORT 1698 #define PF_PKT_SUPPORT 1 1699 #endif 1700 #endif 1701 1702 /** 1703 * Defines the mailbox size for the incoming packets on a 1704 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed 1705 * to sys_mbox_new() when the recvmbox is created. 1706 */ 1707 1708 #define DEFAULT_RAW_RECVMBOX_SIZE 128 1709 #endif 1710 1711 #ifndef LWIP_MAX_PF_RAW_SEND_SIZE 1712 #define LWIP_MAX_PF_RAW_SEND_SIZE (0xFFFF - 40) // - IPv6 header 1713 #endif 1714 1715 /* -----------LOOPIF options -----------*/ 1716 #ifndef LWIP_HAVE_LOOPIF 1717 #define LWIP_HAVE_LOOPIF 1 1718 #endif 1719 1720 /* -----------LOOPBACK options -----------*/ 1721 #ifndef LWIP_NETIF_LOOPBACK 1722 #define LWIP_NETIF_LOOPBACK 1 1723 #endif 1724 1725 /* ---------- Statistics options ---------- */ 1726 /** 1727 * LWIP_STATS==1: Enables statistics gathering in lwip_stats. 1728 */ 1729 #ifndef LWIP_STATS 1730 #define LWIP_STATS 1 1731 #endif 1732 1733 /* ---------- TFTP options ---------- */ 1734 #ifndef LWIP_TFTP 1735 #define LWIP_TFTP 1 1736 #endif 1737 1738 /* ---------- SNTP options ---------- */ 1739 #ifndef LWIP_SNTP 1740 #define LWIP_SNTP 1 1741 #endif 1742 1743 /** 1744 * SO_REUSE==1: Enable SO_REUSEADDR option. 1745 */ 1746 #ifndef SO_REUSE 1747 #define SO_REUSE 1 1748 #endif 1749 1750 #define LWIP_ETHERNET 1 1751 #define LWIP_NETCONN 1 1752 #define LWIP_SOCKET 1 1753 1754 #ifndef IP_FORWARD 1755 #define IP_FORWARD 0 1756 #endif 1757 1758 #ifndef LWIP_DHCPS_START_ADDR_OFFSET 1759 #define LWIP_DHCPS_START_ADDR_OFFSET 2 1760 #endif 1761 1762 #define LWIP_DHCPS_DISCOVER_BROADCAST 0 1763 1764 #if defined (CONFIG_DHCPS_GW) 1765 #ifndef LWIP_DHCPS_GW 1766 #define LWIP_DHCPS_GW 1 1767 #endif 1768 #else 1769 #ifndef LWIP_DHCPS_GW 1770 #define LWIP_DHCPS_GW 0 1771 #endif 1772 #endif 1773 1774 #ifdef NOT_SUPPORT_IP_SOF_BROADCAST 1775 #ifndef IP_SOF_BROADCAST 1776 #define IP_SOF_BROADCAST 0 1777 #endif 1778 #else 1779 #ifndef IP_SOF_BROADCAST 1780 #define IP_SOF_BROADCAST 1 1781 #endif 1782 #endif 1783 1784 #ifndef LWIP_DHCP_REQUEST_UNICAST 1785 #define LWIP_DHCP_REQUEST_UNICAST 0 1786 #endif 1787 1788 #if LWIP_LITEOS_COMPAT 1789 #ifndef TCPIP_THREAD_STACKSIZE 1790 #define TCPIP_THREAD_STACKSIZE 0x6000 1791 #endif 1792 #ifndef TCPIP_THREAD_PRIO 1793 #define TCPIP_THREAD_PRIO 5 1794 #endif 1795 1796 #ifndef LWIP_SOCKET_START_NUM 1797 #define LWIP_SOCKET_START_NUM CONFIG_NFILE_DESCRIPTORS 1798 #endif 1799 1800 1801 #ifndef LWIP_SOCKET_OFFSET 1802 #define LWIP_SOCKET_OFFSET CONFIG_NFILE_DESCRIPTORS 1803 #endif 1804 1805 #ifndef LWIP_ENABLE_LOS_SHELL_CMD 1806 #define LWIP_ENABLE_LOS_SHELL_CMD 1 1807 #endif 1808 #ifndef ERRNO 1809 #define ERRNO 1810 #endif 1811 #ifndef LWIP_PROVIDE_ERRNO 1812 #define LWIP_PROVIDE_ERRNO 0 1813 #endif 1814 /* Currently pthread_cond_timedwait() in liteos doesn't support absolute time */ 1815 #ifndef LWIP_USE_POSIX_COND_WAIT_WITH_ABS_TIMEOUT 1816 #define LWIP_USE_POSIX_COND_WAIT_WITH_ABS_TIMEOUT 0 1817 #endif 1818 1819 #ifndef LWIP_INET_ADDR_FUNC 1820 #define LWIP_INET_ADDR_FUNC 1 1821 #endif 1822 1823 #ifndef LWIP_INET_NTOA_FUNC 1824 #define LWIP_INET_NTOA_FUNC 1 1825 #endif 1826 1827 #ifndef LWIP_INET_ATON_FUNC 1828 #define LWIP_INET_ATON_FUNC 1 1829 #endif 1830 1831 1832 #else 1833 #define ERRNO 1834 #define LWIP_PROVIDE_ERRNO 1 1835 1836 #ifndef LWIP_INET_ADDR_FUNC 1837 #define LWIP_INET_ADDR_FUNC 1 1838 #endif 1839 1840 #ifndef LWIP_INET_NTOA_FUNC 1841 #define LWIP_INET_NTOA_FUNC 1 1842 #endif 1843 1844 #ifndef LWIP_INET_ATON_FUNC 1845 #define LWIP_INET_ATON_FUNC 1 1846 #endif 1847 1848 #endif 1849 1850 /* ---------- Socket Filter options ---------- */ 1851 /** 1852 * implement sock filter based on BPF. 1853 * BPF-extension was not supported. 1854 * only AF_PACKET RAW socket support socket filter now, 1855 * we would add supports for other socket type in the feature. 1856 */ 1857 #if defined(LWIP_RAW) && LWIP_RAW 1858 #ifndef LWIP_SOCK_FILTER 1859 #define LWIP_SOCK_FILTER 1 1860 #endif 1861 #else 1862 #define LWIP_SOCK_FILTER 0 1863 #endif 1864 1865 #ifndef LWIP_STATIC 1866 #define LWIP_STATIC static 1867 #endif 1868 1869 1870 #ifndef LWIP_ALWAYS_SEND_HWTYPE_AS_ETHER_IN_DHCP 1871 #define LWIP_ALWAYS_SEND_HWTYPE_AS_ETHER_IN_DHCP 1 1872 #endif 1873 1874 #ifndef USE_ONLY_PRIMARY_IFACE 1875 #define USE_ONLY_PRIMARY_IFACE 1 1876 #endif 1877 1878 #ifndef DRIVER_STATUS_CHECK 1879 #define DRIVER_STATUS_CHECK 0 1880 #endif 1881 1882 #if DRIVER_STATUS_CHECK 1883 #ifndef DRIVER_WAKEUP_INTERVAL 1884 #define DRIVER_WAKEUP_INTERVAL 120000 1885 #endif 1886 #endif 1887 1888 /* ---------- NETIF options ---------- */ 1889 /** 1890 * LWIP_NETIF_API==1: Supports netif api (in netifapi.c) 1891 */ 1892 #ifndef LWIP_NETIF_API 1893 #define LWIP_NETIF_API 1 1894 #endif 1895 1896 /** 1897 * LWIP_NETIF_EXT_STATUS_CALLBACK==1: Support an extended callback function 1898 * for several netif related event that supports multiple subscribers. 1899 * @see netif_ext_status_callback 1900 */ 1901 #ifndef LWIP_NETIF_EXT_STATUS_CALLBACK 1902 #define LWIP_NETIF_EXT_STATUS_CALLBACK 1 1903 #endif 1904 1905 /* 1906 * LWIP_NETIF_LINK_CALLBACK==1: Supports a callback function from an interface 1907 * whenever the link changes. Example: when link goes down. 1908 */ 1909 #ifndef LWIP_NETIF_LINK_CALLBACK 1910 #define LWIP_NETIF_LINK_CALLBACK 1 1911 #endif 1912 1913 /* 1914 * LWIP_NETIF_NUM_MAX==255: Defines the maximum support number of same type netif. 1915 */ 1916 /* Increase the count of netifs supported by stack. 1917 Currently stack restricts the number of netif to 5, but older versions of linux kernel supports 1918 upto 255 interfaces . New versions donot have these restrictions but we stick to 255 */ 1919 #ifndef LWIP_NETIF_NUM_MAX 1920 #define LWIP_NETIF_NUM_MAX 10 1921 #endif 1922 1923 #ifndef LWIP_NETIF_IFINDEX_START 1924 #define LWIP_NETIF_IFINDEX_START 1 1925 #endif /* LWIP_NETIF_IFINDEX_START */ 1926 1927 #ifndef LWIP_NETIF_IFINDEX_MAX 1928 #define LWIP_NETIF_IFINDEX_MAX 0xFE 1929 #endif 1930 1931 /* ---------- SOCKET options ---------- */ 1932 /** 1933 * LWIP_SO_RCVBUF==1: Enables SO_RCVBUF processing. 1934 */ 1935 #ifndef LWIP_SO_RCVBUF 1936 #define LWIP_SO_RCVBUF 1 1937 #endif 1938 1939 /* ---------- Statistics options ---------- */ 1940 /** 1941 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. 1942 */ 1943 #ifndef LWIP_STATS_DISPLAY 1944 #define LWIP_STATS_DISPLAY 0 1945 #endif 1946 1947 /* ---------- Debugging options ---------- */ 1948 /** 1949 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is 1950 * compared against this value. If it is smaller, then debugging 1951 * messages are written. 1952 */ 1953 #ifndef LWIP_DBG_MIN_LEVEL 1954 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF 1955 #endif 1956 1957 #ifndef LWIP_SOCKET_POLL 1958 #define LWIP_SOCKET_POLL 1 1959 #endif 1960 1961 #ifndef LWIP_EXT_POLL_SUPPORT 1962 #define LWIP_EXT_POLL_SUPPORT 1 1963 #endif 1964 1965 // flags for cross compilation-- manual.. to be automated 1966 #ifndef LWIP_TCP_INFO 1967 #define LWIP_TCP_INFO 1 1968 #endif 1969 1970 #ifndef LWIP_RPL 1971 #define LWIP_RPL 0 1972 #endif 1973 1974 #if !defined(LWIP_RPL) || (0 == LWIP_RPL) 1975 #ifndef LWIP_RPL_TIMER_COUNT 1976 #define LWIP_RPL_TIMER_COUNT 0 1977 #endif 1978 #else 1979 #ifndef LWIP_RPL_TIMER_COUNT 1980 #define LWIP_RPL_TIMER_COUNT 12 1981 #endif 1982 #endif 1983 1984 #ifndef LWIP_IPV6_MLD 1985 #define LWIP_IPV6_MLD 1 1986 #endif 1987 1988 #ifndef LWIP_MLD6_ENABLE_MLD_ON_DAD 1989 #define LWIP_MLD6_ENABLE_MLD_ON_DAD LWIP_IPV6 && LWIP_IPV6_MLD 1990 #endif 1991 1992 #ifndef LWIP_MLD6_DONE_ONLYFOR_LAST_REPORTER 1993 #define LWIP_MLD6_DONE_ONLYFOR_LAST_REPORTER LWIP_IPV6 && LWIP_IPV6_MLD 1994 #endif 1995 #ifndef NETIF_MAX_HWADDR_LEN 1996 #define NETIF_MAX_HWADDR_LEN 6 1997 #endif 1998 1999 #ifndef LWIP_ND6_NUM_NEIGHBORS 2000 #define LWIP_ND6_NUM_NEIGHBORS 10 2001 #endif 2002 #ifndef LWIP_IPV6_SCOPES 2003 #define LWIP_IPV6_SCOPES 0 2004 #endif 2005 2006 #ifndef LWIP_ND6_STATIC_NBR 2007 #define LWIP_ND6_STATIC_NBR 0 2008 #endif 2009 #ifndef LWIP_L3_EVENT_MSG 2010 #define LWIP_L3_EVENT_MSG 1 2011 #endif 2012 2013 #if LWIP_L3_EVENT_MSG 2014 2015 #ifndef MEMP_NUM_L3_EVENT_MSG 2016 #define MEMP_NUM_L3_EVENT_MSG 15 2017 #endif 2018 2019 #ifndef LWIP_ROUTE_CHANGE_MSG 2020 #define LWIP_ROUTE_CHANGE_MSG 1 2021 #endif 2022 2023 #ifndef LWIP_NAT64_CHANGE_MSG 2024 #define LWIP_NAT64_CHANGE_MSG 1 2025 #endif 2026 2027 #ifndef LWIP_RPL_JOIN_SUCC_MSG 2028 #define LWIP_RPL_JOIN_SUCC_MSG 1 2029 #endif 2030 2031 #ifndef LWIP_RPL_PARENT_CLEAR_MSG 2032 #define LWIP_RPL_PARENT_CLEAR_MSG 1 2033 #endif 2034 2035 #ifndef LWIP_RPL_BEACON_PRI_RESET 2036 #define LWIP_RPL_BEACON_PRI_RESET 1 2037 #endif 2038 2039 #ifndef LWIP_RPL_GET_IPV4_ADDR_FAIL 2040 #define LWIP_RPL_GET_IPV4_ADDR_FAIL 1 2041 #endif 2042 2043 #ifndef LWIP_RPL_MSTA_GET_IPV4_ADDR_FAIL 2044 #define LWIP_RPL_MSTA_GET_IPV4_ADDR_FAIL 1 2045 #endif 2046 2047 #ifndef LWIP_RPL_MG_FULL 2048 #define LWIP_RPL_MG_FULL 1 2049 #endif 2050 2051 #ifndef LWIP_RPL_RT_FULL 2052 #define LWIP_RPL_RT_FULL 1 2053 #endif 2054 2055 #ifndef LWIP_RPL_GET_MNID_FAIL 2056 #define LWIP_RPL_GET_MNID_FAIL 1 2057 #endif 2058 2059 #ifndef LWIP_L3_EVENT_MSG_EXIST 2060 #if (LWIP_ROUTE_CHANGE_MSG || LWIP_RPL_JOIN_SUCC_MSG || \ 2061 LWIP_RPL_PARENT_CLEAR_MSG || LWIP_RPL_BEACON_PRI_RESET || \ 2062 LWIP_RPL_GET_IPV4_ADDR_FAIL || LWIP_RPL_MSTA_GET_IPV4_ADDR_FAIL || \ 2063 LWIP_RPL_MG_FULL || LWIP_RPL_RT_FULL || LWIP_RPL_GET_MNID_FAIL) 2064 #define LWIP_L3_EVENT_MSG_EXIST 1 2065 #else 2066 #define LWIP_L3_EVENT_MSG_EXIST 0 2067 #endif 2068 #endif 2069 2070 #endif /* LWIP_L3_EVENT_MSG */ 2071 2072 #ifndef LWIP_LITEOS_TASK 2073 #define LWIP_LITEOS_TASK 1 2074 #endif 2075 2076 #ifndef LWIP_SOCK_OPT_ICMP6_FILTER 2077 #define LWIP_SOCK_OPT_ICMP6_FILTER 0 2078 #endif 2079 2080 #if LWIP_RIPPLE 2081 #ifndef LWIP_IPV6_FORWARD 2082 #define LWIP_IPV6_FORWARD 1 2083 #endif 2084 #endif 2085 2086 #if LWIP_RIPPLE 2087 #ifndef LWIP_MPL 2088 #define LWIP_MPL 0 2089 #endif 2090 #else 2091 #ifndef LWIP_MPL 2092 #define LWIP_MPL 0 2093 #endif 2094 #endif 2095 2096 #if LWIP_MPL 2097 #ifndef LWIP_MPL_IPV4 2098 #define LWIP_MPL_IPV4 1 2099 #endif 2100 #else 2101 #ifndef LWIP_MPL_IPV4 2102 #define LWIP_MPL_IPV4 0 2103 #endif 2104 #endif 2105 2106 #ifndef LWIP_ENABLE_MESH_SHELL_CMD 2107 #define LWIP_ENABLE_MESH_SHELL_CMD 1 2108 #else 2109 #ifndef LWIP_MPL_IPV4 2110 #define LWIP_MPL_IPV4 0 2111 #endif 2112 #endif 2113 2114 #ifndef LWIP_MPL_IPV4_BCAST 2115 #define LWIP_MPL_IPV4_BCAST 0 2116 #endif 2117 #ifndef LWIP_IPV6_MLD_QUERIER 2118 #define LWIP_IPV6_MLD_QUERIER 1 2119 #endif 2120 2121 #ifndef LWIP_LINK_STATUS_CALLBACK 2122 #define LWIP_LINK_STATUS_CALLBACK 1 2123 #endif 2124 2125 #ifdef CONFIG_DENY_DNS_SERVER 2126 2127 #ifndef LWIP_DENY_DNS_SERVER 2128 #define LWIP_DENY_DNS_SERVER 1 2129 #endif 2130 2131 #else 2132 2133 #ifndef LWIP_DENY_DNS_SERVER 2134 #define LWIP_DENY_DNS_SERVER 0 2135 #endif 2136 2137 #endif 2138 2139 #ifdef __cplusplus 2140 } 2141 #endif /* __cplusplus */ 2142 2143 #endif /* __LWIPOPTS_H__ */ 2144 2145 2146 2147