1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** NetX Duo Component                                                    */
16 /**                                                                       */
17 /**   Simple Network Management Protocol (SNMP)                           */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 
23 /**************************************************************************/
24 /*                                                                        */
25 /*  APPLICATION INTERFACE DEFINITION                       RELEASE        */
26 /*                                                                        */
27 /*    nxd_snmp.h                                          PORTABLE C      */
28 /*                                                           6.3.0        */
29 /*  AUTHOR                                                                */
30 /*                                                                        */
31 /*    Yuxin Zhou, Microsoft Corporation                                   */
32 /*                                                                        */
33 /*  DESCRIPTION                                                           */
34 /*                                                                        */
35 /*    This file defines the NetX Simple Network Management Protocol       */
36 /*    (SNMP) component, including all data types and external references. */
37 /*    It is assumed that nx_api.h and nx_port.h have already been         */
38 /*    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 /*  10-31-2023     Bo Chen                  Modified comment(s), and      */
48 /*                                            combined the functions of   */
49 /*                                            processing snmp v1 and v2,  */
50 /*                                            resulting in version 6.3.0  */
51 /*                                                                        */
52 /**************************************************************************/
53 
54 #ifndef NXD_SNMP_H
55 #define NXD_SNMP_H
56 
57 /* Determine if a C++ compiler is being used.  If so, ensure that standard
58    C is used to process the API information.  */
59 
60 #ifdef   __cplusplus
61 
62 /* Yes, C++ compiler is present.  Use standard C.  */
63 extern   "C" {
64 
65 #endif
66 
67 /* Include necessary digest and encryption files.  */
68 
69 #include "nx_api.h"
70 #ifndef NX_SNMP_DISABLE_V3
71 #include "nx_md5.h"
72 #include "nx_sha1.h"
73 #include "nx_des.h"
74 #endif
75 
76 
77 /* Disable SNMP V1 message processing.
78 #define NX_SNMP_DISABLE_V1
79 */
80 
81 /* Disable SNMP V2 message processing.
82 #define NX_SNMP_DISABLE_V2
83 */
84 
85 /* Disable SNMP V3 message processing.
86 #define NX_SNMP_DISABLE_V3
87 */
88 
89 /* Default support of SNMP V2 to only V2C.
90 #define NX_SNMP_V2C_ONLY
91 */
92 
93 /* By default support for security (authentication and encryption) is enabled. To disable
94    it define this option.
95 #define NX_SNMP_NO_SECURITY
96 */
97 
98 
99 /* Define the SNMP ID.  */
100 
101 #define NX_SNMP_ID                          0x534E4D50UL
102 
103 
104 /* Define SNMP UDP socket create options.  */
105 
106 #ifndef NX_SNMP_TYPE_OF_SERVICE
107 #define NX_SNMP_TYPE_OF_SERVICE             NX_IP_NORMAL
108 #endif
109 
110 #ifndef NX_SNMP_FRAGMENT_OPTION
111 #define NX_SNMP_FRAGMENT_OPTION             NX_DONT_FRAGMENT
112 #endif
113 
114 #ifndef NX_SNMP_TIME_TO_LIVE
115 #define NX_SNMP_TIME_TO_LIVE                0x80
116 #endif
117 
118 #ifndef NX_SNMP_AGENT_PRIORITY
119 #define NX_SNMP_AGENT_PRIORITY              16
120 #endif
121 
122 #ifndef NX_SNMP_AGENT_TIMEOUT
123 #define NX_SNMP_AGENT_TIMEOUT               (1 * NX_IP_PERIODIC_RATE)
124 #endif
125 
126 #ifndef NX_SNMP_MAX_OCTET_STRING
127 #define NX_SNMP_MAX_OCTET_STRING            255
128 #else
129 #if NX_SNMP_MAX_OCTET_STRING < 23
130 #error "NX_SNMP_MAX_OCTET_STRING should not be smaller than 23."
131 #endif
132 #endif
133 
134 #ifndef NX_SNMP_MAX_CONTEXT_STRING
135 #define NX_SNMP_MAX_CONTEXT_STRING          32
136 #endif
137 
138 #ifndef NX_SNMP_MAX_USER_NAME
139 #define NX_SNMP_MAX_USER_NAME               64
140 #endif
141 
142 #ifndef NX_SNMP_MAX_TRAP_NAME
143 #define NX_SNMP_MAX_TRAP_NAME               64
144 #endif
145 
146 
147 #ifndef NX_SNMP_MAX_SECURITY_KEY
148 #define NX_SNMP_MAX_SECURITY_KEY            64
149 #else
150 #if NX_SNMP_MAX_SECURITY_KEY < 20
151 #error "NX_SNMP_MAX_SECURITY_KEY should not be smaller than 20."
152 #endif
153 #endif
154 
155 #ifndef NX_SNMP_MAX_TRAP_KEY
156 #define NX_SNMP_MAX_TRAP_KEY                64
157 #endif
158 
159 #ifndef NX_SNMP_PACKET_SIZE
160 #define NX_SNMP_PACKET_SIZE                 560
161 #endif
162 
163 
164 /* Define the maximum number of packets that can be queued on the SNMP Agent's UDP Port.  */
165 
166 #define NX_SNMP_QUEUE_DEPTH                 5
167 
168 /* Define a symbol for indicating trap contains proprietary data (instead of just standard cold start, warm start etc. */
169 #define NX_SNMP_TRAP_CUSTOM    0xFFFFFFFF
170 
171 
172 /* Define the SNMP versions supported.  */
173 
174 #define NX_SNMP_VERSION_1                   0
175 #define NX_SNMP_VERSION_2C                  1
176 #define NX_SNMP_VERSION_2                   2
177 #define NX_SNMP_VERSION_3                   3
178 
179 /* Define constants for ASN1 BER encoding   */
180 
181 #define NX_SNMP_ASN_TAG_CONSTRUCTED_MASK    0x20                    /* If bit 6 is set, it is a constructed type. */
182 #define NX_SNMP_ASN_TAG_MULTIBYTE_MASK      0x1F                    /* Some ASN1 tags are multi-byte.       */
183 #define NX_SNMP_ASN_TAG_CLASS_MASK          0xC0                    /* Top 2 bits of tag are the "class".   */
184 #define NX_SNMP_ASN_TAG_MASK                0x1F                    /* Bottom 6 bits are the tag itself.    */
185 
186 /* Tag classes. Bits refer to bit locations in the tag octet.
187  * Note that "Application" and "Private" are not recommended for use and
188  * should probably never be encountered in SNMP.
189  * Class            |    Bit 7    |    Bit 8   |
190  * ---------------------------------------------
191  * Universal        |      0      |      0     |
192  * Application      |      0      |      1     |
193  * Context-specific |      1      |      0     |
194  * Private          |      1      |      1     |
195  */
196 #define NX_SNMP_ASN_TAG_CLASS_UNIVERSAL                         0x00 /* ASN.1 standard tag values. */
197 #define NX_SNMP_ASN_TAG_CLASS_APPLICATION                       0x01 /* (UNUSED) Application-specific tag values. */
198 #define NX_SNMP_ASN_TAG_CLASS_CONTEXT                           0x02 /* Context-specific tag values. */
199 #define NX_SNMP_ASN_TAG_CLASS_PRIVATE                           0x03 /* (UNUSED) Private tag values. */
200 
201 /* Define the SNMP/ANS1 control characters.  */
202 
203 #define NX_SNMP_ANS1_SEQUENCE               0x30                    /* ANS1 Code for SEQUENCE               */
204 #define NX_SNMP_ANS1_INTEGER                0x02                    /* ANS1 Code for INTEGER                */
205 #define NX_SNMP_ANS1_BIT_STRING             0x03                    /* ANS1 Code for BIT STRING             */
206 #define NX_SNMP_ANS1_OCTET_STRING           0x04                    /* ANS1 Code for OCTET STRING           */
207 #define NX_SNMP_ANS1_NULL                   0x05                    /* ANS1 Code for NULL                   */
208 #define NX_SNMP_ANS1_OBJECT_ID              0x06                    /* ANS1 Code for OBJECT ID              */
209 #define NX_SNMP_ANS1_IP_ADDRESS             0x40                    /* ANS1 Code for IP ADDRESS             */
210 #define NX_SNMP_ANS1_COUNTER                0x41                    /* ANS1 Code for COUNTER                */
211 #define NX_SNMP_ANS1_GAUGE                  0x42                    /* ANS1 Code for GAUGE                  */
212 #define NX_SNMP_ANS1_TIME_TICS              0x43                    /* ANS1 Code for TIME TICS              */
213 #define NX_SNMP_ANS1_OPAQUE                 0x44                    /* ANS1 Code for OPAQUE                 */
214 #define NX_SNMP_ANS1_NSAP_ADDRESS           0x45                    /* ANS1 Code for NSAP ADDRESS           */
215 #define NX_SNMP_ANS1_COUNTER64              0x46                    /* ANS1 Code for COUNTER64              */
216 #define NX_SNMP_ANS1_UINTEGER32             0x47                    /* ANS1 Code for UINTEGER32             */
217 #define NX_SNMP_ANS1_NO_SUCH_OBJECT         0x80                    /* ANS1 Code for No Such Object         */
218 #define NX_SNMP_ANS1_NO_SUCH_INSTANCE       0x81                    /* ANS1 Code for No Such Instance       */
219 #define NX_SNMP_ANS1_END_OF_MIB_VIEW        0x82                    /* ANS1 Code for End of MIB view        */
220 #define NX_SNMP_ANS1_GET_REQUEST            0xA0                    /* ANS1 Code for SNMP GET               */
221 #define NX_SNMP_ANS1_GET_NEXT_REQUEST       0xA1                    /* ANS1 Code for SNMP GET NEXT          */
222 #define NX_SNMP_ANS1_GET_RESPONSE           0xA2                    /* ANS1 Code for SNMP GET RESPONSE      */
223 #define NX_SNMP_ANS1_SET_REQUEST            0xA3                    /* ANS1 Code for SNMP SET               */
224 #define NX_SNMP_ANS1_TRAP_REQUEST           0xA4                    /* ANS1 Code for SNMP TRAP              */
225 #define NX_SNMP_ANS1_GET_BULK_REQUEST       0xA5                    /* ANS1 Code for SNMP GET BULK (v2)     */
226 #define NX_SNMP_ANS1_INFORM_REQUEST         0xA6                    /* ANS1 Code for SNMP INFORM (v2)       */
227 #define NX_SNMP_ANS1_TRAP2_REQUEST          0xA7                    /* ANS1 Code for SNMP TRAP (v2)         */
228 #define NX_SNMP_ANS1_REPORT_REQUEST         0xA8                    /* ANS1 Code for SNMP REPORT (v3)       */
229 #define NX_SNMP_ANS1_MULTI_BYTES            0x80                    /* ANS1 Bit for Multiple Bytes          */
230 #ifdef  FEATURE_NX_IPV6
231 #define NX_SNMP_ANS1_IPV6_ADDRESS           NX_SNMP_ANS1_OCTET_STRING /* ANS1 Code for OCTET string         */
232 #endif
233 /* Define the SNMP application GET/GETNEXT/SET callback return error codes.  */
234 
235 #define NX_SNMP_SUCCESS                     0                       /* Everything is okay                   */
236 #define NX_SNMP_ERROR_TOOBIG                1                       /* Can't fit reply in outgoing message  */
237 #define NX_SNMP_ERROR_NOSUCHNAME            2                       /* Object could not be found            */
238 #define NX_SNMP_ERROR_BADVALUE              3                       /* Invalid value of set operation       */
239 #define NX_SNMP_ERROR_READONLY              4                       /* Object is read only and cannot be set*/
240 #define NX_SNMP_ERROR_GENERAL               5                       /* General error                        */
241 #define NX_SNMP_ERROR_NOACCESS              6
242 #define NX_SNMP_ERROR_WRONGTYPE             7
243 #define NX_SNMP_ERROR_WRONGLENGTH           8
244 #define NX_SNMP_ERROR_WRONGENCODING         9
245 #define NX_SNMP_ERROR_WRONGVALUE            10
246 #define NX_SNMP_ERROR_NOCREATION            11
247 #define NX_SNMP_ERROR_INCONSISTENTVALUE     12
248 #define NX_SNMP_ERROR_RESOURCEUNAVAILABLE   13
249 #define NX_SNMP_ERROR_COMMITFAILED          14
250 #define NX_SNMP_ERROR_UNDOFAILED            15
251 #define NX_SNMP_ERROR_AUTHORIZATION         16
252 #define NX_SNMP_ERROR_NOTWRITABLE           17
253 #define NX_SNMP_ERROR_INCONSISTENTNAME      18
254 #define NX_SNMP_UNKNOWN_USERNAME            19
255 #define NX_SNMP_UNSUPPORTED_AUTHENTICATION  20
256 #define NX_SNMP_INVALID_PDU_ENCRYPTION      21
257 #define NX_SNMP_INVALID_ENCRYPT_LENGTH      22
258 #define NX_SNMP_MULTIBYTE_TAG_UNSUPPORTED   23
259 #define NX_SNMP_INVALID_TAG_CLASS           24
260 #define NX_SNMP_ASN1_LENGTH_TOO_LONG        25
261 
262 /* Define SNMP Traps.  */
263 
264 #define NX_SNMP_TRAP_COLDSTART              0
265 #define NX_SNMP_TRAP_WARMSTART              1
266 #define NX_SNMP_TRAP_LINKDOWN               2
267 #define NX_SNMP_TRAP_LINKUP                 3
268 #define NX_SNMP_TRAP_AUTHENTICATE_FAILURE   4
269 #define NX_SNMP_TRAP_EGPNEIGHBORLOSS        5
270 #define NX_SNMP_TRAP_ENTERPRISESPECIFIC     6
271 
272 
273 /* Define SNMP requests for use by the agent request processing callback routine.  */
274 
275 #define NX_SNMP_GET_REQUEST                 NX_SNMP_ANS1_GET_REQUEST
276 #define NX_SNMP_GET_NEXT_REQUEST            NX_SNMP_ANS1_GET_NEXT_REQUEST
277 #define NX_SNMP_SET_REQUEST                 NX_SNMP_ANS1_SET_REQUEST
278 #define NX_SNMP_GET_BULK_REQUEST            NX_SNMP_ANS1_GET_BULK_REQUEST
279 
280 
281 /* Define SNMP object type definitions.  These will be mapped to the internal ANS1 equivalents.  */
282 
283 #define NX_SNMP_INTEGER                     NX_SNMP_ANS1_INTEGER
284 #define NX_SNMP_BIT_STRING                  NX_SNMP_ANS1_BIT_STRING
285 #define NX_SNMP_OCTET_STRING                NX_SNMP_ANS1_OCTET_STRING
286 #define NX_SNMP_NULL                        NX_SNMP_ANS1_NULL
287 #define NX_SNMP_OBJECT_ID                   NX_SNMP_ANS1_OBJECT_ID
288 #define NX_SNMP_IP_ADDRESS                  NX_SNMP_ANS1_IP_ADDRESS
289 #define NX_SNMP_COUNTER                     NX_SNMP_ANS1_COUNTER
290 #define NX_SNMP_GAUGE                       NX_SNMP_ANS1_GAUGE
291 #define NX_SNMP_TIME_TICS                   NX_SNMP_ANS1_TIME_TICS
292 #define NX_SNMP_OPAQUE                      NX_SNMP_ANS1_OPAQUE
293 #define NX_SNMP_NSAP_ADDRESS                NX_SNMP_ANS1_NSAP_ADDRESS
294 #define NX_SNMP_COUNTER64                   NX_SNMP_ANS1_COUNTER64
295 #define NX_SNMP_UINTEGER32                  NX_SNMP_ANS1_UINTEGER32
296 #define NX_SNMP_NO_SUCH_OBJECT              NX_SNMP_ANS1_NO_SUCH_OBJECT
297 #define NX_SNMP_NO_SUCH_INSTANCE            NX_SNMP_ANS1_NO_SUCH_INSTANCE
298 #define NX_SNMP_END_OF_MIB_VIEW             NX_SNMP_ANS1_END_OF_MIB_VIEW
299 
300 
301 /* Define return code constants.  */
302 
303 #define NX_SNMP_ERROR                       0x100                   /* SNMP internal error                  */
304 #define NX_SNMP_NEXT_ENTRY                  0x101                   /* SNMP found next entry                */
305 #define NX_SNMP_ENTRY_END                   0x102                   /* SNMP end of entry                    */
306 #define NX_SNMP_TIMEOUT                     0x101                   /* SNMP timeout occurred                */
307 #define NX_SNMP_FAILED                      0x102                   /* SNMP error                           */
308 #define NX_SNMP_POOL_ERROR                  0x103                   /* SNMP packet pool size error          */
309 #define NX_SNMP_INVALID_IP_PROTOCOL_ERROR   0x104                   /* Invalid packet IP version            */
310 
311 /* Define the SNMP Agent UDP port number */
312 
313 #ifndef NX_SNMP_AGENT_PORT
314 #define NX_SNMP_AGENT_PORT                  161                     /* Port for SNMP Agent                  */
315 #endif
316 
317 #ifndef NX_SNMP_MANAGER_TRAP_PORT
318 #define NX_SNMP_MANAGER_TRAP_PORT           162                     /* Trap Port for SNMP Manager           */
319 #endif
320 
321 
322 /* Define SNMP v3 constants.  */
323 
324 #define NX_SNMP_USM_SECURITY_MODEL          3                       /* Value for USM Security model         */
325 #define NX_SNMP_SECURITY_AUTHORIZE          0x1                     /* Authorization required bit           */
326 #define NX_SNMP_SECURITY_PRIVACY            0x2                     /* Privacy (encryption) required bit    */
327 #define NX_SNMP_SECURITY_REPORTABLE         0x4                     /* Reportable bit                       */
328 
329 
330 /* Define SNMP authentication/encryption key types.  */
331 
332 #define NX_SNMP_MD5_KEY                     1
333 #define NX_SNMP_SHA_KEY                     2
334 #define NX_SNMP_DES_DEY                     3
335 #define NX_SNMP_AES_KEY                     4                       /* Future expansion                     */
336 
337 
338 /* Define SNMP USM digest size.  */
339 
340 #define NX_SNMP_DIGEST_SIZE                 12                      /* Size of SNMP authentication digest   */
341 #define NX_SNMP_MD5_DIGEST_SIZE             16                      /* Size of pure MD5 digest              */
342 #define NX_SNMP_SHA_DIGEST_SIZE             20                      /* Size of pure SHA digest              */
343 #define NX_SNMP_DIGEST_WORKING_SIZE         64                      /* Size of keys for the digest routines */
344 
345 #define NX_SNMP_TCP_TIMER_RATE              NX_IP_PERIODIC_RATE/NX_TCP_TRANSMIT_TIMER_RATE
346 
347 
348 /* Define the key data types that will be used by the digest and/or encryption routines.  */
349 
350 typedef struct NX_SNMP_SECURITY_KEY_STRUCT
351 {
352 
353     UINT    nx_snmp_security_key_size;
354     UINT    nx_snmp_security_key_type;
355     UCHAR   nx_snmp_security_key[NX_SNMP_MAX_SECURITY_KEY];
356 
357 } NX_SNMP_SECURITY_KEY;
358 
359 
360 
361 /* Define the SNMP Agent object data structure.  This structure is used for holding a single
362    variable's value.  It is passed between the SNMP Agent and the application callback functions
363    in order to get/set variables.  */
364 
365 typedef struct NX_SNMP_OBJECT_DATA_STRUCT
366 {
367 
368     UINT            nx_snmp_object_data_type;                       /* Type of SNMP data contained         */
369     LONG            nx_snmp_object_data_msw;                        /* Most significant 32 bits            */
370     LONG            nx_snmp_object_data_lsw;                        /* Least significant 32 bits           */
371     UINT            nx_snmp_object_octet_string_size;               /* Size of OCTET string                */
372     UCHAR           nx_snmp_object_octet_string[NX_SNMP_MAX_OCTET_STRING + 1];
373 
374 } NX_SNMP_OBJECT_DATA;
375 
376 
377 /* Define the SNMP Agent object list type that defines application objects to be included in the
378    trap calls.  */
379 
380 typedef struct NX_SNMP_TRAP_OBJECT_STRUCT
381 {
382 
383     UCHAR               *nx_snmp_object_string_ptr;
384     NX_SNMP_OBJECT_DATA *nx_snmp_object_data;
385 } NX_SNMP_TRAP_OBJECT;
386 
387 
388 /* Define the SNMP Agent data structure.  */
389 
390 typedef struct NX_SNMP_AGENT_STRUCT
391 {
392     ULONG           nx_snmp_agent_id;                               /* SNMP Agent ID                        */
393     CHAR           *nx_snmp_agent_name;                             /* Name of this SNMP Agent              */
394     NX_IP          *nx_snmp_agent_ip_ptr;                           /* Pointer to associated IP structure   */
395     NX_PACKET_POOL *nx_snmp_agent_packet_pool_ptr;                  /* Pointer to SNMP agent packet pool    */
396     UINT            nx_snmp_agent_current_version;                  /* Current SNMP Version                 */
397     UINT            nx_snmp_agent_request_get_type;                 /* Indicate if last request received is Get or Set type*/
398     UINT            nx_snmp_agent_interface_index;                  /* SNMP network interface index         */
399     UINT            nx_snmp_agent_v1_enabled;                       /* SNMP agent enabled for V1 status     */
400     UINT            nx_snmp_agent_v2_enabled;                       /* SNMP agent enabled for V2/V2C status */
401     UINT            nx_snmp_agent_v3_enabled;                       /* SNMP agent enabled for V3 status     */
402 #ifndef NX_SNMP_DISABLE_V3
403     ULONG           nx_snmp_agent_v3_message_id;                    /* SNMP v3 message id                   */
404     ULONG           nx_snmp_agent_v3_message_size;                  /* SNMP v3 message size                 */
405     ULONG           nx_snmp_agent_v3_message_security_type;         /* SNMP v3 message security type        */
406     UCHAR           nx_snmp_agent_v3_message_security_options;      /* SNMP v3 message security flags       */
407     UCHAR           nx_snmp_agent_v3_security_context_engine[NX_SNMP_MAX_CONTEXT_STRING]; /* Context engine */
408     UINT            nx_snmp_agent_v3_security_context_engine_size;  /* SNMP v3 security context engine size */
409     ULONG           nx_snmp_agent_v3_security_engine_boots;         /* SNMP v3 security engine boot count   */
410     ULONG           nx_snmp_agent_v3_security_engine_boot_time;     /* SNMP v3 security engine boot time    */
411     UCHAR           nx_snmp_agent_v3_security_user_name[NX_SNMP_MAX_USER_NAME]; /* SNMPv3 security username */
412     UINT            nx_snmp_agent_v3_security_user_name_size;       /* SNMP v3 security user name size      */
413     UCHAR           nx_snmp_agent_v3_security_trap_name[NX_SNMP_MAX_TRAP_NAME]; /* SNMPv3 username to send trap messages */
414     UINT            nx_snmp_agent_v3_security_trap_name_size;       /* SNMP v3 security username size for trap messages  */
415     UINT            nx_snmp_agent_unsupported_sec_count;            /* Count of reports with no security    */
416     UINT            nx_snmp_agent_unknown_engineid_count;           /* Count of unknown engine ID reports   */
417     UINT            nx_snmp_agent_unknown_username_count;           /* Count of no username  reports        */
418     UINT            nx_snmp_agent_mismatched_time_count;            /* Count of time out of synch  reports  */
419     UCHAR           nx_snmp_agent_v3_security_authentication[NX_SNMP_MAX_SECURITY_KEY]; /* security authentication */
420     UINT            nx_snmp_agent_v3_security_authentication_size;  /* SNMP v3 security authentication size */
421     UCHAR           nx_snmp_agent_v3_security_privacy[NX_SNMP_MAX_SECURITY_KEY];/* SNMP v3 security privacy */
422     UINT            nx_snmp_agent_v3_security_privacy_size;         /* SNMP v3 security privacy size        */
423     UCHAR           nx_snmp_agent_v3_trap_authentication[NX_SNMP_MAX_TRAP_KEY]; /* security authentication  */
424     UINT            nx_snmp_agent_v3_trap_authentication_size;      /* SNMPv3 trap message authentication size     */
425     UCHAR           nx_snmp_agent_v3_trap_privacy[NX_SNMP_MAX_TRAP_KEY];/* SNMP v3 trap message privacy     */
426     UINT            nx_snmp_agent_v3_trap_privacy_size;             /* SNMP v3 trap message privacy size    */
427     UCHAR           nx_snmp_agent_v3_context_engine[NX_SNMP_MAX_CONTEXT_STRING];  /* SNMP v3 context name   */
428     UINT            nx_snmp_agent_v3_context_engine_size;           /* SNMP v3 context engine size          */
429     UCHAR           nx_snmp_agent_v3_context_name[NX_SNMP_MAX_CONTEXT_STRING]; /* SNMPv3 context name       */
430     UINT            nx_snmp_agent_v3_context_name_size;             /* SNMP v3 context engine size          */
431     UINT            nx_snmp_agent_v3_context_engine_boots;          /* SNMP v3 context engine boots         */
432     UINT            nx_snmp_agent_v3_context_engine_boot_time;      /* SNMP v3 context engine boot time     */
433     UINT            nx_snmp_agent_v3_context_salt_counter;          /* SNMP v3 context salt counter         */
434     NX_SNMP_SECURITY_KEY *nx_snmp_agent_v3_authentication_key;      /* SNMP v3 authentication key           */
435     NX_SNMP_SECURITY_KEY *nx_snmp_agent_v3_auth_trap_key;           /* SNMP v3 authentication key for traps */
436     NX_SNMP_SECURITY_KEY *nx_snmp_agent_v3_privacy_key;             /* SNMP v3 privacy key                  */
437     NX_SNMP_SECURITY_KEY *nx_snmp_agent_v3_priv_trap_key;           /* SNMP v3 privacy key for traps        */
438     NX_MD5          nx_snmp_agent_v3_md5_data;                      /* SNMP v3 MD5 authentication data      */
439     NX_SHA1         nx_snmp_agent_v3_sha_data;                      /* SNMP v3 SHA authentication data      */
440     NX_DES          nx_snmp_agent_v3_des_data;                      /* SNMP v3 DES encryption data          */
441 #endif  /* NX_SNMP_DISABLE_V3 */
442     UCHAR           nx_snmp_agent_current_community_string[NX_SNMP_MAX_USER_NAME + 1]; /* Received Community string            */
443     UCHAR           nx_snmp_agent_private_community_string[NX_SNMP_MAX_USER_NAME + 1]; /* Agent's private community string     */
444     UCHAR           nx_snmp_agent_public_community_string[NX_SNMP_MAX_USER_NAME + 1];  /* Agent's public community string      */
445     UCHAR           nx_snmp_agent_current_octet_string[NX_SNMP_MAX_OCTET_STRING + 1];  /* Current SNMP Object ID*/
446     NX_SNMP_OBJECT_DATA nx_snmp_agent_current_object_data;          /* Current SNMP Object information      */
447     NXD_ADDRESS     nx_snmp_agent_current_manager_ip;               /* Current SNMP Manager IPv6/IPv4 address*/
448     UINT            nx_snmp_agent_current_manager_port;             /* Current SNMP Manager UDP port        */
449     ULONG           nx_snmp_agent_packets_received;                 /* Number of SNMP packets received      */
450     ULONG           nx_snmp_agent_packets_sent;                     /* Number of SNMP packets sent          */
451     ULONG           nx_snmp_agent_invalid_version;                  /* Number of invalid SNMP versions      */
452     ULONG           nx_snmp_agent_total_get_variables;              /* Number of variables to get           */
453     ULONG           nx_snmp_agent_total_set_variables;              /* Number of variables to set           */
454     ULONG           nx_snmp_agent_too_big_errors;                   /* Number of too big errors sent        */
455     ULONG           nx_snmp_agent_no_such_name_errors;              /* Number of no such name errors sent   */
456     ULONG           nx_snmp_agent_bad_value_errors;                 /* Number of bad value errors sent      */
457     ULONG           nx_snmp_agent_general_errors;                   /* Number of general errors sent        */
458     ULONG           nx_snmp_agent_request_errors;                   /* Number of errors on SNMP requests    */
459     ULONG           nx_snmp_agent_get_requests;                     /* Number of GET requests               */
460     ULONG           nx_snmp_agent_getnext_requests;                 /* Number of GETNEXT requests           */
461     ULONG           nx_snmp_agent_getbulk_requests;                 /* Number of GETBULK requests           */
462     ULONG           nx_snmp_agent_set_requests;                     /* Number of SET requests               */
463     ULONG           nx_snmp_agent_reports_sent;                     /* Number of DISCOVERY requests         */
464     ULONG           nx_snmp_agent_internal_errors;                  /* Number of internal errors detected   */
465     ULONG           nx_snmp_agent_traps_sent;                       /* Number of traps sent                 */
466     ULONG           nx_snmp_agent_total_bytes_sent;                 /* Number of total bytes sent           */
467     ULONG           nx_snmp_agent_total_bytes_received;             /* Number of total bytes received       */
468     ULONG           nx_snmp_agent_unknown_requests;                 /* Number of unknown commands received  */
469     ULONG           nx_snmp_agent_invalid_packets;                  /* Number of invalid SNMP packets       */
470     ULONG           nx_snmp_agent_allocation_errors;                /* Number of allocation errors          */
471     ULONG           nx_snmp_agent_username_errors;                  /* Number of community/username errors  */
472     ULONG           nx_snmp_agent_authentication_errors;            /* Number of authentication errors      */
473     ULONG           nx_snmp_agent_privacy_errors;                   /* Number of privacy errors             */
474     ULONG           nx_snmp_agent_getresponse_sent;                 /* Number of getresponse sent           */
475     NX_UDP_SOCKET   nx_snmp_agent_socket;                           /* SNMP Server UDP socket               */
476     TX_THREAD       nx_snmp_agent_thread;                           /* SNMP agent thread                    */
477     UINT (*nx_snmp_agent_get_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data);
478     UINT (*nx_snmp_agent_getnext_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data);
479     UINT (*nx_snmp_agent_set_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data);
480     UINT (*nx_snmp_agent_username_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *username);
481 
482 } NX_SNMP_AGENT;
483 
484 
485 
486 #ifndef NX_SNMP_SOURCE_CODE
487 
488 /* Application caller is present, perform API mapping.  */
489 
490 /* Determine if error checking is desired.  If so, map API functions
491    to the appropriate error checking front-ends.  Otherwise, map API
492    functions to the core functions that actually perform the work.
493    Note: error checking is enabled by default.  */
494 
495 #ifdef NX_DISABLE_ERROR_CHECKING
496 
497 /* Services without error checking.  */
498 
499 #define nx_snmp_agent_authenticate_key_use  _nx_snmp_agent_authenticate_key_use
500 #define nx_snmp_agent_auth_trap_key_use     _nx_snmp_agent_auth_trap_key_use
501 #define nx_snmp_agent_community_get         _nx_snmp_agent_community_get
502 #define nx_snmp_agent_context_engine_set    _nx_snmp_agent_context_engine_set
503 #define nx_snmp_agent_context_name_set      _nx_snmp_agent_context_name_set
504 #define nx_snmp_agent_v3_context_boots_set  _nx_snmp_agent_v3_context_boots_set
505 #define nx_snmp_agent_create                _nx_snmp_agent_create
506 #define nx_snmp_agent_delete                _nx_snmp_agent_delete
507 #define nx_snmp_agent_request_get_type_test _nx_snmp_agent_request_get_type_test
508 #define nx_snmp_agent_current_version_get   _nx_snmp_agent_current_version_get
509 #define nx_snmp_agent_version_set           _nx_snmp_agent_version_set
510 #define nx_snmp_agent_set_interface         _nx_snmp_agent_set_interface
511 #ifndef NX_SNMP_DISABLE_V3
512 #define nx_snmp_agent_md5_key_create        _nx_snmp_agent_md5_key_create
513 #define nx_snmp_agent_md5_key_create_extended _nx_snmp_agent_md5_key_create_extended
514 #define nx_snmp_agent_privacy_key_use       _nx_snmp_agent_privacy_key_use
515 #define nx_snmp_agent_sha_key_create        _nx_snmp_agent_sha_key_create
516 #define nx_snmp_agent_sha_key_create_extended _nx_snmp_agent_sha_key_create_extended
517 #endif
518 #define nx_snmp_agent_priv_trap_key_use     _nx_snmp_agent_priv_trap_key_use
519 #define nx_snmp_agent_private_string_set    _nx_snmp_agent_private_string_set
520 #define nx_snmp_agent_public_string_set     _nx_snmp_agent_public_string_set
521 #define nx_snmp_agent_public_string_test    _nx_snmp_agent_public_string_test
522 #define nx_snmp_agent_private_string_test   _nx_snmp_agent_private_string_test
523 #define nx_snmp_agent_start                 _nx_snmp_agent_start
524 #define nx_snmp_agent_stop                  _nx_snmp_agent_stop
525 #define nx_snmp_agent_trap_send             _nx_snmp_agent_trap_send
526 #define nx_snmp_agent_trapv2_send           _nx_snmp_agent_trapv2_send
527 #define nx_snmp_agent_trapv3_send           _nx_snmp_agent_trapv3_send
528 #define nxd_snmp_agent_trap_send            _nxd_snmp_agent_trap_send
529 #define nxd_snmp_agent_trapv2_send          _nxd_snmp_agent_trapv2_send
530 #define nxd_snmp_agent_trapv3_send          _nxd_snmp_agent_trapv3_send
531 #define nx_snmp_object_compare              _nx_snmp_object_compare
532 #define nx_snmp_object_compare_extended     _nx_snmp_object_compare_extended
533 #define nx_snmp_object_copy                 _nx_snmp_object_copy
534 #define nx_snmp_object_copy_extended        _nx_snmp_object_copy_extended
535 #define nx_snmp_object_counter_get          _nx_snmp_object_counter_get
536 #define nx_snmp_object_counter_set          _nx_snmp_object_counter_set
537 #define nx_snmp_object_counter64_get        _nx_snmp_object_counter64_get
538 #define nx_snmp_object_counter64_set        _nx_snmp_object_counter64_set
539 #define nx_snmp_object_end_of_mib           _nx_snmp_object_end_of_mib
540 #define nx_snmp_object_gauge_get            _nx_snmp_object_gauge_get
541 #define nx_snmp_object_gauge_set            _nx_snmp_object_gauge_set
542 #define nx_snmp_object_id_get               _nx_snmp_object_id_get
543 #define nx_snmp_object_id_set               _nx_snmp_object_id_set
544 #define nx_snmp_object_integer_get          _nx_snmp_object_integer_get
545 #define nx_snmp_object_integer_set          _nx_snmp_object_integer_set
546 #define nx_snmp_object_ip_address_get       _nx_snmp_object_ip_address_get
547 #define nx_snmp_object_ip_address_set       _nx_snmp_object_ip_address_set
548 #ifdef FEATURE_NX_IPV6
549 #define nx_snmp_object_ipv6_address_get     _nx_snmp_object_ipv6_address_get
550 #define nx_snmp_object_ipv6_address_set     _nx_snmp_object_ipv6_address_set
551 #endif
552 #define nx_snmp_object_no_instance          _nx_snmp_object_no_instance
553 #define nx_snmp_object_not_found            _nx_snmp_object_not_found
554 #define nx_snmp_object_octet_string_get     _nx_snmp_object_octet_string_get
555 #define nx_snmp_object_octet_string_set     _nx_snmp_object_octet_string_set
556 #define nx_snmp_object_string_get           _nx_snmp_object_string_get
557 #define nx_snmp_object_string_set           _nx_snmp_object_string_set
558 #define nx_snmp_object_timetics_get         _nx_snmp_object_timetics_get
559 #define nx_snmp_object_timetics_set         _nx_snmp_object_timetics_set
560 #define nx_snmp_agent_trapv2_oid_send       _nx_snmp_agent_trapv2_oid_send
561 #define nx_snmp_agent_trapv3_oid_send       _nx_snmp_agent_trapv3_oid_send
562 
563 
564 #else
565 
566 /* Services with error checking.  */
567 
568 #define nx_snmp_agent_authenticate_key_use  _nxe_snmp_agent_authenticate_key_use
569 #define nx_snmp_agent_auth_trap_key_use     _nxe_snmp_agent_auth_trap_key_use
570 #define nx_snmp_agent_community_get         _nxe_snmp_agent_community_get
571 #define nx_snmp_agent_context_engine_set    _nxe_snmp_agent_context_engine_set
572 #define nx_snmp_agent_context_name_set      _nxe_snmp_agent_context_name_set
573 #define nx_snmp_agent_v3_context_boots_set  _nxe_snmp_agent_v3_context_boots_set
574 #define nx_snmp_agent_create                _nxe_snmp_agent_create
575 #define nx_snmp_agent_delete                _nxe_snmp_agent_delete
576 #define nx_snmp_agent_request_get_type_test _nxe_snmp_agent_request_get_type_test
577 #define nx_snmp_agent_current_version_get   _nxe_snmp_agent_current_version_get
578 #define nx_snmp_agent_version_set           _nxe_snmp_agent_version_set
579 #define nx_snmp_agent_set_interface         _nxe_snmp_agent_set_interface
580 #ifndef NX_SNMP_DISABLE_V3
581 #define nx_snmp_agent_md5_key_create        _nxe_snmp_agent_md5_key_create
582 #define nx_snmp_agent_md5_key_create_extended _nxe_snmp_agent_md5_key_create_extended
583 #define nx_snmp_agent_sha_key_create        _nxe_snmp_agent_sha_key_create
584 #define nx_snmp_agent_sha_key_create_extended _nxe_snmp_agent_sha_key_create_extended
585 #define nx_snmp_agent_privacy_key_use       _nxe_snmp_agent_privacy_key_use
586 #define nx_snmp_agent_priv_trap_key_use     _nxe_snmp_agent_priv_trap_key_use
587 #endif
588 #define nx_snmp_agent_private_string_set    _nxe_snmp_agent_private_string_set
589 #define nx_snmp_agent_public_string_set     _nxe_snmp_agent_public_string_set
590 #define nx_snmp_agent_private_string_test   _nxe_snmp_agent_private_string_test
591 #define nx_snmp_agent_public_string_test    _nxe_snmp_agent_public_string_test
592 #define nx_snmp_agent_start                 _nxe_snmp_agent_start
593 #define nx_snmp_agent_stop                  _nxe_snmp_agent_stop
594 #define nx_snmp_agent_trap_send             _nxe_snmp_agent_trap_send
595 #define nx_snmp_agent_trapv2_send           _nxe_snmp_agent_trapv2_send
596 #define nx_snmp_agent_trapv3_send           _nxe_snmp_agent_trapv3_send
597 #define nxd_snmp_agent_trap_send            _nxde_snmp_agent_trap_send
598 #define nxd_snmp_agent_trapv2_send          _nxde_snmp_agent_trapv2_send
599 #define nxd_snmp_agent_trapv3_send          _nxde_snmp_agent_trapv3_send
600 #define nx_snmp_object_compare              _nxe_snmp_object_compare
601 #define nx_snmp_object_compare_extended     _nxe_snmp_object_compare_extended
602 #define nx_snmp_object_copy                 _nxe_snmp_object_copy
603 #define nx_snmp_object_copy_extended        _nxe_snmp_object_copy_extended
604 #define nx_snmp_object_counter_get          _nxe_snmp_object_counter_get
605 #define nx_snmp_object_counter_set          _nxe_snmp_object_counter_set
606 #define nx_snmp_object_counter64_get        _nxe_snmp_object_counter64_get
607 #define nx_snmp_object_counter64_set        _nxe_snmp_object_counter64_set
608 #define nx_snmp_object_end_of_mib           _nxe_snmp_object_end_of_mib
609 #define nx_snmp_object_gauge_get            _nxe_snmp_object_gauge_get
610 #define nx_snmp_object_gauge_set            _nxe_snmp_object_gauge_set
611 #define nx_snmp_object_id_get               _nxe_snmp_object_id_get
612 #define nx_snmp_object_id_set               _nxe_snmp_object_id_set
613 #define nx_snmp_object_integer_get          _nxe_snmp_object_integer_get
614 #define nx_snmp_object_integer_set          _nxe_snmp_object_integer_set
615 #define nx_snmp_object_ip_address_get       _nxe_snmp_object_ip_address_get
616 #define nx_snmp_object_ip_address_set       _nxe_snmp_object_ip_address_set
617 #ifdef FEATURE_NX_IPV6
618 #define nx_snmp_object_ipv6_address_get     _nxe_snmp_object_ipv6_address_get
619 #define nx_snmp_object_ipv6_address_set     _nxe_snmp_object_ipv6_address_set
620 #endif
621 #define nx_snmp_object_no_instance          _nxe_snmp_object_no_instance
622 #define nx_snmp_object_not_found            _nxe_snmp_object_not_found
623 #define nx_snmp_object_octet_string_get     _nxe_snmp_object_octet_string_get
624 #define nx_snmp_object_octet_string_set     _nxe_snmp_object_octet_string_set
625 #define nx_snmp_object_string_get           _nxe_snmp_object_string_get
626 #define nx_snmp_object_string_set           _nxe_snmp_object_string_set
627 #define nx_snmp_object_timetics_get         _nxe_snmp_object_timetics_get
628 #define nx_snmp_object_timetics_set         _nxe_snmp_object_timetics_set
629 #define nx_snmp_agent_trapv2_oid_send       _nxe_snmp_agent_trapv2_oid_send
630 #define nx_snmp_agent_trapv3_oid_send       _nxe_snmp_agent_trapv3_oid_send
631 
632 
633 #endif  /* NX_DISABLE_ERROR_CHECKING */
634 
635 /* Define the prototypes accessible to the application software.  */
636 
637 UINT    nx_snmp_agent_authenticate_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
638 UINT    nx_snmp_agent_auth_trap_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
639 UINT    nx_snmp_agent_md5_key_create(NX_SNMP_AGENT *agent_ptr, UCHAR *password, NX_SNMP_SECURITY_KEY *destination_key);
640 UINT    nx_snmp_agent_md5_key_create_extended(NX_SNMP_AGENT *agent_ptr, UCHAR *password, UINT password_length, NX_SNMP_SECURITY_KEY *destination_key);
641 UINT    nx_snmp_agent_privacy_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
642 UINT    nx_snmp_agent_priv_trap_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
643 UINT    nx_snmp_agent_sha_key_create(NX_SNMP_AGENT *agent_ptr, UCHAR *password, NX_SNMP_SECURITY_KEY *destination_key);
644 UINT    nx_snmp_agent_sha_key_create_extended(NX_SNMP_AGENT *agent_ptr, UCHAR *password, UINT password_length, NX_SNMP_SECURITY_KEY *destination_key);
645 UINT    nx_snmp_agent_community_get(NX_SNMP_AGENT *agent_ptr, UCHAR **community_string_ptr);
646 UINT    nx_snmp_agent_context_engine_set(NX_SNMP_AGENT *agent_ptr, UCHAR *context_engine, UINT context_engine_size);
647 UINT    nx_snmp_agent_context_name_set(NX_SNMP_AGENT *agent_ptr, UCHAR *context_name, UINT context_name_size);
648 UINT    nx_snmp_agent_v3_context_boots_set(NX_SNMP_AGENT *agent_ptr, UINT boots);
649 UINT    nx_snmp_agent_create(NX_SNMP_AGENT *agent_ptr, CHAR *snmp_agent_name, NX_IP *ip_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr,
650                 UINT (*snmp_agent_username_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *username),
651                 UINT (*snmp_agent_get_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data),
652                 UINT (*snmp_agent_getnext_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data),
653                 UINT (*snmp_agent_set_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data));
654 UINT    nx_snmp_agent_delete(NX_SNMP_AGENT *agent_ptr);
655 UINT    nx_snmp_agent_request_get_type_test(NX_SNMP_AGENT *agent_ptr, UINT *is_get_type);
656 UINT    nx_snmp_agent_current_version_get(NX_SNMP_AGENT *agent_ptr, UINT *version);
657 UINT    nx_snmp_agent_version_set(NX_SNMP_AGENT *agent_ptr, UINT enabled_v1, UINT enable_v2, UINT enable_v3);
658 UINT    nx_snmp_agent_set_interface(NX_SNMP_AGENT *agent_ptr, UINT if_index);
659 UINT    nx_snmp_agent_private_string_set(NX_SNMP_AGENT *agent_ptr, UCHAR *private_string);
660 UINT    nx_snmp_agent_public_string_set(NX_SNMP_AGENT *agent_ptr, UCHAR *public_string);
661 UINT    nx_snmp_agent_private_string_test(NX_SNMP_AGENT *agent_ptr, UCHAR *community_string, UINT *is_private);
662 UINT    nx_snmp_agent_public_string_test(NX_SNMP_AGENT *agent_ptr, UCHAR *community_string, UINT *is_public);
663 UINT    nx_snmp_agent_start(NX_SNMP_AGENT *agent_ptr);
664 UINT    nx_snmp_agent_stop(NX_SNMP_AGENT *agent_ptr);
665 UINT    nx_snmp_agent_trap_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UCHAR *enterprise, UINT trap_type, UINT trap_code, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
666 UINT    nx_snmp_agent_trapv2_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
667 UINT    nx_snmp_agent_trapv3_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *username, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
668 UINT    nx_snmp_agent_trapv2_oid_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *username, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
669 UINT    nx_snmp_agent_trapv3_oid_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
670 UINT    nxd_snmp_agent_trap_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *community, UCHAR *enterprise, UINT trap_type, UINT trap_code, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
671 UINT    nxd_snmp_agent_trapv2_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *community, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
672 UINT    nxd_snmp_agent_trapv3_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *username, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
673 UINT    nxd_snmp_agent_trapv2_oid_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ipduo_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
674 UINT    nxd_snmp_agent_trapv3_oid_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ipduo_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
675 UINT    nx_snmp_object_compare(UCHAR *requested_object, UCHAR *reference_object);
676 UINT    nx_snmp_object_compare_extended(UCHAR *requested_object, UINT requested_object_length, UCHAR *actual_object, UINT actual_object_length);
677 UINT    nx_snmp_object_copy(UCHAR *source_object_name, UCHAR *destination_object_name);
678 UINT    nx_snmp_object_copy_extended(UCHAR *source_object_name, UINT source_object_name_length, UCHAR *destination_object_name_buffer, UINT destination_object_name_buffer_size);
679 UINT    nx_snmp_object_counter_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
680 UINT    nx_snmp_object_counter_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
681 UINT    nx_snmp_object_counter64_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
682 UINT    nx_snmp_object_counter64_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
683 UINT    nx_snmp_object_end_of_mib(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
684 UINT    nx_snmp_object_gauge_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
685 UINT    nx_snmp_object_gauge_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
686 UINT    nx_snmp_object_id_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
687 UINT    nx_snmp_object_id_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
688 UINT    nx_snmp_object_integer_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
689 UINT    nx_snmp_object_integer_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
690 UINT    nx_snmp_object_ip_address_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
691 UINT    nx_snmp_object_ip_address_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
692 #ifdef FEATURE_NX_IPV6
693 UINT    nx_snmp_object_ipv6_address_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
694 UINT    nx_snmp_object_ipv6_address_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
695 #endif
696 UINT    nx_snmp_object_no_instance(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
697 UINT    nx_snmp_object_not_found(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
698 UINT    nx_snmp_object_octet_string_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data, UINT length);
699 UINT    nx_snmp_object_octet_string_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
700 UINT    nx_snmp_object_string_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
701 UINT    nx_snmp_object_string_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
702 UINT    nx_snmp_object_timetics_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
703 UINT    nx_snmp_object_timetics_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
704 
705 
706 
707 #else
708 
709 /* SNMP source code is being compiled, do not perform any API mapping.  */
710 
711 UINT    _nx_snmp_agent_authenticate_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
712 UINT    _nxe_snmp_agent_authenticate_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
713 UINT    _nx_snmp_agent_auth_trap_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
714 UINT    _nxe_snmp_agent_auth_trap_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
715 #ifndef NX_SNMP_DISABLE_V3
716 UINT    _nx_snmp_agent_md5_key_create(NX_SNMP_AGENT *agent_ptr, UCHAR *password, NX_SNMP_SECURITY_KEY *destination_key);
717 UINT    _nxe_snmp_agent_md5_key_create(NX_SNMP_AGENT *agent_ptr, UCHAR *password, NX_SNMP_SECURITY_KEY *destination_key);
718 UINT    _nx_snmp_agent_md5_key_create_extended(NX_SNMP_AGENT *agent_ptr, UCHAR *password, UINT password_length, NX_SNMP_SECURITY_KEY *destination_key);
719 UINT    _nxe_snmp_agent_md5_key_create_extended(NX_SNMP_AGENT *agent_ptr, UCHAR *password, UINT password_length, NX_SNMP_SECURITY_KEY *destination_key);
720 UINT    _nx_snmp_agent_privacy_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
721 UINT    _nxe_snmp_agent_privacy_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
722 UINT    _nx_snmp_agent_priv_trap_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
723 UINT    _nxe_snmp_agent_priv_trap_key_use(NX_SNMP_AGENT *agent_ptr, NX_SNMP_SECURITY_KEY *key);
724 UINT    _nx_snmp_agent_sha_key_create(NX_SNMP_AGENT *agent_ptr, UCHAR *password, NX_SNMP_SECURITY_KEY *destination_key);
725 UINT    _nxe_snmp_agent_sha_key_create(NX_SNMP_AGENT *agent_ptr, UCHAR *password, NX_SNMP_SECURITY_KEY *destination_key);
726 UINT    _nx_snmp_agent_sha_key_create_extended(NX_SNMP_AGENT *agent_ptr, UCHAR *password, UINT password_length, NX_SNMP_SECURITY_KEY *destination_key);
727 UINT    _nxe_snmp_agent_sha_key_create_extended(NX_SNMP_AGENT *agent_ptr, UCHAR *password, UINT password_length, NX_SNMP_SECURITY_KEY *destination_key);
728 #endif
729 UINT    _nx_snmp_agent_community_get(NX_SNMP_AGENT *agent_ptr, UCHAR **community_string_ptr);
730 UINT    _nxe_snmp_agent_community_get(NX_SNMP_AGENT *agent_ptr, UCHAR **community_string_ptr);
731 UINT    _nx_snmp_agent_context_engine_set(NX_SNMP_AGENT *agent_ptr, UCHAR *context_engine, UINT context_engine_size);
732 UINT    _nxe_snmp_agent_context_engine_set(NX_SNMP_AGENT *agent_ptr, UCHAR *context_engine, UINT context_engine_size);
733 UINT    _nx_snmp_agent_context_name_set(NX_SNMP_AGENT *agent_ptr, UCHAR *context_name, UINT context_name_size);
734 UINT    _nxe_snmp_agent_context_name_set(NX_SNMP_AGENT *agent_ptr, UCHAR *context_name, UINT context_name_size);
735 UINT    _nx_snmp_agent_v3_context_boots_set(NX_SNMP_AGENT *agent_ptr, UINT boots);
736 UINT    _nxe_snmp_agent_v3_context_boots_set(NX_SNMP_AGENT *agent_ptr, UINT boots);
737 UINT    _nx_snmp_agent_create(NX_SNMP_AGENT *agent_ptr, CHAR *snmp_agent_name, NX_IP *ip_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr,
738                 UINT (*snmp_agent_username_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *username),
739                 UINT (*snmp_agent_get_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data),
740                 UINT (*snmp_agent_getnext_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data),
741                 UINT (*snmp_agent_set_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data));
742 UINT    _nxe_snmp_agent_create(NX_SNMP_AGENT *agent_ptr, CHAR *snmp_agent_name, NX_IP *ip_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr,
743                 UINT (*snmp_agent_username_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *username),
744                 UINT (*snmp_agent_get_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data),
745                 UINT (*snmp_agent_getnext_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data),
746                 UINT (*snmp_agent_set_process)(struct NX_SNMP_AGENT_STRUCT *agent_ptr, UCHAR *object_requested, NX_SNMP_OBJECT_DATA *object_data));
747 UINT    _nx_snmp_agent_delete(NX_SNMP_AGENT *agent_ptr);
748 UINT    _nxe_snmp_agent_delete(NX_SNMP_AGENT *agent_ptr);
749 UINT    _nx_snmp_agent_request_get_type_test(NX_SNMP_AGENT *agent_ptr, UINT *is_get_type);
750 UINT    _nxe_snmp_agent_request_get_type_test(NX_SNMP_AGENT *agent_ptr, UINT *is_get_type);
751 UINT    _nx_snmp_agent_current_version_get(NX_SNMP_AGENT *agent_ptr, UINT *version);
752 UINT    _nxe_snmp_agent_current_version_get(NX_SNMP_AGENT *agent_ptr, UINT *version);
753 UINT    _nxe_snmp_agent_version_set(NX_SNMP_AGENT *agent_ptr, UINT enabled_v1, UINT enable_v2, UINT enable_v3);
754 UINT    _nx_snmp_agent_version_set(NX_SNMP_AGENT *agent_ptr, UINT enabled_v1, UINT enable_v2, UINT enable_v3);
755 UINT    _nx_snmp_agent_private_string_test(NX_SNMP_AGENT *agent_ptr, UCHAR *community_string, UINT *is_private);
756 UINT    _nxe_snmp_agent_private_string_test(NX_SNMP_AGENT *agent_ptr, UCHAR *community_string, UINT *is_private);
757 UINT    _nx_snmp_agent_public_string_test(NX_SNMP_AGENT *agent_ptr, UCHAR *community_string, UINT *is_public);
758 UINT    _nxe_snmp_agent_public_string_test(NX_SNMP_AGENT *agent_ptr, UCHAR *community_string, UINT *is_public);
759 UINT    _nxe_snmp_agent_set_interface(NX_SNMP_AGENT *agent_ptr, UINT if_index);
760 UINT    _nx_snmp_agent_set_interface(NX_SNMP_AGENT *agent_ptr, UINT if_index);
761 UINT    _nx_snmp_agent_private_string_set(NX_SNMP_AGENT *agent_ptr, UCHAR *private_string);
762 UINT    _nxe_snmp_agent_private_string_set(NX_SNMP_AGENT *agent_ptr, UCHAR *private_string);
763 UINT    _nx_snmp_agent_public_string_set(NX_SNMP_AGENT *agent_ptr, UCHAR *public_string);
764 UINT    _nxe_snmp_agent_public_string_set(NX_SNMP_AGENT *agent_ptr, UCHAR *public_string);
765 UINT    _nx_snmp_agent_start(NX_SNMP_AGENT *agent_ptr);
766 UINT    _nxe_snmp_agent_start(NX_SNMP_AGENT *agent_ptr);
767 UINT    _nx_snmp_agent_stop(NX_SNMP_AGENT *agent_ptr);
768 UINT    _nxe_snmp_agent_stop(NX_SNMP_AGENT *agent_ptr);
769 UINT    _nxe_snmp_agent_trap_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UCHAR *enterprise, UINT trap_type, UINT trap_code, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
770 UINT    _nx_snmp_agent_trap_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UCHAR *enterprise, UINT trap_type, UINT trap_code, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
771 UINT    _nx_snmp_agent_trapv2_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
772 UINT    _nxe_snmp_agent_trapv2_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
773 UINT    _nx_snmp_agent_trapv3_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *username, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
774 UINT    _nxe_snmp_agent_trapv3_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *username, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
775 UINT    _nx_snmp_agent_trapv2_oid_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
776 UINT    _nxe_snmp_agent_trapv2_oid_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
777 UINT    _nx_snmp_agent_trapv3_oid_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *username, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
778 UINT    _nxe_snmp_agent_trapv3_oid_send(NX_SNMP_AGENT *agent_ptr, ULONG ip_address, UCHAR *username, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
779 UINT    _nxd_snmp_agent_trap_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *community, UCHAR *enterprise, UINT trap_type, UINT trap_code, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
780 UINT    _nxde_snmp_agent_trap_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *community, UCHAR *enterprise, UINT trap_type, UINT trap_code, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
781 UINT    _nxd_snmp_agent_trapv2_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *community, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
782 UINT    _nxde_snmp_agent_trapv2_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *community, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
783 UINT    _nxd_snmp_agent_trapv3_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *username, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
784 UINT    _nxde_snmp_agent_trapv3_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ip_address, UCHAR *username, UINT trap_type, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
785 UINT    _nxd_snmp_agent_trapv2_oid_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ipduo_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
786 UINT    _nxde_snmp_agent_trapv2_oid_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ipduo_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
787 UINT    _nxd_snmp_agent_trapv3_oid_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ipduo_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
788 UINT    _nxde_snmp_agent_trapv3_oid_send(NX_SNMP_AGENT *agent_ptr, NXD_ADDRESS *ipduo_address, UCHAR *community, UCHAR *oid, ULONG elapsed_time, NX_SNMP_TRAP_OBJECT *object_list_ptr);
789 UINT    _nx_snmp_object_compare(UCHAR *requested_object, UCHAR *reference_object);
790 UINT    _nxe_snmp_object_compare(UCHAR *requested_object, UCHAR *reference_object);
791 UINT    _nx_snmp_object_compare_extended(UCHAR *requested_object, UINT requested_object_length, UCHAR *actual_object, UINT actual_object_length);
792 UINT    _nxe_snmp_object_compare_extended(UCHAR *requested_object, UINT requested_object_length, UCHAR *actual_object, UINT actual_object_length);
793 UINT    _nx_snmp_object_copy(UCHAR *source_object_name, UCHAR *destination_object_name);
794 UINT    _nxe_snmp_object_copy(UCHAR *source_object_name, UCHAR *destination_object_name);
795 UINT    _nx_snmp_object_copy_extended(UCHAR *source_object_name, UINT source_object_name_length, UCHAR *destination_object_name_buffer, UINT destination_object_name_buffer_size);
796 UINT    _nxe_snmp_object_copy_extended(UCHAR *source_object_name, UINT source_object_name_length, UCHAR *destination_object_name_buffer, UINT destination_object_name_buffer_size);
797 UINT    _nx_snmp_object_counter_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
798 UINT    _nxe_snmp_object_counter_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
799 UINT    _nx_snmp_object_counter_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
800 UINT    _nxe_snmp_object_counter_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
801 UINT    _nx_snmp_object_counter64_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
802 UINT    _nxe_snmp_object_counter64_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
803 UINT    _nx_snmp_object_counter64_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
804 UINT    _nxe_snmp_object_counter64_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
805 UINT    _nx_snmp_object_end_of_mib(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
806 UINT    _nxe_snmp_object_end_of_mib(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
807 UINT    _nx_snmp_object_gauge_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
808 UINT    _nxe_snmp_object_gauge_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
809 UINT    _nx_snmp_object_gauge_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
810 UINT    _nxe_snmp_object_gauge_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
811 UINT    _nx_snmp_object_id_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
812 UINT    _nxe_snmp_object_id_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
813 UINT    _nx_snmp_object_id_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
814 UINT    _nxe_snmp_object_id_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
815 UINT    _nx_snmp_object_integer_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
816 UINT    _nxe_snmp_object_integer_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
817 UINT    _nx_snmp_object_integer_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
818 UINT    _nxe_snmp_object_integer_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
819 UINT    _nx_snmp_object_ip_address_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
820 UINT    _nxe_snmp_object_ip_address_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
821 UINT    _nx_snmp_object_ip_address_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
822 UINT    _nxe_snmp_object_ip_address_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
823 #ifdef FEATURE_NX_IPV6
824 UINT    _nx_snmp_object_ipv6_address_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
825 UINT    _nxe_snmp_object_ipv6_address_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
826 UINT    _nxe_snmp_object_ipv6_address_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
827 UINT    _nx_snmp_object_ipv6_address_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
828 #endif
829 UINT    _nx_snmp_object_no_instance(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
830 UINT    _nxe_snmp_object_no_instance(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
831 UINT    _nx_snmp_object_not_found(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
832 UINT    _nxe_snmp_object_not_found(VOID *not_used_ptr, NX_SNMP_OBJECT_DATA *object_data);
833 UINT    _nx_snmp_object_octet_string_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data, UINT length);
834 UINT    _nxe_snmp_object_octet_string_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data, UINT length);
835 UINT    _nx_snmp_object_octet_string_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
836 UINT    _nxe_snmp_object_octet_string_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
837 UINT    _nx_snmp_object_string_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
838 UINT    _nxe_snmp_object_string_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
839 UINT    _nx_snmp_object_string_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
840 UINT    _nxe_snmp_object_string_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
841 UINT    _nx_snmp_object_timetics_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
842 UINT    _nxe_snmp_object_timetics_get(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
843 UINT    _nx_snmp_object_timetics_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
844 UINT    _nxe_snmp_object_timetics_set(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
845 
846 
847 /* Define internal SNMP routines.  */
848 
849 VOID    _nx_snmp_agent_thread_entry(ULONG snmp_agent_address);
850 UINT    _nx_snmp_utility_community_get(UCHAR *buffer_ptr, UCHAR *community_string, INT buffer_length);
851 UINT    _nx_snmp_utility_community_set(UCHAR *buffer_ptr, UCHAR *community_string, UCHAR *buffer_end);
852 UINT    _nx_snmp_utility_error_info_get(UCHAR *buffer_ptr, UINT *error_code, UINT *error_index, INT buffer_length);
853 UINT    _nx_snmp_utility_error_info_set(UCHAR *buffer_ptr, UINT error_code, UINT error_index, UCHAR *buffer_end);
854 UINT    _nx_snmp_utility_object_id_get(UCHAR *buffer_ptr, UCHAR *object_string, INT buffer_length);
855 UINT    _nx_snmp_utility_object_id_set(UCHAR *buffer_ptr, UCHAR *object_string, UCHAR *buffer_end);
856 UINT    _nx_snmp_utility_object_id_set_1byte(UCHAR *buffer_ptr, UCHAR *object_string, UCHAR *buffer_end);
857 UINT    _nx_snmp_utility_object_data_get(UCHAR *buffer_ptr, NX_SNMP_OBJECT_DATA *object_data, INT buffer_length);
858 UINT    _nx_snmp_utility_object_data_set(UCHAR *buffer_ptr, NX_SNMP_OBJECT_DATA *object_data, UCHAR *buffer_end);
859 UINT    _nx_snmp_utility_octet_get(UCHAR *buffer_ptr, UCHAR *octet_string, UINT max_octet_length, UINT *octet_length, INT buffer_length);
860 UINT    _nx_snmp_utility_octet_set(UCHAR *buffer_ptr, UCHAR *octet_string, UINT octet_length, UCHAR *buffer_end);
861 UINT    _nx_snmp_utility_sequence_get(UCHAR *buffer_ptr, UINT *sequence_value, INT buffer_length);
862 UINT    _nx_snmp_utility_sequence_set(UCHAR *buffer_ptr, UINT sequence_value, UCHAR *buffer_end);
863 UINT    _nx_snmp_utility_sequence_set_1byte(UCHAR *buffer_ptr, UINT sequence_value, UCHAR *buffer_end);
864 UINT    _nx_snmp_utility_request_id_get(UCHAR *buffer_ptr, ULONG *request_id, INT buffer_length);
865 UINT    _nx_snmp_utility_request_id_set(UCHAR *buffer_ptr, ULONG request_id, UCHAR *buffer_end);
866 UINT    _nx_snmp_utility_request_type_get(UCHAR *buffer_ptr, UINT *request_type, UINT *request_length, INT buffer_length);
867 UINT    _nx_snmp_utility_request_type_set_1byte(UCHAR *buffer_ptr, UINT request_type, UINT request_length, UCHAR *buffer_end);
868 UINT    _nx_snmp_utility_request_type_set_multibyte(UCHAR *buffer_ptr, UINT request_type, UINT request_length, UCHAR *buffer_end);
869 UINT    _nx_snmp_utility_version_get(UCHAR *buffer_ptr, UINT *snmp_version, INT buffer_length);
870 UINT    _nx_snmp_utility_version_set(UCHAR *buffer_ptr, UINT snmp_version, UCHAR *buffer_end);
871 UINT    _nx_snmp_utility_tlv_block_parse(UCHAR *buffer, INT buffer_length, USHORT *tlv_type, USHORT *tlv_tag_class, ULONG *tlv_length, UCHAR **tlv_data, ULONG *header_length);
872 VOID    _nx_snmp_version_error_response(NX_SNMP_AGENT *agent_ptr, NX_PACKET *packet_ptr, UCHAR *request_type_ptr, UCHAR *error_string_ptr, UINT status, UINT objects);
873 VOID    _nx_snmp_version_1_and_2_process(NX_SNMP_AGENT *agent_ptr, NX_PACKET *packet_ptr);
874 VOID    _nx_snmp_version_3_report_send(NX_SNMP_AGENT *agent_ptr, UCHAR *buffer_ptr, UINT discovery_response, INT buffer_length);
875 VOID    _nx_snmp_version_3_process(NX_SNMP_AGENT *agent_ptr, NX_PACKET *packet_ptr);
876 UINT    _nx_snmp_agent_encrypt_pdu(NX_SNMP_AGENT *agent_ptr, UINT *response_pdu_length, UINT *response_sequence_length, UCHAR *response_encryption_size_ptr,
877                                    UCHAR **response_sequence_ptr, UCHAR *response_sequence_buffer_end, UCHAR **response_buffer_ptr,UCHAR *response_privacy_ptr);
878 UINT    _nx_snmp_agent_add_auth_parameter(NX_SNMP_AGENT *agent_ptr, NX_PACKET *response_packet_ptr, UCHAR *response_authentication_ptr);
879 UINT    _nx_snmp_agent_decrypt_pdu(NX_SNMP_AGENT *agent_ptr, UCHAR **buffer_ptr, UCHAR *response_buffer_ptr,  UCHAR **response_encryption_size_ptr, UINT *response_length, INT *buffer_length);
880 VOID    _nx_snmp_agent_security_response_status(NX_SNMP_AGENT *agent_ptr, UINT *authenticate, UINT *encryption, UINT *send_reply);
881 
882 
883 #endif  /* NX_SNMP_SOURCE_CODE */
884 
885 /* Determine if a C++ compiler is being used.  If so, complete the standard
886    C conditional started above.  */
887 #ifdef   __cplusplus
888         }
889 #endif
890 
891 #endif /* NXD_SNMP_H */
892 
893