Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
Macros | Enumerations | Functions
Class Of Service Configuration [OPENAPI_COS]

Macros

#define OPEN_COS_ALL_INTERFACES   0
 
#define OPEN_COS_QUEUE_ID_MIN   0
 
#define OPEN_MAX_CFG_DROP_PREC_LEVELS   4
 
#define OPEN_MIN_CFG_DROP_PREC_LEVELS   1
 

Enumerations

enum  OPEN_QOS_COS_MAP_TRUST_MODE_t {
  OPEN_QOS_COS_MAP_TRUST_MODE_INVALID = 0, OPEN_QOS_COS_MAP_TRUST_MODE_UNTRUSTED, OPEN_QOS_COS_MAP_TRUST_MODE_DOT1P, OPEN_QOS_COS_MAP_TRUST_MODE_IPPREC,
  OPEN_QOS_COS_MAP_TRUST_MODE_IPDSCP
}
 QOS COS mapping trust modes. More...
 
enum  OPEN_QOS_COS_QUEUE_MGMT_TYPE_t { OPEN_QOS_COS_QUEUE_MGMT_TYPE_TAILDROP = 1 }
 QOS COS queue management types. More...
 
enum  OPEN_QOS_COS_QUEUE_SCHED_TYPE_t { OPEN_QOS_COS_QUEUE_SCHED_TYPE_STRICT = 1, OPEN_QOS_COS_QUEUE_SCHED_TYPE_WEIGHTED }
 QOS COS queue scheduler types. More...
 

Functions

open_error_t openapiCosQueueIntfShapingPercentageIncrementGet (openapiClientHandle_t *client_handle, uint32_t *increment)
 Get the minimum increment allowed when percentage of link speed is used to express rates. More...
 
open_error_t openapiCosQueueIntfShapingRateGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rate)
 Get the COS egress shaping rate for an interface. More...
 
open_error_t openapiCosQueueIntfShapingRateSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t rate)
 Set the COS egress shaping rate for an interface. More...
 
open_error_t openapiCosQueueIntfShapingRateUnitsGet (openapiClientHandle_t *client_handle, OPEN_RATE_UNIT_t *rateUnit)
 Get the units used to express rates. More...
 
open_error_t openapiCosQueueMaxIdGet (openapiClientHandle_t *client_handle, uint32_t *maxQueueId)
 Get the max cos queue ID value. More...
 
open_error_t openapiCosQueueWredDropParamsReset (openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum)
 Reset WRED and ECN drop configuration on a given queue for a given or all interfaces. More...
 
open_error_t openapiCosQueueWredDropParamsSet (openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, uint8_t dropPrecedence, OPEN_BOOL_t ecnEnabled, int16_t wredMinThreshold, int16_t wredMaxThreshold, int16_t wredDropProbability)
 Set WRED and ECN drop configuration on a given queue for a given or all interfaces. More...
 
open_error_t openapiCosQueueWredSet (openapiClientHandle_t *client_handle, uint32_t intfNum, uint8_t queueNum, OPEN_BOOL_t enableWred)
 Enable or disable WRED for a given queue and for a given or all interfaces. More...
 
open_error_t openapiCosQueueWredStatsClear (openapiClientHandle_t *client_handle, uint32_t intfNum)
 Clear WRED and ECN counters for a given or all interfaces. More...
 
open_error_t openapiCosQueueWredStatsGet (openapiClientHandle_t *client_handle, uint32_t intfNum, uint64_t *dropCount, uint64_t *ecnMarked)
 Get WRED drop and ECN marked counters for a given or all interfaces. More...
 
open_error_t openapiQosCosDot1dDefaultTrafficClassGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, uint32_t *pTc)
 Gets factory default dot1d traffic class information. More...
 
open_error_t openapiQosCosDot1dTrafficClassEntryGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority)
 Gets status of user priority to traffic class mapping for a given interface. More...
 
open_error_t openapiQosCosDot1dTrafficClassEntryNextGet (openapiClientHandle_t *client_handle, uint32_t *pIntIfNum, uint32_t *pPriority)
 Gets next sequential user priority to traffic class mapping. More...
 
open_error_t openapiQosCosDot1dTrafficClassGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, uint32_t *pTc)
 Gets dot1d traffic class information. More...
 
open_error_t openapiQosCosDot1dTrafficClassSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t priority, uint32_t tc)
 Sets dot1d traffic class. More...
 
