Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
Macros | Enumerations | Functions
Diff Serv Policy Configuration And Status [OPENAPI_DIFFSERV_POLICY]

Macros

#define OPEN_DIFFSERV_POLICY_NAME_MAX   31
 
#define OPEN_DIFFSERV_POLICY_NAME_MIN   1
 

Enumerations

enum  OPEN_BURST_POLICE_TYPE_t {
  OPEN_BURST_POLICE_TWORATE_NONE = 0, OPEN_BURST_POLICE_TWORATE_CBURST, OPEN_BURST_POLICE_TWORATE_PBURST, OPEN_BURST_POLICE_SINGLERATE_CBURST,
  OPEN_BURST_POLICE_SINGLERATE_EBURST, OPEN_BURST_POLICE_SIMPLE_CBURST
}
 
enum  OPEN_DIFFSERV_POLICE_ACT_t {
  OPEN_DIFFSERV_POLICE_ACT_NONE = 0, OPEN_DIFFSERV_POLICE_ACT_DROP, OPEN_DIFFSERV_POLICE_ACT_MARKCOS, OPEN_DIFFSERV_POLICE_ACT_MARKCOS2,
  OPEN_DIFFSERV_POLICE_ACT_MARKCOS_AS_COS2, OPEN_DIFFSERV_POLICE_ACT_MARKDSCP, OPEN_DIFFSERV_POLICE_ACT_MARKPREC, OPEN_DIFFSERV_POLICE_ACT_SEND
}
 
enum  OPEN_DIFFSERV_POLICY_ATTR_TYPE_t {
  OPEN_DIFFSERV_POLICY_ATTR_TYPE_NONE = 0, OPEN_DIFFSERV_POLICY_ATTR_TYPE_ASSIGN_QUEUE, OPEN_DIFFSERV_POLICY_ATTR_TYPE_DROP, OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_COSVAL,
  OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_COS2VAL, OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_COS_AS_COS2, OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_IPDSCPVAL, OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_IPPRECEDENCEVAL,
  OPEN_DIFFSERV_POLICY_ATTR_TYPE_MIRROR, OPEN_DIFFSERV_POLICY_ATTR_TYPE_POLICE_SIMPLE, OPEN_DIFFSERV_POLICY_ATTR_TYPE_POLICE_SINGLERATE, OPEN_DIFFSERV_POLICY_ATTR_TYPE_POLICE_TWORATE,
  OPEN_DIFFSERV_POLICY_ATTR_TYPE_REDIRECT
}
 
enum  OPEN_DIFFSERV_POLICY_TYPE_t { OPEN_DIFFSERV_POLICY_TYPE_NONE = 0, OPEN_DIFFSERV_POLICY_TYPE_IN, OPEN_DIFFSERV_POLICY_TYPE_OUT }
 
enum  OPEN_DIFFSERV_ROW_STATUS_t {
  OPEN_DIFFSERV_ROW_STATUS_NONE = 0, OPEN_DIFFSERV_ROW_STATUS_ACTIVE, OPEN_DIFFSERV_ROW_STATUS_NOT_IN_SERVICE, OPEN_DIFFSERV_ROW_STATUS_NOT_READY,
  OPEN_DIFFSERV_ROW_STATUS_CREATE_AND_GO, OPEN_DIFFSERV_ROW_STATUS_CREATE_AND_WAIT, OPEN_DIFFSERV_ROW_STATUS_DESTROY
}
 
enum  OPEN_DIFFSERV_STORAGE_TYPE_t {
  OPEN_DIFFSERV_STORAGE_TYPE_NONE = 0, OPEN_DIFFSERV_STORAGE_TYPE_OTHER, OPEN_DIFFSERV_STORAGE_TYPE_VOLATILE, OPEN_DIFFSERV_STORAGE_TYPE_NONVOLATILE,
  OPEN_DIFFSERV_STORAGE_TYPE_READONLY, OPEN_DIFFSERV_STORAGE_TYPE_PERMANENT
}
 

Functions

open_error_t openapiDiffServClassValidForPolicyCheck (openapiClientHandle_t *client_handle, uint32_t classIndex, uint32_t policyIndex)
 Check if class definition is suitable for inclusion by specified policy. More...
 
open_error_t openapiDiffServPolicyAttrCreate (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_BOOL_t activateRow)
 Create a new row in the Policy Attribute Table for the specified index. More...
 
open_error_t openapiDiffServPolicyAttrDelete (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex)
 Delete a row from the Policy Attribute Table for the specified index. More...
 
open_error_t openapiDiffServPolicyAttrGetNext (openapiClientHandle_t *client_handle, uint32_t prevPolicyIndex, uint32_t prevPolicyInstIndex, uint32_t prevPolicyAttrIndex, uint32_t *pPolicyIndex, uint32_t *pPolicyInstIndex, uint32_t *pPolicyAttrIndex)
 Determine next sequential row in the Policy Attribute Table. More...
 
open_error_t openapiDiffServPolicyAttrIndexFind (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t inEntry, uint32_t *pPolicyAttrIndex)
 Find the Policy Attribute index for the specified attribute. More...
 
open_error_t openapiDiffServPolicyAttrIndexMaxGet (openapiClientHandle_t *client_handle, uint32_t *pIndexMax)
 Retrieve the maximum policy attribute index value allowed for the Policy Attribute Table. More...
 
open_error_t openapiDiffServPolicyAttrIndexNext (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t *pPolicyAttrIndex)
 Obtain the next available index value to be used when creating a new row in the Policy Attribute Table. More...
 
open_error_t openapiDiffServPolicyAttrRowStatusGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_ROW_STATUS_t *pValue)
 Get the current status of the specified Policy Attribute Table row. More...
 
open_error_t openapiDiffServPolicyAttrStmtEntryDataGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, uint32_t *data)
 Get the Policy Attribute statement entry associated data. More...
 
open_error_t openapiDiffServPolicyAttrStmtEntryTypeDataSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, uint32_t data)
 Set the Policy Attribute statement entry type and associated data. More...
 
