forked from iwilson16/mstpd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
snmp.h
68 lines (56 loc) · 3.26 KB
/
snmp.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*****************************************************************************
Copyright (c) 2016 Westermo Teleindustri AB
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The full GNU General Public License is included in this distribution in the
file called LICENSE.
Authors: Jonas Johansson <[email protected]>
This code will provide SNMP support for MSTPD daemon.
******************************************************************************/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
/* standard nodes */
#define oid_iso 1 /* 1 */
#define oid_org oid_iso, 3 /* 1.3 */
#define oid_dod oid_org, 6 /* 1.3.6 */
#define oid_internet oid_dod, 1 /* 1.3.6.1 */
#define oid_mgmt oid_internet, 2 /* 1.3.6.1.2 */
#define oid_mib2 oid_mgmt, 1 /* 1.3.6.1.2.1 */
#define oid_dot1dBridge oid_mib2, 17 /* 1.3.6.1.2.1.17 */
/* iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).dot1dBridge(17) */
#define oid_dot1dStp oid_dot1dBridge, 2
/* iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).dot1dBridge(17).dot1dBridge(2) */
#define oid_dot1dStpProtocolSpecification oid_dot1dStp, 1
#define oid_dot1dStpPriority oid_dot1dStp, 2
#define oid_dot1dStpTimeSinceTopologyChange oid_dot1dStp, 3
#define oid_dot1dStpTopChanges oid_dot1dStp, 4
#define oid_dot1dStpDesignatedRoot oid_dot1dStp, 5
#define oid_dot1dStpRootCost oid_dot1dStp, 6
#define oid_dot1dStpRootPort oid_dot1dStp, 7
#define oid_dot1dStpMaxAge oid_dot1dStp, 8
#define oid_dot1dStpHelloTime oid_dot1dStp, 9
#define oid_dot1dStpHoldTime oid_dot1dStp, 10
#define oid_dot1dStpForwardDelay oid_dot1dStp, 11
#define oid_dot1dStpBridgeMaxAge oid_dot1dStp, 12
#define oid_dot1dStpBridgeHelloTime oid_dot1dStp, 13
#define oid_dot1dStpBridgeForwardDelay oid_dot1dStp, 14
#define oid_dot1dStpPortTable oid_dot1dStp, 15
#define oid_dot1dStpVersion oid_dot1dStp, 16
#define oid_dot1dStpTxHoldCount oid_dot1dStp, 17
#define oid_dot1dStpExtPortTable oid_dot1dStp, 19
#define ELEMENT_SIZE(s,e) sizeof(((s*)0)->e)
void snmp_init(void);
void snmp_fini(void);
void snmp_init_mib_dot1d_stp(void);
void snmp_init_mib_dot1d_stp_port_table(void);
void snmp_init_mib_dot1d_stp_ext_port_table(void);