This document provides a brief description of the msrp OpEN APIs. It provides the following services:
- Get the global MSRP mode.
- set the global MSRP mode.
- Get the MSRP boundary propagate mode.
- Set the MSRP boundary propagate mode.
- Get the MSRP mode for the specified interface.
- Set the MSRP mode for the given interface.
- Get the 802.1Qav priority.
- Set the 802.1Qav priority.
- Get the 802.1Qav remapped priority.
- Set the 802.1Qav remapped priority.
- Get the MSRP talker pruning mode.
- Set the MSRP talker pruning mode.
- Get the maximum number of the ports, where MSRP registrations are allowed.
- Set the maximum number of the ports, where MSRP registrations are allowed.
- Get the MSRP SR class PVID value on the interface.
- Set the MSRP SR class PVID value on the interface.
- Get the delta bandwidth values for the interface.
- Set the delta bandwidth values for the interface.
- Get the max free bandwidth values for the interface.
- Get the current used bandwidth values for the interface.
- Check if a port is boundary port.
- Given the next stream index to the given index.
- Get the MSRP Reservation Information.
- Get the value of specified MSRP counter.
- Get the value of specified MSRP counter for an interface.
- Get Failed Registration Counter.
- Get the MSRP Stream Information.
- Clear MSRP traffic counters on specified interface.
- Clear all MSRP traffic counters.
Example C Application msrp_example
Initialization
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
msrp_example
msrp_example.c is a sample application that demonstrates the use of OpEN's msrp APIs. msrp_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.
Sample Output
- Usage: ./msrp_example <test#> <arg1> <arg2> ...
- Test 1: Get the global MSRP mode: msrp_example 1
- Test 2: set the global MSRP mode: msrp_example 2 <mode>(0-Disable, 1-Enable)
- Test 3: Get the MSRP boundary propagate mode: msrp_example 3
- Test 4: Set the MSRP boundary propagate mode: 4 <mode>(0-Disable, 1-Enable)
- Test 5: Get the MSRP mode for the specified interface: msrp_example 5 <intIfNum>
- Test 6: Set the MSRP mode for the given interface: msrp_example 6 <intIfNum><mode>(0-Disable, 1-Enable)
- Test 7: Get the 802.1Qav priority: msrp_example 7 <intIfNum> <trClass>
- Test 8: Set the MSRP SR Qav priority: msrp_example 8 <intIfNum> <trClass>(0-Class A or 1-Class B) <priority>(0-7)
- Test 9: Get the 802.1Qav remapped priority: msrp_example 9 <intIfNum> <trClass>
- Test 10: Set the MSRP Sr Qav remapped priority: msrp_example 10 <intIfNum> <trClass>(0-Class A or 1-Class B) <remap>(0-7)
- Test 11: Get the MSRP talker pruning mode: msrp_example 11
- Test 12: Set the MSRP talker pruning mode: msrp_example 12 <mode>(0-Disable, 1-Enable)
- Test 13: Get the maximum number of the ports, where MSRP registrations are allowed: msrp_example 13
- Test 14: Set the maximum number of the ports, where MSRP registrations are allowed: msrp_example 14 <maxFanInPorts>
- Test 15: Get the MSRP SR class PVID value on the interface: msrp_example 15 <intIfNum>>
- Test 16: Set the MSRP SR class PVID value on the interface: msrp_example 16 <intIfNum> <pvid>(1-4094)
- Test 17: Get the delta bandwidth values for the interface: msrp_example 17 <intIfNum>
- Test 18: Set the delta bandwidth values for the interface: msrp_example 18 <intIfNum> <trafficClass>(0-Class A or 1-Class B) <deltaBandwidth> (0-75)
- Test 19: Get the max free bandwidth values for the interface: msrp_example 19 <intIfNum>
- Test 20: Get the current used bandwidth values for the interface: msrp_example 20 <intIfNum>
- Test 21: Check if a port is boundary port: msrp_example 21 <intIfNum> <trClass> (0-Class A or 1-Class B)
- Test 22: Given the next stream index to the given index: msrp_example 22 <currentIndex>
- Test 23: Get the MSRP Reservation Information: msrp_example 23 <intIfNum>
- Test 24: Get the value of specified MSRP counter: msrp_example 24 <type>
- Test 25: Get the value of specified MSRP counter for an interface: msrp_example 25 <intIfNum> <type>
- Test 26: Get Failed Registration Counter: msrp_example 26 <intIfNum>
- Test 27: Get the MSRP Stream Information: msrp_example 27 <streamId>
- Test 28: Clear MSRP traffic counters on specified interface: msrp_example 28 <intIfNum>
- Test 29: Clear all MSRP traffic counters: msrp_example 29
- Test 30: Run API sanity checks: msrp_example 30
msrp CLI/API Cross Reference
openapiMsrpMaxFanInPortsGet()
openapiMsrpBoundaryPropagateModeGet()
openapiMsrpSrQavPriorityGet()
openapiMsrpSrQavRePriorityGet()
show msrp interface u/s/p | openapiMsrpIntfModeGet()
openapiMsrpSRclassPVIDGet()
openapiMsrpIsBoundaryPortGet()
openapiMsrpQavDeltaBandwidthGet()
openapiMsrpQavMaxRateGet()
openapiMsrpQavCurrentBandwidthGet()
openapiMsrpSrQavPriorityGet()
openapiMsrpSrQavRePriorityGet()
show msrp interface bandwidth | openapiMsrpQavDeltaBandwidthGet()
openapiMsrpQavMaxRateGet()
openapiMsrpQavCurrentBandwidthGet()
show msrp reservations <intf> summary | openapiMsrpStreamIndexedGetNext()
openapimsrpReservationInformationGet()
show msrp statistics summary | openapiMsrpTrafficPduCounterGet()
show msrp statistics <interface u/s/p> | openapiMsrpTrafficPduCounterGet()
openapiMsrpIntfTrafficPduCounterGet()
openapiMsrpFailedRegistrationCounterGet()
show msrp stream detail | openapiMsrpStreamIndexedNextGet()
openapimsrpStreamInformationGet()
msrp | openapiMsrpModeSet()
openapiMsrpIntfModeSet() msrp boundaryPropagate | openapiMsrpBoundaryPropagateModeSet() msrp srClassQav class | openapiMsrpSrQavPrioritySet()
openapiMsrpSrQavRePrioritySet() msrp talker-pruning | openapiMsrpTalkerPruningModeSet() msrp max-fan-in-ports | openapiMsrpMaxFanInPortsSet() msrp srClassPVID | openapiMsrpSRclassPVIDSet() msrp deltaBandwidth | openapiMsrpQavDeltaBandwidthSet() clear msrp statistics <intf/all> | openapiMsrpTrafficCountersPerIfClear()
openapiMsrpTrafficCountersClear()