open_error_t openapiDiffServPolicyAttrStmtEntryTypeGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t *pEntryType)
 Get the Policy Attribute statement entry type. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceBurstGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, OPEN_BURST_POLICE_TYPE_t burstType, uint32_t *burst)
 Get the policing committed burst size attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceBurstSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, OPEN_BURST_POLICE_TYPE_t burstType, uint32_t burst)
 Set the policing committed burst size attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceColorAwareClassValidate (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t classIndex)
 Determine if a DiffServ class is valid for use as a policing color aware designation. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceColorConformIndexGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *pClassIndex)
 Get the policing color conform attribute class index value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceColorConformIndexSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t classIndex)
 Set the policing color conform attribute class index value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceColorConformValGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *pVal)
 Get the policing color conform value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceColorExceedIndexGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *pClassIndex)
 Get the policing color exceed attribute class index value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceColorExceedIndexSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t classIndex)
 Set the policing color exceed attribute class index value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceConformActGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICE_ACT_t *action)
 Get the policing conform action attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceConformActSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICE_ACT_t action)
 Set the policing conform action attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceConformValGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *value)
 Get the policing conform value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceConformValSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t value)
 Set the policing conform value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceDataRatePercentGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, uint32_t *pRate_percent)
 Get the policing committed rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceDataRateSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, OPEN_RATE_UNIT_t rate_unit, uint32_t rate)
 Set the simple policing committed rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceDataRateUnitGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, OPEN_RATE_UNIT_t *pRate_unit)
 Get the policing committed rate unit attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedActGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICE_ACT_t *action)
 Get the policing exceed action attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedActSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICE_ACT_t action)
 Set the policing exceed action attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedValGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *pValue)
 Get the policing exceed value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedValSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t value)
 Set the policing exceed value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformActGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICE_ACT_t *action)
 Get the policing nonconform action attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformActSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICE_ACT_t action)
 Set the policing nonconform action attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformValGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *value)
 Get the policing nonconform value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformValSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t value)
 Set the policing nonconform value attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPolicePdataRatePercentGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_POLICY_ATTR_TYPE_t entryType, uint32_t *pRate_percent)
 Get the policing peak rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceSimpleCrateGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *rate)
 Get the simple policing committed rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceSimpleCrateSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t rate)
 Set the simple policing committed rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceTworateCrateGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *pRate)
 Get the two-rate policing committed rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceTworateCrateSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t rate)
 Set the two-rate policing committed rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceTworatePdataRateSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_RATE_UNIT_t rate_unit, uint32_t rate)
 Set the two-rate policing peak rate attribute statement value as per unit. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceTworatePrateGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t *rate)
 Get the two-rate policing peak rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStmtPoliceTworatePrateSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, uint32_t rate)
 Set the two-rate policing peak rate attribute statement value. More...
 
open_error_t openapiDiffServPolicyAttrStorageTypeGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t policyAttrIndex, OPEN_DIFFSERV_STORAGE_TYPE_t *pValue)
 Get the storage type for the specified Policy Attribute Table row. More...
 
open_error_t openapiDiffServPolicyCreate (openapiClientHandle_t *client_handle, uint32_t policyIndex, OPEN_BOOL_t activateRow)
 Create a new row in the Policy Table for the specified index. More...
 
open_error_t openapiDiffServPolicyDelete (openapiClientHandle_t *client_handle, uint32_t policyIndex)
 Delete a row from the Policy Table for the specified index. More...
 
open_error_t openapiDiffServPolicyGetNext (openapiClientHandle_t *client_handle, uint32_t prevPolicyIndex, uint32_t *pPolicyIndex)
 Determine next sequential row in the Policy Table. More...
 
open_error_t openapiDiffServPolicyIndexNext (openapiClientHandle_t *client_handle, uint32_t *pPolicyIndex)
 Obtain the next available index value to be used when creating a new row in the Policy Table. More...
 
open_error_t openapiDiffServPolicyInstClassIndexGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t *pClassIndex)
 Get the class index referenced as the policy class instance. More...
 
open_error_t openapiDiffServPolicyInstClassIndexSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t classIndex)
 Set the class index referenced as the policy class instance. More...
 
open_error_t openapiDiffServPolicyInstCreate (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, OPEN_BOOL_t activateRow)
 Create a new row in the Policy-Class Instance Table for the specified index. More...
 
open_error_t openapiDiffServPolicyInstDelete (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex)
 Delete a row from the Policy-Class Instance Table for the specified index. More...
 
open_error_t openapiDiffServPolicyInstGetNext (openapiClientHandle_t *client_handle, uint32_t prevPolicyIndex, uint32_t prevPolicyInstIndex, uint32_t *pPolicyIndex, uint32_t *pPolicyInstIndex)
 Determine next sequential row in the Policy-Class Instance Table. More...
 
open_error_t openapiDiffServPolicyInstIndexFromClass (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t classIndex, uint32_t *pPolicyInstIndex)
 Find the policy instance index from the policy and class indexes. More...
 
open_error_t openapiDiffServPolicyInstIndexNext (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t *pPolicyInstIndex)
 Obtain the next available index value to be used when creating a new row in the Policy-Class Instance Table. More...
 
open_error_t openapiDiffServPolicyInstRowStatusGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, OPEN_DIFFSERV_ROW_STATUS_t *pValue)
 Get the current status of the specified Policy-Class Instance Table row. More...
 
open_error_t openapiDiffServPolicyNameGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, open_buffdesc *bufd)
 Get the policy name. More...
 
open_error_t openapiDiffServPolicyNameSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, open_buffdesc *bufd)
 Set the policy name. More...
 
open_error_t openapiDiffServPolicyNameToIndex (openapiClientHandle_t *client_handle, open_buffdesc *stringPtr, uint32_t *pPolicyIndex)
 Translate a policy name into its associated Policy Table index. More...
 
