mikroSDK Reference Manual
snmp_usm_mib_module.h
Go to the documentation of this file.
1
31#ifndef _SNMP_USM_MIB_MODULE_H
32#define _SNMP_USM_MIB_MODULE_H
33
34//Dependencies
35#include "mibs/mib_common.h"
36#include "snmp/snmp_agent.h"
37
38//SNMP USM MIB module support
39#ifndef SNMP_USM_MIB_SUPPORT
40 #define SNMP_USM_MIB_SUPPORT DISABLED
41#elif (SNMP_USM_MIB_SUPPORT != ENABLED && SNMP_USM_MIB_SUPPORT != DISABLED)
42 #error SNMP_USM_MIB_SUPPORT parameter is not valid
43#endif
44
45//Support for SET operations
46#ifndef SNMP_USM_MIB_SET_SUPPORT
47 #define SNMP_USM_MIB_SET_SUPPORT DISABLED
48#elif (SNMP_USM_MIB_SET_SUPPORT != ENABLED && SNMP_USM_MIB_SET_SUPPORT != DISABLED)
49 #error SNMP_USM_MIB_SET_SUPPORT parameter is not valid
50#endif
51
52//Macro definitions
53#if (SNMP_USM_MIB_SUPPORT == ENABLED)
54 #define SNMP_USM_MIB_INC_COUNTER32(name, value) snmpUsmMibBase.name += value
55 #define SNMP_USM_MIB_GET_COUNTER32(value, name) value = snmpUsmMibBase.name
56#else
57 #define SNMP_USM_MIB_INC_COUNTER32(name, value)
58 #define SNMP_USM_MIB_GET_COUNTER32(value, name)
59#endif
60
61//C++ guard
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66
71typedef struct
72{
73 SnmpAgentContext *context;
74 uint32_t usmStatsUnsupportedSecLevels;
75 uint32_t usmStatsNotInTimeWindows;
76 uint32_t usmStatsUnknownUserNames;
77 uint32_t usmStatsUnknownEngineIDs;
78 uint32_t usmStatsWrongDigests;
79 uint32_t usmStatsDecryptionErrors;
80 int32_t usmUserSpinLock;
81 SnmpUserEntry tempUser;
83
84
85//SNMP USM MIB related constants
86extern SnmpUsmMibBase snmpUsmMibBase;
87extern const MibObject snmpUsmMibObjects[];
88extern const MibModule snmpUsmMibModule;
89
90//C++ guard
91#ifdef __cplusplus
92}
93#endif
94
95#endif
Common definitions for MIB modules.
SNMP agent (Simple Network Management Protocol)
MIB module.
Definition mib_common.h:288
User table entry.
Definition snmp_agent_usm.h:295
SNMP USM MIB base.
Definition snmp_usm_mib_module.h:72