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