open_error_t openapiDiffServPolicyRowStatusGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, OPEN_DIFFSERV_ROW_STATUS_t *pValue)
 Get the current status of the specified Policy Table row. More...
 
open_error_t openapiDiffServPolicyTypeGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, OPEN_DIFFSERV_POLICY_TYPE_t *pPolicyType)
 Get the type of policy definition. More...
 
open_error_t openapiDiffServPolicyTypeSet (openapiClientHandle_t *client_handle, uint32_t policyIndex, OPEN_DIFFSERV_POLICY_TYPE_t policyType)
 Set the type of policy definition. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_BURST_POLICE_TWORATE_NONE 

Tworate- none.

OPEN_BURST_POLICE_TWORATE_CBURST 

Tworate-Commited burst [1-128].

OPEN_BURST_POLICE_TWORATE_PBURST 

Tworate-Peak burst [1-128].

OPEN_BURST_POLICE_SINGLERATE_CBURST 

Singlerate-Commited burst [1-128].

OPEN_BURST_POLICE_SINGLERATE_EBURST 

Singlerate-Egress burst [1-128].

OPEN_BURST_POLICE_SIMPLE_CBURST 

Simple-Commited burst [1-128].

Definition at line 98 of file openapi_diffserv_policy.h.

Enumerator
OPEN_DIFFSERV_POLICE_ACT_NONE 

None.

OPEN_DIFFSERV_POLICE_ACT_DROP 

Drop.

OPEN_DIFFSERV_POLICE_ACT_MARKCOS 

Mark-Cos.

OPEN_DIFFSERV_POLICE_ACT_MARKCOS2 

Mark-Cos2.

OPEN_DIFFSERV_POLICE_ACT_MARKCOS_AS_COS2 

Mark-CosAsCos2.

OPEN_DIFFSERV_POLICE_ACT_MARKDSCP 

Mark-DSCP.

OPEN_DIFFSERV_POLICE_ACT_MARKPREC 

Mark-Precedence.

OPEN_DIFFSERV_POLICE_ACT_SEND 

Send.

Definition at line 108 of file openapi_diffserv_policy.h.

Enumerator
OPEN_DIFFSERV_POLICY_ATTR_TYPE_NONE 

None.

OPEN_DIFFSERV_POLICY_ATTR_TYPE_ASSIGN_QUEUE 

Assign-Queue [0-6].

OPEN_DIFFSERV_POLICY_ATTR_TYPE_DROP 

Drop.

OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_COSVAL 

CosVal [1-7].

OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_COS2VAL 

Cos2Val [1-7].

OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_COS_AS_COS2 

CosAsCos2 [1-7].

OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_IPDSCPVAL 

Valid IPDSCP [0-63].

OPEN_DIFFSERV_POLICY_ATTR_TYPE_MARK_IPPRECEDENCEVAL 

IP-Precedence [0-7].

OPEN_DIFFSERV_POLICY_ATTR_TYPE_MIRROR 

Mirror.

OPEN_DIFFSERV_POLICY_ATTR_TYPE_POLICE_SIMPLE 

Police-Simple.

OPEN_DIFFSERV_POLICY_ATTR_TYPE_POLICE_SINGLERATE 

Police-Singlerate.

OPEN_DIFFSERV_POLICY_ATTR_TYPE_POLICE_TWORATE 

Police-Tworate.

OPEN_DIFFSERV_POLICY_ATTR_TYPE_REDIRECT 

Redirect.

Definition at line 79 of file openapi_diffserv_policy.h.

Enumerator
OPEN_DIFFSERV_POLICY_TYPE_NONE 

None.

OPEN_DIFFSERV_POLICY_TYPE_IN 

In.

OPEN_DIFFSERV_POLICY_TYPE_OUT 

Out.

Definition at line 60 of file openapi_diffserv_policy.h.

Enumerator
OPEN_DIFFSERV_ROW_STATUS_NONE 

not a valid value

OPEN_DIFFSERV_ROW_STATUS_ACTIVE 

Active.

OPEN_DIFFSERV_ROW_STATUS_NOT_IN_SERVICE 

Not in Service.

OPEN_DIFFSERV_ROW_STATUS_NOT_READY 

Not Ready.

OPEN_DIFFSERV_ROW_STATUS_CREATE_AND_GO 

Create and Go.

OPEN_DIFFSERV_ROW_STATUS_CREATE_AND_WAIT 

Create and Wait.

OPEN_DIFFSERV_ROW_STATUS_DESTROY 

Destroy.

Definition at line 48 of file openapi_diffserv_policy.h.

Enumerator
OPEN_DIFFSERV_STORAGE_TYPE_NONE 

not a valid value

OPEN_DIFFSERV_STORAGE_TYPE_OTHER 

Other.

OPEN_DIFFSERV_STORAGE_TYPE_VOLATILE 

Volatile.

OPEN_DIFFSERV_STORAGE_TYPE_NONVOLATILE 

Non-Volatile.

OPEN_DIFFSERV_STORAGE_TYPE_READONLY 

Readonly.

OPEN_DIFFSERV_STORAGE_TYPE_PERMANENT 

Permanent.

Definition at line 67 of file openapi_diffserv_policy.h.

Function Documentation

open_error_t openapiDiffServClassValidForPolicyCheck ( openapiClientHandle_t client_handle,
uint32_t  classIndex,
uint32_t  policyIndex 
)

Check if class definition is suitable for inclusion by specified policy.

Parameters
[in]client_handleclient handle
[in]classIndexClass index
[in]policyIndexPolicy index
Return values
OPEN_E_NONEinclusion is valid
OPEN_E_FAILinclusion is invalid
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALinternal error occured
Note
This is a supplemental function provided to assist the user interface code with determining if a class can be assigned to a given policy. Some platforms impose restrictions on the classifiers that can be used in a certain policy direction (in/out).

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrCreate ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_BOOL_t  activateRow 
)

