Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_bridge.h
Go to the documentation of this file.
1 
9 /**************************************************************************************
10 *
11 * Copyright Broadcom Corporation 2012-2018
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_bridge.h
28 *
29 * @purpose BRIDGE support
30 *
31 * @component OPEN
32 *
33 * @create 06/02/2015
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_BRIDGE_H_INCLUDED
39 #define OPENAPI_BRIDGE_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 #define OPEN_STP_PROTOCOL_SPEC_UNKNOWN 1
44 #define OPEN_STP_PROTOCOL_SPEC_IEEE8021D 3
45 
46 /* string representation of MAC in "XX:XX:XX:XX:XX:XX" format including EOL symbol */
47 #define OPEN_STP_DOT1D_DESIGNATED_ROOT_LEN 18
48 
49 #define OPEN_FDB_ADDR_LEN 8
50 #define OPEN_FDB_ADDR_STR_LEN ((OPEN_FDB_ADDR_LEN * 2) + (OPEN_FDB_ADDR_LEN - 1))
51 
52 /* Spanning Tree Port States */
53 #define OPEN_DOT1D_BLOCKING 1
54 #define OPEN_DOT1D_LISTENING 2
55 #define OPEN_DOT1D_LEARNING 3
56 #define OPEN_DOT1D_FORWARDING 4
57 #define OPEN_DOT1D_DISABLED 5
58 #define OPEN_DOT1D_MANUAL_FWD 6
59 #define OPEN_DOT1D_NOT_PARTICIPATE 7
60 #define OPEN_NULLPTR ((void *)0)
61 
62 /**********************************************************************************/
78  uint32_t intIfNum,
79  uint32_t *nextIntIfNum);
80 
81 /***********************************************************************************************/
99  open_buffdesc *bridgeAddress);
100 
101 /**********************************************************************************/
116  uint32_t *numPorts);
117 
118 /**********************************************************************************/
133 open_error_t openapiDot1dBaseTypeGet(openapiClientHandle_t *client_handle, uint32_t *type);
134 
135 /**********************************************************************************/
151  uint32_t port);
152 
153 /**********************************************************************************/
174  uint32_t port, open_buffdesc *buffer);
175 
176 /**********************************************************************************/
197  uint32_t port, uint32_t *ifIndex);
198 
199 /**********************************************************************************/
213 open_error_t openapiDot1dIsValidIntf(openapiClientHandle_t *client_handle, uint32_t intIfNum);
214 
215 /**********************************************************************************/
234  uint32_t port,
235  uint32_t *delayExceededDiscardsValue);
236 
237 /**********************************************************************************/
255  uint32_t port,
256  uint32_t *mtuExceededDiscardsValue);
257 
258 /**********************************************************************************/
273  uint32_t *value);
274 
275 /**********************************************************************************/
290  uint32_t *value);
291 
292 /**********************************************************************************/
307  uint64_t *value);
308 
309 /**********************************************************************************/
324  uint32_t *value);
325 
326 /**********************************************************************************/
344  open_buffdesc *buffer);
345 
346 /**********************************************************************************/
361  uint32_t *value);
362 
363 /**********************************************************************************/
378  uint32_t *value);
379 
380 /**********************************************************************************/
397  uint32_t *value);
398 
399 /**********************************************************************************/
416  uint32_t *value);
417 
418 /**********************************************************************************/
435  uint32_t *value);
436 
437 /**********************************************************************************/
452  uint32_t *value);
453 
454 /**********************************************************************************/
471  uint32_t *value);
472 
473 /**********************************************************************************/
488  uint32_t *value);
489 
490 /**********************************************************************************/
505  uint32_t *value);
506 
507 /**********************************************************************************/
523  uint32_t port, uint32_t *value);
524 
525 /**********************************************************************************/
541  uint32_t intIfNum,
542  uint32_t *isInInstance);
543 
544 /**********************************************************************************/
560  uint32_t intIfNum,
561  uint32_t *nextIntIfNum);
562 
563 /**********************************************************************************/
579  uint32_t port, uint32_t *value);
580 
581 /**********************************************************************************/
597  uint32_t port, uint32_t *value);
598 
599 /**********************************************************************************/
615  uint32_t port, open_buffdesc *buffer);
616 
617 /**********************************************************************************/
633  uint32_t port, uint32_t *value);
634 
635 /**********************************************************************************/
651  uint32_t port, open_buffdesc *buffer);
652 
653 /**********************************************************************************/
669  uint32_t port, uint16_t *value);
670 
671 /**********************************************************************************/
687  uint32_t port, uint32_t *value);
688 
689 /**********************************************************************************/
705  uint32_t *value);
706 
707 /**********************************************************************************/
724  uint32_t *value);
725 
726 /**********************************************************************************/
743  uint32_t value);
744 
745 /**********************************************************************************/
761  open_buffdesc *address);
762 
763 /**********************************************************************************/
779  open_buffdesc *address);
780 
781 /**********************************************************************************/
809  open_buffdesc *address, uint32_t *value);
810 
811 /**********************************************************************************/
862  open_buffdesc *address, uint32_t *value);
863 
864 /**********************************************************************************/
880  uint32_t port, uint32_t *value);
881 
882 /**********************************************************************************/
898  uint32_t port, uint32_t *value);
899 
900 /**********************************************************************************/
916  uint32_t port, uint32_t *value);
917 
918 /**********************************************************************************/
935  uint32_t port, uint32_t *value);
936 
937 #endif /* OPENAPI_BRIDGE_H_INCLUDED */
938 
open_error_t openapiDot1dBasePortEntryGet(openapiClientHandle_t *client_handle, uint32_t port)
Get admin state of the port.
open_error_t openapiDot1dStpPortDesignatedRootGet(openapiClientHandle_t *client_handle, uint32_t port, open_buffdesc *buffer)
Get Spanning Tree Designated Root for the switch.
open_error_t openapiDot1dStpPriorityGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get the Spanning Tree Bridge priority.
open_error_t openapiDot1dBaseBridgeAddressGet(openapiClientHandle_t *client_handle, open_buffdesc *bridgeAddress)
Get the unique MAC address used to refer to the bridge.
open_error_t openapiDbDot1dTpAgingTimeSet(openapiClientHandle_t *client_handle, uint32_t value)
Set timeout period for aging out dynamically learned forwarding information.
open_error_t openapiDot1dStpBridgeHelloTimeGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree Bridge Hello Time.
open_error_t openapiDot1dStpPortPriorityGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get Spanning Tree Port Priority.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiDot1dStpMaxAgeGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree max age.
open_error_t openapiDot1dTpPortMaxInfoGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get maximum size of the INFO field this port will receive or transmit.
open_error_t openapiDot1dTpPortInDiscardsGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get count of valid frames received which were discarded by the Forwarding Process.
open_error_t openapiDot1dStpTimeSinceTopologyChangeGet(openapiClientHandle_t *client_handle, uint64_t *value)
Get the time since last topology change was detected by the bridge.
open_error_t openapiDot1dStpHoldTimeGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree hold time.
open_error_t openapiDot1dTpLearnedEntryDiscardsGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get number of Forwarding Database entries that have been discarded due to a lack of space to store th...
open_error_t openapiDot1dInstanceMemberGetNext(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *nextIntIfNum)
Get next interface for current instance.
open_error_t openapiDot1dStpPortForwardTransitionsGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get number of times this port has transitioned from Learning state to Forwarding state.
open_error_t openapiDot1dStpTopChangesGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get the STP change count.
open_error_t openapiDot1dIsValidIntf(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Check if an interface is valid for DOT1D.
open_error_t openapiDot1dStpRootPortGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get port number with lowest cost path from bridge to the root bridge.
open_error_t openapiDot1dBasePortIfIndexGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *ifIndex)
Get ifIndex associated with the internal interface number.
open_error_t openapiDot1dStpRootCostGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get the cost of the path to the root as seen from this bridge.
open_error_t openapiDot1dBasePortDelayExceededDiscardsGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *delayExceededDiscardsValue)
Get number of frames discarded by this port due to delay through the bridge.
open_error_t openapiDot1dStpForwardDelayGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree forward delay.
open_error_t openapiDot1dStpPortDesignatedBridgeGet(openapiClientHandle_t *client_handle, uint32_t port, open_buffdesc *buffer)
Get Spanning Tree Designated Bridge for this port.
open_error_t openapiDot1dBaseTypeGet(openapiClientHandle_t *client_handle, uint32_t *type)
Get dot1d Base type of bridging.
open_error_t openapiDot1dTpFdbEntryNextGet(openapiClientHandle_t *client_handle, open_buffdesc *address)
Get info about a specific unicast MAC address which the bridge has forwarding and/or filtering inform...
open_error_t openapiDot1dBasePortMtuExceededDiscardsGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *mtuExceededDiscardsValue)
Get number of frames discarded by this port due to delay through the bridge.
open_error_t openapiDot1dStpDesignatedRootGet(openapiClientHandle_t *client_handle, open_buffdesc *buffer)
Get Spanning Tree Designated root for the switch.
open_error_t openapiDot1dStpBridgeForwardDelayGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree Bridge Forward Delay.
open_error_t openapiDbDot1dTpAgingTimeGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get timeout period for aging out dynamically learned forwarding information.
open_error_t openapiDot1dTpPortInFramesGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get number of frames received by this port from its segment.
open_error_t openapiDot1dTpFdbStatusGet(openapiClientHandle_t *client_handle, open_buffdesc *address, uint32_t *value)
Get the status of the dot1dTpFdbEntry.
open_error_t openapiDot1dBasePortCircuitGet(openapiClientHandle_t *client_handle, uint32_t port, open_buffdesc *buffer)
Get name of an object instance unique to this port.
open_error_t openapiDot1dTpFdbPortGet(openapiClientHandle_t *client_handle, open_buffdesc *address, uint32_t *value)
Returns the port number.
open_error_t openapiDot1dStpPortStateGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get Spanning Tree Port State.
open_error_t openapiDot1dStpPortDesignatedPortGet(openapiClientHandle_t *client_handle, uint32_t port, uint16_t *value)
Get Spanning Tree Designated port ID.
open_error_t openapiDot1dTpPortOutFramesGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get number of frames transmitted by this port to its segment.
open_error_t openapiDot1dBaseNumPortsGet(openapiClientHandle_t *client_handle, uint32_t *numPorts)
Get number of ports controlled by the bridging entity.
open_error_t openapiDot1dTpFdbEntryGet(openapiClientHandle_t *client_handle, open_buffdesc *address)
Get info about a specific unicast MAC address which the bridge has forwarding and/or filtering inform...
open_error_t openapiDot1dStpHelloTimeGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree hello time.
open_error_t openapiDot1dBasePortEntryNextGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *nextIntIfNum)
Get Internal Interface Number of next valid port.
open_error_t openapiDot1dStpBridgeMaxAgeGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get Spanning Tree bridge max age.
open_error_t openapiDot1dStpPortDesignatedCostGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get Spanning Tree Designated Cost for this port.
open_error_t openapiDot1dStpProtocolSpecificationGet(openapiClientHandle_t *client_handle, uint32_t *value)
Get indication of what version of the Spanning Tree Protocol is being run.
open_error_t openapiDot1dStpPortPathCostGet(openapiClientHandle_t *client_handle, uint32_t port, uint32_t *value)
Get Spanning Tree Path Cost for this port.
open_error_t openapiDot1dIsInterfaceInCurrentInstance(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *isInInstance)
Determine if the interface is the currently configured STP instance.