1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** NetX Component */ 16 /** */ 17 /** User Specific */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 23 /**************************************************************************/ 24 /* */ 25 /* PORT SPECIFIC C INFORMATION RELEASE */ 26 /* */ 27 /* nx_user.h PORTABLE C */ 28 /* 6.3.0 */ 29 /* */ 30 /* AUTHOR */ 31 /* */ 32 /* Yuxin Zhou, Microsoft Corporation */ 33 /* */ 34 /* DESCRIPTION */ 35 /* */ 36 /* This file contains user defines for configuring NetX in specific */ 37 /* ways. This file will have an effect only if the application and */ 38 /* NetX library are built with NX_INCLUDE_USER_DEFINE_FILE defined. */ 39 /* Note that all the defines in this file may also be made on the */ 40 /* command line when building NetX library and application objects. */ 41 /* */ 42 /* RELEASE HISTORY */ 43 /* */ 44 /* DATE NAME DESCRIPTION */ 45 /* */ 46 /* 05-19-2020 Yuxin Zhou Initial Version 6.0 */ 47 /* 09-30-2020 Yuxin Zhou Modified comment(s), */ 48 /* resulting in version 6.1 */ 49 /* 08-02-2021 Yuxin Zhou Modified comment(s), and */ 50 /* supported TCP/IP offload, */ 51 /* resulting in version 6.1.8 */ 52 /* 04-25-2022 Yuxin Zhou Modified comment(s), */ 53 /* resulting in version 6.1.11 */ 54 /* 10-31-2023 Tiejun Zhou Modified comment(s), */ 55 /* supported random IP id, */ 56 /* resulting in version 6.3.0 */ 57 /* */ 58 /**************************************************************************/ 59 60 #ifndef NX_USER_H 61 #define NX_USER_H 62 63 64 /* Define various build options for the NetX Duo port. The application should either make changes 65 here by commenting or un-commenting the conditional compilation defined OR supply the defines 66 though the compiler's equivalent of the -D option. */ 67 68 69 /* Override various options with default values already assigned in nx_api.h or nx_port.h. Please 70 also refer to nx_port.h for descriptions on each of these options. */ 71 72 73 /* Configuration options for Interface */ 74 75 /* NX_MAX_PHYSICAL_INTERFACES defines the number physical network interfaces 76 present to NetX Duo IP layer. Physical interface does not include 77 loopback interface. By default there is at least one physical interface 78 in the system. */ 79 /* 80 #define NX_MAX_PHYSICAL_INTERFACES 1 81 */ 82 83 /* Defined, this option disables NetX Duo support on the 127.0.0.1 loopback interface. 84 127.0.0.1 loopback interface is enabled by default. Uncomment out the follow code to disable 85 the loopback interface. */ 86 /* 87 #define NX_DISABLE_LOOPBACK_INTERFACE 88 */ 89 90 /* If defined, the link driver is able to specify extra capability, such as checksum offloading features. */ 91 /* 92 #define NX_ENABLE_INTERFACE_CAPABILITY 93 */ 94 95 96 /* Configuration options for IP */ 97 98 /* This defines specifies the number of ThreadX timer ticks in one second. The default value is based 99 on ThreadX timer interrupt. */ 100 /* 101 #ifdef TX_TIMER_TICKS_PER_SECOND 102 #define NX_IP_PERIODIC_RATE TX_TIMER_TICKS_PER_SECOND 103 #else 104 #define NX_IP_PERIODIC_RATE 100 105 #endif 106 */ 107 108 /* Defined, NX_ENABLE_IP_RAW_PACKET_FILTER allows an application to install a filter 109 for incoming raw packets. This feature is disabled by default. */ 110 /* 111 #define NX_ENABLE_IP_RAW_PACKET_FILTER 112 */ 113 114 /* This define specifies the maximum number of RAW packets can be queued for receive. The default 115 value is 20. */ 116 /* 117 #define NX_IP_RAW_MAX_QUEUE_DEPTH 20 118 */ 119 120 /* Defined, this option enables IP static routing feature. By default IP static routing 121 feature is not compiled in. */ 122 /* 123 #define NX_ENABLE_IP_STATIC_ROUTING 124 */ 125 126 /* This define specifies the size of IP routing table. The default value is 8. */ 127 /* 128 #define NX_IP_ROUTING_TABLE_SIZE 8 129 */ 130 131 /* Defined, this option enables random IP id. By default IP id is increased by one for each packet. */ 132 /* 133 #define NX_ENABLE_IP_ID_RANDOMIZATION 134 */ 135 136 /* This define specifies the maximum number of multicast groups that can be joined. 137 The default value is 7. */ 138 /* 139 #define NX_MAX_MULTICAST_GROUPS 7 140 */ 141 142 143 /* Configuration options for IPv6 */ 144 145 /* Disable IPv6 processing in NetX Duo. */ 146 /* 147 #define NX_DISABLE_IPV6 148 */ 149 150 /* Define the number of entries in IPv6 address pool. */ 151 /* 152 #ifdef NX_MAX_PHYSICAL_INTERFACES 153 #define NX_MAX_IPV6_ADDRESSES (NX_MAX_PHYSICAL_INTERFACES * 3) 154 #endif 155 */ 156 157 /* Do not process IPv6 ICMP Redirect Messages. */ 158 /* 159 #define NX_DISABLE_ICMPV6_REDIRECT_PROCESS 160 */ 161 162 /* Do not process IPv6 Router Advertisement Messages. */ 163 /* 164 #define NX_DISABLE_ICMPV6_ROUTER_ADVERTISEMENT_PROCESS 165 */ 166 167 /* Do not send IPv6 Router Solicitation Messages. */ 168 /* 169 #define NX_DISABLE_ICMPV6_ROUTER_SOLICITATION 170 */ 171 172 /* Define the max number of router solicitations a host sends until a router response 173 is received. If no response is received, the host concludes no router is present. */ 174 /* 175 #define NX_ICMPV6_MAX_RTR_SOLICITATIONS 3 176 */ 177 178 /* Define the interval between which the host sends router solicitations in seconds. */ 179 /* 180 #define NX_ICMPV6_RTR_SOLICITATION_INTERVAL 4 181 */ 182 183 /* Define the maximum delay for the initial router solicitation in seconds. */ 184 /* 185 #define NX_ICMPV6_RTR_SOLICITATION_DELAY 1 186 */ 187 188 /* Do not send ICMPv4 Error Messages. */ 189 /* 190 #define NX_DISABLE_ICMPV4_ERROR_MESSAGE 191 */ 192 193 /* Do not send ICMPv6 Error Messages. */ 194 /* 195 #define NX_DISABLE_ICMPV6_ERROR_MESSAGE 196 */ 197 198 /* Disable the Duplicate Address Detection (DAD) protocol when configuring the host IP address. */ 199 /* 200 #define NX_DISABLE_IPV6_DAD 201 */ 202 203 /* If defined, application is able to control whether or not to perform IPv6 stateless 204 address autoconfiguration with nxd_ipv6_stateless_address_autoconfig_enable() or 205 nxd_ipv6_stateless_address_autoconfig_disable() service. If defined, the system starts 206 with IPv6 stateless address autoconfiguration enabled. This feature is disabled by default. */ 207 /* 208 #define NX_IPV6_STATELESS_AUTOCONFIG_CONTROL 209 */ 210 211 /* If enabled, application is able to install a callback function to get notified 212 when an interface IPv6 address is changed. By default this feature is disabled. */ 213 /* 214 #define NX_ENABLE_IPV6_ADDRESS_CHANGE_NOTIFY 215 */ 216 217 /* Defined, this option prevents NetX Duo from removing stale (old) cache table entries 218 whose timeout has not expired so are otherwise still valid) to make room for new entries 219 when the table is full. Static and router entries are not purged. */ 220 /* 221 #define NX_DISABLE_IPV6_PURGE_UNUSED_CACHE_ENTRIES 222 */ 223 224 /* This define enables simple IPv6 multicast group join/leave function. By default 225 the IPv6 multicast join/leave function is not enabled. */ 226 /* 227 #define NX_ENABLE_IPV6_MULTICAST 228 */ 229 230 /* Defined, Minimum Path MTU Discovery feature is enabled. */ 231 /* 232 #define NX_ENABLE_IPV6_PATH_MTU_DISCOVERY 233 */ 234 235 /* Define wait interval in seconds to reset the path MTU for a destination 236 table entry after decreasing it in response to a packet too big error message. 237 RFC 1981 Section 5.4 states the minimum time to wait is 238 5 minutes and recommends 10 minutes. 239 */ 240 /* 241 #define NX_PATH_MTU_INCREASE_WAIT_INTERVAL 600 242 */ 243 244 245 /* Configuration options for Neighbor Discovery. */ 246 /* Define values used for Neighbor Discovery protocol. 247 The default values are suggested by RFC2461, chapter 10. */ 248 249 /* Define the maximum number of multicast Neighbor Solicitation packets 250 NetX Duo sends for a packet destination needing physical mapping 251 to the IP address. */ 252 /* 253 #define NX_MAX_MULTICAST_SOLICIT 3 254 */ 255 256 /* Define the maximum number of unicast Neighbor Solicitation packets 257 NetX Duo sends for a cache entry whose reachable time has expired 258 and gone "stale". */ 259 /* 260 #define NX_MAX_UNICAST_SOLICIT 3 261 */ 262 263 /* Define the length of time, in seconds, that a Neighbor Cache table entry 264 remains in the reachable state before it becomes state. */ 265 /* 266 #define NX_REACHABLE_TIME 30 267 */ 268 269 /* Define the length of time, in milliseconds, between retransmitting 270 Neighbor Solicitation (NS) packets. */ 271 /* 272 #define NX_RETRANS_TIMER 1000 273 */ 274 275 /* Define the length of time, in seconds, for a Neighbor Cache entry 276 to remain in the Delay state. This is the Delay first probe timer. */ 277 /* 278 #define NX_DELAY_FIRST_PROBE_TIME 5 279 */ 280 281 /* This defines specifies the maximum number of packets that can be queued while waiting for a 282 Neighbor Discovery to resolve an IPv6 address. The default value is 4. */ 283 /* 284 #define NX_ND_MAX_QUEUE_DEPTH 4 285 */ 286 287 /* Define the maximum ICMPv6 Duplicate Address Detect Transmit . */ 288 /* 289 #define NX_IPV6_DAD_TRANSMITS 3 290 */ 291 292 /* Define the number of neighbor cache entries. */ 293 /* 294 #define NX_IPV6_NEIGHBOR_CACHE_SIZE 16 295 */ 296 297 /* Define the size of the IPv6 destination table. */ 298 /* 299 #define NX_IPV6_DESTINATION_TABLE_SIZE 8 300 */ 301 302 /* Define the size of the IPv6 prefix table. */ 303 /* 304 #define NX_IPV6_PREFIX_LIST_TABLE_SIZE 8 305 */ 306 307 308 /* Configuration options for IPSEC */ 309 310 /* This define enables IPSEC in NetX Duo. */ 311 /* 312 #define NX_IPSEC_ENABLE 313 */ 314 315 316 /* Configuration options for NAT */ 317 318 /* This define enables NAT process in NetX Duo. */ 319 /* 320 #define NX_NAT_ENABLE 321 */ 322 323 324 /* Configuration options for IGMP */ 325 326 /* Defined, IGMP v2 support is disabled. By default NetX Duo 327 is built with IGMPv2 enabled . By uncommenting this option, 328 NetX Duo reverts back to IGMPv1 only. */ 329 /* 330 #define NX_DISABLE_IGMPV2 331 */ 332 333 334 /* Configuration options for ARP */ 335 336 /* When defines, ARP reply is sent when address conflict occurs. */ 337 /* 338 #define NX_ARP_DEFEND_BY_REPLY 339 */ 340 341 /* To use the ARP collision handler to check for invalid ARP messages 342 matching existing entries in the table (man in the middle attack), 343 enable this feature. */ 344 /* 345 #define NX_ENABLE_ARP_MAC_CHANGE_NOTIFICATION 346 */ 347 348 /* This define specifies the number of seconds ARP entries remain valid. The default value of 0 disables 349 aging of ARP entries. */ 350 /* 351 #define NX_ARP_EXPIRATION_RATE 0 352 */ 353 354 /* This define specifies the number of seconds between ARP retries. The default value is 10, which represents 355 10 seconds. */ 356 /* 357 #define NX_ARP_UPDATE_RATE 10 358 */ 359 360 /* This define specifies the maximum number of ARP retries made without an ARP response. The default 361 value is 18. */ 362 /* 363 #define NX_ARP_MAXIMUM_RETRIES 18 364 */ 365 366 /* This defines specifies the maximum number of packets that can be queued while waiting for an ARP 367 response. The default value is 4. */ 368 /* 369 #define NX_ARP_MAX_QUEUE_DEPTH 4 370 */ 371 372 /* Defined, this option disables entering ARP request information in the ARP cache. */ 373 /* 374 #define NX_DISABLE_ARP_AUTO_ENTRY 375 */ 376 377 /* Define the ARP defend interval. The default value is 10 seconds. */ 378 /* 379 #define NX_ARP_DEFEND_INTERVAL 10 380 */ 381 382 383 /* Configuration options for TCP */ 384 385 /* This define specifies how the number of system ticks (NX_IP_PERIODIC_RATE) is divided to calculate the 386 timer rate for the TCP delayed ACK processing. The default value is 5, which represents 200ms. */ 387 /* 388 #define NX_TCP_ACK_TIMER_RATE 5 389 */ 390 391 /* This define specifies how the number of system ticks (NX_IP_PERIODIC_RATE) is divided to calculate the 392 fast TCP timer rate. The fast TCP timer is used to drive various TCP timers, including the delayed ACK 393 timer. The default value is 10, which represents 100ms. */ 394 /* 395 #define NX_TCP_FAST_TIMER_RATE 10 396 */ 397 398 /* This define specifies how the number of system ticks (NX_IP_PERIODIC_RATE) is divided to calculate the 399 timer rate for the TCP transmit retry processing. The default value is 1, which represents 1 second. */ 400 /* 401 #define NX_TCP_TRANSMIT_TIMER_RATE 1 402 */ 403 404 /* This define specifies how many seconds of inactivity before the keepalive timer activates. The default 405 value is 7200, which represents 2 hours. */ 406 /* 407 #define NX_TCP_KEEPALIVE_INITIAL 7200 408 */ 409 410 /* This define specifies how many seconds between retries of the keepalive timer assuming the other side 411 of the connection is not responding. The default value is 75, which represents 75 seconds between 412 retries. */ 413 /* 414 #define NX_TCP_KEEPALIVE_RETRY 75 415 */ 416 417 /* This define specifies the maximum packets that are out of order. The default value is 8. */ 418 /* 419 #define NX_TCP_MAX_OUT_OF_ORDER_PACKETS 8 420 */ 421 422 /* This define specifies the maximum number of TCP server listen requests. The default value is 10. */ 423 /* 424 #define NX_MAX_LISTEN_REQUESTS 10 425 */ 426 427 /* Defined, this option enables the optional TCP keepalive timer. */ 428 /* 429 #define NX_ENABLE_TCP_KEEPALIVE 430 */ 431 432 /* Defined, this option enables the optional TCP immediate ACK response processing. */ 433 /* 434 #define NX_TCP_IMMEDIATE_ACK 435 */ 436 437 /* This define specifies the number of TCP packets to receive before sending an ACK. */ 438 /* The default value is 2: ack every 2 packets. */ 439 /* 440 #define NX_TCP_ACK_EVERY_N_PACKETS 2 441 */ 442 443 /* Automatically define NX_TCP_ACK_EVERY_N_PACKETS to 1 if NX_TCP_IMMEDIATE_ACK is defined. 444 This is needed for backward compatibility. */ 445 #if (defined(NX_TCP_IMMEDIATE_ACK) && !defined(NX_TCP_ACK_EVERY_N_PACKETS)) 446 #define NX_TCP_ACK_EVERY_N_PACKETS 1 447 #endif 448 449 /* This define specifies how many transmit retires are allowed before the connection is deemed broken. 450 The default value is 10. */ 451 /* 452 #define NX_TCP_MAXIMUM_RETRIES 10 453 */ 454 455 /* This define specifies the maximum depth of the TCP transmit queue before TCP send requests are 456 suspended or rejected. The default value is 20, which means that a maximum of 20 packets can be in 457 the transmit queue at any given time. */ 458 /* 459 #define NX_TCP_MAXIMUM_TX_QUEUE 20 460 */ 461 462 /* This define specifies how the retransmit timeout period changes between successive retries. If this 463 value is 0, the initial retransmit timeout is the same as subsequent retransmit timeouts. If this 464 value is 1, each successive retransmit is twice as long. The default value is 0. */ 465 /* 466 #define NX_TCP_RETRY_SHIFT 0 467 */ 468 469 /* This define specifies how many keepalive retries are allowed before the connection is deemed broken. 470 The default value is 10. */ 471 /* 472 #define NX_TCP_KEEPALIVE_RETRIES 10 473 */ 474 475 /* Defined, this option enables the TCP window scaling feature. (RFC 1323). Default disabled. */ 476 /* 477 #define NX_ENABLE_TCP_WINDOW_SCALING 478 */ 479 480 /* Defined, this option disables the reset processing during disconnect when the timeout value is 481 specified as NX_NO_WAIT. */ 482 /* 483 #define NX_DISABLE_RESET_DISCONNECT 484 */ 485 486 /* If defined, the incoming SYN packet (connection request) is checked for a minimum acceptable 487 MSS for the host to accept the connection. The default minimum should be based on the host 488 application packet pool payload, socket transmit queue depth and relevant application specific parameters. */ 489 /* 490 #define NX_ENABLE_TCP_MSS_CHECK 491 #define NX_TCP_MSS_MINIMUM 128 492 */ 493 494 /* If defined, NetX Duo has a notify callback for the transmit TCP socket queue decreased from 495 the maximum queue depth. */ 496 /* 497 #define NX_ENABLE_TCP_QUEUE_DEPTH_UPDATE_NOTIFY 498 */ 499 500 /* Defined, feature of low watermark is enabled. */ 501 /* 502 #define NX_ENABLE_LOW_WATERMARK 503 */ 504 505 /* Define the maximum receive queue for TCP socket. */ 506 /* 507 #ifdef NX_ENABLE_LOW_WATERMARK 508 #define NX_TCP_MAXIMUM_RX_QUEUE 20 509 #endif 510 */ 511 512 /* Configuration options for fragmentation */ 513 514 /* Defined, this option disables both IPv4 and IPv6 fragmentation and reassembly logic. */ 515 /* 516 #define NX_DISABLE_FRAGMENTATION 517 */ 518 519 /* Defined, this option process IP fragmentation immediately. */ 520 /* 521 #define NX_FRAGMENT_IMMEDIATE_ASSEMBLY 522 */ 523 524 /* This define specifies the maximum time of IP reassembly. The default value is 60. 525 By default this option is not defined. */ 526 /* 527 #define NX_IP_MAX_REASSEMBLY_TIME 60 528 */ 529 530 /* This define specifies the maximum time of IPv4 reassembly. The default value is 15. 531 Note that if NX_IP_MAX_REASSEMBLY_TIME is defined, this option is automatically defined as 60. 532 By default this option is not defined. */ 533 /* 534 #define NX_IPV4_MAX_REASSEMBLY_TIME 15 535 */ 536 537 /* This define specifies the maximum time of IPv6 reassembly. The default value is 60. 538 Note that if NX_IP_MAX_REASSEMBLY_TIME is defined, this option is automatically defined as 60. 539 By default this option is not defined. */ 540 /* 541 #define NX_IPV6_MAX_REASSEMBLY_TIME 60 542 */ 543 544 /* Configuration options for checksum */ 545 546 /* Defined, this option disables checksum logic on received ICMPv4 packets. 547 Note that if NX_DISABLE_ICMP_RX_CHECKSUM is defined, this option is 548 automatically defined. By default this option is not defined.*/ 549 /* 550 #define NX_DISABLE_ICMPV4_RX_CHECKSUM 551 */ 552 553 /* Defined, this option disables checksum logic on received ICMPv6 packets. 554 Note that if NX_DISABLE_ICMP_RX_CHECKSUM is defined, this option is 555 automatically defined. By default this option is not defined.*/ 556 /* 557 #define NX_DISABLE_ICMPV6_RX_CHECKSUM 558 */ 559 560 /* Defined, this option disables checksum logic on received ICMPv4 or ICMPv6 packets. 561 Note that if NX_DISABLE_ICMP_RX_CHECKSUM is defined, NX_DISABLE_ICMPV4_RX_CHECKSUM 562 and NX_DISABLE_ICMPV6_RX_CHECKSUM are automatically defined. */ 563 /* 564 #define NX_DISABLE_ICMP_RX_CHECKSUM 565 */ 566 567 /* Defined, this option disables checksum logic on transmitted ICMPv4 packets. 568 Note that if NX_DISABLE_ICMP_TX_CHECKSUM is defined, this option is 569 automatically defined. By default this option is not defined.*/ 570 /* 571 #define NX_DISABLE_ICMPV4_TX_CHECKSUM 572 */ 573 574 /* Defined, this option disables checksum logic on transmitted ICMPv6 packets. 575 Note that if NX_DISABLE_ICMP_TX_CHECKSUM is defined, this option is 576 automatically defined. By default this option is not defined.*/ 577 /* 578 #define NX_DISABLE_ICMPV6_TX_CHECKSUM 579 */ 580 581 /* Defined, this option disables checksum logic on transmitted ICMPv4 or ICMPv6 packets. 582 Note that if NX_DISABLE_ICMP_TX_CHECKSUM is defined, NX_DISABLE_ICMPV4_TX_CHECKSUM 583 and NX_DISABLE_ICMPV6_TX_CHECKSUM are automatically defined. */ 584 /* 585 #define NX_DISABLE_ICMP_TX_CHECKSUM 586 */ 587 588 /* Defined, this option disables checksum logic on received IP packets. This is useful if the link-layer 589 has reliable checksum or CRC logic. */ 590 /* 591 #define NX_DISABLE_IP_RX_CHECKSUM 592 */ 593 594 /* Defined, this option disables checksum logic on transmitted IP packets. */ 595 /* 596 #define NX_DISABLE_IP_TX_CHECKSUM 597 */ 598 599 /* Defined, this option disables checksum logic on received TCP packets. */ 600 /* 601 #define NX_DISABLE_TCP_RX_CHECKSUM 602 */ 603 604 /* Defined, this option disables checksum logic on transmitted TCP packets. */ 605 /* 606 #define NX_DISABLE_TCP_TX_CHECKSUM 607 */ 608 609 /* Defined, this option disables checksum logic on received UDP packets. */ 610 611 /* 612 #define NX_DISABLE_UDP_RX_CHECKSUM 613 */ 614 615 /* Defined, this option disables checksum logic on transmitted UDP packets. Note that 616 IPV6 requires the UDP checksum computed for outgoing packets. If this option is 617 defined, the IPv6 NetX Duo host must ensure the UDP checksum is computed elsewhere 618 before the packet is transmitted. */ 619 /* 620 #define NX_DISABLE_UDP_TX_CHECKSUM 621 */ 622 623 624 /* Configuration options for statistics. */ 625 626 /* Defined, ARP information gathering is disabled. */ 627 /* 628 #define NX_DISABLE_ARP_INFO 629 */ 630 631 /* Defined, IP information gathering is disabled. */ 632 /* 633 #define NX_DISABLE_IP_INFO 634 */ 635 636 /* Defined, ICMP information gathering is disabled. */ 637 /* 638 #define NX_DISABLE_ICMP_INFO 639 */ 640 641 /* Defined, IGMP information gathering is disabled. */ 642 /* 643 #define NX_DISABLE_IGMP_INFO 644 */ 645 646 /* Defined, packet information gathering is disabled. */ 647 /* 648 #define NX_DISABLE_PACKET_INFO 649 */ 650 651 /* Defined, RARP information gathering is disabled. */ 652 /* 653 #define NX_DISABLE_RARP_INFO 654 */ 655 656 /* Defined, TCP information gathering is disabled. */ 657 /* 658 #define NX_DISABLE_TCP_INFO 659 */ 660 661 /* Defined, UDP information gathering is disabled. */ 662 /* 663 #define NX_DISABLE_UDP_INFO 664 */ 665 666 667 /* Configuration options for Packet Pool */ 668 669 /* This define specifies the size of the physical packet header. The default value is 16 (based on 670 a typical 16-byte Ethernet header). */ 671 /* 672 #define NX_PHYSICAL_HEADER 16 673 */ 674 675 /* This define specifies the size of the physical packet trailer and is typically used to reserve storage 676 for things like Ethernet CRCs, etc. */ 677 /* 678 #define NX_PHYSICAL_TRAILER 4 679 */ 680 681 /* Defined, this option disables the addition size checking on received packets. */ 682 /* 683 #define NX_DISABLE_RX_SIZE_CHECKING 684 */ 685 686 /* Defined, packet debug infromation is enabled. */ 687 /* 688 #define NX_ENABLE_PACKET_DEBUG_INFO 689 */ 690 691 /* Defined, NX_PACKET structure is padded for alignment purpose. The default is no padding. */ 692 /* 693 #define NX_PACKET_HEADER_PAD 694 #define NX_PACKET_HEADER_PAD_SIZE 1 695 */ 696 697 /* Defined, packet header and payload are aligned automatically by the value. The default value is sizeof(ULONG). */ 698 /* 699 #define NX_PACKET_ALIGNMENT sizeof(ULONG) 700 */ 701 702 /* If defined, the packet chain feature is removed. */ 703 /* 704 #define NX_DISABLE_PACKET_CHAIN 705 */ 706 707 /* Defined, the IP instance manages two packet pools. */ 708 /* 709 #define NX_ENABLE_DUAL_PACKET_POOL 710 */ 711 712 /* Configuration options for Others */ 713 714 /* Defined, this option bypasses the basic NetX error checking. This define is typically used 715 after the application is fully debugged. */ 716 /* 717 #define NX_DISABLE_ERROR_CHECKING 718 */ 719 720 /* Defined, this option enables deferred driver packet handling. This allows the driver to place a raw 721 packet on the IP instance and have the driver's real processing routine called from the NetX internal 722 IP helper thread. */ 723 /* 724 #define NX_DRIVER_DEFERRED_PROCESSING 725 */ 726 727 /* Defined, the source address of incoming packet is checked. The default is disabled. */ 728 /* 729 #define NX_ENABLE_SOURCE_ADDRESS_CHECK 730 */ 731 732 /* Defined, the extended notify support is enabled. This feature adds additional callback/notify services 733 to NetX Duo API for notifying the application of socket events, such as TCP connection and disconnect 734 completion. These extended notify functions are mainly used by the BSD wrapper. The default is this 735 feature is disabled. */ 736 /* 737 #define NX_ENABLE_EXTENDED_NOTIFY_SUPPORT 738 */ 739 740 /* Defined, ASSERT is disabled. The default is enabled. */ 741 /* 742 #define NX_DISABLE_ASSERT 743 */ 744 745 /* Define the process when assert fails. */ 746 /* 747 #define NX_ASSERT_FAIL while (1) tx_thread_sleep(NX_WAIT_FOREVER); 748 */ 749 750 /* Defined, the IPv4 feature is disabled. */ 751 /* 752 #define NX_DISABLE_IPV4 753 */ 754 755 /* Defined, the destination address of ICMP packet is checked. The default is disabled. 756 An ICMP Echo Request destined to an IP broadcast or IP multicast address will be silently discarded. 757 */ 758 /* 759 #define NX_ENABLE_ICMP_ADDRESS_CHECK 760 */ 761 762 /* Define the max string length. The default value is 1024. */ 763 /* 764 #define NX_MAX_STRING_LENGTH 1024 765 */ 766 767 /* Defined, the TCP/IP offload feature is enabled. 768 NX_ENABLE_INTERFACE_CAPABILITY must be defined to enable this feature. */ 769 /* 770 #define NX_ENABLE_TCPIP_OFFLOAD 771 */ 772 773 /* Defined, the VLAN feature is enabled. 774 Note: Require driver support to use APIs from this file. 775 A quick check in driver is to search for 776 NX_LINK_RAW_PACKET_SEND. VLAN APIs are not supported if not found. */ 777 /* 778 #define NX_ENABLE_VLAN 779 */ 780 781 #endif 782 783