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 /**   System Management (System)                                          */
19 /**                                                                       */
20 /**************************************************************************/
21 /**************************************************************************/
22 
23 
24 /**************************************************************************/
25 /*                                                                        */
26 /*  COMPONENT DEFINITION                                   RELEASE        */
27 /*                                                                        */
28 /*    nx_system.h                                         PORTABLE C      */
29 /*                                                           6.1          */
30 /*  AUTHOR                                                                */
31 /*                                                                        */
32 /*    Yuxin Zhou, Microsoft Corporation                                   */
33 /*                                                                        */
34 /*  DESCRIPTION                                                           */
35 /*                                                                        */
36 /*    This file defines the NetX system management component,             */
37 /*    including all data types and external references.  It is assumed    */
38 /*    that nx_api.h and nx_port.h have already been included.             */
39 /*                                                                        */
40 /*  RELEASE HISTORY                                                       */
41 /*                                                                        */
42 /*    DATE              NAME                      DESCRIPTION             */
43 /*                                                                        */
44 /*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
45 /*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
46 /*                                            resulting in version 6.1    */
47 /*                                                                        */
48 /**************************************************************************/
49 
50 #ifndef NX_SYS_H
51 #define NX_SYS_H
52 
53 
54 
55 /* Define system management function prototypes.  */
56 
57 VOID _nx_system_initialize(VOID);
58 
59 
60 /* Define error checking shells for API services.  These are only referenced by the
61    application.  */
62 
63 /* System management component data declarations follow.  */
64 
65 /* Determine if the initialization function of this component is including
66    this file.  If so, make the data definitions really happen.  Otherwise,
67    make them extern so other functions in the component can access them.  */
68 
69 /*lint -e767 suppress different definitions.  */
70 #ifdef NX_SYSTEM_INIT
71 #define SYSTEM_DECLARE
72 #else
73 #define SYSTEM_DECLARE extern
74 #endif
75 /*lint +e767 enable checking for different definitions.  */
76 
77 
78 /* Define the global NetX build options variables. These variables contain a bit
79    map representing how the NetX library was built. The following are the bit
80    field definitions:
81 
82     _nx_system_build_options_1:
83 
84                     Bit(s)                   Meaning
85 
86                     31                  NX_LITTLE_ENDIAN
87                     30                  NX_DISABLE_ARP_AUTO_ENTRY
88                     29                  NX_ENABLE_TCP_KEEPALIVE
89                     28                  NX_TCP_IMMEDIATE_ACK
90                     27                  NX_DRIVER_DEFERRED_PROCESSING
91                     26                  NX_DISABLE_FRAGMENTATION
92                     25                  NX_DISABLE_IP_RX_CHECKSUM
93                     24                  NX_DISABLE_IP_TX_CHECKSUM
94                     23                  NX_DISABLE_TCP_RX_CHECKSUM
95                     22                  NX_DISABLE_TCP_TX_CHECKSUM
96                     21                  NX_DISABLE_RESET_DISCONNECT
97                     20                  NX_DISABLE_RX_SIZE_CHECKING
98                     19                  NX_DISABLE_ARP_INFO
99                     18                  NX_DISABLE_IP_INFO
100                     17                  NX_DISABLE_ICMP_INFO
101                     16                  NX_DISABLE_IGMP_INFO
102                     15                  NX_DISABLE_PACKET_INFO
103                     14                  NX_DISABLE_RARP_INFO
104                     13                  NX_DISABLE_TCP_INFO
105                     12                  NX_DISABLE_UDP_INFO
106                     3-0                 NX_TCP_RETRY_SHIFT
107 
108     _nx_system_build_options_2:
109 
110                     Bit(s)                   Meaning
111 
112                     31-16               NX_IP_PERIODIC_RATE
113                     15-8                NX_ARP_EXPIRATION_RATE
114                     7-0                 NX_ARP_UPDATE_RATE
115 
116     _nx_system_build_options_3:
117 
118                     Bit(s)                   Meaning
119 
120                     31-24               NX_TCP_ACK_TIMER_RATE
121                     23-16               NX_TCP_FAST_TIMER_RATE
122                     15-8                NX_TCP_TRANSMIT_TIMER_RATE
123                     7-0                 NX_TCP_KEEPALIVE_RETRY
124 
125     _nx_system_build_options_4:
126 
127                     Bit(s)                   Meaning
128 
129                     31-16               NX_TCP_KEEPALIVE_INITIAL
130                     15-8                NX_ARP_MAXIMUM_RETRIES
131                     7-4                 NX_ARP_MAX_QUEUE_DEPTH
132                     3-0                 NX_TCP_KEEPALIVE_RETRIES
133 
134     _nx_system_build_options_5:
135 
136                     Bit(s)                   Meaning
137 
138                     31-24               NX_MAX_MULTICAST_GROUPS
139                     23-16               NX_MAX_LISTEN_REQUESTS
140                     15-8                NX_TCP_MAXIMUM_RETRIES
141                     7-0                 NX_TCP_MAXIMUM_TX_QUEUE
142 
143    Note that values greater than the value that can be represented in the build options
144    bit field are represented as all ones in the bit field. For example, if NX_TCP_ACK_TIMER_RATE
145    is 256, the value in the bits 31-24 of _nx_system_build_options_3 is 0xFF, which is 255
146    decimal.  */
147 
148 SYSTEM_DECLARE  ULONG       _nx_system_build_options_1;
149 SYSTEM_DECLARE  ULONG       _nx_system_build_options_2;
150 SYSTEM_DECLARE  ULONG       _nx_system_build_options_3;
151 SYSTEM_DECLARE  ULONG       _nx_system_build_options_4;
152 SYSTEM_DECLARE  ULONG       _nx_system_build_options_5;
153 
154 
155 #endif
156 
157