summaryrefslogtreecommitdiff
path: root/test/regression/snmp_test/small_mib_helper.h
blob: bd76f50cbaf0660b8c106a899bfa916aab0ccae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/***************************************************************************/
/* Copyright (c) 2024 Microsoft Corporation                                */
/* Copyright (c) 2026 Eclipse ThreadX contributors                         */
/*                                                                         */
/* This program and the accompanying materials are made available under    */
/* the terms of the MIT License which is available at                      */
/* https://opensource.org/licenses/MIT.                                    */
/*                                                                         */
/* SPDX-License-Identifier: MIT                                            */
/***************************************************************************/

/* This is an include file for the NetX SNMP demo programs for setting up the MIB for
   user callback functions. It is not part of the official release of NetX SNMP Agent. */

#ifndef SMALL_MIB_HELPER_H
#define SMALL_MIB_HELPER_H

/* Determine if a C++ compiler is being used.  If so, ensure that standard
   C is used to process the API information.  */

#ifdef   __cplusplus

/* Yes, C++ compiler is present.  Use standard C.  */
extern   "C" {

#endif

/* Include necessary digest and encryption files.  */

#include "tx_api.h"
#include "nx_api.h"
#ifdef __PRODUCT_NETXDUO__
#include "nxd_snmp.h"
#else
#include "nx_snmp.h"
#endif  

/* Define application MIB data structure. Actual application structures would certainly vary.  */

typedef struct MIB_ENTRY_STRUCT
{

    UCHAR       *object_name;
    void        *object_value_ptr;
    UINT        (*object_get_callback)(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data);
    UINT        (*object_get_octet_callback)(VOID *source_ptr, NX_SNMP_OBJECT_DATA *object_data, UINT length);
    UINT        (*object_set_callback)(VOID *destination_ptr, NX_SNMP_OBJECT_DATA *object_data);
    UINT        length;
} MIB_ENTRY;

#endif /* SMALL_MIB_HELPER_H */