open_error_t openapiQosCosMapGetIntfIndexForGlobalConfig (openapiClientHandle_t *client_handle, uint32_t *pIntIfNum)
 Gets intIfNum to denotes global config operation. More...
 
open_error_t openapiQosCosMapGlobalTrustModeGet (openapiClientHandle_t *client_handle, OPEN_QOS_COS_MAP_TRUST_MODE_t *pTrustMode)
 Gets CoS global trust mode. More...
 
open_error_t openapiQosCosMapGlobalTrustModeSet (openapiClientHandle_t *client_handle, OPEN_QOS_COS_MAP_TRUST_MODE_t trustMode)
 Sets the CoS global trust mode. More...
 
open_error_t openapiQosCosMapInterfaceTrustModeGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_QOS_COS_MAP_TRUST_MODE_t *pTrustMode)
 Gets CoS internal trust mode. More...
 
open_error_t openapiQosCosMapInterfaceTrustModeSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_QOS_COS_MAP_TRUST_MODE_t trustMode)
 Sets the CoS interface trust mode. More...
 
open_error_t openapiQosCosMapIpDscpDefaultsRestore (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Restore default ip DSCP mappings for given interface. More...
 
open_error_t openapiQosCosMapIpDscpDefaultTrafficClassGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t dscp, uint32_t *pTc)
 Gets the default traffic class mapping for specified ip DSCP value. More...
 
open_error_t openapiQosCosMapIpDscpIndexGet (openapiClientHandle_t *client_handle, uint32_t dscp)
 Gets status of specified IP DSCP mapping table index. More...
 
open_error_t openapiQosCosMapIpDscpIndexGetNext (openapiClientHandle_t *client_handle, uint32_t dscp, uint32_t *pNxtDscp)
 Gets next sequential ip DSCP mapping table index. More...
 
open_error_t openapiQosCosMapIpDscpIntfIndexGet (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Gets status of specified ip DSCP mapping table interface index. More...
 
open_error_t openapiQosCosMapIpDscpIntfIndexGetNext (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pNxtIntIfNum)
 Gets next sequential ip DSCP mapping table interface index. More...
 
open_error_t openapiQosCosMapIpDscpTrafficClassGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t dscp, uint32_t *pTc)
 Gets the assigned traffic class (queue) for given ip DSCP. More...
 
open_error_t openapiQosCosMapIpDscpTrafficClassSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t dscp, uint32_t tc)
 Sets the assigned traffic class (queue) for given Ip DSCP. More...
 
open_error_t openapiQosCosMapTrustModeIntfIndexGet (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Gets specified trust mode interface index status. More...
 
open_error_t openapiQosCosMapTrustModeIntfIndexGetNext (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pNxtIntIfNum)
 Gets next sequential specified trust mode interface. More...
 
open_error_t openapiQosCosMapUntrustedPortDefaultTrafficClassGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pTcVal)
 Gets CoS untrusted port default traffic class for given internal interface. More...
 
open_error_t openapiQosCosQueueIdIndexGet (openapiClientHandle_t *client_handle, uint32_t queueId)
 Gets specified queueId index status. More...
 
open_error_t openapiQosCosQueueIdIndexGetNext (openapiClientHandle_t *client_handle, uint32_t queueId, uint32_t *pNxtqueueId)
 Gets next sequential specified queueId index. More...
 
open_error_t openapiQosCosQueueIntfIndexGet (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Gets specified queue config interface index status. More...
 
open_error_t openapiQosCosQueueIntfIndexGetNext (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pNxtIntIfNum)
 Gets next sequential specified queue config interface index. More...
 
open_error_t openapiQosCosQueueIntfIsValid (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *pIsQueueIntfValid)
 Gets if the specified interface is valid for COS queue config. More...
 
open_error_t openapiQosCosQueueMgmtTypeListGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *pMgmtTypeList)
 Gets queue management type list for all queues on a given interface. More...
 
open_error_t openapiQosCosQueueMgmtTypeSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t queueId, OPEN_QOS_COS_QUEUE_MGMT_TYPE_t qMgmtType)
 Sets queue management type for a specific queue on a given interface. More...
 
open_error_t openapiQosCosQueueMinBandwidthListGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *pMinBwList)
 Gets minimum bandwidth list for all queues on a given interface. More...
 
open_error_t openapiQosCosQueueMinBandwidthSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t queueId, uint32_t minBwVal)
 Sets minimum bandwidth for a specific queue on a given interface. More...
 