Create a new row in the Policy Attribute Table for the specified index.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]activateRowActivate row when ready flag
Return values
OPEN_E_NONErow creation is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILrow creation failed
OPEN_E_ERRORindex value in use, row not complete
OPEN_E_EXISTSindex value in use, row complete
Note
An OPEN_E_ERROR response means the policy attribute index value is currently in use, but the row is not complete. This is typically caused when multiple requestors obtain the same "index next" value and race to create the new row. The caller should get a new index value and re-attempt to create the row.
An OPEN_E_EXISTS response means the policy attribute index value is currently in use for a completed row. The caller should get a new index value and re-attempt to create the row.
The row status is initially set to 'not ready' and remains that way until every object in the row contains a valid value. If the activateRow parameter is set to OPEN_TRUE, the row status will then be automatically updated to 'active'.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrDelete ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex 
)

Delete a row from the Policy Attribute Table for the specified index.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
Return values
OPEN_E_NONErow deletion is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILrow deletion failed
OPEN_E_ERRORrow does not exist for the specified index

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrGetNext ( openapiClientHandle_t client_handle,
uint32_t  prevPolicyIndex,
uint32_t  prevPolicyInstIndex,
uint32_t  prevPolicyAttrIndex,
uint32_t *  pPolicyIndex,
uint32_t *  pPolicyInstIndex,
uint32_t *  pPolicyAttrIndex 
)

Determine next sequential row in the Policy Attribute Table.

Parameters
[in]client_handleclient handle
[in]prevPolicyIndexPolicy index to begin search
[in]prevPolicyInstIndexPolicy instance index to begin search
[in]prevPolicyAttrIndexPolicy attribute index to begin search
[out]pPolicyIndexPointer to next sequential policy index value
[out]pPolicyInstIndexPointer to next sequential policy instance index value
[out]pPolicyAttrIndexPointer to next sequential policy attribute index value
Return values
OPEN_E_NONEnext index get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get next index
OPEN_E_ERRORNot allowed for current match entry type
Note
A prevPolicyIndex value of 0 is used to find the first policy entry in the table.
A prevPolicyInstIndex value of 0 is used to find the first class instance relative to the specified prevPolicyIndex.
A prevPolicyAttrIndex value of 0 is used to find the first policy attribute relative to the specified prevPolicyIndex, prevPolicyInstIndex.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrIndexFind ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  inEntry,
uint32_t *  pPolicyAttrIndex 
)

Find the Policy Attribute index for the specified attribute.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]inEntryPolicy attribute
[out]pPolicyAttrIndexPointer to attribute index
Return values
OPEN_E_NONEpolicy attribute index find is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to find policy attribute index

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrIndexMaxGet ( openapiClientHandle_t client_handle,
uint32_t *  pIndexMax 
)

Retrieve the maximum policy attribute index value allowed for the Policy Attribute Table.

Parameters
[in]client_handleclient handle
[out]pIndexMaxPointer to index max output location
Return values
OPEN_E_NONEmaximum policy attribute index is successfully retrieved
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get maximum policy attribute index
Note
This is purely informational. The corresponding table 'IndexNext' function must be used to obtain the current index value.
There is a difference between this maximum index and the maximum table size. The latter encompasses independent sets of index maximums.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrIndexNext ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t *  pPolicyAttrIndex 
)

Obtain the next available index value to be used when creating a new row in the Policy Attribute Table.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[out]pPolicyAttrIndexPointer to policy attribute index
Return values
OPEN_E_NONEnext index is successfully retrieved
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get the next index
Note
An OPEN_E_NONE return with an output *pPolicyAttrIndex value of 0 means the table is full.
The index value remains free until used in a subsequent create request. When two or more requestors get the same index value, only the first one to successfully create a new row in this table gets to keep it. All other requestors' create requests will fail due to the index being in use, and they must call this function again to get a new value.
Although an index value is considered in use once a successful row create occurs, the next index value is not revealed until the row is either completed or deleted.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrRowStatusGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_ROW_STATUS_t pValue 
)

Get the current status of the specified Policy Attribute Table row.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pValuePointer to row status value
Return values
OPEN_E_NONEcurrent status is successfully retrieved
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get the current status

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtEntryDataGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
uint32_t *  data 
)

Get the Policy Attribute statement entry associated data.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[out]dataassociated data
Return values
OPEN_E_NONEassociated data get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get the associated data
Note
The entry type MUST be set before any of the individual statements can be set for this policy attribute. The entry type value determines which statement get/set commands are valid for this attribute.
For a given policy-class instance, one or more attribute statements may be defined. However, not all statement entry types are allowed to co-exist within the same policy-class instance. The following lists for each statement entry types any other types that conflict: ASSIGN_QUEUE : _DROP _DROP : _ASSIGN_QUEUE, _MARK(any), POLICE(any), REDIRECT _MARK_COSVAL : _DROP, _MARK_COS2VAL, _MARK_IPDSCPVAL, _MARK_IPPPRECEDENCEVAL, _POLICE(any) MARK_COS2VAL : _DROP, _MARK_COSVAL, _MARK_IPDSCPVAL, _MARK_IPPPRECEDENCEVAL, _POLICE(any) MARK_IPDSCPVAL : _DROP, _MARK_COSVAL, _MARK_COS2VAL, _MARK_IPPPRECEDENCEVAL, _POLICE(any) MARK_IPPRECEDENCEVAL : _DROP, _MARK_COSVAL, _MARK_COS2VAL, _MARK_IPPDSCPVAL, _POLICE(any) _MIRROR : _DROP, _REDIRECT _REDIRECT : _DROP, _MIRROR

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtEntryTypeDataSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
uint32_t  data 
)

