Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
Enumerations | Functions
This Code Implements The OpEN Diff Services API [OPENAPI_DIFFSERV_SERVICE]

Enumerations

enum  OPEN_MIB_DIFFSERV_IF_DIRECTION_t { OPEN_MIB_DIFFSERV_IF_DIRECTION_NONE = 0, OPEN_MIB_DIFFSERV_IF_DIRECTION_IN, OPEN_MIB_DIFFSERV_IF_DIRECTION_OUT }
 DiffServ Interface Direction type. More...
 
enum  OPEN_MIB_DIFFSERV_IF_OPER_STATUS_t { OPEN_MIB_DIFFSERV_IF_OPER_STATUS_NONE = 0, OPEN_MIB_DIFFSERV_IF_OPER_STATUS_UP, OPEN_MIB_DIFFSERV_IF_OPER_STATUS_DOWN }
 DiffServ Interface Operational Status type. More...
 
enum  OPEN_MIB_DIFFSERV_ROW_STATUS_t {
  OPEN_MIB_DIFFSERV_ROW_STATUS_NONE = 0, OPEN_MIB_DIFFSERV_ROW_STATUS_ACTIVE, OPEN_MIB_DIFFSERV_ROW_STATUS_NOT_IN_SERVICE, OPEN_MIB_DIFFSERV_ROW_STATUS_NOT_READY,
  OPEN_MIB_DIFFSERV_ROW_STATUS_CREATE_AND_GO, OPEN_MIB_DIFFSERV_ROW_STATUS_CREATE_AND_WAIT, OPEN_MIB_DIFFSERV_ROW_STATUS_DESTROY
}
 Enumerated values for RowStatus object. More...
 

Functions

open_error_t openapiDiffServIsAclIntfInUse (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, OPEN_BOOL_t *pIsAclIntfInUse)
 Check if the specified internal interface number is in use by the ACL component. More...
 
open_error_t openapiDiffServPolicyPerfInDiscardedPacketsGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t intIfNum, uint64_t *pPacktCount)
 Get the inbound discarded packet count for the specified policy class instance. More...
 
open_error_t openapiDiffServPolicyPerfInOfferedPacketsGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t intIfNum, uint64_t *pPacktCount)
 Get the inbound offered packets count for the specified policy class instance. More...
 
open_error_t openapiDiffServPolicyPerfOutDiscardedPacketsGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t intIfNum, uint64_t *pPacktCount)
 Get the outbound discarded packet count for the specified policy class instance. More...
 
open_error_t openapiDiffServPolicyPerfOutOfferedPacketsGet (openapiClientHandle_t *client_handle, uint32_t policyIndex, uint32_t policyInstIndex, uint32_t intIfNum, uint64_t *pPacktCount)
 Get the outbound offered packets count for the specified policy class instance. More...
 
open_error_t openapiDiffServServiceCreate (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, OPEN_BOOL_t activateRow)
 Create a new row in the Service Table for the specified interface and direction. More...
 
open_error_t openapiDiffServServiceDelete (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir)
 Delete a row from the Service Table for the specified interface and direction. More...
 
open_error_t openapiDiffServServiceGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir)
 Gets a row from the Service Table for the specified interface and direction. More...
 
open_error_t openapiDiffServServiceGetNext (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, uint32_t *pNxtIntIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t *pNxtIfDir)
 Determine next sequential row in the Service Table. More...
 
open_error_t openapiDiffServServiceIfOperStatusGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, OPEN_MIB_DIFFSERV_IF_OPER_STATUS_t *pIfOperStatus)
 Get the service interface operational status for the specified Service Table row. More...
 
open_error_t openapiDiffServServicePolicyIndexGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, uint32_t *pPolicyIndex)
 Get the policy index attached to the specified interface and direction. More...
 
open_error_t openapiDiffServServicePolicyIndexSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, uint32_t policyIndex)
 Set the policy index attached to the specified interface and direction. More...
 
open_error_t openapiDiffServServiceRowStatusGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, OPEN_MIB_DIFFSERV_ROW_STATUS_t *pStatus)
 Get the current status for the specified Service Table row. More...
 
open_error_t openapiDiffServServiceRowStatusSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, OPEN_MIB_DIFFSERV_ROW_STATUS_t status)
 Set the given status for the specified Service Table row. More...
 
open_error_t openapiDiffServServiceRowStatusVerify (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MIB_DIFFSERV_IF_DIRECTION_t ifDir, OPEN_MIB_DIFFSERV_ROW_STATUS_t status)
 Verifies the current status for the specified Service Table row. More...
 

Detailed Description

Enumeration Type Documentation

DiffServ Interface Direction type.

Enumerator
OPEN_MIB_DIFFSERV_IF_DIRECTION_IN 

Interface direction type IN.

OPEN_MIB_DIFFSERV_IF_DIRECTION_OUT 

Interface direction type OUT.

Definition at line 44 of file openapi_diffserv_service.h.

DiffServ Interface Operational Status type.

Enumerator
OPEN_MIB_DIFFSERV_IF_OPER_STATUS_NONE 

not a valid value

OPEN_MIB_DIFFSERV_IF_OPER_STATUS_UP 

Interface operational status UP.

OPEN_MIB_DIFFSERV_IF_OPER_STATUS_DOWN 

Interface operational status DOWN.

Definition at line 52 of file openapi_diffserv_service.h.

Enumerated values for RowStatus object.

Enumerator
OPEN_MIB_DIFFSERV_ROW_STATUS_NONE 

Not a valid value.

OPEN_MIB_DIFFSERV_ROW_STATUS_ACTIVE 

Active.

OPEN_MIB_DIFFSERV_ROW_STATUS_NOT_IN_SERVICE 

