Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_msrp.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2020 Broadcom.
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_msrp.h
28 *
29 * @purpose Multiple Stream Reservation Protocol (MSRP).
30 *
31 * @component OPEN
32 *
33 * @create 05/15/2020
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_MSRP_H_INCLUDED
39 #define OPENAPI_MSRP_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
45 #define OPEN_MSRP_INTF_MAX_COUNT 1024
46 
48 typedef enum
49 {
53 
54 typedef struct
55 {
56  uint32_t streamID;
57  uint8_t streamMacAddr[OPEN_MAC_ADDR_LEN];
58  OPEN_BOOL_t listenerRegistered;
59  OPEN_BOOL_t listenerDeclared;
60  OPEN_BOOL_t talkerRegistered;
61  OPEN_BOOL_t talkerDeclared;
62  uint32_t listenerDeclType;
63  uint32_t talkerDeclType;
64  uint32_t accLatency;
65  uint8_t failIntf;
66  uint8_t failCode;
67  uint8_t failMacAddr[OPEN_MAC_ADDR_LEN];
68  uint32_t age;
70 
71 typedef struct
72 {
73  uint32_t streamID;
74  uint8_t sourceMacAddr[OPEN_MAC_ADDR_LEN];
75  uint32_t accLatency;
76  uint8_t trafficClass;
77  uint8_t rank;
78  uint32_t maxFrameSize;
79  uint32_t maxIntervalFrames;
80  uint16_t vlanId;
81  uint8_t destMacAddr[OPEN_MAC_ADDR_LEN];
82  uint8_t failIntf;
83  uint8_t failCode;
84  uint8_t failMacAddr[OPEN_MAC_ADDR_LEN];
85  uint8_t talkerIntf;
86  uint32_t listeners[OPEN_MSRP_INTF_MAX_COUNT - 1];
88 
89 typedef enum
90 {
99 
100 typedef enum
101 {
109 
110 
111 /*************************************************************************/
128 
129 /*************************************************************************/
146 
147 /*************************************************************************/
163 
164 /*************************************************************************/
180 
181 /*************************************************************************/
197 open_error_t openapiMsrpIntfModeGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_CONTROL_t *adminMode);
198 
199 /*************************************************************************/
215 open_error_t openapiMsrpIntfModeSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_CONTROL_t mode);
216 
217 /*************************************************************************/
234 open_error_t openapiMsrpSrQavPriorityGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t *priority);
235 
236 /*************************************************************************/
253 open_error_t openapiMsrpSrQavPrioritySet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t priority);
254 
255 /*************************************************************************/
272 open_error_t openapiMsrpSrQavRePriorityGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t *remap);
273 
274 /*************************************************************************/
291 open_error_t openapiMsrpSrQavRePrioritySet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t remap);
292 
293 /*************************************************************************/
309 
310 /*************************************************************************/
326 
327 /*************************************************************************/
342 open_error_t openapiMsrpMaxFanInPortsGet(openapiClientHandle_t *client_handle, uint32_t *maxFanInPorts);
343 
344 /*************************************************************************/
359 open_error_t openapiMsrpMaxFanInPortsSet(openapiClientHandle_t *client_handle, uint32_t maxFanInPorts);
360 
361 /*************************************************************************/
377 open_error_t openapiMsrpSRclassPVIDGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pvid);
378 
379 /*************************************************************************/
395 open_error_t openapiMsrpSRclassPVIDSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t pvid);
396 
397 /*************************************************************************/
415 open_error_t openapiMsrpQavDeltaBandwidthGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *deltaClassA, uint32_t *deltaClassB);
416 
417 /*************************************************************************/
435 open_error_t openapiMsrpQavDeltaBandwidthSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trafficClass, uint32_t deltaBandwidth);
436 
437 /*************************************************************************/
456 open_error_t openapiMsrpQavMaxRateGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint64_t *trClassA, uint64_t *trClassB, uint64_t *total);
457 
458 /*************************************************************************/
477 open_error_t openapiMsrpQavCurrentBandwidthGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint64_t *trClassA, uint64_t *trClassB, uint64_t *total);
478 
479 /*************************************************************************/
496 open_error_t openapiMsrpIsBoundaryPortGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, OPEN_BOOL_t *isBoundary);
497 
498 /*************************************************************************/
515 open_error_t openapiMsrpStreamIndexedNextGet(openapiClientHandle_t *client_handle, uint16_t currentIndex, uint16_t *nextIndex);
516 
517 /*************************************************************************/
534 open_error_t openapiMsrpReservationInformationGet(openapiClientHandle_t *client_handle, uint32_t streamId, uint32_t intIfNum, open_buffdesc *reservationInfo);
535 
536 /*************************************************************************/
553 
554 /*************************************************************************/
571 open_error_t openapiMsrpIntfTrafficPduCounterGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_STATS_t type, uint32_t *counter);
572 
573 /*************************************************************************/
589 open_error_t openapiMsrpFailedRegistrationCounterGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *counter);
590 
591 /*************************************************************************/
607 open_error_t openapiMsrpStreamInformationGet(openapiClientHandle_t *client_handle, uint32_t streamId, open_buffdesc *streamInfo);
608 
609 /*************************************************************************/
625 
626 /*************************************************************************/
641 
642 
643 #endif /* OPENAPI_MSRP_H_INCLUDED */
644 
open_error_t openapiMsrpBoundaryPropagateModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get the MSRP boundary propagate mode.
open_error_t openapiMsrpIntfModeGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_CONTROL_t *adminMode)
Get the MSRP mode for the specified interface.
Domain attributes.
Definition: openapi_msrp.h:97
uint32_t listenerDeclType
Listener type.
Definition: openapi_msrp.h:62
uint8_t failIntf
Failure interface.
Definition: openapi_msrp.h:82
open_error_t openapiMsrpModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
set the global MSRP mode.
uint8_t failIntf
Failure interface.
Definition: openapi_msrp.h:65
OPEN_MSRP_DECLARATION_t
Definition: openapi_msrp.h:89
Flag for all received msrp PDUs.
Definition: openapi_msrp.h:102
uint8_t failCode
Failure code.
Definition: openapi_msrp.h:66
Flag for received msrp PDUs with bad header.
Definition: openapi_msrp.h:103
#define OPEN_MSRP_INTF_MAX_COUNT
< Maximum number of MSRP interfaces in the system.
Definition: openapi_msrp.h:45
open_error_t openapiMsrpSrQavPrioritySet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t priority)
Set the 802.1Qav priority.
open_error_t openapiMsrpIsBoundaryPortGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, OPEN_BOOL_t *isBoundary)
Check if a port is boundary port.
uint8_t failCode
Failure code.
Definition: openapi_msrp.h:83
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiMsrpTalkerPruningModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Set the MSRP talker pruning mode.
Flag for msrp PDUs which failed.
Definition: openapi_msrp.h:106
open_error_t openapiMsrpQavCurrentBandwidthGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint64_t *trClassA, uint64_t *trClassB, uint64_t *total)
Get the current used bandwidth values for the interface.
open_error_t openapiMsrpQavDeltaBandwidthSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trafficClass, uint32_t deltaBandwidth)
Get the delta bandwidth values for the interface.
open_error_t openapiMsrpStreamIndexedNextGet(openapiClientHandle_t *client_handle, uint16_t currentIndex, uint16_t *nextIndex)
Given the next stream index to the given index.
open_error_t openapiMsrpIntfModeSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_CONTROL_t mode)
Set the MSRP mode for the given interface.
open_error_t openapiMsrpTrafficCountersClear(openapiClientHandle_t *client_handle)
Clear all MSRP traffic counters.
open_error_t openapiMsrpMaxFanInPortsSet(openapiClientHandle_t *client_handle, uint32_t maxFanInPorts)
Set the maximum number of the ports, where MSRP registrations are allowed.
open_error_t openapiMsrpIntfTrafficPduCounterGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_STATS_t type, uint32_t *counter)
Get the value of specified MSRP counter for an interface.
open_error_t openapiMsrpSRclassPVIDGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pvid)
Get the MSRP SR class PVID value on the interface.
open_error_t openapiMsrpTalkerPruningModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get the MSRP talker pruning mode.
open_error_t openapiMsrpReservationInformationGet(openapiClientHandle_t *client_handle, uint32_t streamId, uint32_t intIfNum, open_buffdesc *reservationInfo)
Get the MSRP Reservation Information.
uint8_t trafficClass
SR Traffic class.
Definition: openapi_msrp.h:76
OPEN_MSRP_STATS_t
Definition: openapi_msrp.h:100
open_error_t openapiMsrpModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get the global MSRP mode.
uint32_t streamID
Stream id to uniquely identify a stream.
Definition: openapi_msrp.h:56
open_error_t openapiMsrpStreamInformationGet(openapiClientHandle_t *client_handle, uint32_t streamId, open_buffdesc *streamInfo)
Get the MSRP Stream Information.
Flag for received msrp PDUs with bad data field.
Definition: openapi_msrp.h:104
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiMsrpSRclassPVIDSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t pvid)
Set the MSRP SR class PVID value on the interface.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
Flag for message queue send failed.
Definition: openapi_msrp.h:107
open_error_t openapiMsrpSrQavPriorityGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t *priority)
Get the 802.1Qav priority.
open_error_t openapiMsrpQavDeltaBandwidthGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *deltaClassA, uint32_t *deltaClassB)
Get the delta bandwidth values for the interface.
open_error_t openapiMsrpQavMaxRateGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint64_t *trClassA, uint64_t *trClassB, uint64_t *total)
Get the max free bandwidth values for the interface.
open_error_t openapiMsrpTrafficCountersPerIfClear(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Clear MSRP traffic counters on specified interface.
open_error_t openapiMsrpTrafficPduCounterGet(openapiClientHandle_t *client_handle, OPEN_MSRP_STATS_t type, uint32_t *counter)
Get the value of specified MSRP counter.
open_error_t openapiMsrpBoundaryPropagateModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Set the MSRP boundary propagate mode.
open_error_t openapiMsrpFailedRegistrationCounterGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *counter)
Get Failed Registration Counter.
open_error_t openapiMsrpSrQavRePrioritySet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t remap)
Set the 802.1Qav remapped priority.
Flag for all transmitted msrp PDUs.
Definition: openapi_msrp.h:105
open_error_t openapiMsrpSrQavRePriorityGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MSRP_QAV_STREAMCLASS_t trClass, uint32_t *remap)
Get the 802.1Qav remapped priority.
uint32_t streamID
Stream id to uniquely identify a stream.
Definition: openapi_msrp.h:73
uint16_t vlanId
VLAN tag of stream packets.
Definition: openapi_msrp.h:80
uint32_t talkerDeclType
Talker type.
Definition: openapi_msrp.h:63
OPEN_MSRP_QAV_STREAMCLASS_t
Definition: openapi_msrp.h:48
uint8_t rank
Stream Rank.
Definition: openapi_msrp.h:77
open_error_t openapiMsrpMaxFanInPortsGet(openapiClientHandle_t *client_handle, uint32_t *maxFanInPorts)
Get the maximum number of the ports, where MSRP registrations are allowed.
uint32_t age
Stream Age.
Definition: openapi_msrp.h:68