Set the Policy Attribute statement entry type and associated data.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[in]dataEntry value
Return values
OPEN_E_NONEsuccesfully set the policy attribute statement and associated data
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfaled to set the policy attribute statement and associated data
Note
The entry type MUST be set before any of the individual statements can be set for this policy attribute. The entry type value determines which statement get/set commands are valid for this attribute.
For a given policy-class instance, one or more attribute statements may be defined. However, not all statement entry types are allowed to co-exist within the same policy-class instance. The following lists for each statement entry types any other types that conflict: ASSIGN_QUEUE : _DROP _DROP : _ASSIGN_QUEUE, _MARK(any), POLICE(any), REDIRECT _MARK_COSVAL : _DROP, _MARK_COS2VAL, _MARK_IPDSCPVAL, _MARK_IPPPRECEDENCEVAL, _POLICE(any) MARK_COS2VAL : _DROP, _MARK_COSVAL, _MARK_IPDSCPVAL, _MARK_IPPPRECEDENCEVAL, _POLICE(any) MARK_IPDSCPVAL : _DROP, _MARK_COSVAL, _MARK_COS2VAL, _MARK_IPPPRECEDENCEVAL, _POLICE(any) MARK_IPPRECEDENCEVAL : _DROP, _MARK_COSVAL, _MARK_COS2VAL, _MARK_IPPDSCPVAL, _POLICE(any) MIRROR : _DROP, _REDIRECT _REDIRECT : _DROP, _MIRROR _POLICE_SIMPLE : _DROP, _MARK(any), POLICE_SINGLERATE, _POLICE_TWORATE _POLICE_SINGLERATE : _DROP, _MARK(any), POLICE_SIMPLE, _POLICE_TWORATE _POLICE_TWORATE : _DROP, _MARK(any), _POLICE_SIMPLE, _POLICE_SINGLERATE
When entryType's are passed with _POLICE_SIMPLE or _POLICE_SINGLERATE, or _POLICE_TWORATE types default actions [conform Action:send , Exceed and nonConform Action:drop] are set

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtEntryTypeGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t pEntryType 
)

Get the Policy Attribute statement entry type.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pEntryTypePointer to entry type value
Return values
OPEN_E_NONEpolicy attribute statement is successfully retrieved
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get the policy attribute statement
Note
The entry type is essential to determine which one of the individual statements is defined for this policy attribute.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceBurstGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
OPEN_BURST_POLICE_TYPE_t  burstType,
uint32_t *  burst 
)

Get the policing committed burst size attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[in]burstTypeburst type , i.e OPEN_BURST_POLICE_TWORATE_CBURST or OPEN_BURST_POLICE_TWORATE_PBURST or OPEN_BURST_POLICE_SINGLERATE_CBURST or OPEN_BURST_POLICE_SINGLERATE_EBURST or OPEN_BURST_POLICE_SIMPLE_CBURST
[out]burstBurst size value
Return values
OPEN_E_NONEpolicing committed burst size attribute statement value is set successfully
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing committed burst size attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
The api should use the correct entry type and associated burst type

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceBurstSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
OPEN_BURST_POLICE_TYPE_t  burstType,
uint32_t  burst 
)

Set the policing committed burst size attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[in]burstTypeburst type , i.e OPEN_BURST_POLICE_TWORATE_CBURST or OPEN_BURST_POLICE_TWORATE_PBURST or OPEN_BURST_POLICE_SINGLERATE_CBURST or OPEN_BURST_POLICE_SINGLERATE_EBURST or OPEN_BURST_POLICE_SIMPLE_CBURST
[in]burstBurst size value
Return values
OPEN_E_NONEpolicing committed burst size attribute statement value is set successfully
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set policing committed burst size attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
The api should use the correct entry type and associated burst type

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceColorAwareClassValidate ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  classIndex 
)

Determine if a DiffServ class is valid for use as a policing color aware designation.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]classIndexClass index value to be set
Return values
OPEN_E_NONEClass is valid for color-aware use
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORinvalid class definition for color-aware use
OPEN_E_FAILif any error or malfunction
Note
The class definition used for policing color awareness is only allowed to contain a single, non-excluded class match condition identifying one of the supported comparison fields: COS, IP DSCP, IP Precedence, or Secondary COS. Also, the field used in this class must not conflict with the classifier match conditions for this policy-class instance. Anything else results in an OPEN_E_ERROR return code.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceColorConformIndexGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  pClassIndex 
)

Get the policing color conform attribute class index value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pClassIndexPointer to class index output value
Return values
OPEN_E_INTERNALexceed color-aware parms same as Conform.
OPEN_E_FAILfailed to get policing color conform attribute class index value
OPEN_E_NONEpolicing color conform attribute class index value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_NOT_FOUNDvalue is not configured

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceColorConformIndexSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  classIndex 
)

Set the policing color conform attribute class index value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]classIndexClass index value to be set
Return values
OPEN_E_NONEpolicing color conform attribute class index value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORinvalid class definition for color-aware use
OPEN_E_INTERNALexceed color-aware parms same as Conform.
OPEN_E_FAILif any other malfunction
Note
A classIndex of 0 sets the conform mode to 'color blind'.
In color-aware mode, the color conform mode and value must not be the same as the color exceed mode and value. The OPEN_E_INTERNAL return value is specifically used to indicate this error condition.
Usage of this function is only meaningful for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceColorConformValGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  pVal 
)

Get the policing color conform value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pValPointer to police color value
Return values
OPEN_E_NONEpolicing color conform value attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing color conform value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceColorExceedIndexGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  pClassIndex 
)

Get the policing color exceed attribute class index value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pClassIndexClass index value to be set
Return values
OPEN_E_NONEpolicing color exceed attribute class index get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORinvalid class definition for color-aware use
OPEN_E_INTERNALexceed color-aware parms same as Conform.
OPEN_E_FAILfailed to get policing color exceed attribute class index
Note
In color-aware mode, the color exceed mode and value must not be the same as the color conform mode and value. The OPEN_E_INTERNAL return value is specifically used to indicate this error condition.
Usage of this function is only meaningful for an attribute statement entry type of: _POLICE_SINGLERATE or _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceColorExceedIndexSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  classIndex 
)

