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