bridge_mib_impl_stp.h
Go to the documentation of this file.
1 /**
2  * @file bridge_mib_impl.h
3  * @brief Bridge MIB module implementation (dot1dStp subtree)
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneSTP 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  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.4
29  **/
30 
31 #ifndef _BRIDGE_MIB_IMPL_STP_H
32 #define _BRIDGE_MIB_IMPL_STP_H
33 
34 //Dependencies
35 #include "mibs/mib_common.h"
36 
37 //C++ guard
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 //Bridge MIB related functions
44  size_t oidLen, MibVariant *value, size_t *valueLen);
45 
46 error_t bridgeMibSetDot1dStpPriority(const MibObject *object, const uint8_t *oid,
47  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
48 
49 error_t bridgeMibGetDot1dStpPriority(const MibObject *object, const uint8_t *oid,
50  size_t oidLen, MibVariant *value, size_t *valueLen);
51 
53  size_t oidLen, MibVariant *value, size_t *valueLen);
54 
55 error_t bridgeMibGetDot1dStpTopChanges(const MibObject *object, const uint8_t *oid,
56  size_t oidLen, MibVariant *value, size_t *valueLen);
57 
58 error_t bridgeMibGetDot1dStpDesignatedRoot(const MibObject *object, const uint8_t *oid,
59  size_t oidLen, MibVariant *value, size_t *valueLen);
60 
61 error_t bridgeMibGetDot1dStpRootCost(const MibObject *object, const uint8_t *oid,
62  size_t oidLen, MibVariant *value, size_t *valueLen);
63 
64 error_t bridgeMibGetDot1dStpRootPort(const MibObject *object, const uint8_t *oid,
65  size_t oidLen, MibVariant *value, size_t *valueLen);
66 
67 error_t bridgeMibGetDot1dStpMaxAge(const MibObject *object, const uint8_t *oid,
68  size_t oidLen, MibVariant *value, size_t *valueLen);
69 
70 error_t bridgeMibGetDot1dStpHelloTime(const MibObject *object, const uint8_t *oid,
71  size_t oidLen, MibVariant *value, size_t *valueLen);
72 
73 error_t bridgeMibGetDot1dStpHoldTime(const MibObject *object, const uint8_t *oid,
74  size_t oidLen, MibVariant *value, size_t *valueLen);
75 
76 error_t bridgeMibGetDot1dStpForwardDelay(const MibObject *object, const uint8_t *oid,
77  size_t oidLen, MibVariant *value, size_t *valueLen);
78 
79 error_t bridgeMibSetDot1dStpBridgeMaxAge(const MibObject *object, const uint8_t *oid,
80  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
81 
82 error_t bridgeMibGetDot1dStpBridgeMaxAge(const MibObject *object, const uint8_t *oid,
83  size_t oidLen, MibVariant *value, size_t *valueLen);
84 
85 error_t bridgeMibSetDot1dStpBridgeHelloTime(const MibObject *object, const uint8_t *oid,
86  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
87 
88 error_t bridgeMibGetDot1dStpBridgeHelloTime(const MibObject *object, const uint8_t *oid,
89  size_t oidLen, MibVariant *value, size_t *valueLen);
90 
91 error_t bridgeMibSetDot1dStpBridgeForwardDelay(const MibObject *object, const uint8_t *oid,
92  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
93 
94 error_t bridgeMibGetDot1dStpBridgeForwardDelay(const MibObject *object, const uint8_t *oid,
95  size_t oidLen, MibVariant *value, size_t *valueLen);
96 
97 error_t bridgeMibSetDot1dStpPortEntry(const MibObject *object, const uint8_t *oid,
98  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
99 
100 error_t bridgeMibGetDot1dStpPortEntry(const MibObject *object, const uint8_t *oid,
101  size_t oidLen, MibVariant *value, size_t *valueLen);
102 
103 error_t bridgeMibGetNextDot1dStpPortEntry(const MibObject *object, const uint8_t *oid,
104  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
105 
107  const MibVariant *value, size_t valueLen, bool_t commit);
108 
110  MibVariant *value, size_t *valueLen);
111 
112 error_t bridgeMibGetDot1dStpPortState(uint16_t portNum,
113  MibVariant *value, size_t *valueLen);
114 
115 error_t bridgeMibSetDot1dStpPortEnable(uint16_t portNum,
116  const MibVariant *value, size_t valueLen, bool_t commit);
117 
118 error_t bridgeMibGetDot1dStpPortEnable(uint16_t portNum,
119  MibVariant *value, size_t *valueLen);
120 
122  const MibVariant *value, size_t valueLen, bool_t commit);
123 
125  MibVariant *value, size_t *valueLen);
126 
128  MibVariant *value, size_t *valueLen);
129 
131  MibVariant *value, size_t *valueLen);
132 
134  MibVariant *value, size_t *valueLen);
135 
137  MibVariant *value, size_t *valueLen);
138 
140  MibVariant *value, size_t *valueLen);
141 
143  const MibVariant *value, size_t valueLen, bool_t commit);
144 
146  MibVariant *value, size_t *valueLen);
147 
148 //C++ guard
149 #ifdef __cplusplus
150 }
151 #endif
152 
153 #endif
int bool_t
Definition: compiler_port.h:53
error_t bridgeMibGetDot1dStpPriority(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpPriority object value.
error_t bridgeMibGetDot1dStpPortPathCost32(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortPathCost32 object value.
error_t bridgeMibGetDot1dStpPortDesignatedRoot(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortDesignatedRoot object value.
error_t bridgeMibSetDot1dStpPortPathCost32(uint16_t portNum, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpPortPathCost32 object value.
error_t bridgeMibSetDot1dStpPortEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpPortEntry object value.
error_t bridgeMibSetDot1dStpPortPriority(uint16_t portNum, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpPortPriority object value.
uint8_t oid[]
Definition: lldp_tlv.h:300
error_t
Error codes.
Definition: error.h:43
error_t bridgeMibSetDot1dStpBridgeHelloTime(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpBridgeHelloTime object value.
error_t bridgeMibGetNextDot1dStpPortEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next dot1dStpPortEntry object.
error_t bridgeMibSetDot1dStpPortEnable(uint16_t portNum, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpPortEnable object value.
error_t bridgeMibGetDot1dStpBridgeForwardDelay(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpBridgeForwardDelay object value.
error_t bridgeMibGetDot1dStpPortDesignatedCost(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortDesignatedCost object value.
error_t bridgeMibSetDot1dStpBridgeMaxAge(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpBridgeMaxAge object value.
error_t bridgeMibGetDot1dStpBridgeMaxAge(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpBridgeMaxAge object value.
error_t bridgeMibGetDot1dStpPortEnable(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortEnable object value.
error_t bridgeMibGetDot1dStpPortEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpPortEntry object value.
error_t bridgeMibSetDot1dStpBridgeForwardDelay(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpBridgeForwardDelay object value.
error_t bridgeMibGetDot1dStpHoldTime(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpHoldTime object value.
Common definitions for MIB modules.
error_t bridgeMibGetDot1dStpBridgeHelloTime(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpBridgeHelloTime object value.
error_t bridgeMibGetDot1dStpHelloTime(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpHelloTime object value.
#define MibObject
Definition: mib_common.h:46
uint8_t value[]
Definition: tcp.h:369
error_t bridgeMibGetDot1dStpPortPriority(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortPriority object value.
uint8_t oidLen
Definition: lldp_tlv.h:299
error_t bridgeMibSetDot1dStpPortPathCost(uint16_t portNum, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpPortPathCost object value.
error_t bridgeMibGetDot1dStpDesignatedRoot(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpDesignatedRoot object value.
error_t bridgeMibGetDot1dStpForwardDelay(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpForwardDelay object value.
error_t bridgeMibGetDot1dStpRootCost(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpRootCost object value.
error_t bridgeMibGetDot1dStpPortForwardTransitions(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortForwardTransitions object value.
error_t bridgeMibGetDot1dStpPortPathCost(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortPathCost object value.
error_t bridgeMibSetDot1dStpPriority(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set dot1dStpPriority object value.
MibVariant
Definition: mib_common.h:196
error_t bridgeMibGetDot1dStpProtocolSpecification(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpProtocolSpecification object value.
error_t bridgeMibGetDot1dStpPortDesignatedBridge(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortDesignatedBridge object value.
error_t bridgeMibGetDot1dStpPortState(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortState object value.
error_t bridgeMibGetDot1dStpPortDesignatedPort(uint16_t portNum, MibVariant *value, size_t *valueLen)
Get dot1dStpPortDesignatedPort object value.
error_t bridgeMibGetDot1dStpTopChanges(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpTopChanges object value.
error_t bridgeMibGetDot1dStpRootPort(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpRootPort object value.
error_t bridgeMibGetDot1dStpMaxAge(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpMaxAge object value.
error_t bridgeMibGetDot1dStpTimeSinceTopologyChange(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get dot1dStpTimeSinceTopologyChange object value.