Set the policing color exceed attribute class index value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]classIndexClass index value to be set
Return values
OPEN_E_NONEpolicing color exceed attribute class index value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORinvalid class definition for color-aware use
OPEN_E_INTERNALexceed color-aware parms same as Conform.
OPEN_E_FAILfailed to set policing color exceed attribute class index value
Note
A classIndex of 0 sets the exceed mode to 'color blind'.
In color-aware mode, the color exceed mode and value must not be the same as the color conform mode and value. The OPEN_E_INTERNAL return value is specifically used to indicate this error condition.
Usage of this function is only meaningful for an attribute statement entry type of: _POLICE_SINGLERATE or _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceConformActGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICE_ACT_t action 
)

Get the policing conform action attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]actionPolice action value
Return values
OPEN_E_NONEpolicing conform action attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing conform action attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
A policing action is one of _DROP, _MARKxxxx, or _SEND. When _MARKxxxx is used, a police conform value must also be specified.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceConformActSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICE_ACT_t  action 
)

Set the policing conform action attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]actionPolice action value
Return values
OPEN_E_NONEpolicing conform action attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set policing conform action attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Returns
 OPEN_E_UNAVAIL  Feature not available.
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
A policing action is one of _DROP, _MARKxxxx, or _SEND. When _MARKxxxx is used, a police conform value must also be specified.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceConformValGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  value 
)

Get the policing conform value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]valuePolice conform value
Return values
OPEN_E_NONEpolicing conform value attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing conform value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
This value is required when a police conform action of _MARKxxxx is used.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceConformValSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  value 
)

Set the policing conform value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]valuePolice conform value
Return values
OPEN_E_NONEpolicing conform value attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set policing conform value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
This value is required when a police conform action of _MARKxxxx is used.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceDataRatePercentGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
uint32_t *  pRate_percent 
)

Get the policing committed rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[out]pRate_percentValue percentage
Return values
OPEN_E_NONEpolicing committed rate attribute statement value is successfully retrieved.
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing committed rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE. _POLICE_SINGLERATE. _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceDataRateSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
OPEN_RATE_UNIT_t  rate_unit,
uint32_t  rate 
)

Set the simple policing committed rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[in]rate_unitRate unit (in kbps or percentage)
[in]rateRate value
Return values
OPEN_E_NONEsimple policing committed rate attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set simple policing committed rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry types of: _POLICE_SIMPLE, _POLICE_SINGLERATE _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceDataRateUnitGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
OPEN_RATE_UNIT_t pRate_unit 
)

Get the policing committed rate unit attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[out]pRate_unitValue unit
Return values
OPEN_E_NONEpolicing committed rate unit attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing committed rate unit attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE. _POLICE_SINGLERATE. _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedActGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICE_ACT_t action 
)

Get the policing exceed action attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]actionPolice action value
Return values
OPEN_E_NONEpolicing exceed action attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing exceed action attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SINGLERATE or _POLICE_TWORATE.
A policing action is one of _DROP, _MARKxxxx, or _SEND. When _MARKxxxx is used, a police exceed value must also be specified.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedActSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICE_ACT_t  action 
)

Set the policing exceed action attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]actionPolice action value
Return values
OPEN_E_NONEpolicing exceed action attribute statement value is set successfully
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing exceed action attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Returns
 OPEN_E_UNAVAIL  Feature not available.
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SINGLERATE or _POLICE_TWORATE.
A policing action is one of _DROP, _MARKxxxx, or _SEND. When _MARKxxxx is used, a police exceed value must also be specified.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedValGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  pValue 
)

Get the policing exceed value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pValuePointer to police exceed value
Return values
OPEN_E_NONEpolicing exceed value attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing exceed value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SINGLERATE or _POLICE_TWORATE.
This value is required when a police exceed action of _MARKxxxx is used.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceExceedValSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  value 
)

Set the policing exceed value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]valuePolice exceed value
Return values
OPEN_E_NONEpolicing exceed value attribute statement value is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set policing exceed value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SINGLERATE or _POLICE_TWORATE.
This value is required when a police exceed action of _MARKxxxx is used.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformActGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICE_ACT_t action 
)

Get the policing nonconform action attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]actionPolice action value
Return values
OPEN_E_NONEpolicing nonconform action attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing nonconform action attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
A policing action is one of _DROP, _MARKxxxx, or _SEND. When _MARKxxxx is used, a police nonconform value must also be specified.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformActSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICE_ACT_t  action 
)

Set the policing nonconform action attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]actionPolice action value
Return values
OPEN_E_NONEpolicing nonconform action attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set policing nonconform action attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Returns
 OPEN_E_UNAVAIL  Feature not available.
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
A policing action is one of _DROP, _MARKxxxx, or _SEND. When _MARKxxxx is used, a police nonconform value must also be specified.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformValGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  value 
)

Get the policing nonconform value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]valuePolice noncofrm value
Return values
OPEN_E_NONEpolicing nonconform value attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policing nonconform value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
This value is required when a police nonconform action of _MARKxxxx is used.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceNonconformValSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  value 
)

Set the policing nonconform value attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]valuePolice noncofrm value
Return values
OPEN_E_NONEpolicing nonconform value attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set policing nonconform value attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE, _POLICE_SINGLERATE, or _POLICE_TWORATE.
This value is required when a police nonconform action of _MARKxxxx is used.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPolicePdataRatePercentGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_POLICY_ATTR_TYPE_t  entryType,
uint32_t *  pRate_percent 
)

Get the policing peak rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]entryTypeEntry type value
[out]pRate_percentValue percentage
Return values
OPEN_E_NONE
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAIL
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceSimpleCrateGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  rate 
)

Get the simple policing committed rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]rateRate value
Return values
OPEN_E_NONEsimple policing committed rate attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get simple policing committed rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceSimpleCrateSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  rate 
)

Set the simple policing committed rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]rateRate value
Return values
OPEN_E_NONEsimple policing committed rate attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set simple policing committed rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_SIMPLE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceTworateCrateGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  pRate 
)