open_error_t openapiQosCosQueueSchedulerTypeListGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *pSchTypeList)
 Gets scheduler type list for all queues on a given interface. More...
 
open_error_t openapiQosCosQueueSchedulerTypeSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t queueId, OPEN_QOS_COS_QUEUE_SCHED_TYPE_t schTypeVal)
 Sets scheduler type for a specific queue on a given interface. More...
 

Detailed Description

Enumeration Type Documentation

QOS COS mapping trust modes.

Enumerator
OPEN_QOS_COS_MAP_TRUST_MODE_INVALID 

trust mode invalid

OPEN_QOS_COS_MAP_TRUST_MODE_UNTRUSTED 

do not trust any pkt markings

OPEN_QOS_COS_MAP_TRUST_MODE_DOT1P 

trust pkt Dot1p (802.1p) value

OPEN_QOS_COS_MAP_TRUST_MODE_IPPREC 

trust pkt IP Precedence value

OPEN_QOS_COS_MAP_TRUST_MODE_IPDSCP 

trust pkt IP DSCP value

Definition at line 50 of file openapi_cos.h.

QOS COS queue management types.

Enumerator
OPEN_QOS_COS_QUEUE_MGMT_TYPE_TAILDROP 

tail drop

Definition at line 67 of file openapi_cos.h.

QOS COS queue scheduler types.

Enumerator
OPEN_QOS_COS_QUEUE_SCHED_TYPE_STRICT 

strict priority

OPEN_QOS_COS_QUEUE_SCHED_TYPE_WEIGHTED 

WRR/WFQ.

Definition at line 60 of file openapi_cos.h.

Function Documentation

open_error_t openapiCosQueueIntfShapingPercentageIncrementGet ( openapiClientHandle_t client_handle,
uint32_t *  increment 
)

Get the minimum increment allowed when percentage of link speed is used to express rates.

Parameters
[in]client_handleClient handle from registration API
[out]incrementminimum percentage increment
Return values
OPEN_E_NONEvalue returned successfully
OPEN_E_ERRORplatform does not use percentage to express rates
OPEN_E_PARAMinvalid parameter passed
Note
For platforms using rate expressed as percentages, the rates are expressed in whole percentage values. In some cases, there are restrictions on the values for the percentage parameter. For example, if this function returns 5 for the increment, only percentage values of 0, 5, 10, 15, ... , 95, 100 are accepted. In many cases, the value of increment is 1.

OpEN API Version: 1.14

open_error_t openapiCosQueueIntfShapingRateGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  rate 
)

Get the COS egress shaping rate for an interface.

Parameters
[in]client_handleClient handle from registration API
[in]ifNuminterface number
[out]rateshaping rate value
Return values
OPEN_E_NONEvalue returned successfully
OPEN_E_UNAVAILplatform does not support COS egress shaping
OPEN_E_FAILfailed to get shaping rate
OPEN_E_PARAMinvalid parameter passed
Note
The value for rate is interpreted based on the data returned from openapiCosQueueIntfSapingRateUnitsGet().

OpEN API Version: 1.14

open_error_t openapiCosQueueIntfShapingRateSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  rate 
)

Set the COS egress shaping rate for an interface.

Parameters
[in]client_handleClient handle from registration API
[in]ifNuminterface number
[in]rateshaping rate value
Return values
OPEN_E_NONEvalue set successfully
OPEN_E_UNAVAILplatform does not support COS egress shaping
OPEN_E_FAILfailed to set shaping rate
OPEN_E_PARAMinvalid parameter passed
Note
The value for rate is interpreted based on the data returned from openapiCosQueueIntfSapingRateUnitsGet().

OpEN API Version: 1.14

open_error_t openapiCosQueueIntfShapingRateUnitsGet ( openapiClientHandle_t client_handle,
OPEN_RATE_UNIT_t rateUnit 
)

Get the units used to express rates.

Parameters
[in]client_handleClient handle from registration API
[out]rateUnitrate unit identifier
Return values
OPEN_E_NONEvalue returned successfully
OPEN_E_PARAMinvalid parameter passed
Note
Various platforms use different ways of expressing traffic rates. Examples of the rate unit are kilobytes per second (KBPS) and percentage of link speed. This function returns the unit used on the switch. The caller should use this information to correctly set parameter values for rates when using other APIs in this file.

OpEN API Version: 1.14

open_error_t openapiCosQueueMaxIdGet ( openapiClientHandle_t client_handle,
uint32_t *  maxQueueId 
)