Not in service.

OPEN_MIB_DIFFSERV_ROW_STATUS_NOT_READY 

Not ready.

OPEN_MIB_DIFFSERV_ROW_STATUS_CREATE_AND_GO 

Create and go.

OPEN_MIB_DIFFSERV_ROW_STATUS_CREATE_AND_WAIT 

Create and wait.

OPEN_MIB_DIFFSERV_ROW_STATUS_DESTROY 

Destroy.

Definition at line 60 of file openapi_diffserv_service.h.

Function Documentation

open_error_t openapiDiffServIsAclIntfInUse ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
OPEN_BOOL_t pIsAclIntfInUse 
)

Check if the specified internal interface number is in use by the ACL component.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[out]pIsAclIntfInUsestatus of interface number in use by the ACL component
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API checks if the specified internal interface number is in use by the ACL component.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServPolicyPerfInDiscardedPacketsGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  intIfNum,
uint64_t *  pPacktCount 
)

Get the inbound discarded packet count for the specified policy class instance.

Parameters
[in]client_handleclient handle from registration API
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]intIfNumInternal interface number
[out]pPacktCountPacket count
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches inbound discarded packet count for the specified policy class instance.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServPolicyPerfInOfferedPacketsGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  intIfNum,
uint64_t *  pPacktCount 
)

Get the inbound offered packets count for the specified policy class instance.

Parameters
[in]client_handleclient handle from registration API
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]intIfNumInternal interface number
[out]pPacktCountPacket count
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches inbound packets count for the specified policy class instance.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServPolicyPerfOutDiscardedPacketsGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  intIfNum,
uint64_t *  pPacktCount 
)

Get the outbound discarded packet count for the specified policy class instance.

Parameters
[in]client_handleclient handle from registration API
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]intIfNumInternal interface number
[out]pPacktCountPacket count
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches outbound discarded packet count for the specified policy class instance.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServPolicyPerfOutOfferedPacketsGet ( openapiClientHandle_t client_handle,
uint32_t  policyIndex,
uint32_t  policyInstIndex,
uint32_t  intIfNum,
uint64_t *  pPacktCount 
)

Get the outbound offered packets count for the specified policy class instance.

Parameters
[in]client_handleclient handle from registration API
[in]policyIndexPolicy index
[in]policyInstIndexPolicy instance index
[in]intIfNumInternal interface number
[out]pPacktCountPacket count
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches outbound packets count for the specified policy class instance.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceCreate ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
OPEN_BOOL_t  activateRow 
)

Create a new row in the Service Table for the specified interface and direction.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[in]activateRowActivate row when value is TRUE
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_EXISTSAlready configured.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
An OPEN_E_FAIL response means the service index values are currently in use, but the row is not complete. This is typically caused when multiple requestors use the same index values and race to create the new row. The caller should use new index values and re-attempt to create the row. An OPEN_E_EXISTS response means the service index values are currently in use for a completed row. The caller should use new index values 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'. Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceDelete ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir 
)

Delete a row from the Service Table for the specified interface and direction.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API Deletea a row from the Service Table for the specified interface and direction.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir 
)

Gets a row from the Service Table for the specified interface and direction.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Verify that a Service Table row exists for the specified interface and direction.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceGetNext ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
uint32_t *  pNxtIntIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t pNxtIfDir 
)

Determine next sequential row in the Service Table.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[out]pNxtIntIfNumNext sequential internal interface number
[out]pNxtIfDirNext sequential interface direction
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
intIfNum value of 0 is used to find the first interface entry the table.
ifDir value of 0 is used to find the first interface direction entry relative to the specified intIfNum.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceIfOperStatusGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
OPEN_MIB_DIFFSERV_IF_OPER_STATUS_t pIfOperStatus 
)

Get the service interface operational status for the specified Service Table row.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[out]pIfOperStatusInterface operational status
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches service interface operational status for the specified Service Table row.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServicePolicyIndexGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
uint32_t *  pPolicyIndex 
)

Get the policy index attached to the specified interface and direction.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[out]pPolicyIndexPolicy index
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches policy index attached to the specified interface and direction.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServicePolicyIndexSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
uint32_t  policyIndex 
)

Set the policy index attached to the specified interface and direction.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[in]policyIndexPolicy index
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets policy index attached to the specified interface and direction.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceRowStatusGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
OPEN_MIB_DIFFSERV_ROW_STATUS_t pStatus 
)

Get the current status for the specified Service Table row.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[out]pStatusRow status value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API fetches the current status for the specified Service Table row.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceRowStatusSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
OPEN_MIB_DIFFSERV_ROW_STATUS_t  status 
)

Set the given status for the specified Service Table row.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[in]statusRow status value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets the given status for the specified Service Table row.
Calling this API will change the running configuration of the switch.
Supported row status are OPEN_MIB_DIFFSERV_ROW_STATUS_ACTIVE,
OPEN_MIB_DIFFSERV_ROW_STATUS_NOT_IN_SERVICE and OPEN_MIB_DIFFSERV_ROW_STATUS_DESTROY.
Non supported row status are used for internal purpose.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.
open_error_t openapiDiffServServiceRowStatusVerify ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MIB_DIFFSERV_IF_DIRECTION_t  ifDir,
OPEN_MIB_DIFFSERV_ROW_STATUS_t  status 
)

Verifies the current status for the specified Service Table row.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInternal interface number
[in]ifDirInterface direction
[in]statusRow status value
Return values
OPEN_E_UNAVAILOperation unsupported.
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API verifies the current status for the specified Service Table row.

OpEN API Version: 1.26

Examples:
diffserv_service_example.c.