Get the two-rate policing committed rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pRatePointer to rate value
Return values
OPEN_E_NONEtwo-rate policing committed rate attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get two-rate policing committed rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceTworateCrateSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  rate 
)

Set the two-rate policing committed rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]raterate value
Return values
OPEN_E_NONEtwo-rate policing committed rate attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set two-rate policing committed rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceTworatePdataRateSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_RATE_UNIT_t  rate_unit,
uint32_t  rate 
)

Set the two-rate policing peak rate attribute statement value as per unit.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]rate_unitRate unit (in kbps or percentage)
[in]rateRate value in percentage
Return values
OPEN_E_NONEtwo-rate policing peak rate attribute statement value as per unit set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORNot allowed for current match entry type
OPEN_E_FAILfailed to set two-rate policing peak rate attribute statement value as per unit set
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceTworatePrateGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t *  rate 
)

Get the two-rate policing peak rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]rateRate value
Return values
OPEN_E_NONEtwo-rate policing peak rate attribute statement value get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to two-rate policing peak rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStmtPoliceTworatePrateSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
uint32_t  rate 
)

Set the two-rate policing peak rate attribute statement value.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[in]rateRate value
Return values
OPEN_E_NONEtwo-rate policing peak rate attribute statement value set is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to set two-rate policing peak rate attribute statement value
OPEN_E_ERRORNot allowed for current match entry type
Note
Usage of this function is only allowed for an attribute statement entry type of: _POLICE_TWORATE.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyAttrStorageTypeGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  policyAttrIndex,
OPEN_DIFFSERV_STORAGE_TYPE_t pValue 
)

Get the storage type for the specified Policy Attribute Table row.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]policyAttrIndexPolicy attribute index
[out]pValuePointer to storage type value
Return values
OPEN_E_NONEstorage type get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get the storage type

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyCreate ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
OPEN_BOOL_t  activateRow 
)

Create a new row in the Policy Table for the specified index.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]activateRowActivate row when ready flag
Return values
OPEN_E_NONErow status successfully retrieved
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALinternal error occured
OPEN_E_ERRORIndex value in use, row not complete
OPEN_E_EXISTSIndex value in use, row complete
OPEN_E_FAILFailed to set the row.
Note
An OPEN_E_ERROR response means the policy index value is currently in use, but the row is not complete. This is typically caused when multiple requestors obtain the same "index next" value and race to create the new row. The caller should get a new index value and re-attempt to create the row.
An OPEN_E_EXISTS response means the policy index value is currently in use for a completed row. The caller should get a new index value and re-attempt to create the row.
An OPEN_E_INTERNAL response means another application has denied approval of this configuration change.
The row status is initially set to 'not ready' and remains that way until every object in the row contains a valid value. If the activateRow parameter is set to OPEN_TRUE, the row status will then be automatically updated to 'active'.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyDelete ( openapiClientHandle_t client_handle,
uint32_t  policyIndex 
)

Delete a row from the Policy Table for the specified index.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
Return values
OPEN_E_NONEdeletion is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORRow does not exist for the specified index, or is referenced by one or more services (interfaces)
OPEN_E_INTERNALConfig change not approved
OPEN_E_FAILDeletion failed
Note
A policy cannot be deleted if it is currently assigned to an interface.
An OPEN_E_INTERNAL response means another application has denied approval of this configuration change.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyGetNext ( openapiClientHandle_t client_handle,
uint32_t  prevPolicyIndex,
uint32_t *  pPolicyIndex 
)

Determine next sequential row in the Policy Table.

Parameters
[in]client_handleclient handle
[in]prevPolicyIndexPolicy index to begin search
[out]pPolicyIndexPointer to next sequential policy index value
Return values
OPEN_E_NONEnext entry successfully retrieved
OPEN_E_FAILfailed to get next entry
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORinternal error has occurred
Note
A prevPolicyIndex value of 0 is used to find the first entry in the table.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyIndexNext ( openapiClientHandle_t client_handle,
uint32_t *  pPolicyIndex 
)

Obtain the next available index value to be used when creating a new row in the Policy Table.

Parameters
[in]client_handleclient handle
[in,out]pPolicyIndexPointer to policy index value
Return values
OPEN_E_NONEnext index is received successfully
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get next available index
Note
An OPEN_E_NONE return with an output *pPolicyIndex value of 0 means the table is full.
The index value remains free until used in a subsequent create request. When two or more requestors get the same index value, only the first one to successfully create a new row in this table gets to keep it. All other requestors' create requests will fail due to the index being in use, and they must call this function again to get a new value.
Although an index value is considered in use once a successful row create occurs, the next index value is not revealed until the row is either completed or deleted.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstClassIndexGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t *  pClassIndex 
)

Get the class index referenced as the policy class instance.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[out]pClassIndexPointer to class index value
Return values
OPEN_E_NONEClass index get is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILClass index get failed
Note
The class index identifies the classifier definition used by the policy to establish an instance of that class (to which policy attributes can be attached). This is what connects a class (instance) to a policy.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstClassIndexSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  classIndex 
)

Set the class index referenced as the policy class instance.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]classIndexclass index value
Return values
OPEN_E_NONEClass index is successfuly set
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILClass index set failed
Note
The class index identifies the classifier definition used by the policy to establish an instance of that class (to which policy attributes can be attached). This is what connects a class (instance) to a policy.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstCreate ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
OPEN_BOOL_t  activateRow 
)