Get the max cos queue ID value.

Parameters
[in]client_handleClient handle from registration API
[out]maxQueueIdQueue number
Return values
OPEN_E_NONEMax cos queue ID returned successfully
OPEN_E_PARAMInvalid parameter passed

OpEN API Version: 1.25

Examples:
cos_example.c.
open_error_t openapiCosQueueWredDropParamsReset ( openapiClientHandle_t client_handle,
uint32_t  intfNum,
uint8_t  queueNum 
)

Reset WRED and ECN drop configuration on a given queue for a given or all interfaces.

Parameters
[in]client_handleClient handle from registration API
[in]intfNuminterface number
[in]queueNumqueue number
Return values
OPEN_E_NONEvalue set successfully
OPEN_E_UNAVAILplatform does not support WRED feature
OPEN_E_FAILfailed to reset drop params config
Note
If intfNum is zero then WRED drop configuration will be reset on all interfaces.
Refer openapiCosQueueMaxIdGet() for max cos queue ID value.
Refer OPEN_COS_QUEUE_ID_MIN for min cos queue ID value.

OpEN API Version: 1.14

Examples:
cos_example.c.
open_error_t openapiCosQueueWredDropParamsSet ( openapiClientHandle_t client_handle,
uint32_t  intfNum,
uint8_t  queueNum,
uint8_t  dropPrecedence,
OPEN_BOOL_t  ecnEnabled,
int16_t  wredMinThreshold,
int16_t  wredMaxThreshold,
int16_t  wredDropProbability 
)

Set WRED and ECN drop configuration on a given queue for a given or all interfaces.

Parameters
[in]client_handleClient handle from registration API
[in]intfNuminterface number
[in]queueNumqueue number
[in]dropPrecedencedrop precedence
[in]ecnEnabledECN enabled
[in]wredMinThresholdWRED minimum threshold
[in]wredMaxThresholdWRED maximum threshold
[in]wredDropProbabilityWRED drop probability
Return values
OPEN_E_NONEvalue set successfully
OPEN_E_UNAVAILplatform does not support WRED or ECN feature
OPEN_E_FAILfailed to set or get drop params config
OPEN_E_PARAMinvalid parameter passed
Note
If intfNum is zero then WRED drop configuration will be applied on all interfaces.
Refer openapiCosQueueMaxIdGet() for max cos queue ID value.
Refer OPEN_COS_QUEUE_ID_MIN for min cos queue ID value.
Refer OPEN_MIN_CFG_DROP_PREC_LEVELS for minimum drop precedence levels
Refer OPEN_MAX_CFG_DROP_PREC_LEVELS for maximum drop precedence levels

OpEN API Version: 1.14

Examples:
cos_example.c.
open_error_t openapiCosQueueWredSet ( openapiClientHandle_t client_handle,
uint32_t  intfNum,
uint8_t  queueNum,
OPEN_BOOL_t  enableWred 
)

Enable or disable WRED for a given queue and for a given or all interfaces.

Parameters
[in]client_handleClient handle from registration API
[in]intfNuminterface number
[in]queueNumqueue number
[in]enableWredOPEN_TRUE to enable WRED OPEN_FALSE to enable tail drop queue management
Return values
OPEN_E_NONEenabled WRED successfully
OPEN_E_FAILunable to enable WRED
Note
If intfNum is zero then WRED drop configuration will be enabled or disabled on all interfaces.
Refer openapiCosQueueMaxIdGet() for max cos queue ID value.
Refer OPEN_COS_QUEUE_ID_MIN for min cos queue ID value.

OpEN API Version: 1.14

Examples:
cos_example.c.
open_error_t openapiCosQueueWredStatsClear ( openapiClientHandle_t client_handle,
uint32_t  intfNum 
)

Clear WRED and ECN counters for a given or all interfaces.

Parameters
[in]client_handleClient handle from registration API
[in]intfNuminterface number
Return values
OPEN_E_NONEcounters reset successfully
OPEN_E_FAILunable to reset counters
Note
If intfNum is zero then WRED stats will be cleared on all interfaces.

OpEN API Version: 1.14

Examples:
cos_example.c.
open_error_t openapiCosQueueWredStatsGet ( openapiClientHandle_t client_handle,
uint32_t  intfNum,
uint64_t *  dropCount,
uint64_t *  ecnMarked 
)

Get WRED drop and ECN marked counters for a given or all interfaces.

