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