snmp_framework_mib_module.c
Go to the documentation of this file.
1 /**
2  * @file snmp_framework_mib_module.c
3  * @brief SNMP FRAMEWORK MIB module
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @section Description
26  *
27  * The SNMP-FRAMEWORK-MIB defines managed objects for SNMP management
28  * frameworks. Refer to RFC 3411 for more details
29  *
30  * @author Oryx Embedded SARL (www.oryx-embedded.com)
31  * @version 1.9.0
32  **/
33 
34 //Switch to the appropriate trace level
35 #define TRACE_LEVEL SNMP_TRACE_LEVEL
36 
37 //Dependencies
38 #include "core/net.h"
39 #include "mibs/mib_common.h"
42 #include "core/crypto.h"
43 #include "encoding/asn1.h"
44 #include "encoding/oid.h"
45 #include "debug.h"
46 
47 //Check TCP/IP stack configuration
48 #if (SNMP_FRAMEWORK_MIB_SUPPORT == ENABLED)
49 
50 
51 /**
52  * @brief SNMP FRAMEWORK MIB base
53  **/
54 
56 
57 
58 /**
59  * @brief SNMP FRAMEWORK MIB objects
60  **/
61 
63 {
64  //snmpEngineID object (1.3.6.1.6.3.10.2.1.1)
65  {
66  "snmpEngineID",
67  {43, 6, 1, 6, 3, 10, 2, 1, 1},
68  9,
72  NULL,
73  NULL,
74  0,
75  NULL,
77  NULL
78  },
79  //snmpEngineBoots object (1.3.6.1.6.3.10.2.1.2)
80  {
81  "snmpEngineBoots",
82  {43, 6, 1, 6, 3, 10, 2, 1, 2},
83  9,
87  NULL,
88  NULL,
89  sizeof(int32_t),
90  NULL,
92  NULL
93  },
94  //snmpEngineTime object (1.3.6.1.6.3.10.2.1.3)
95  {
96  "snmpEngineTime",
97  {43, 6, 1, 6, 3, 10, 2, 1, 3},
98  9,
102  NULL,
103  NULL,
104  sizeof(int32_t),
105  NULL,
107  NULL
108  },
109  //snmpEngineMaxMessageSize object (1.3.6.1.6.3.10.2.1.4)
110  {
111  "snmpEngineMaxMessageSize",
112  {43, 6, 1, 6, 3, 10, 2, 1, 4},
113  9,
117  NULL,
118  NULL,
119  sizeof(int32_t),
120  NULL,
122  NULL
123  }
124 };
125 
126 
127 /**
128  * @brief SNMP FRAMEWORK MIB module
129  **/
130 
132 {
133  "SNMP-FRAMEWORK-MIB",
134  {43, 6, 1, 6, 3, 10},
135  6,
143 };
144 
145 #endif
SnmpFrameworkMibBase snmpFrameworkMibBase
SNMP FRAMEWORK MIB base.
TCP/IP stack core.
Debugging facilities.
#define MibObject
Definition: mib_common.h:44
General definitions for cryptographic algorithms.
OID (Object Identifier)
#define arraysize(a)
Definition: os_port.h:68
ASN.1 (Abstract Syntax Notation One)
SNMP FRAMEWORK MIB base.
error_t snmpFrameworkMibGetSnmpEngineID(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get snmpEngineID object value.
const MibModule snmpFrameworkMibModule
SNMP FRAMEWORK MIB module.
error_t snmpFrameworkMibInit(void)
SNMP FRAMEWORK MIB module initialization.
error_t snmpFrameworkMibGetSnmpEngineBoots(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get snmpEngineBoots object value.
void snmpFrameworkMibLock(void)
Lock SNMP FRAMEWORK MIB base.
void snmpFrameworkMibUnlock(void)
Unlock SNMP FRAMEWORK MIB base.
void snmpFrameworkMibUnload(void *context)
Unload SNMP FRAMEWORK MIB module.
error_t snmpFrameworkMibLoad(void *context)
Load SNMP FRAMEWORK MIB module.
Common definitions for MIB modules.
#define ASN1_CLASS_UNIVERSAL
Definition: asn1.h:45
const MibObject snmpFrameworkMibObjects[]
SNMP FRAMEWORK MIB objects.
MIB module.
Definition: mib_common.h:285
error_t snmpFrameworkMibGetSnmpEngineTime(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get snmpEngineTime object value.
SNMP FRAMEWORK MIB module implementation.
error_t snmpFrameworkMibGetSnmpEngineMaxMessageSize(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get snmpEngineMaxMessageSize object value.
SNMP FRAMEWORK MIB module.