Parameters
[in]client_handleClient handle from registration API
[in]intfNuminterface number
[out]dropCountWRED drop counters
[out]ecnMarkedECN marked counters
Return values
OPEN_E_NONEcounters retrieved successfully
OPEN_E_FAILunable to retrieve counters
OPEN_E_UNAVAILfeature is not supported on the given interface
Note
If intfNum is zero then WRED stats wil be retrieved on all interfaces. Physical interfaces are the only valid interfaces.

OpEN API Version: 1.14

Examples:
cos_example.c.
open_error_t openapiQosCosDot1dDefaultTrafficClassGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  priority,
uint32_t *  pTc 
)

Gets factory default dot1d traffic class information.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]prioritypriority
[out]pTctraffic class
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches factory default dot1d traffic class information for a given priority on a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosDot1dTrafficClassEntryGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  priority 
)

Gets status of user priority to traffic class mapping for a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]prioritypriority
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches status of user priority to traffic class mapping for a given interface.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosDot1dTrafficClassEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t *  pIntIfNum,
uint32_t *  pPriority 
)

Gets next sequential user priority to traffic class mapping.

Parameters
[in]client_handleclient handle from registration API
[in,out]pIntIfNumInternal interface number
[in,out]pPrioritypriority
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches next sequential user priority to traffic class mapping.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosDot1dTrafficClassGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  priority,
uint32_t *  pTc 
)

Gets dot1d traffic class information.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]prioritypriority
[out]pTctraffic class
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches dot1d traffic class information for a given priority on a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosDot1dTrafficClassSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  priority,
uint32_t  tc 
)

Sets dot1d traffic class.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]prioritypriority
[in]tctraffic class
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets dot1d traffic class.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapGetIntfIndexForGlobalConfig ( openapiClientHandle_t client_handle,
uint32_t *  pIntIfNum 
)

Gets intIfNum to denotes global config operation.

Parameters
[in]client_handleclient handle from registration API
[out]pIntIfNumInternal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API returns intIfNum to denote global config operation.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapGlobalTrustModeGet ( openapiClientHandle_t client_handle,
OPEN_QOS_COS_MAP_TRUST_MODE_t pTrustMode 
)

Gets CoS global trust mode.

Parameters
[in]client_handleclient handle from registration API
[out]pTrustModeTrust mode
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches global trust mode.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapGlobalTrustModeSet ( openapiClientHandle_t client_handle,
OPEN_QOS_COS_MAP_TRUST_MODE_t  trustMode 
)

Sets the CoS global trust mode.

Parameters
[in]client_handleclient handle from registration API
[in]trustModeTrust mode
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets CoS global trust mode.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapInterfaceTrustModeGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_QOS_COS_MAP_TRUST_MODE_t pTrustMode 
)

Gets CoS internal trust mode.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[out]pTrustModeTrust mode
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches interface trust mode.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapInterfaceTrustModeSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_QOS_COS_MAP_TRUST_MODE_t  trustMode 
)

Sets the CoS interface trust mode.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]trustModeTrust mode
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets CoS interface trust mode.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpDefaultsRestore ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Restore default ip DSCP mappings for given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API restore default ip DSCP mappings for given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpDefaultTrafficClassGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  dscp,
uint32_t *  pTc 
)

Gets the default traffic class mapping for specified ip DSCP value.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]dscpdscp
[out]pTctraffic class
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches the default traffic class mapping for specified ip DSCP.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpIndexGet ( openapiClientHandle_t client_handle,
uint32_t  dscp 
)

Gets status of specified IP DSCP mapping table index.

Parameters
[in]client_handleclient handle from registration API
[in]dscpIp DSCP
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches status of specified IP DSCP mapping table index.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpIndexGetNext ( openapiClientHandle_t client_handle,
uint32_t  dscp,
uint32_t *  pNxtDscp 
)

Gets next sequential ip DSCP mapping table index.

Parameters
[in]client_handleclient handle from registration API
[in]dscpIp DSCP
[out]pNxtDscpNext Ip DSCP
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches next sequential ip DSCP mapping table index.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpIntfIndexGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Gets status of specified ip DSCP mapping table interface index.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches status of specified IP DSCP mapping table interface index.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpIntfIndexGetNext ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  pNxtIntIfNum 
)

Gets next sequential ip DSCP mapping table interface index.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[out]pNxtIntIfNumNext Internal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches next sequential ip DSCP mapping table index.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpTrafficClassGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  dscp,
uint32_t *  pTc 
)

