source: ctrl/firmware/Main/CubeMX/NetXDuo/App/nx_user.h @ 69

Last change on this file since 69 was 69, checked in by Zed, 37 hours ago

NetX can be compiled and initialized.

File size: 83.1 KB
Line 
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/** NetX Component                                                        */
16/**                                                                       */
17/**   User Specific                                                       */
18/**                                                                       */
19/**************************************************************************/
20/**************************************************************************/
21
22/**************************************************************************/
23/*                                                                        */
24/*  PORT SPECIFIC C INFORMATION                            RELEASE        */
25/*                                                                        */
26/*    nx_user.h                                           PORTABLE C      */
27/*                                                           6.3.0        */
28/*                                                                        */
29/*  AUTHOR                                                                */
30/*                                                                        */
31/*    Yuxin Zhou, Microsoft Corporation                                   */
32/*                                                                        */
33/*  DESCRIPTION                                                           */
34/*                                                                        */
35/*    This file contains user defines for configuring NetX in specific    */
36/*    ways. This file will have an effect only if the application and     */
37/*    NetX library are built with NX_INCLUDE_USER_DEFINE_FILE defined.    */
38/*    Note that all the defines in this file may also be made on the      */
39/*    command line when building NetX library and application objects.    */
40/*                                                                        */
41/*  RELEASE HISTORY                                                       */
42/*                                                                        */
43/*    DATE              NAME                      DESCRIPTION             */
44/*                                                                        */
45/*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
46/*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
47/*                                            resulting in version 6.1    */
48/*  08-02-2021     Yuxin Zhou               Modified comment(s), and      */
49/*                                            supported TCP/IP offload,   */
50/*                                            resulting in version 6.1.8  */
51/*  04-25-2022     Yuxin Zhou               Modified comment(s),          */
52/*                                            resulting in version 6.1.11 */
53/*  10-31-2023     Tiejun Zhou              Modified comment(s),          */
54/*                                            supported random IP id,     */
55/*                                            resulting in version 6.3.0  */
56/*                                                                        */
57/**************************************************************************/
58
59#ifndef NX_USER_H
60#define NX_USER_H
61
62/* USER CODE BEGIN 1 */
63
64/* USER CODE END 1 */
65
66/* Define various build options for the NetX Duo port. The application should
67   either make changes here by commenting or un-commenting the conditional
68   compilation defined OR supply the defines though the compiler's equivalent
69   of the -D option.  */
70
71/* Override various options with default values already assigned in nx_api.h
72   or nx_port.h. Please also refer to nx_port.h for descriptions on each of
73   these options.  */
74
75/*****************************************************************************/
76/************** Configuration options for NetXDuo Core ***********************/
77/*****************************************************************************/
78
79/* NX_MAX_PHYSICAL_INTERFACES defines the number physical network interfaces
80   present to NetX Duo IP layer.  Physical interface does not include
81   loopback interface. By default there is at least one physical interface
82   in the system. */
83/*
84#define NX_MAX_PHYSICAL_INTERFACES              1
85*/
86
87/* If defined, the link driver is able to specify extra capability, such as
88   checksum offloading features. */
89/*
90#define NX_ENABLE_INTERFACE_CAPABILITY
91*/
92
93/* NX_PHYSICAL_HEADER Specifies the size in bytes of the physical header of
94   the frame. */
95/*
96#define NX_PHYSICAL_HEADER            16
97*/
98
99/* NX_PHYSICAL_TRAILER specifies the size in bytes of the physical packet
100   trailer and is typically used to reserve storage for things like Ethernet
101   CRCs, etc. */
102/* Define the max string length. The default value is 1024.  */
103/*
104#define NX_PHYSICAL_TRAILER                     4
105*/
106
107/* Defined, this option bypasses the basic NetX error checking. This define
108   is typically used after the application is fully debugged.
109*/
110/*
111#define NX_DISABLE_ERROR_CHECKING
112*/
113
114/* Defined, this option enables deferred driver packet handling. This allows
115   the driver to place a raw packet on the IP instance and have the driver's
116   real processing routine called from the NetX internal IP helper thread. */
117/*
118#define NX_DRIVER_DEFERRED_PROCESSING
119*/
120
121/* Defined, the source address of incoming packet is checked. The default is
122   disabled. */
123/*
124#define NX_ENABLE_SOURCE_ADDRESS_CHECK
125*/
126
127/* Defined, ASSERT is disabled. The default is enabled. */
128/*
129#define NX_DISABLE_ASSERT
130*/
131
132/* Defined, ASSERT is disabled. The default is enabled. */
133/*
134#define NX_ASSERT_FAIL              for (;;) {tx_thread_sleep(NX_WAIT_FOREVER); }
135*/
136
137/* Define the max string length. The default value is 1024.  */
138/*
139#define NX_MAX_STRING_LENGTH                    1024
140*/
141
142/* Defined, enables the optional debug packet dumping available in the RAM
143   Ethernet network driver.  */
144/*
145#define NX_DEBUG_PACKET
146*/
147
148/* Defined, enables the optional print debug information available from the RAM
149   Ethernet network driver. */
150/*
151#define NX_DEBUG
152*/
153
154/* Defined, the extended notify support is enabled.  This feature adds additional
155   callback/notify services to NetX Duo API for notifying the application of
156   socket events, such as TCP connection and disconnect completion.
157   These extended notify functions are mainly used by the BSD wrapper.
158   The default is this feature is disabled.  */
159/*
160#define NX_ENABLE_EXTENDED_NOTIFY_SUPPORT
161*/
162
163/* Defined, NetX Duo is built with NAT process. This option is defined when the
164   component Addons NAT is selected and NX_DISABLE_IPV4 is not selected. */
165/*
166#define NX_NAT_ENABLE
167*/
168
169/* Defined, allows the stack to use two packet pools, one with large payload
170   size and one with smaller payload size. By default this option is not
171   enabled. */
172/*
173#define NX_ENABLE_DUAL_PACKET_POOL
174*/
175
176/*****************************************************************************/
177/***************** Configuration options for Packet **************************/
178/*****************************************************************************/
179
180/* Defined, packet header and payload are aligned automatically by the value.
181   The default value is sizeof(ULONG). */
182/*
183#define NX_PACKET_ALIGNMENT               sizeof(ULONG)
184*/
185
186/* Defined, packet debug information is enabled.  */
187/*
188#define NX_ENABLE_PACKET_DEBUG_INFO
189*/
190
191/* Defined, disables packet pool information gathering. */
192/*
193#define NX_DISABLE_PACKET_INFO
194*/
195
196/* Defined, enables NetX Duo packet pool low watermark feature. Application
197   sets low watermark value. On receiving TCP packets, if the packet pool
198   low watermark is reached, NetX Duo silently discards the packet by releasing
199   it, preventing the packet pool from starvation. By default this feature is
200   not enabled. */
201/*
202#define NX_ENABLE_LOW_WATERMARK
203*/
204
205/*****************************************************************************/
206/************* Configuration options for Neighbor Cache **********************/
207/*****************************************************************************/
208
209/* Define the length of time, in milliseconds, between re-transmitting
210   Neighbor Solicitation (NS) packets. */
211/*
212#define NX_RETRANS_TIMER                        1000
213*/
214
215/* Defined, this option disables Duplicate Address Detection (DAD) during IPv6
216   address assignment. Addresses are set either by manual configuration or
217   through Stateless Address Auto Configuration. */
218/*
219#define NX_DISABLE_IPV6_DAD
220*/
221
222/* Defined, this option prevents NetX Duo from removing stale (old) cache table
223   entries whose timeout has not expired so are otherwise still valid) to make
224   room for new entries when the table is full. Static and router entries are
225   not purged.  */
226/*
227#define NX_DISABLE_IPV6_PURGE_UNUSED_CACHE_ENTRIES
228*/
229
230/* Specifies the number of Neighbor Solicitation messages to be sent before
231   NetX Duo marks an interface address as valid. If NX_DISABLE_IPV6_DAD is
232   defined (DAD disabled), setting this option has no effect. Alternatively,
233   a value of zero (0) turns off DAD but leaves the DAD functionality in
234   NetX Duo. Defined in nx_api.h, the default value is 3.  */
235/*
236#define NX_IPV6_DAD_TRANSMITS               3
237*/
238
239/* Specifies the number of entries in the IPv6 Neighbor Cache table. Defined
240   in nx_nd_cache.h, the default value is 16. */
241/*
242#define NX_IPV6_NEIGHBOR_CACHE_SIZE         16
243*/
244
245/* Specifies the delay in seconds before the first solicitation is sent out for
246   a cache entry in the STALE state. Defined in nx_nd_cache.h, the default
247   value is 5. */
248/*
249#define NX_DELAY_FIRST_PROBE_TIME           5
250*/
251
252/* Specifies the number of Neighbor Solicitation messages NetX Duo transmits as
253   part of the IPv6 Neighbor Discovery protocol when mapping between IPv6
254   address and MAC address is required. Defined in nx_nd_cache.h, the default
255   value is 3. */
256/*
257#define NX_MAX_MULTICAST_SOLICIT            3
258*/
259
260/* Specifies the number of Neighbor Solicitation messages NetX Duo transmits
261   to determine a specific neighbor's reachability. Defined in nx_nd_cache.h,
262   the default value is 3. */
263/*
264#define NX_MAX_UNICAST_SOLICIT              3
265*/
266
267/* This defines specifies the maximum number of packets that can be queued while waiting for a
268   Neighbor Discovery to resolve an IPv6 address. The default value is 4.  */
269/*
270#define NX_ND_MAX_QUEUE_DEPTH               4
271*/
272
273/* Specifies the time out in seconds for a cache entry to exist in the REACHABLE
274   state with no packets received from the cache destination IPv6 address.
275   Defined in nx_nd_cache.h, the default value is 30. */
276/*
277#define NX_REACHABLE_TIME                   30
278*/
279
280/*****************************************************************************/
281/********************* Configuration options for IP **************************/
282/*****************************************************************************/
283
284/* Defined, this option disables NetX Duo support on the 127.0.0.1 loopback
285   interface. 127.0.0.1 loopback interface is enabled by default.
286   Uncomment out the follow code to disable the loopback interface. */
287
288/*
289#define NX_DISABLE_LOOPBACK_INTERFACE
290*/
291
292/* Defined, this option disables the addition size checking on received packets. */
293/*
294#define NX_DISABLE_RX_SIZE_CHECKING
295*/
296
297/* The symbol "NX_IP_PERIODIC_RATE" specifies the number of ThreadX timer ticks in one second.
298   The value should be derived from TX_TIMER_TICKS_PER_SECOND, which is defined in ThreadX port.
299   If TX_TIMER_TICKS_PER_SECOND is not defined, NX_IP_PERIODIC_RATE defaults to 100 ticks per second. */
300
301/*
302#ifdef TX_TIMER_TICKS_PER_SECOND
303#define NX_IP_PERIODIC_RATE                     TX_TIMER_TICKS_PER_SECOND
304#else
305#define NX_IP_PERIODIC_RATE                     100
306#endif
307*/
308
309/* Defined, NX_ENABLE_IP_RAW_PACKET_FILTER allows an application to install a
310   filter for incoming raw packets. This feature is disabled by default. */
311/*
312#define NX_ENABLE_IP_RAW_PACKET_FILTER
313*/
314
315/* This define specifies the maximum number of RAW packets can be queued for
316   receive. The default value is 20.  */
317/*
318#define NX_IP_RAW_MAX_QUEUE_DEPTH             20
319*/
320
321/* Defined, this option enables IP static routing feature. By default IP static
322   routing feature is not compiled in. */
323/*
324#define NX_ENABLE_IP_STATIC_ROUTING
325*/
326
327/* Defined, this option enables random IP id. By default IP id is increased by one for each packet. */
328/* #define NX_ENABLE_IP_ID_RANDOMIZATION */
329
330/* This define specifies the maximum time of IP reassembly.  The default value
331   is 60. By default this option is not defined.  */
332/*
333#define NX_IP_MAX_REASSEMBLY_TIME       60
334*/
335
336/* Symbol that controls maximum time allowed to reassemble IPv4 fragment.
337   Note the value defined in NX_IP_MAX_REASSEMBLY_TIME overwrites this value.
338   The default value is 15. */
339/*
340#define NX_IPV4_MAX_REASSEMBLY_TIME       15
341*/
342
343/* This define specifies the maximum time of IPv6 reassembly. The default value
344   is 60. Note that if NX_IP_MAX_REASSEMBLY_TIME is defined, this option is
345   automatically defined as 60. By default this option is not defined. */
346/*
347#define NX_IPV6_MAX_REASSEMBLY_TIME 60
348*/
349
350/* Defined, this option disables checksum logic on received IP packets.
351   This is useful if the link-layer has reliable checksum or CRC logic. */
352/*
353#define NX_DISABLE_IP_RX_CHECKSUM
354*/
355
356/* Defined, this option disables checksum logic on transmitted IP packets. */
357/*
358#define NX_DISABLE_IP_TX_CHECKSUM
359*/
360
361/* Defined, IP information gathering is disabled.  */
362/*
363#define NX_DISABLE_IP_INFO
364*/
365
366/* This define IP fast timer rate. The default value is 10. */
367/*
368#define NX_IP_FAST_TIMER_RATE               10
369*/
370
371/* Define the amount of time to sleep in nx_ip_(interface_)status_check.
372   The default value is 1. */
373/*
374#define NX_IP_STATUS_CHECK_WAIT_TIME          1
375*/
376
377/* Defined, IP packet filter is enabled.  */
378/*
379#define NX_ENABLE_IP_PACKET_FILTER
380*/
381
382/* Defined, disables both IPv4 and IPv6 fragmentation and reassembly logic. */
383/*
384#define NX_DISABLE_FRAGMENTATION
385*/
386
387/* Defined, this option process IP fragmentation immediately.  */
388/*
389#define NX_FRAGMENT_IMMEDIATE_ASSEMBLY
390*/
391
392/*****************************************************************************/
393/******************** Configuration options for IPV 4 ************************/
394/*****************************************************************************/
395
396/* Defined, disables IPv4 functionality. This option can be used to build NetX
397   Duo to support IPv6 only. By default this option is not defined. */
398/*
399#define NX_DISABLE_IPV4
400*/
401
402/*****************************************************************************/
403/******************** Configuration options for IPV 6 ************************/
404/*****************************************************************************/
405
406/* Disables IPv6 functionality when the NetX Duo library is built.
407   For applications that do not need IPv6, this avoids pulling in code and
408   additional storage space needed to support IPv6. */
409/*
410#define NX_DISABLE_IPV6
411*/
412
413/* Defined, enable IPV6 features. */
414/*
415#define FEATURE_NX_IPV6
416*/
417
418/* Specifies the number of entries in the IPv6 address pool. During interface
419   configuration, NetX Duo uses IPv6 entries from the pool. It is defaulted to
420   (NX_MAX_PHYSICAL_INTERFACES * 3) to allow each interface to have at least
421   one link local address and two global addresses. Note that all interfaces
422   share the IPv6 address pool. */
423/*
424#ifdef NX_MAX_PHYSICAL_INTERFACES
425#define NX_MAX_IPV6_ADDRESSES           (NX_MAX_PHYSICAL_INTERFACES * 3)
426#endif
427*/
428
429/* If defined, application is able to control whether or not to perform IPv6
430   stateless address auto-configuration with nxd_ipv6_stateless_address_autoconfig_enable()
431   or nxd_ipv6_stateless_address_autoconfig_disable() service. If defined, the
432   system starts with IPv6 stateless address auto-configuration enabled.
433   This feature is disabled by default. */
434/*
435#define NX_IPV6_STATELESS_AUTOCONFIG_CONTROL
436*/
437
438/* If enabled, application is able to install a callback function to get
439   notified when an interface IPv6 address is changed. By default this
440   feature is disabled. */
441/*
442#define NX_ENABLE_IPV6_ADDRESS_CHANGE_NOTIFY
443*/
444
445/* This define enables simple IPv6 multicast group join/leave function.
446   By default the IPv6 multicast join/leave function is not enabled. */
447/*
448#define NX_ENABLE_IPV6_MULTICAST
449*/
450
451/* Defined, Minimum Path MTU Discovery feature is enabled.  */
452/*
453#define NX_ENABLE_IPV6_PATH_MTU_DISCOVERY
454*/
455
456/* Define wait interval in seconds to reset the path MTU for a destination
457   table entry after decreasing it in response to a packet too big error message.
458   RFC 1981 Section 5.4 states the minimum time to wait is 5 minutes and
459   recommends 10 minutes. */
460/*
461#define NX_PATH_MTU_INCREASE_WAIT_INTERVAL          600
462*/
463
464/* Specifies the number of entries in the IPv6 destination table. This stores
465   information about next hop addresses for IPv6 addresses. Defined in nx_api.h,
466   the default value is 8. */
467/*
468#define NX_IPV6_DESTINATION_TABLE_SIZE          8
469*/
470
471/* Specifies the size of the prefix table. Prefix information is obtained from
472   router advertisements and is part of the IPv6 address configuration. Defined
473   in nx_api.h, the default value is 8. */
474/*
475#define NX_IPV6_PREFIX_LIST_TABLE_SIZE      8
476*/
477
478/* Specifies the number of entries in the IPv6 routing table. At least one
479   entry is needed for the default router. Defined in nx_api.h, the default
480   value is 8. */
481/*
482#define NX_IPV6_DEFAULT_ROUTER_TABLE_SIZE       8
483*/
484
485/*****************************************************************************/
486/******************** Configuration options for ICMP *************************/
487/*****************************************************************************/
488
489/* Defined, NetX Duo does not send ICMPv4 Error Messages in response to error
490   conditions such as improperly formatted IPv4 header. By default this option
491   is not defined. */
492/*
493#define NX_DISABLE_ICMPV4_ERROR_MESSAGE
494*/
495
496/* Defined, this option disables checksum logic on received ICMPv4 or ICMPv6 packets.
497   Note that if NX_DISABLE_ICMP_RX_CHECKSUM is defined, NX_DISABLE_ICMPV4_RX_CHECKSUM
498   and NX_DISABLE_ICMPV6_RX_CHECKSUM are automatically defined. */
499/*
500#define NX_DISABLE_ICMP_RX_CHECKSUM
501*/
502
503/* Defined, this option disables checksum logic on received ICMPv4 packets.
504   Note that if NX_DISABLE_ICMP_RX_CHECKSUM is defined, this option is
505   automatically defined. By default this option is not defined. */
506/*
507#define NX_DISABLE_ICMPV4_RX_CHECKSUM
508*/
509
510/* Defined, this option disables checksum logic on received ICMPv6 packets.
511   Note that if NX_DISABLE_ICMP_RX_CHECKSUM is defined, this option is
512   automatically defined. By default this option is not defined. */
513/*
514#define NX_DISABLE_ICMPV6_RX_CHECKSUM
515*/
516
517/* Defined, this option disables checksum logic on transmitted ICMPv4 or ICMPv6
518   packets. Note that if NX_DISABLE_ICMP_TX_CHECKSUM is defined,
519   NX_DISABLE_ICMPV4_TX_CHECKSUM and NX_DISABLE_ICMPV6_TX_CHECKSUM are
520   automatically defined. */
521/*
522#define NX_DISABLE_ICMP_TX_CHECKSUM
523*/
524
525/* Defined, this option disables checksum logic on transmitted ICMPv4 packets.
526   Note that if NX_DISABLE_ICMP_TX_CHECKSUM is defined, this option is
527   automatically defined. By default this option is not defined.*/
528/*
529#define NX_DISABLE_ICMPV4_TX_CHECKSUM
530*/
531
532/* Defined, this option disables checksum logic on transmitted ICMPv6 packets.
533   Note that if NX_DISABLE_ICMP_TX_CHECKSUM is defined, this option is
534   automatically defined. By default this option is not defined.*/
535/*
536#define NX_DISABLE_ICMPV6_TX_CHECKSUM
537*/
538
539/* Defined, ICMP information gathering is disabled. */
540/*
541#define NX_DISABLE_ICMP_INFO
542*/
543
544/* Defined, the destination address of ICMP packet is checked. The default
545   is disabled. An ICMP Echo Request destined to an IP broadcast or IP
546   multicast address will be silently discarded. */
547/*
548#define NX_ENABLE_ICMP_ADDRESS_CHECK
549*/
550
551/* Defined, disables NetX Duo from sending an ICMPv6 error message in response
552   to a problem packet (e.g., improperly formatted header or packet header
553   type is deprecated) received from another host. */
554/*
555#define NX_DISABLE_ICMPV6_ERROR_MESSAGE
556*/
557
558/* Defined, disables ICMPv6 redirect packet processing. NetX Duo by default
559   processes redirect messages and updates the destination table with next hop
560   IP address information. */
561/*
562#define NX_DISABLE_ICMPV6_REDIRECT_PROCESS
563*/
564
565/* Defined, disables NetX Duo from processing information received in IPv6
566   router advertisement packets. */
567/*
568#define NX_DISABLE_ICMPV6_ROUTER_ADVERTISEMENT_PROCESS
569*/
570
571/* Defined, disables NetX Duo from sending IPv6 router solicitation messages
572   at regular intervals to the router. */
573/*
574#define NX_DISABLE_ICMPV6_ROUTER_SOLICITATION
575*/
576
577/* Define the max number of router solicitations a host sends until a router
578   response is received. If no response is received, the host concludes no
579   router is present. The default value is 3. */
580/*
581#define NX_ICMPV6_MAX_RTR_SOLICITATIONS         3
582*/
583
584/* Specifies the interval between two router solicitation messages.
585   The default value is 4. */
586/*
587#define NX_ICMPV6_RTR_SOLICITATION_INTERVAL     4
588*/
589
590/* Specifies the maximum delay for the initial router solicitation in seconds. */
591/*
592#define NX_ICMPV6_RTR_SOLICITATION_DELAY        1
593*/
594
595/*****************************************************************************/
596/********************* Configuration options for TCP *************************/
597/*****************************************************************************/
598
599/* Specifies how the number of system ticks (NX_IP_PERIODIC_RATE) is divided
600   to calculate the timer rate for the TCP delayed ACK processing.
601   The default value is 5, which represents 200ms, and is defined in nx_tcp.h.
602   The application can override the default by defining the value before
603   nx_api.h is included. */
604/*
605#define NX_TCP_ACK_TIMER_RATE             5
606*/
607
608/* Specifies how the number of NetX Duo internal ticks (NX_IP_PERIODIC_RATE)
609   is divided to calculate the fast TCP timer rate. The fast TCP timer is used
610   to drive the various TCP timers, including the delayed ACK timer.
611   The default value is 10, which represents 100ms assuming the ThreadX timer
612   is running at 10ms. This value is defined in nx_tcp.h. The application can
613   override the default by defining the value before nx_api.h is included. */
614/*
615#define NX_TCP_FAST_TIMER_RATE            10
616*/
617
618/* Specifies how the number of system ticks (NX_IP_PERIODIC_RATE) is divided to
619   calculate the timer rate for the TCP transmit retry processing.
620   The default value is 1, which represents 1 second, and is defined in nx_tcp.h.
621   The application can override the default by defining the value before nx_api.h
622   is included. */
623/*
624#define NX_TCP_TRANSMIT_TIMER_RATE        1
625*/
626
627/* Specifies the number of seconds of inactivity before the keepalive timer
628   activates. The default value is 7200, which represents 2 hours, and is
629   defined in nx_tcp.h. The application can override the default by defining
630   the value before nx_api.h is included. */
631/*
632#define NX_TCP_KEEPALIVE_INITIAL          7200
633*/
634
635/* Specifies the number of seconds between retries of the keepalive timer
636   assuming the other side of the connection is not responding. The default
637   value is 75, which represents 75 seconds between retries, and is defined
638   in nx_tcp.h. The application can override the default by defining the value
639   before nx_api.h is included. */
640/*
641#define NX_TCP_KEEPALIVE_RETRY            75
642*/
643
644/* Symbol that defines the maximum number of out-of-order TCP packets can be
645   kept in the TCP socket receive queue. This symbol can be used to limit the
646   number of packets queued in the TCP receive socket, preventing the packet
647   pool from being starved. By default this symbol is not defined, thus there
648   is no limit on the number of out of order packets being queued in the TCP
649   socket. */
650#define NX_TCP_MAX_OUT_OF_ORDER_PACKETS       8
651
652/* Defined, enables the optional TCP keepalive timer. The default settings is
653   not enabled. */
654/*
655#define NX_ENABLE_TCP_KEEPALIVE
656*/
657
658/* Defined, enables the optional TCP immediate ACK response processing.
659   Defining this symbol is equivalent to defining NX_TCP_ACK_EVERY_N_PACKETS
660   to be 1. */
661/*
662#define NX_TCP_IMMEDIATE_ACK
663*/
664
665/* Specifies the number of TCP packets to receive before sending an ACK.
666   Note if NX_TCP_IMMEDIATE_ACK is enabled but NX_TCP_ACK_EVERY_N_PACKETS is
667   not, this value is automatically set to 1 for backward compatibility. */
668/*
669#define NX_TCP_ACK_EVERY_N_PACKETS        2
670*/
671
672/* Automatically define NX_TCP_ACK_EVERY_N_PACKETS to 1 if NX_TCP_IMMEDIATE_ACK is defined.
673   This is needed for backward compatibility. */
674#if (defined(NX_TCP_IMMEDIATE_ACK) && !defined(NX_TCP_ACK_EVERY_N_PACKETS))
675#define NX_TCP_ACK_EVERY_N_PACKETS 1
676#endif
677
678/* Specifies how many data transmit retries are allowed before the connection
679   is deemed broken. The default value is 10, which represents 10 retries, and
680   is defined in nx_tcp.h. The application can override the default by defining
681   the value before nx_api.h is included. */
682/*
683#define NX_TCP_MAXIMUM_RETRIES            10
684*/
685
686/* Specifies the maximum depth of the TCP transmit queue before TCP send
687   requests are suspended or rejected. The default value is 20, which means
688   that a maximum of 20 packets can be in the transmit queue at any given time.
689   Note packets stay in the transmit queue until an ACK that covers some or all
690   of the packet data is received from the other side of the connection.
691   This constant is defined in nx_tcp.h. The application can override the
692   default by defining the value before nx_api.h is included. */
693/*
694#define NX_TCP_MAXIMUM_TX_QUEUE           20
695*/
696
697/* Specifies how the retransmit timeout period changes between retries.
698   If this value is 0, the initial retransmit timeout is the same as subsequent
699   retransmit timeouts. If this value is 1, each successive retransmit is twice
700   as long. If this value is 2, each subsequent retransmit timeout is four
701   times as long. The default value is 0 and is defined in nx_tcp.h.
702   The application can override the default by defining the value before nx_api.h
703   is included. */
704/*
705#define NX_TCP_RETRY_SHIFT                0x0
706*/
707
708/* Specifies how many keepalive retries are allowed before the connection is
709   deemed broken. The default value is 10, which represents 10 retries, and is
710   defined in nx_tcp.h. The application can override the default by defining
711   the value before nx_api.h is included. */
712/*
713#define NX_TCP_KEEPALIVE_RETRIES          10
714*/
715
716/* Enables the window scaling option for TCP applications. If defined, window
717   scaling option is negotiated during TCP connection phase, and the
718   application is able to specify a window size larger than 64K. The default
719   setting is not enabled (not defined). */
720/*
721#define NX_ENABLE_TCP_WINDOW_SCALING
722*/
723
724/* Defined, disables the reset processing during disconnect when the timeout
725   value supplied is specified as NX_NO_WAIT. */
726/*
727#define NX_DISABLE_RESET_DISCONNECT
728*/
729
730/* Defined, enables the verification of minimum peer MSS before accepting a TCP
731   connection. To use this feature, the symbol NX_ENABLE_TCP_MSS_MINIMUM must
732   be defined. By default, this option is not enabled. */
733/*
734#define NX_ENABLE_TCP_MSS_CHECK
735*/
736
737/* Defined, allows the application to install a callback function that is
738   invoked when the TCP transmit queue depth is no longer at maximum value.
739   This callback serves as an indication that the TCP socket is ready to
740   transmit more data. By default this option is not enabled. */
741/*
742#define NX_ENABLE_TCP_QUEUE_DEPTH_UPDATE_NOTIFY
743*/
744
745/* Defined, disables checksum logic on received TCP packets. This is only
746   useful in situations in which the link-layer has reliable checksum or CRC
747   processing, or the interface driver is able to verify the TCP checksum in
748   hardware, and the application does not use IPsec. */
749/*
750#define NX_DISABLE_TCP_RX_CHECKSUM
751*/
752
753/* Defined, disables checksum logic for sending TCP packets. This is only
754   useful in situations in which the receiving network node has received TCP
755   checksum logic disabled or the underlying network driver is capable of
756   generating the TCP checksum, and the application does not use IPsec. */
757/*
758#define NX_DISABLE_TCP_TX_CHECKSUM
759*/
760
761/* Defined, disables TCP information gathering. */
762/*
763#define NX_DISABLE_TCP_INFO
764*/
765
766/* Number of seconds for maximum segment lifetime, the default is 2 minutes
767  (120s) */
768/*
769#define NX_TCP_MAXIMUM_SEGMENT_LIFETIME       120
770*/
771
772/* Specifies the maximum number of server listen requests. The default value is
773   10 and is defined in nx_api.h. The application can override the default by
774   defining the value before nx_api.h is included. */
775/*
776#define NX_MAX_LISTEN_REQUESTS            10
777*/
778
779/*****************************************************************************/
780/********************* Configuration options for UDP *************************/
781/*****************************************************************************/
782
783/* Defined, disables the UDP checksum computation on incoming UDP packets.
784   This is useful if the network interface driver is able to verify UDP header
785   checksum in hardware, and the application does not enable IPsec or IP
786   fragmentation logic. */
787/*
788#define NX_DISABLE_UDP_RX_CHECKSUM
789*/
790
791/* Defined, disables the UDP checksum computation on outgoing UDP packets.
792   This is useful if the network interface driver is able to compute UDP header
793   checksum and insert the value in the IP head before transmitting the data,
794   and the application does not enable IPsec or IP fragmentation logic. */
795/*
796#define NX_DISABLE_UDP_TX_CHECKSUM
797*/
798
799/* Defined, disables UDP information gathering. */
800/*
801#define NX_DISABLE_UDP_INFO
802*/
803
804/*****************************************************************************/
805/********************* Configuration options for IGMP ************************/
806/*****************************************************************************/
807
808/* Defined, disables IGMP information gathering. */
809/*
810#define NX_DISABLE_IGMP_INFO
811*/
812
813/* Defined, disables IGMPv2 support, and NetX Duo supports IGMPv1 only.
814   By default this option is not set and is defined in nx_api.h. */
815/*
816#define NX_DISABLE_IGMPV2
817*/
818
819/* Specifies the maximum number of multicast groups that can be joined.
820   The default value is 7 and is defined in nx_api.h. The application can
821   override the default by defining the value before nx_api.h is included. */
822/*
823#define NX_MAX_MULTICAST_GROUPS           7
824*/
825
826/*****************************************************************************/
827/******************* Configuration options for ARP/RARP **********************/
828/*****************************************************************************/
829
830/* Defined, allows NetX Duo to defend its IP address by sending an ARP
831   response. */
832/*
833#define NX_ARP_DEFEND_BY_REPLY
834*/
835
836/* Specifies the number of seconds ARP entries remain valid. The default value
837   of zero disables expiration or aging of ARP entries and is defined in
838   nx_api.h. The application can override the default by defining the value
839   before nx_api.h is included. */
840/*
841#define NX_ARP_EXPIRATION_RATE            0
842*/
843
844/* Specifies the number of seconds between ARP retries. The default value is 10,
845   which represents 10 seconds, and is defined in nx_api.h. The application can
846   override the default by defining the value before nx_api.h is included. */
847/*
848#define NX_ARP_UPDATE_RATE                10
849*/
850
851/* Specifies the maximum number of ARP retries made without an ARP response.
852   The default value is 18 and is defined in nx_api.h. The application can
853   override the default by defining the value before nx_api.h is included. */
854/*
855#define NX_ARP_MAXIMUM_RETRIES            18
856*/
857
858/* Specifies the maximum number of packets that can be queued while waiting for
859   an ARP response. The default value is 4 and is defined in nx_api.h. */
860/*
861#define NX_ARP_MAX_QUEUE_DEPTH            4
862*/
863
864/* Defines the interval, in seconds, the ARP module sends out the next defend
865   packet in response to an incoming ARP message that indicates an address in
866   conflict. */
867/*
868#define NX_ARP_DEFEND_INTERVAL          10
869*/
870
871/* Defined, disables entering ARP request information in the ARP cache. */
872/*
873#define NX_DISABLE_ARP_AUTO_ENTRY
874*/
875
876/* Defined, allows ARP to invoke a callback notify function on detecting the
877   MAC address is updated. */
878/*
879#define NX_ENABLE_ARP_MAC_CHANGE_NOTIFICATION
880*/
881
882/* Defined, disables ARP information gathering. */
883/*
884#define NX_DISABLE_ARP_INFO
885*/
886
887/* Defined, disables RARP information gathering. */
888/*
889#define NX_DISABLE_RARP_INFO
890*/
891
892/*****************************************************************************/
893/********************* Configuration options for DHCP ************************/
894/*****************************************************************************/
895
896/* Type of service required for the DHCP UDP requests. By default, this value
897   is defined as NX_IP_NORMAL to indicate normal IP packet service. */
898/*
899#define NX_DHCP_TYPE_OF_SERVICE                 NX_IP_NORMAL
900*/
901
902/* Fragment enable for DHCP UDP requests. By default, this value is
903   NX_DONT_FRAGMENT to disable DHCP UDP fragmenting. */
904/*
905#define NX_DHCP_FRAGMENT_OPTION                 NX_DONT_FRAGMENT
906*/
907
908/* Specifies the number of routers this packet can pass before it is discarded.
909   The default value is set to 0x80. */
910/*
911#define NX_DHCP_TIME_TO_LIVE                    0x80
912*/
913
914/* Specifies the number of maximum depth of receive queue. The default value
915   is set to 4. */
916/*
917#define NX_DHCP_QUEUE_DEPTH                 4
918*/
919
920/*****************************************************************************/
921/****************** Configuration options for DHCP Client ********************/
922/*****************************************************************************/
923
924/* Defined, this option enables the BOOTP protocol instead of DHCP.
925   By default this option is disabled. */
926/*
927#define NX_DHCP_ENABLE_BOOTP
928*/
929
930/* If defined, this enables the DHCP Client to save its current DHCP Client
931   license 'state' including time remaining on the lease, and restore this
932   state between DHCP Client application reboots.
933   The default value is disabled. */
934
935#define NX_DHCP_CLIENT_RESTORE_STATE
936
937/* If set, the DHCP Client will not create its own packet pool. The host
938   application must use the nx_dhcp_packet_pool_set service to set the DHCP
939   Client packet pool. The default value is disabled. */
940/*
941#define NX_DHCP_CLIENT_USER_CREATE_PACKET_POOL
942*/
943
944/* Defined, this enables the DHCP Client to send an ARP probe after IP
945   address assignment to verify the assigned DHCP address is not owned by
946   another host. By default, this option is disabled. */
947/*
948#define NX_DHCP_CLIENT_SEND_ARP_PROBE
949*/
950
951/* Defines the number of ARP probes sent for determining if the IP address
952   assigned by the DHCP server is already in use. The value is defaulted to
953   3 probes. */
954/*
955#define NX_DHCP_ARP_PROBE_NUM               3
956*/
957
958/* Specifies the maximum number of interface records to save to the DHCP Client
959   instance. A DHCP Client interface record is a record of the DHCP Client
960   running on a specific interface. The default value is set as physical
961   interfaces count (NX_MAX_PHYSICAL_INTERFACES). */
962/*
963#define NX_DHCP_CLIENT_MAX_RECORDS          (NX_MAX_PHYSICAL_INTERFACES)
964*/
965
966/* Defined, this enables the DHCP Client to send maximum DHCP message size
967   option. By default, this option is disabled. */
968/*
969#define NX_DHCP_CLIENT_SEND_MAX_DHCP_MESSAGE_OPTION
970*/
971
972/* Defined, this enables the DHCP Client to check the input host name in the
973   nx_dhcp_create call for invalid characters or length. By default, this
974   option is disabled. */
975/*
976#define NX_DHCP_CLIENT_ENABLE_HOST_NAME_CHECK
977*/
978
979/* Priority of the DHCP thread. By default, this value specifies that the DHCP
980   thread runs at priority 3. */
981/*
982#define NX_DHCP_THREAD_PRIORITY             3
983*/
984
985/* Size of the DHCP thread stack. By default, the size is 4096 bytes. */
986/*
987#define NX_DHCP_THREAD_STACK_SIZE           (4096)
988*/
989
990/* Size of DHCP options buffer. By default, this value is 312 bytes. */
991/*
992#define NX_DHCP_OPTIONS_BUFFER_SIZE         312
993*/
994
995/* Specifies the size in bytes of the DHCP Client packet payload.
996   The default value is NX_DHCP_MINIMUM_IP_DATAGRAM + physical header size.
997   The physical header size in a wireline network is usually the Ethernet frame
998   size. */
999/*
1000#define NX_DHCP_PACKET_PAYLOAD              (NX_DHCP_MINIMUM_IP_DATAGRAM + NX_PHYSICAL_HEADER)
1001*/
1002
1003/* Specifies the size of the DHCP Client packet pool. The default value is
1004  (5 *NX_DHCP_PACKET_PAYLOAD) which will provide four packets plus room for
1005  internal packet pool overhead. */
1006/*
1007#define NX_DHCP_PACKET_POOL_SIZE            (5 * NX_DHCP_PACKET_PAYLOAD)
1008*/
1009
1010/*****************************************************************************/
1011/****************** Configuration options for DHCP Server ********************/
1012/*****************************************************************************/
1013
1014/* This option specifies the priority of the DHCP Server thread. By default,
1015   this value specifies that the DHCP thread runs at priority 2. */
1016/*
1017#define NX_DHCP_SERVER_THREAD_PRIORITY          2
1018*/
1019
1020/* This is the subnet mask the DHCP Client should be configured with.
1021   The default value is set to 0xFFFFFF00. */
1022/*
1023#define NX_DHCP_SUBNET_MASK                     0xFFFFFF00UL
1024*/
1025
1026/* This is timeout period in timer ticks for the DHCP Server fast timer to check
1027   on session time remaining and handle sessions that have timed out. */
1028/*
1029#define NX_DHCP_FAST_PERIODIC_TIME_INTERVAL     10
1030*/
1031
1032/* This is timeout period in timer ticks for the DHCP Server slow timer to
1033   check on IP address lease time remaining and handle lease that have
1034   timed out. */
1035/*
1036#define NX_DHCP_SLOW_PERIODIC_TIME_INTERVAL   1000
1037*/
1038
1039/* This is IP Address lease time in seconds assigned to the DHCP Client, and
1040   the basis for computing the renewal and rebind times also assigned to the
1041   Client.
1042   The default value is set to (10 * NX_DHCP_SLOW_PERIODIC_TIME_INTERVAL). */
1043/*
1044#define  NX_DHCP_DEFAULT_LEASE_TIME             (10 * NX_DHCP_SLOW_PERIODIC_TIME_INTERVAL)
1045*/
1046
1047/* This is size of the DHCP Server array for holding available IP addresses for
1048   assigning to the Client. The default value is 20. */
1049/*
1050#define NX_DHCP_IP_ADDRESS_MAX_LIST_SIZE        20
1051*/
1052
1053/* This is size of the DHCP Server array for holding Client records.
1054   The default value is 50. */
1055/*
1056#define NX_DHCP_CLIENT_RECORD_TABLE_SIZE        50
1057*/
1058
1059/* This is size of the array in the DHCP Client instance for holding the all
1060   the requested options in the parameter request list in the current session.
1061   The default value is 12. */
1062/*
1063#define NX_DHCP_CLIENT_OPTIONS_MAX              12
1064*/
1065
1066/* This is size of the buffer for holding the Server host name.
1067   The default value is 32. */
1068/*
1069#define NX_DHCP_SERVER_HOSTNAME_MAX             32
1070*/
1071
1072/* This is size of the buffer for holding the Client host name in the current
1073   DHCP Server Client session. The default value is 32. */
1074/*
1075#define NX_DHCP_CLIENT_HOSTNAME_MAX             32
1076*/
1077
1078/* Define the DHCP server thread stack size. */
1079/*
1080#define NX_DHCP_SERVER_THREAD_STACK_SIZE           1024
1081*/
1082
1083/* Define name of DHCP server. */
1084/*
1085#define NX_DHCP_SERVER_NAME       "NetX DHCP Server"
1086*/
1087
1088/*****************************************************************************/
1089/****************** Configuration options for DHCP IPV6 **********************/
1090/*****************************************************************************/
1091
1092/* Time interval in seconds at which the session timer updates the length of
1093   time the Client has been in session communicating with the Server.
1094   By default, this value is 1. */
1095/*
1096#define NX_DHCPV6_SESSION_TIMER_INTERVAL        1
1097*/
1098
1099/* Time out in seconds for allocating a packet from the Client packet pool.
1100   The default value is 3 seconds. */
1101/*
1102#define NX_DHCPV6_PACKET_TIME_OUT               (3 * NX_DHCPV6_TICKS_PER_SECOND)
1103*/
1104
1105/* This defines the type of service for UDP packet transmission from the DHCPv6
1106   Client socket. The default value is NX_IP_NORMAL. */
1107/*
1108#define NX_DHCPV6_TYPE_OF_SERVICE               NX_IP_NORMAL
1109*/
1110
1111/* The number of times a Client packet is forwarded by a network router before
1112   the packet is discarded. The default value is 0x80. */
1113/*
1114#define NX_DHCPV6_TIME_TO_LIVE                  0x80
1115*/
1116
1117/* Specifies the number of packets to keep in the Client UDP socket receive
1118   queue before NetX Duo discards packets. The default value is 5. */
1119/*
1120#define NX_DHCPV6_QUEUE_DEPTH                   5
1121*/
1122
1123/*****************************************************************************/
1124/*************** Configuration options for DHCP Client IPV6 ******************/
1125/*****************************************************************************/
1126
1127/* Priority of the Client thread. By default, this value specifies that the
1128   Client thread runs at priority 2. */
1129/*
1130#define NX_DHCPV6_THREAD_PRIORITY               2
1131*/
1132
1133/* Time out option for obtaining an exclusive lock on a DHCPv6 Client mutex.
1134   The default value is TX_WAIT_FOREVER. */
1135/*
1136#define NX_DHCPV6_MUTEX_WAIT                    TX_WAIT_FOREVER
1137*/
1138
1139/* Time interval in seconds at which the IP lifetime timer updates the length
1140   of time the current IP address has been assigned to the Client.
1141   By default, this value is 1. */
1142/*
1143#define NX_DHCPV6_IP_LIFETIME_TIMER_INTERVAL    1
1144*/
1145
1146/* The maximum number of IA addresses that can be added to the Client record.
1147   The default value is 1. */
1148/*
1149#define NX_DHCPV6_MAX_IA_ADDRESS                1
1150*/
1151
1152/* Number of DNS servers to store to the client record.
1153   The default value is 2. */
1154/*
1155#define NX_DHCPV6_NUM_DNS_SERVERS               2
1156*/
1157
1158/* Number of time servers to store to the client record.
1159   The default value is 1. */
1160/*
1161#define NX_DHCPV6_NUM_TIME_SERVERS              1
1162*/
1163
1164/* Size of the buffer in the Client record to hold the client's network domain
1165   name. The default value is 32. */
1166/*
1167#define NX_DHCPV6_DOMAIN_NAME_BUFFER_SIZE       32
1168*/
1169
1170/* Size of the buffer in the Client record to hold the Client's time zone.
1171   The default value is 16. */
1172/*
1173#define NX_DHCPV6_TIME_ZONE_BUFFER_SIZE         16
1174*/
1175
1176/* Size of the buffer in the Client record to hold the option status message
1177   in a Server reply. The default value is 100 bytes. */
1178/*
1179#define NX_DHCPV6_MAX_MESSAGE_SIZE              100
1180*/
1181
1182/*****************************************************************************/
1183/*************** Configuration options for DHCP Server IPV6 ******************/
1184/*****************************************************************************/
1185
1186/* This defines the size of the DHCPv6 thread stack. By default, the size is
1187   4096 bytes which is more than enough for most NetX Duo applications. */
1188/*
1189#define NX_DHCPV6_SERVER_THREAD_STACK_SIZE      4096
1190*/
1191
1192/* This defines the DHCPv6 Server thread priority. This should be lower than the
1193   DHCPv6 Server's IP thread task priority. The default value is 2. */
1194/*
1195#define NX_DHCPV6_SERVER_THREAD_PRIORITY        2
1196*/
1197
1198/* Timer interval in seconds when the lease timer entry function is called by
1199   the ThreadX scheduler. The entry function sets a flag for the DHCPv6 Server
1200   to increment all Clients' accrued time on their lease by the timer interval.
1201   By default, this value is 60. */
1202/*
1203#define NX_DHCPV6_IP_LEASE_TIMER_INTERVAL       (60)
1204*/
1205
1206/* Create a Server DUID with a vendor assigned ID. Note the DUID type must be
1207   set NX_DHCPV6_DUID_TYPE_VENDOR_ASSIGNED. */
1208/*
1209#define NX_DHCPV6_SERVER_DUID_VENDOR_ASSIGNED_ID    "abcdeffghijklmnopqrstuvwxyz"
1210*/
1211
1212/* Sets the upper limit on the Vendor assigned ID. The default value is 48. */
1213/*
1214#define NX_DHCPV6_SERVER_DUID_VENDOR_ASSIGNED_LENGTH    48
1215*/
1216
1217/* Sets the enterprise type of the DUID to private vendor type. */
1218/*
1219#define NX_DHCPV6_SERVER_DUID_VENDOR_PRIVATE_ID     0x12345678
1220*/
1221
1222/* This defines the preference option value between 0 and 255, where the higher
1223   the value the higher the preference, in the DHCPv6 option of the same name.
1224   This tells the Client what preference to place on this Server's offer where
1225   multiple DHCPv6 Servers are available to assign IP addresses.
1226   A value of 255 instructs the Client to choose this server. A value of zero
1227   indicates the Client is free to choose. The default value is zero. */
1228/*
1229#define NX_DHCPV6_PREFERENCE_VALUE              0
1230*/
1231
1232/* This defines the maximum number of option requests in a Client request that
1233   can be saved to a Client record. The default value is 6. */
1234/*
1235#define NX_DHCPV6_MAX_OPTION_REQUEST_OPTIONS    6
1236*/
1237
1238/* The time in seconds assigned by the Server on a Client address lease for
1239   when the Client should begin renewing its IP address. The default value is
1240   2000 seconds. */
1241/*
1242#define  NX_DHCPV6_DEFAULT_T1_TIME              (2000)
1243*/
1244
1245/* The time in seconds assigned by the Server on a Client address lease for
1246   when the Client should begin rebinding its IP address assuming its attempt
1247   to renew failed. The default value is 3000 seconds. */
1248/*
1249#define  NX_DHCPV6_DEFAULT_T2_TIME              (3000)
1250*/
1251
1252/* This defines the time in seconds assigned bythe Server for when an assigned
1253   Client IP address lease is deprecated.
1254   The default value is 2 NX_DHCPV6_DEFAULT_T1_TIME. */
1255/*
1256#define  NX_DHCPV6_DEFAULT_PREFERRED_TIME       (2 * NX_DHCPV6_DEFAULT_T1_TIME)
1257*/
1258
1259/* This defines the time expiration in seconds assigned by the Server on an
1260   assigned Client IP address lease. After this time expires, the Client IP
1261   address is invalid.
1262   The default value is 2 NX_DHCPV6_DEFAULT_PREFERRED_TIME. */
1263/*
1264#define NX_DHCPV6_DEFAULT_VALID_TIME          (2 * NX_DHCPV6_DEFAULT_PREFERRED_TIME)
1265*/
1266
1267/* Defines the maximum size of the Server message in status option message field.
1268   The default value is 100 bytes. */
1269/*
1270#define NX_DHCPV6_STATUS_MESSAGE_MAX            100
1271*/
1272
1273/* Defines the size of the Server's IP lease table (e.g. the max number of IPv6
1274   address available to lease that can be stored).
1275   By default, this value is 100. */
1276/*
1277#define NX_DHCPV6_MAX_LEASES                    100
1278*/
1279
1280/* Defines the size of the Server's Client record table (e.g. max number of
1281   Clients that can be stored). This value should be less than or equal to the
1282   value NX_DHCPV6_MAX_LEASES.By default, this value is 120. */
1283/*
1284#define NX_DHCPV6_MAX_CLIENTS                   120
1285*/
1286
1287/* This defines the packet payload of the Server packet pool packets.
1288   The default value is 500 bytes. */
1289/*
1290#define NX_DHCPV6_PACKET_SIZE                   500
1291*/
1292
1293/* Defines the Server packet pool size for packets the Server will allocate to
1294   send DHCPv6 messages out.
1295   The default value is (10 * NX_DHCPV6_PACKET_SIZE) */
1296/*
1297#define NX_DHCPV6_PACKET_POOL_SIZE              (10 * NX_DHCPV6_PACKET_SIZE)
1298*/
1299
1300/* This defines the Server socket fragmentation option.
1301   The default value is NX_DONT_FRAGMENT. */
1302/*
1303#define NX_DHCPV6_FRAGMENT_OPTION               NX_DONT_FRAGMENT
1304*/
1305
1306/* Define the session time out in seconds. This is the timer for how long the
1307   server has not received a client response.
1308   The default value is set to 20. */
1309/*
1310#define NX_DHCPV6_SESSION_TIMEOUT               (20)
1311*/
1312
1313/* This defines the status option message for : NX_DHCPV6_STATUS_MESSAGE_SUCCESS.
1314   The default value is "IA OPTION GRANTED". */
1315/*
1316#define NX_DHCPV6_STATUS_MESSAGE_SUCCESS        "IA OPTION GRANTED"
1317*/
1318
1319/* This defines the status option message for : NX_DHCPV6_STATUS_MESSAGE_NO_ADDRS_AVAILABLE.
1320   The default value is "IA OPTION NOT GRANTED-NO ADDRESSES AVAILABLE". */
1321/*
1322#define NX_DHCPV6_STATUS_MESSAGE_NO_ADDRS_AVAILABLE     "IA OPTION NOT GRANTED-NO ADDRESSES AVAILABLE"
1323*/
1324
1325/* This defines the status option message for : NX_DHCPV6_STATUS_MESSAGE_NO_BINDING.
1326   The default value is "IA OPTION NOT GRANTED-INVALID CLIENT REQUEST". */
1327/*
1328#define NX_DHCPV6_STATUS_MESSAGE_NO_BINDING             "IA OPTION NOT GRANTED-INVALID CLIENT REQUEST"
1329*/
1330
1331/* This defines the status option message for : NX_DHCPV6_STATUS_MESSAGE_NOT_ON_LINK.
1332   The default value is "IA OPTION NOT GRANTED-INVALID CLIENT REQUEST". */
1333/*
1334#define NX_DHCPV6_STATUS_MESSAGE_NOT_ON_LINK            "IA OPTION NOT GRANTED-CLIENT NOT ON LINK"
1335*/
1336
1337/* This defines the status option message for : NX_DHCPV6_STATUS_MESSAGE_USE_MULTICAST.
1338   The default value is "IA OPTION NOT GRANTED-CLIENT MUST USE MULTICAST". */
1339/*
1340#define NX_DHCPV6_STATUS_MESSAGE_USE_MULTICAST          "IA OPTION NOT GRANTED-CLIENT MUST USE MULTICAST"
1341*/
1342
1343/*****************************************************************************/
1344/********************* Configuration options for DNS *************************/
1345/*****************************************************************************/
1346
1347/* Type of service required for the DNS UDP requests. By default, this value
1348   is defined as NX_IP_NORMAL for normal IP packet service. */
1349/*
1350#define NX_DNS_TYPE_OF_SERVICE              NX_IP_NORMAL
1351*/
1352
1353/* Specifies the maximum number of routers a packet can pass before it is
1354   discarded. The default value is 0x80. */
1355/*
1356#define NX_DNS_TIME_TO_LIVE                     0x80
1357*/
1358
1359/* Sets the socket property to allow or disallow fragmentation of outgoing
1360   packets. The default value is NX_DONT_FRAGMENT. */
1361/*
1362#define NX_DNS_FRAGMENT_OPTION              NX_DONT_FRAGMENT
1363*/
1364
1365/* Sets the maximum number of packets to store on the socket receive queue.
1366   The default value is 5. */
1367/*
1368#define NX_DNS_QUEUE_DEPTH                      5
1369*/
1370
1371/* Specifies the maximum number of DNS Servers in the Client server list.
1372   The default value is 5. */
1373/*
1374#define NX_DNS_MAX_SERVERS                      5
1375*/
1376
1377/* Specifies the maximum number of DNS Servers in the Client server list.
1378   The default value is 5. */
1379/*
1380#define NX_DNS_MESSAGE_MAX                      512
1381*/
1382
1383/* If not defined, the size of the Client packet payload which includes the
1384   Ethernet, IP (or IPv6), and UDP headers plus the maximum DNS message size
1385   specified by NX_DNS_MESSAGE_MAX. Regardless if defined, the packet payload
1386   is the 4-byte aligned and stored in NX_DNS_PACKET_PAYLOAD.
1387   The default value is (NX_UDP_PACKET + NX_DNS_MESSAGE_MAX). */
1388/*
1389#define NX_DNS_PACKET_PAYLOAD_UNALIGNED         (NX_UDP_PACKET + NX_DNS_MESSAGE_MAX)
1390*/
1391
1392/* Size of the Client packet pool for sending DNS queries if
1393   NX_DNS_CLIENT_USER_CREATE_PACKET_POOL is not defined. The default value is
1394   large enough for 16 packets of payload size defined by NX_DNS_PACKET_PAYLOAD,
1395   and is 4-byte aligned.
1396   The default value is (16 * (NX_DNS_PACKET_PAYLOAD + sizeof(NX_PACKET))). */
1397/*
1398#define NX_DNS_PACKET_POOL_SIZE                 (16 * (NX_DNS_PACKET_PAYLOAD + sizeof(NX_PACKET)))
1399*/
1400
1401/* The maximum number of times the DNS Client will query the current DNS server
1402   before trying another server or aborting the DNS query.
1403   The default value is 3. */
1404/*
1405#define NX_DNS_MAX_RETRIES                      3
1406*/
1407
1408/* If defined and the Client IPv4 gateway address is non zero, the DNS Client
1409   sets the IPv4 gateway as the Client's primary DNS server. The default value
1410   is disabled. */
1411/*
1412#define NX_DNS_IP_GATEWAY_AND_DNS_SERVER
1413*/
1414
1415/* This enables the DNS Client to let the application create and set the DNS
1416   Client packet pool. By default this option is disabled, and the DNS Client
1417   creates its own packet pool in nx_dns_create. */
1418/*
1419#define NX_DNS_CLIENT_USER_CREATE_PACKET_POOL
1420*/
1421
1422/* This enables the DNS Client to clear old DNS messages off the receive queue
1423   before sending a new query. Removing these packets from previous DNS queries
1424   prevents the DNS Client socket queue from overflowing and dropping valid
1425   packets. */
1426/*
1427#define NX_DNS_CLIENT_CLEAR_QUEUE
1428*/
1429
1430/* This enables the DNS Client to query on additional DNS record types in
1431   (e.g. CNAME, NS, MX, SOA, SRV and TXT). */
1432/*
1433#define NX_DNS_ENABLE_EXTENDED_RR_TYPES
1434*/
1435
1436/* This enables the DNS Client to store the answer records into DNS cache. */
1437/*
1438#define NX_DNS_CACHE_ENABLE
1439*/
1440
1441/*****************************************************************************/
1442/********************* Configuration options for MQTT ************************/
1443/*****************************************************************************/
1444
1445/* Defined, MQTT Client is built with TLS support. Defining this symbol
1446   requires NetX Secure TLS module to be installed. NX_SECURE_ENABLE is not
1447   enabled by default. */
1448/*
1449#define NX_SECURE_ENABLE
1450*/
1451
1452/* Defined, application must use TLS to connect to MQTT broker. This feature
1453   requires NX_SECURE_ENABLE defined. By default, this symbol is not
1454   defined. */
1455/*
1456#define NXD_MQTT_REQUIRE_TLS
1457*/
1458
1459/* Defines the time out in the TCP socket disconnect call when disconnecting
1460   from the MQTT server in timer ticks. The default value is NX_WAIT_FOREVER. */
1461/*
1462#define NXD_MQTT_SOCKET_TIMEOUT                 NX_WAIT_FOREVER
1463*/
1464
1465/* Defined, enable MQTT over cloud option. */
1466/*
1467#define NXD_MQTT_CLOUD_ENABLE
1468*/
1469
1470/* Define memcpy function used internal. */
1471/*
1472#define NXD_MQTT_SECURE_MEMCPY                  memcpy
1473*/
1474
1475/* Define memcmp function used internal. */
1476/*
1477#define NXD_MQTT_SECURE_MEMCMP                  memcmp
1478*/
1479
1480/* Define memset function used internal. */
1481/*
1482#define NXD_MQTT_SECURE_MEMSET                  memset
1483*/
1484
1485/* Define memmove function used internal. */
1486/*
1487#define NXD_MQTT_SECURE_MEMMOVE                 memmove
1488*/
1489
1490/* Define the default TCP socket window size. */
1491/*
1492#define NXD_MQTT_CLIENT_SOCKET_WINDOW_SIZE      8192
1493*/
1494
1495/* Define the default MQTT Thread time slice. */
1496/*
1497#define NXD_MQTT_CLIENT_THREAD_TIME_SLICE       2
1498*/
1499
1500/*****************************************************************************/
1501/********************* Configuration options for HTTP ************************/
1502/*****************************************************************************/
1503
1504/* Type of service required for the HTTP TCP requests. By default, this value
1505   is defined as NX_IP_NORMAL to indicate normal IP packet service. */
1506/*
1507#define NX_HTTP_TYPE_OF_SERVICE               NX_IP_NORMAL
1508*/
1509
1510/* Fragment enable for HTTP TCP requests. By default, this value is
1511   NX_DONT_FRAGMENT to disable HTTP TCP fragmenting. */
1512/*
1513#define NX_HTTP_FRAGMENT_OPTION               NX_DONT_FRAGMENT
1514*/
1515
1516/* Specifies the number of bytes allowed in a client supplied resource name.
1517   The default value is set to 40. */
1518/*
1519#define NX_HTTP_MAX_RESOURCE                  40
1520*/
1521
1522/* Specifies the number of bytes allowed in a client supplied username.
1523   The default value is set to 20. */
1524/*
1525#define NX_HTTP_MAX_NAME                      20
1526*/
1527
1528/* Specifies the number of bytes allowed in a client supplied password.
1529   The default value is set to 20. */
1530/*
1531#define NX_HTTP_MAX_PASSWORD                  20
1532*/
1533
1534/*****************************************************************************/
1535/***************** Configuration options for HTTP Client *********************/
1536/*****************************************************************************/
1537
1538/* Specifies the minimum size of the packets in the pool specified at Client
1539   creation. The minimum size is needed to ensure the complete HTTP header can
1540   be contained in one packet. The default value is set to 600. */
1541/*
1542#define NX_HTTP_CLIENT_MIN_PACKET_SIZE        600
1543*/
1544
1545/*****************************************************************************/
1546/***************** Configuration options for HTTP Server *********************/
1547/*****************************************************************************/
1548
1549/* The number of timer ticks the Server thread is allowed to run before yielding
1550   to threads of the same priority. The default value is 2. */
1551/*
1552#define NX_HTTP_SERVER_THREAD_TIME_SLICE      2
1553*/
1554
1555/* Specifies the maximum size of the HTTP header field. The default value is 256. */
1556/*
1557#define NX_HTTP_MAX_HEADER_FIELD              256
1558*/
1559
1560/* If defined, enables HTTP Server to support multipart HTTP requests. */
1561/*
1562#define NX_HTTP_MULTIPART_ENABLE
1563*/
1564
1565/* Specifies the number of connections that can be queued for the HTTP Server.
1566   The default value is set to 5. */
1567/*
1568#define NX_HTTP_SERVER_MAX_PENDING            5
1569*/
1570
1571/* This specifies the maximum number of packets that can be enqueued on the
1572   Server socket retransmission queue. If the number of packets enqueued
1573   reaches this number, no more packets can be sent until one or more enqueued
1574   packets are released. The default value is set to 20. */
1575/*
1576#define NX_HTTP_SERVER_TRANSMIT_QUEUE_DEPTH   20
1577*/
1578
1579/* Specifies the minimum size of the packets in the pool specified at Server
1580   creation. The minimum size is needed to ensure the complete HTTP header can
1581   be contained in one packet. The default value is set to 600. */
1582/*
1583#define NX_HTTP_SERVER_MIN_PACKET_SIZE        600
1584*/
1585
1586/* Set the Server socket retransmission timeout in seconds.
1587   The default value is set to 2. */
1588/*
1589#define NX_HTTP_SERVER_RETRY_SECONDS          2
1590*/
1591
1592/* This value is used to set the next retransmission timeout. The current
1593   timeout is multiplied by the number of retransmissions thus far, shifted
1594   by the value of the socket timeout shift. The default value is set to 1 for
1595   doubling the timeout. */
1596/*
1597#define NX_HTTP_SERVER_RETRY_SHIFT            1
1598*/
1599
1600/* This sets the maximum number of retransmissions on Server socket.
1601   The default value is set to 10. */
1602/*
1603#define NX_HTTP_SERVER_RETRY_MAX              10
1604*/
1605
1606/* The priority of the HTTP Server thread. By default, this value is defined
1607   as 16 to specify priority 16. */
1608/*
1609#define NX_HTTP_SERVER_PRIORITY               16
1610*/
1611
1612/* Server socket window size. By default, this value is 2048 bytes */
1613/*
1614#define NX_HTTP_SERVER_WINDOW_SIZE            2048
1615*/
1616
1617/*****************************************************************************/
1618/***************** Configuration options for AUTO_IP *************************/
1619/*****************************************************************************/
1620
1621/* This option enables printing a debugging trace using printf.*/
1622/*
1623#define NX_AUTO_IP_DEBUG
1624*/
1625
1626/* The number of seconds to wait before sending first probe.
1627   By default, this value is defined as 1.*/
1628/*
1629#define NX_AUTO_IP_PROBE_WAIT         1
1630*/
1631
1632/* The number of ARP probes to send.
1633   By default, this value is defined as 3.*/
1634/*
1635#define NX_AUTO_IP_PROBE_NUM         3
1636*/
1637
1638/* The minimum number of seconds to wait between sending probes.
1639   By default, this value is defined as 1.*/
1640/*
1641#define NX_AUTO_IP_PROBE_MIN         1
1642*/
1643
1644/* The maximum number of seconds to wait between sending probes.
1645   By default, this value is defined as 2.*/
1646/*
1647#define NX_AUTO_IP_PROBE_MAX         2
1648*/
1649
1650/* The number of AutoIP conflicts before increasing processing delays.
1651   By default, this value is defined as 10.*/
1652/*
1653#define NX_AUTO_IP_MAX_CONFLICTS         10
1654*/
1655
1656/* The number of seconds to extend the wait period when the total
1657   number of conflicts is exceeded. By default, this value is defined as 60.*/
1658/*
1659#define NX_AUTO_IP_RATE_LIMIT_INTERVAL         60
1660*/
1661
1662/* The number of seconds to wait before sending announcement.
1663   By default, this value is defined as 2.*/
1664/*
1665#define NX_AUTO_IP_ANNOUNCE_WAIT         2
1666*/
1667
1668/* The number of ARP announces to send.
1669   By default, this value is defined as 2.*/
1670/*
1671#define NX_AUTO_IP_ANNOUNCE_NUM         2
1672*/
1673
1674/* The number of seconds to wait between sending announces.
1675   By default, this value is defined as 2.*/
1676/*
1677#define NX_AUTO_IP_ANNOUNCE_INTERVAL         2
1678*/
1679
1680/* The number of seconds to wait between defense announces.
1681   By default, this value is defined as 10.*/
1682/*
1683#define NX_AUTO_IP_DEFEND_INTERVAL         10
1684*/
1685
1686/*****************************************************************************/
1687/************** Configuration options for mDNS *******************************/
1688/*****************************************************************************/
1689
1690/* Disables the mDNS/DNS-SD server functionality. Without the server functionality,
1691   the mDNS/DNS-SD module does not announce services provided by local host,
1692   nor does it respond to mDNS enquiries. This symbol is not defined by default.*/
1693/*
1694#define NX_MDNS_DISABLE_SERVER
1695*/
1696
1697/* Maximum IPv6 addresses count of host. The default value is 2.*/
1698/*
1699#define NX_MDNS_IPV6_ADDRESS_COUNT        2
1700*/
1701
1702/* Maximum string size for host name. The default value is 64.
1703   Does not include the NULL terminator.*/
1704/*
1705#define NX_MDNS_HOST_NAME_MAX        64
1706*/
1707
1708/* Maximum string size for service name. The default value is 64.
1709   Does not include the NULL terminator.*/
1710/*
1711#define NX_MDNS_SERVICE_NAME_MAX        64
1712*/
1713
1714/* Maximum string size for domain name. The default value is 16.
1715   Does not include the NULL terminator.*/
1716/*
1717#define NX_MDNS_DOMAIN_NAME_MAX        16
1718*/
1719
1720/* Maximum conflict count for host name or service name.
1721   The default value is 8.*/
1722/*
1723#define NX_MDNS_CONFLICT_COUNT        8
1724*/
1725
1726/* Define UDP socket create options.*/
1727/*
1728#define NX_MDNS_UDP_TYPE_OF_SERVICE        NX_IP_NORMAL
1729*/
1730
1731/* TTL value for resource records with host name, in second.
1732   The default value is 120 for 120s.*/
1733/*
1734#define NX_MDNS_RR_TTL_HOST        120
1735*/
1736
1737/* TTL value for other resource records, in second.
1738   The default value is 4500 for 75 minutes.*/
1739/*
1740#define NX_MDNS_RR_TTL_OTHER        4500
1741*/
1742
1743/* The time interval, in ticks, between mDNS probing messages.
1744   The default value is 25 ticks for 250ms.*/
1745/*
1746#define NX_MDNS_PROBING_TIMER_COUNT        25
1747*/
1748
1749/* The time interval, in ticks, between mDNS announcement messages.
1750   The default value is 25 ticks for 250ms.*/
1751/*
1752#define NX_MDNS_ANNOUNCING_TIMER_COUNT        25
1753*/
1754
1755/* The time interval, in ticks, between repeated "goodbye" messages.
1756   The default value is 25 ticks for 250ms.*/
1757/*
1758#define NX_MDNS_GOODBYE_TIMER_COUNT        25
1759*/
1760
1761/* The minimum delay for sending first query, in ticks.
1762   The default value is 2 ticks for 20ms.*/
1763/*
1764#define NX_MDNS_QUERY_DELAY_MIN        2
1765*/
1766
1767/* The delay range for sending first query, in ticks.
1768   The default value is 10 ticks for 100ms.*/
1769/*
1770#define NX_MDNS_QUERY_DELAY_RANGE        10
1771*/
1772
1773/* The delay, in ticks, in responding to a query to a service that is
1774   unique to the local network. The default value is 1 tick for 10ms.*/
1775/*
1776#define NX_MDNS_RESPONSE_UNIQUE_DELAY        1
1777*/
1778
1779/* The minimum delay, in ticks, in responding to a query to a shared resource.
1780   The default value is 2 ticks for 20ms.*/
1781/*
1782#define NX_MDNS_RESPONSE_SHARED_DELAY_MIN        2
1783*/
1784
1785/* The delay range, in ticks, in responding to a query to a shared resource.
1786   The default value is 10 ticks for 100ms.*/
1787/*
1788#define NX_MDNS_RESPONSE_SHARED_DELAY_RANGE        10
1789*/
1790
1791/* The minimum delay, in ticks, in responding to a query with TC bit.
1792   The default value is 40 ticks for 400ms.*/
1793/*
1794#define NX_MDNS_RESPONSE_TC_DELAY_MIN        40
1795*/
1796
1797/* The delay range, in ticks, in responding to a query with TC bit.
1798   The default value is 10 ticks for 100ms.*/
1799/*
1800#define NX_MDNS_RESPONSE_TC_DELAY_RANGE        10
1801*/
1802
1803/* When sending out mDNS responses, the packet contains responses that
1804   otherwise would be sent within this timer counter range.
1805   The timer count range is expressed in ticks. The default value is 12 for
1806   120ms.This value allows a response to include messages that would be sent
1807   within the next 120ms range if each tick is 10ms.*/
1808/*
1809#define NX_MDNS_TIMER_COUNT_RANGE        12
1810*/
1811
1812/* The number of retransmitted probing messages. The default value is 3.*/
1813/*
1814#define NX_MDNS_PROBING_RETRANSMIT_COUNT        3
1815*/
1816
1817/* The number of retransmitted "goodbye" messages. The default value is 1.*/
1818/*
1819#define NX_MDNS_GOODBYE_RETRANSMIT_COUNT        1
1820*/
1821
1822/* The number of queries that no multicast response,
1823   then the host may take this as an indication that
1824   the record may no longer be valid. The default value is 2.*/
1825/*
1826#define NX_MDNS_POOF_MIN_COUNT        2
1827*/
1828
1829/* Disable the mDNS Client functionality.  By default, mDNS client function is enabled. */
1830/*
1831#define NX_MDNS_DISABLE_CLIENT
1832*/
1833
1834/*****************************************************************************/
1835/******************** Configuration options for PPP **************************/
1836/*****************************************************************************/
1837
1838/* If defined, PPP can transmit packet over Ethernet.*/
1839/*
1840#define NX_PPP_PPPOE_ENABLE
1841*/
1842
1843/* If defined, internal PPP information gathering is disabled.*/
1844/*
1845#define NX_PPP_DISABLE_INFO
1846*/
1847
1848/* If defined, internal PPP debug log is enabled.*/
1849/*
1850#define NX_PPP_DEBUG_LOG_ENABLE
1851*/
1852
1853/* If defined, internal PPP debug log printf to stdio is enabled.
1854   This is only valid if the debug log is also enabled.*/
1855/*
1856#define NX_PPP_DEBUG_LOG_PRINT_ENABLE
1857*/
1858
1859/* If defined, internal PPP CHAP logic is removed, including the MD5 digest logic.*/
1860/*
1861#define NX_PPP_DISABLE_CHAP
1862*/
1863
1864/* If defined, internal PPP PAP logic is removed.*/
1865/*
1866#define NX_PPP_DISABLE_PAP
1867*/
1868
1869/* If defined, the primary DNS Server Option is disabled in
1870   the IPCP response. By default this option is not defined.*/
1871/*
1872#define NX_PPP_DNS_OPTION_DISABLE
1873*/
1874
1875/* This specifies how many times the PPP host will request
1876  a DNS Server address from the peer in the IPCP state.
1877  This has no effect if NX_PPP_DNS_OPTION_DISABLE is defined.
1878  The default value is 2.*/
1879/*
1880#define NX_PPP_DNS_ADDRESS_MAX_RETRIES       2
1881*/
1882
1883/* Time-slice option for PPP threads.
1884   By default, this value is TX_NO_TIME_SLICE.
1885   This define can be set by the application prior
1886   to inclusion of nx_ppp.h.By default, it is TX_NO_TIME_SLICE.*/
1887/*
1888#define NX_PPP_THREAD_TIME_SLICE       TX_NO_TIME_SLICE
1889*/
1890
1891/* Specifies the Maximum Receive Unit (MRU) for PPP.
1892   By default, this value is 1,500 bytes (the minimum value).
1893   This define can be set by the application prior to inclusion of nx_ppp.h.*/
1894/*
1895#define NX_PPP_MRU       1480
1896*/
1897
1898/* Specifies the Maximum Receive Unit (MRU) for PPP.
1899   By default, this value is 1,500 bytes (the minimum value).
1900   This define can be set by the application prior to inclusion of nx_ppp.h.*/
1901/*
1902#define NX_PPP_MINIMUM_MRU       1480
1903*/
1904
1905/* Specifies the size of the receive character serial buffer.
1906   By default, this value is 3,000 bytes.
1907   This define can be set by the application prior to inclusion of nx_ppp.h.
1908   By default, it is NX_PPP_MRU*2.*/
1909/*
1910#define NX_PPP_SERIAL_BUFFER_SIZE       2960
1911*/
1912
1913/* Specifies the size of "name" strings used in authentication.
1914   The default value is set to 32bytes,
1915   but can be redefined prior to inclusion of *nx_ppp.h.*/
1916/*
1917#define NX_PPP_NAME_SIZE       32
1918*/
1919
1920/* Specifies the size of "password" strings used in authentication.
1921   The default value is set to 32bytes,
1922   but can be redefined prior to inclusion of *nx_ppp.h.*/
1923/*
1924#define NX_PPP_PASSWORD_SIZE       32
1925*/
1926
1927/* Specifies the size of "value" strings used in CHAP authentication.
1928   The default value is set to 32bytes,
1929   but can be redefined prior to inclusion of nx_ppp.h.*/
1930/*
1931#define NX_PPP_VALUE_SIZE       32
1932*/
1933
1934/* Specifies the size of "hashed value" strings used in CHAP authentication.
1935   The default value is set to 16 bytes, but can be redefined prior
1936   to inclusion of nx_ppp.h.*/
1937/*
1938#define NX_PPP_HASHED_VALUE_SIZE       16
1939*/
1940
1941/* This defines the number of times the PPP thread task times out
1942   waiting to receive the next character in a PPP message stream.
1943   Thereafter, PPP releases the packet and begins waiting to
1944   receive the next PPP message. The default value is 4. */
1945/*
1946#define NX_PPP_RECEIVE_TIMEOUTS       4
1947*/
1948
1949/* This defines the wait option (in seconds) for the PPP task to
1950   receive a response to a PPP protocol request message. The default value is 4 seconds. */
1951/*
1952#define NX_PPP_PROTOCOL_TIMEOUT       4
1953*/
1954
1955/* Size of debug log (number of entries in the debug log).
1956   On reaching the last entry, the debug capture wraps
1957   to the first entry and overwrites any data previously captured.
1958   The default value is 50. */
1959/*
1960#define NX_PPP_DEBUG_LOG_SIZE       50
1961*/
1962
1963/* Maximum amount of data captured from a received packet
1964   payload and saved to debug output. The default value is 50.*/
1965/*
1966#define NX_PPP_DEBUG_FRAME_SIZE       50
1967*/
1968
1969/* This defines the max number of retries if the PPP times out before sending
1970   another LCP configure request message. When this number is reached the
1971   PPP handshake is aborted and the link status is down. The default value is 20. */
1972/*
1973#define NX_PPP_MAX_LCP_PROTOCOL_RETRIES       20
1974*/
1975
1976/* This defines the max number of retries if the PPP times out
1977   before sending another PAP authentication request message.
1978   When this number is reached the PPP handshake is aborted and the
1979   link status is down. The default value is 20.*/
1980/*
1981#define NX_PPP_MAX_PAP_PROTOCOL_RETRIES       20
1982*/
1983
1984/* This defines the max number of retries if the PPP times out
1985   before sending another CHAP challenge message. When this number
1986   is reached the PPP handshake is aborted and the link status is down.
1987   The default value is 20.*/
1988/*
1989#define NX_PPP_MAX_CHAP_PROTOCOL_RETRIES       20
1990*/
1991
1992/* Define the packet header.*/
1993/*
1994#define NX_PPP_PACKET        22
1995*/
1996
1997/* Define the minimum PPP packet payload, the PPP commands
1998  (LCP, PAP, CHAP, IPCP) should be in one packet.
1999   The default value is (NX_PPP_PACKET + 128).*/
2000/*
2001#define NX_PPP_MIN_PACKET_PAYLOAD        (NX_PPP_PACKET + 128)
2002*/
2003
2004/* Size of the NAK list.*/
2005/*
2006#define NX_PPP_OPTION_MESSAGE_LENGTH        64
2007*/
2008
2009/*****************************************************************************/
2010/******************** Configuration options for SNTP *************************/
2011/*****************************************************************************/
2012
2013/* This option sets the size of the Client thread stack. The default NetX Duo
2014   SNTP Client size is 2048. */
2015/*
2016#define NX_SNTP_CLIENT_THREAD_STACK_SIZE        2048
2017*/
2018
2019/* This option sets the time slice of the scheduler allows for Client thread
2020   execution. The default NetX Duo SNTP Client size is TX_NO_TIME_SLICE. */
2021/*
2022#define NX_SNTP_CLIENT_THREAD_TIME_SLICE        TX_NO_TIME_SLICE
2023*/
2024
2025/* This option sets the Client thread priority.
2026   The NetX Duo SNTP Client default value is 2. */
2027/*
2028#define NX_SNTP_CLIENT_THREAD_PRIORITY          2
2029*/
2030
2031/* This option sets the sets the level of priority at which the Client thread
2032   allows preemption. The default NetX Duo SNTP Client value is set to
2033   NX_SNTP_CLIENT_ THREAD_PRIORITY.  */
2034/*
2035#define NX_SNTP_CLIENT_PREEMPTION_THRESHOLD     NX_SNTP_CLIENT_THREAD_PRIORITY
2036*/
2037
2038/* This option sets the UDP socket name. The NetX Duo SNTP Client UDP socket
2039   name default is "SNTP Client socket". */
2040/*
2041#define NX_SNTP_CLIENT_UDP_SOCKET_NAME          "SNTP Client socket"
2042*/
2043
2044/* This sets the port which the Client socket is bound to. The default NetX
2045   Duo SNTP Client port is 123.  */
2046/*
2047#define NX_SNTP_CLIENT_UDP_PORT                 123
2048*/
2049
2050/* This is port which the Client sends SNTP messages to the SNTP Server on.
2051   The default NetX SNTP Server port is 123. */
2052/*
2053#define NX_SNTP_SERVER_UDP_PORT                 123
2054*/
2055
2056/* Specifies the number of routers a Client packet can pass before it is
2057   discarded. The default NetX Duo SNTP Client is set to 0x80
2058   (NX_IP_TIME_TO_LIVE). */
2059/*
2060#define NX_SNTP_CLIENT_TIME_TO_LIVE             NX_IP_TIME_TO_LIVE
2061*/
2062
2063/* Maximum number of UDP packets (datagrams) that can be queued in the NetX
2064   Duo SNTP Client socket. Additional packets received mean the oldest packets
2065   are released. The default NetX Duo SNTP Client is set to 5. */
2066/*
2067#define NX_SNTP_CLIENT_MAX_QUEUE_DEPTH          5
2068*/
2069
2070/* SNTP version used by the Client The NetX Duo SNTP Client API was based on
2071   Version 4. The default value is 3. */
2072/*
2073#define NX_SNTP_CLIENT_NTP_VERSION              3
2074*/
2075
2076/* Oldest SNTP version the Client will be able to work with. The NetX Duo SNTP
2077   Client default is Version 3. */
2078/*
2079#define NX_SNTP_CLIENT_MIN_NTP_VERSION          3
2080*/
2081
2082/* The lowest level (highest numeric stratum level) SNTP Server stratum the
2083   Client will accept. The NetX Duo SNTP Client default is 2. */
2084/*
2085#define NX_SNTP_CLIENT_MIN_SERVER_STRATUM       2
2086*/
2087
2088/* The minimum time adjustment in milliseconds the Client will make to its
2089   local clock time. Time adjustments below this will be ignored. The NetX
2090   Duo SNTP Client default is 10. */
2091/*
2092#define NX_SNTP_CLIENT_MIN_TIME_ADJUSTMENT      10
2093*/
2094
2095/* The maximum time adjustment in milliseconds the Client will make to its local
2096   clock time. For time adjustments above this amount, the local clock adjustment
2097   is limited to the maximum time adjustment. The NetX Duo SNTP Client default
2098   is 180000 (3 minutes). */
2099/*
2100#define NX_SNTP_CLIENT_MAX_TIME_ADJUSTMENT      180000
2101*/
2102
2103/* This enables the maximum time adjustment to be waived when the Client
2104   receives the first update from its time server. Thereafter, the maximum
2105   time adjustment is enforced. The intention is to get the Client in synch
2106   with the server clock as soon as possible. The NetX Duo SNTP Client default
2107   is NX_TRUE. */
2108/*
2109#define NX_SNTP_CLIENT_IGNORE_MAX_ADJUST_STARTUP    NX_TRUE
2110*/
2111
2112/* This determines if the SNTP Client in unicast mode should send its first SNTP
2113   request with the current SNTP server after a random wait interval. It is used
2114   in cases where significant numbers of SNTP Clients are starting up
2115   simultaneously to limit traffic congestion on the SNTP Server. The default
2116   value is NX_FALSE. */
2117/*
2118#define NX_SNTP_CLIENT_RANDOMIZE_ON_STARTUP     NX_FALSE
2119*/
2120
2121/* Maximum allowable amount of time (seconds) elapsed without a valid time
2122   update received by the SNTP Client. The SNTP Client will continue in
2123   operation but the SNTP Server status is set to NX_FALSE. The default
2124   value is 7200. */
2125/*
2126#define NX_SNTP_CLIENT_MAX_TIME_LAPSE           7200
2127*/
2128
2129/* The interval (seconds) at which the SNTP Client timer updates the SNTP Client
2130   time remaining since the last valid update received, and the unicast Client
2131   updates the poll interval time remaining before sending the next SNTP
2132   update request. The default value is 1. */
2133/*
2134#define NX_SNTP_UPDATE_TIMEOUT_INTERVAL         1
2135*/
2136
2137/* The time interval during which the SNTP Client task sleeps. This allows the
2138   application API calls to be executed by the SNTP Client. The default value
2139   is 1 timer tick. */
2140/*
2141#define NX_SNTP_CLIENT_SLEEP_INTERVAL           1
2142*/
2143
2144/* The starting poll interval (seconds) on which the Client sends a unicast
2145   request to its SNTP server. The NetX Duo SNTP Client default is 3600. */
2146/*
2147#define NX_SNTP_CLIENT_UNICAST_POLL_INTERVAL    3600
2148*/
2149
2150/* The factor by which the current Client unicast poll interval is increased.
2151   When the Client fails to receive a server time update, or receiving
2152   indications from the server that it is temporarily unavailable
2153   (e.g. not synchronized yet) for time update service, it will increase the
2154   current poll interval by this rate up to but not exceeding
2155   NX_SNTP_CLIENT_MAX_TIME_LAPSE. The default is 2. */
2156/*
2157#define NX_SNTP_CLIENT_EXP_BACKOFF_RATE         2
2158*/
2159
2160/* This option if enabled requires that the SNTP Client calculate round trip
2161   time of SNTP messages when applying Server updates to the local clock.
2162   The default value is NX_FALSE (disabled). */
2163/*
2164#define NX_SNTP_CLIENT_RTT_REQUIRED             NX_FALSE
2165*/
2166
2167/* The maximum server clock dispersion (microseconds), which is a measure of
2168   server clock precision, the Client will accept. To disable this requirement,
2169   set the maximum root dispersion to 0x0. The NetX Duo SNTP Client default is
2170   set to 50000. */
2171/*
2172#define NX_SNTP_CLIENT_MAX_ROOT_DISPERSION      50000
2173*/
2174
2175/* The limit on the number of consecutive invalid updates received from the
2176   Client server in either broadcast or unicast mode. When this limit is
2177   reached, the Client sets the current SNTP Server status to invalid (NX_FALSE)
2178   although it will continue to try to receive updates from the Server.
2179   The NetX Duo SNTP Client default is 3. */
2180/*
2181#define NX_SNTP_CLIENT_INVALID_UPDATE_LIMIT     3
2182*/
2183
2184/* To display date in year/month/date format, set this value to equal or less
2185   than current year (need not be same year as in NTP time being evaluated).
2186   The default value is 2015. */
2187/*
2188#define NX_SNTP_CURRENT_YEAR                    2015
2189*/
2190
2191/* This is the number of seconds into the first NTP Epoch on the master NTP
2192   clock. It is defined as 0xBA368E80. To disable display of NTP seconds into
2193   date and time, set to zero. */
2194/*
2195#define NTP_SECONDS_AT_01011999                 0xBA368E80
2196*/
2197
2198/*****************************************************************************/
2199/****************** Configuration options for WEB HTTP ***********************/
2200/*****************************************************************************/
2201
2202/* Type of service required for the HTTPS TCP requests. By default, this value
2203   is defined as NX_IP_NORMAL to indicate normal IP packet service. */
2204/*
2205#define NX_WEB_HTTP_TYPE_OF_SERVICE             NX_IP_NORMAL
2206*/
2207
2208/* Fragment enable for HTTP TCP requests. By default, this value is
2209   NX_DONT_FRAGMENT to disable HTTP TCP fragmenting. */
2210/*
2211#define NX_WEB_HTTP_FRAGMENT_OPTION             NX_DONT_FRAGMENT
2212*/
2213
2214/* Specifies the number of routers this packet can pass before it is discarded.
2215   The default value is set to 0x80. */
2216/*
2217#define NX_WEB_HTTP_TIME_TO_LIVE                0x80
2218*/
2219
2220/* Specifies the number of bytes allowed in a client supplied resource name.
2221   The default value is set to 40. */
2222/*
2223#define NX_WEB_HTTP_MAX_RESOURCE                40
2224*/
2225
2226/* Specifies the number of bytes allowed in a client supplied username.
2227   The default value is set to 20. */
2228/*
2229#define NX_WEB_HTTP_MAX_NAME                    20
2230*/
2231
2232/* Specifies the number of bytes allowed in a client supplied password.
2233   The default value is set to 20. */
2234/*
2235#define NX_WEB_HTTP_MAX_PASSWORD                20
2236*/
2237
2238/* If defined, this macro enables TLS and HTTPS. Leave undefined to free up
2239   resources if only plain-text HTTP is desired. By default, this macro is not
2240   defined. */
2241/*
2242#define NX_WEB_HTTPS_ENABLE
2243*/
2244
2245/* If defined, authentication using the MD5 digest is enabled on the HTTPS
2246   Server. By default it is not defined. */
2247/*
2248#define NX_WEB_HTTP_DIGEST_ENABLE
2249*/
2250
2251/* Specifies the maximum size of the HTTP header field.
2252   The default value is 256. */
2253/*
2254#define NX_WEB_HTTP_MAX_HEADER_FIELD            256
2255*/
2256
2257/* Defined, this option provides a stub for FileX dependencies. The HTTPS Client
2258   will function without any change if this option is defined. The HTTPS Server
2259   will need to either be modified or the user will have to create a handful of
2260   FileX services in order to function properly. */
2261/*
2262#define NX_WEB_HTTP_NO_FILEX
2263*/
2264
2265/* The priority of the HTTPS Server thread. By default, this value is defined
2266   as 4 to specify priority 4. */
2267/*
2268#define NX_WEB_HTTP_SERVER_PRIORITY             4
2269*/
2270
2271/* Server socket window size. By default, this value is 8192. */
2272/*
2273#define NX_WEB_HTTP_SERVER_WINDOW_SIZE          8192
2274*/
2275
2276/* Specifies the number of simultaneous sessions for an HTTP or HTTPS Server.
2277   A TCP socket and a TLS session (if HTTPS is enabled) are allocated for each
2278   session. The default value is set to 2. */
2279/*
2280#define NX_WEB_HTTP_SERVER_SESSION_MAX          2
2281*/
2282
2283/* Specifies the number of connections that can be queued for the HTTPS Server.
2284   The default value is set to twice the maximum number of server sessions
2285   ((NX_WEB_HTTP_SERVER_SESSION_MAX << 1). */
2286/*
2287#define NX_WEB_HTTP_SERVER_MAX_PENDING          (NX_WEB_HTTP_SERVER_SESSION_MAX << 1)
2288*/
2289
2290/* The number of timer ticks the Server thread is allowed to run before yielding
2291   to threads of the same priority. The default value is 2. */
2292/*
2293#define NX_WEB_HTTP_SERVER_THREAD_TIME_SLICE    2
2294*/
2295
2296/* Specifies the minimum size of the packets in the pool specified at server
2297   creation. The minimum size is needed to ensure the complete HTTP header can
2298   be contained in one packet. The default value is set to 600. */
2299/*
2300#define NX_WEB_HTTP_SERVER_MIN_PACKET_SIZE      600
2301*/
2302
2303/* Set the Server socket retransmission timeout in seconds. The default value
2304   is set to 2.*/
2305/*
2306#define NX_WEB_HTTP_SERVER_RETRY_SECONDS        2
2307*/
2308
2309/* This specifies the maximum number of packets that can be enqueued on the
2310   Server socket retransmission queue. If the number of packets enqueued
2311   reaches this number, no more packets can be sent until one or more enqueued
2312   packets are released. */
2313/*
2314#define NX_WEB_HTTP_SERVER_TRANSMIT_QUEUE_DEPTH   20
2315*/
2316
2317/* This value is used to set the next retransmission timeout. The current
2318   timeout is multiplied by the number of retransmissions thus far, shifted
2319   by the value of the socket timeout shift. */
2320/*
2321#define NX_WEB_HTTP_SERVER_RETRY_SHIFT          1
2322*/
2323
2324/* If defined, enables HTTPS Server to support multipart HTTP requests. */
2325/*
2326#define NX_WEB_HTTP_MULTIPART_ENABLE
2327*/
2328
2329/* This sets the maximum number of retransmissions on Server socket. The default
2330   value is set to 10. */
2331/*
2332#define NX_WEB_HTTP_SERVER_RETRY_MAX            10
2333*/
2334
2335/* Defined, the TCP/IP offload feature is enabled.
2336   NX_ENABLE_INTERFACE_CAPABILITY must be defined to enable this feature.  */
2337/* #define NX_ENABLE_TCPIP_OFFLOAD */
2338
2339/* Defined, the VLAN feature is enabled.
2340   Note: Require driver support to use APIs from this file.
2341         A quick check in driver is to search for
2342         NX_LINK_RAW_PACKET_SEND. VLAN APIs are not supported if not found. */
2343
2344/* #define NX_ENABLE_VLAN */
2345
2346#ifdef NX_DISABLE_IPV6
2347#ifdef NX_DISABLE_IPV4
2348#error "At least one of the IPv4 or IPv6 protocols must be enabled"
2349#endif
2350#endif
2351
2352/* USER CODE BEGIN 2 */
2353
2354/* USER CODE END 2 */
2355
2356#endif /* NX_USER_H */
Note: See TracBrowser for help on using the repository browser.