Create a new row in the Policy-Class Instance Table for the specified index.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]activateRowActivate row when ready flag
Return values
OPEN_E_NONENew row creation is successful
OPEN_E_PARAMInvalid parameter passed
OPEN_E_ERRORIndex value in use, row not complete
OPEN_E_EXISTSIndex value in use, row complete
OPEN_E_INTERNALInternal error occured
OPEN_E_FAILNew row creation failed
Note
An OPEN_E_ERROR response means the policy instance index value is currently in use, but the row is not complete. This is typically caused when multiple requestors obtain the same "index next" value and race to create the new row. The caller should get a new index value and re-attempt to create the row.
An OPEN_E_EXISTS response means the policy instance index value is currently in use for a completed row. The caller should get a new index value and re-attempt to create the row.
An OPEN_E_INTERNAL response means another application has denied approval of this configuration change.
The row status is initially set to 'not ready' and remains that way until every object in the row contains a valid value. If the activateRow parameter is set to L7_TRUE, the row status will then be automatically updated to 'active'.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstDelete ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex 
)

Delete a row from the Policy-Class Instance Table for the specified index.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
Return values
OPEN_E_NONEdeletion is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_ERRORrow does not exist for the specified index
OPEN_E_INTERNALconfig change not approved
OPEN_E_FAILdeletion is not successful
Note
An OPEN_E_INTERNAL response means another application has denied approval of this configuration change.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstGetNext ( openapiClientHandle_t client_handle,
uint32_t  prevPolicyIndex,
uint32_t  prevPolicyInstIndex,
uint32_t *  pPolicyIndex,
uint32_t *  pPolicyInstIndex 
)

Determine next sequential row in the Policy-Class Instance Table.

Parameters
[in]client_handleclient handle
[in]prevPolicyIndexPolicy index to begin search
[in]prevPolicyInstIndexPolicy instance index to begin search
[out]pPolicyIndexPointer to next sequential policy index value
[out]pPolicyInstIndexPointer to next sequential policy instance index value
Return values
OPEN_E_NONEOperation is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILFailed to get next sequential index
Note
A prevPolicyIndex value of 0 is used to find the first policy entry in the table.
A prevPolicyInstIndex value of 0 is used to find the first class instance relative to the specified prevPolicyIndex.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstIndexFromClass ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  classIndex,
uint32_t *  pPolicyInstIndex 
)

Find the policy instance index from the policy and class indexes.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]classIndexClass index
[out]pPolicyInstIndexPointer to policy instance index value
Return values
OPEN_E_NONEPolicy instance index find is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILFailed to find the Policy instance index
Note
This is a supplemental function provided to assist the user interface code by searching through the Policy-Class Instance Table for the policy instance index whose row matches the specified class index for the policy.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstIndexNext ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t *  pPolicyInstIndex 
)

Obtain the next available index value to be used when creating a new row in the Policy-Class Instance Table.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[out]pPolicyInstIndexPointer to instance index value
Return values
OPEN_E_NONEOperation is successful
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILFailed to get next index
Note
An OPEN_E_NONE return with an output *pPolicyInstIndex value of 0 means the table is full.
The index value remains free until used in a subsequent create request. When two or more requestors get the same index value, only the first one to successfully create a new row in this table gets to keep it. All other requestors' create requests will fail due to the index being in use, and they must call this function again to get a new value.
Although an index value is considered in use once a successful row create occurs, the next index value is not revealed until the row is either completed or deleted.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyInstRowStatusGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
OPEN_DIFFSERV_ROW_STATUS_t pValue 
)

Get the current status of the specified Policy-Class Instance Table row.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[out]pValuePointer to row status value
Return values
OPEN_E_NONErow status successfully retrieved
OPEN_E_PARAMinvalid parameter passed
OPEN_E_FAILfailed to get policy instance row status
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALinternal error occured

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyNameGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
open_buffdesc bufd 
)

Get the policy name.

Parameters
[in]client_handleclient handle
[in]policyIndexi Policy index
[out]bufdbuffer descriptor for policy name
Return values
OPEN_E_NONEname successfully retrieved
OPEN_E_FAILfailed to get name
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALObject value never been established or buffer length is too short
Note
bufd points to a char buffer of minimum length equals to OPEN_DIFFSERV_POLICY_NAME_MAX

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyNameSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
open_buffdesc bufd 
)

Set the policy name.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]bufdbuffer descriptor for policy name
Return values
OPEN_E_NONEname is set successfully
OPEN_E_FAILfailed to set name
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALinternal error occured

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyNameToIndex ( openapiClientHandle_t client_handle,
open_buffdesc stringPtr,
uint32_t *  pPolicyIndex 
)

Translate a policy name into its associated Policy Table index.

Parameters
[in]client_handleclient handle
[in]stringPtrPolicy name string pointer
[out]pPolicyIndexPointer to policy index value
Return values
OPEN_E_NONEindex successfully retrieved
OPEN_E_FAILfailed to get policy index
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALinternal error occured
Note
This is a supplemental function provided to assist the user interface code with name-to-index translation. Use the name 'get' function to translate in the reverse direction.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyRowStatusGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
OPEN_DIFFSERV_ROW_STATUS_t pValue 
)

Get the current status of the specified Policy Table row.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[out]pValuePointer to row status value
Return values
OPEN_E_NONErow status successfully retrieved
OPEN_E_FAILfailed to get policy row status
OPEN_E_PARAMinvalid parameter passed
OPEN_E_INTERNALinternal error occured

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyTypeGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
OPEN_DIFFSERV_POLICY_TYPE_t pPolicyType 
)

Get the type of policy definition.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[out]pPolicyTypePointer to policy type value
Return values
OPEN_E_NONEGet is successful
OPEN_E_FAILGet operation failed
OPEN_E_PARAMInvalida parameter passed
Note
The policy type dictates whether inbound or outbound policy attribute statements are used in the policy definition.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.
open_error_t openapiDiffServPolicyTypeSet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
OPEN_DIFFSERV_POLICY_TYPE_t  policyType 
)

Set the type of policy definition.

Parameters
[in]client_handleclient handle
[in]policyIndexPolicy index
[in]policyTypePointer to policy type value
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet operation failed
OPEN_E_PARAMInvalida parameter passed
Note
The policy type dictates whether inbound or outbound policy attribute statements are used in the policy definition.

OpEN API Version: 1.26

Examples:
diffserv_policy_example.c.