Gets the assigned traffic class (queue) for given ip DSCP.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]dscpdscp
[out]pTctraffic class
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches the assigned traffic class (queue) for given ip DSCP.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapIpDscpTrafficClassSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  dscp,
uint32_t  tc 
)

Sets the assigned traffic class (queue) for given Ip DSCP.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]dscpIp DSCP
[in]tctraffic class
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets the assigned traffic class (queue) for given Ip DSCP.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapTrustModeIntfIndexGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Gets specified trust mode interface index status.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches existence status of specified trust mode interface.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapTrustModeIntfIndexGetNext ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  pNxtIntIfNum 
)

Gets next sequential specified trust mode interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[out]pNxtIntIfNumNext internal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches next sequential specified trust mode interface.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosMapUntrustedPortDefaultTrafficClassGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  pTcVal 
)

Gets CoS untrusted port default traffic class for given internal interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[out]pTcValuntrusted traffic class value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches CoS untrusted port default traffic class for given internal interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueIdIndexGet ( openapiClientHandle_t client_handle,
uint32_t  queueId 
)

Gets specified queueId index status.

Parameters
[in]client_handleclient handle from registration API
[in]queueIdqueueId
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches existence status of specified queueId.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueIdIndexGetNext ( openapiClientHandle_t client_handle,
uint32_t  queueId,
uint32_t *  pNxtqueueId 
)

Gets next sequential specified queueId index.

Parameters
[in]client_handleclient handle from registration API
[in]queueIdQueue id
[out]pNxtqueueIdNext Queue id
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches next sequential specified queueId.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueIntfIndexGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Gets specified queue config interface index status.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches existence status of specified queue config interface.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueIntfIndexGetNext ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  pNxtIntIfNum 
)

Gets next sequential specified queue config interface index.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[out]pNxtIntIfNumNext internal interface number
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches next sequential specified queue config interface.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueIntfIsValid ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_BOOL_t pIsQueueIntfValid 
)

Gets if the specified interface is valid for COS queue config.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[out]pIsQueueIntfValidIf interface is valid for queue config then OPEN_TRUE, else OPEN_FALSE
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches state of specified interface is valid for COS queue config.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueMgmtTypeListGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
open_buffdesc pMgmtTypeList 
)

Gets queue management type list for all queues on a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]pMgmtTypeListqueue mgmt type list list is in the format of queueId:mgmtType, and would hold information for all queues. (i.e) queueId0:mgmtType0, .... queueId7:mgmtType7
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches list of queue management type for all queues on a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueMgmtTypeSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  queueId,
OPEN_QOS_COS_QUEUE_MGMT_TYPE_t  qMgmtType 
)

Sets queue management type for a specific queue on a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]queueIdQueue id
[in]qMgmtTypeQueue mgmt type value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets queue management type for a specific queue of a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueMinBandwidthListGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
open_buffdesc pMinBwList 
)

Gets minimum bandwidth list for all queues on a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]pMinBwListMinimum bandwidth list list is in the format of queueId:minBwVal, and would hold information for all queues. (i.e) queueId0:minBwVal0, .... queueId7:minBwVal7
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches list of minimum bandwidth for all queues on a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueMinBandwidthSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  queueId,
uint32_t  minBwVal 
)

Sets minimum bandwidth for a specific queue on a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]queueIdQueue id
[in]minBwValMin bandwidth value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets minimum bandwidth for a specific queue of a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueSchedulerTypeListGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
open_buffdesc pSchTypeList 
)

Gets scheduler type list for all queues on a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]pSchTypeListScheduler type list list is in the format of queueId:schType, and would hold information for all queues. (i.e) queueId0:schType0, .... queueId7:schType7
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches list of scheduler type for all queues on a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.

OpEN API Version: 1.26

Examples:
cos_example.c.
open_error_t openapiQosCosQueueSchedulerTypeSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  queueId,
OPEN_QOS_COS_QUEUE_SCHED_TYPE_t  schTypeVal 
)

Sets scheduler type for a specific queue on a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]queueIdQueue id
[in]schTypeValScheduler type value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets scheduler type for a specific queue of a given interface.
For global config operation intIfNum fetch using openapiQosCosMapGetIntfIndexForGlobalConfig() should be used.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
cos_example.c.