Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.9.0.2
Macros | Enumerations | Functions
Capability Lisensing Feature [OPENAPI_CAPABILITY_LICENSING]
API Definitions

Macros

#define OPEN_CAPAB_LIC_MAX_FILE_PARAM_VAL_LEN   64
 
#define OPEN_CAPAB_LIC_MAX_KEY_LEN   32
 
#define OPEN_CAPAB_LIC_MAX_LICENSE_FILES   16
 
#define OPEN_CAPAB_LIC_MAX_MODEL_LEN   32
 
#define OPEN_CAPAB_LIC_MAX_SERIAL_LEN   64
 
#define OPEN_CAPAB_LIC_MAX_VER_LEN   6
 

Enumerations

enum  OPEN_CAPAB_LICENSE_FILE_PARAM_TYPE_t { OPEN_CAPAB_LICENSE_FILE_PARAM_COPY = 1, OPEN_CAPAB_LICENSE_FILE_PARAM_DATE, OPEN_CAPAB_LICENSE_FILE_PARAM_DESC }
 
enum  OPEN_CAPAB_LICENSE_STATUS_TYPE_t {
  OPEN_CAPAB_LICENSE_STATUS_FILE_NOT_PRESENT = 1, OPEN_CAPAB_LICENSE_STATUS_VALID, OPEN_CAPAB_LICENSE_STATUS_APPLIED, OPEN_CAPAB_LICENSE_STATUS_REMOVED,
  OPEN_CAPAB_LICENSE_STATUS_INVALID, OPEN_CAPAB_LICENSE_STATUS_UNSUPPORTED, OPEN_CAPAB_LICENSE_STATUS_DUPLICATE, OPEN_CAPAB_LICENSE_STATUS_ERROR
}
 
enum  OPEN_CAPAB_LICENSE_TYPE_t { OPEN_CAPAB_LICENSE_TYPE_UNKNOWN = 1, OPEN_CAPAB_LICENSE_TYPE_PORT, OPEN_CAPAB_LICENSE_TYPE_FEATURE, OPEN_CAPAB_LICENSE_TYPE_PORT_FEATURE }
 

Functions

open_error_t openapiCapabLicenseCountGet (openapiClientHandle_t *client_handle, uint32_t *numOfLicenses)
 Get the number of license files in the system.
 
open_error_t openapiCapabLicenseFirstIndexGet (openapiClientHandle_t *client_handle, uint32_t *firstLicenseIndex)
 Get the first license index in the system.
 
open_error_t openapiCapabLicenseKeyGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, open_buffdesc *version)
 Get the key of license file in the system.
 
open_error_t openapiCapabLicenseLicenseRemove (openapiClientHandle_t *client_handle, uint32_t licenseIndex)
 Remove a license file.
 
open_error_t openapiCapabLicenseLicenseRemoveAll (openapiClientHandle_t *client_handle)
 Remove all license files in the System.
 
open_error_t openapiCapabLicenseModelGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, open_buffdesc *model)
 Get the model name of license file.
 
open_error_t openapiCapabLicenseNextIndexGet (openapiClientHandle_t *client_handle, uint32_t currentIndex, uint32_t *nextLicenseIndex)
 Get the next license index in the system.
 
open_error_t openapiCapabLicenseParamGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, OPEN_CAPAB_LICENSE_FILE_PARAM_TYPE_t paramType, open_buffdesc *paramValue)
 Get the parameter value of license file in the system.
 
open_error_t openapiCapabLicenseSerialNumberGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, open_buffdesc *serialNum)
 Get the serial number of license file.
 
open_error_t openapiCapabLicenseStatusGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, OPEN_CAPAB_LICENSE_STATUS_TYPE_t *status)
 Get the status of license in the system.
 
open_error_t openapiCapabLicenseTypeGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, OPEN_CAPAB_LICENSE_TYPE_t *type)
 Get the type of license.
 
open_error_t openapiCapabLicenseVersionGet (openapiClientHandle_t *client_handle, uint32_t licenseIndex, open_buffdesc *version)
 Get the version number of license file in the system.
 

Detailed Description

Enumeration Type Documentation

Enumerator:
OPEN_CAPAB_LICENSE_FILE_PARAM_COPY 

License copy.

OPEN_CAPAB_LICENSE_FILE_PARAM_DATE 

License Date.

OPEN_CAPAB_LICENSE_FILE_PARAM_DESC 

License description.

Definition at line 72 of file openapi_capability_licensing.h.

Enumerator:
OPEN_CAPAB_LICENSE_STATUS_FILE_NOT_PRESENT 

License file is not present.

OPEN_CAPAB_LICENSE_STATUS_VALID 

Valid license file after installation.

OPEN_CAPAB_LICENSE_STATUS_APPLIED 

License applied successfully.

OPEN_CAPAB_LICENSE_STATUS_REMOVED 

License file was applied but got removed.

OPEN_CAPAB_LICENSE_STATUS_INVALID 

Invalid license.

OPEN_CAPAB_LICENSE_STATUS_UNSUPPORTED 

Unsupported capability/features.

OPEN_CAPAB_LICENSE_STATUS_DUPLICATE 

Duplicate license.

OPEN_CAPAB_LICENSE_STATUS_ERROR 

Other Error.

Definition at line 51 of file openapi_capability_licensing.h.

Enumerator:
OPEN_CAPAB_LICENSE_TYPE_PORT 

Port license.

OPEN_CAPAB_LICENSE_TYPE_FEATURE 

Feature license.

OPEN_CAPAB_LICENSE_TYPE_PORT_FEATURE 

Port and Feature license.

Definition at line 64 of file openapi_capability_licensing.h.

Function Documentation

open_error_t openapiCapabLicenseCountGet ( openapiClientHandle_t client_handle,
uint32_t *  numOfLicenses 
)

Get the number of license files in the system.

Parameters
[in]client_handleclient handle from registration API
[out]numOfLicensesNumber of license(s) present in the system.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Some platforms/systems allow more than one license file. This API gives the number of license files present in the system.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseFirstIndexGet ( openapiClientHandle_t client_handle,
uint32_t *  firstLicenseIndex 
)

Get the first license index in the system.

Parameters
[in]client_handleclient handle from registration API
[out]firstLicenseIndexFirst license index in the system.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Each License file in the system has specific index. This API gets the first valid index in the system.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseKeyGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
open_buffdesc version 
)

Get the key of license file in the system.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[out]versionKey of the license file.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the key of license file.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseLicenseRemove ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex 
)

Remove a license file.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API removes a license file.

OpEN API Version: 1.21

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseLicenseRemoveAll ( openapiClientHandle_t client_handle)

Remove all license files in the System.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API removes all the license files present in the System.

OpEN API Version: 1.21

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseModelGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
open_buffdesc model 
)

Get the model name of license file.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[out]modelModel of the license file.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the model name of license file.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseNextIndexGet ( openapiClientHandle_t client_handle,
uint32_t  currentIndex,
uint32_t *  nextLicenseIndex 
)

Get the next license index in the system.

Parameters
[in]client_handleclient handle from registration API
[in]CurrentIndexCurrent license index.
[out]nextLicenseIndexNext valid license index in the system.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Each License file in the system has specific index. This API gets the next valid index in the system.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseParamGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
OPEN_CAPAB_LICENSE_FILE_PARAM_TYPE_t  paramType,
open_buffdesc paramValue 
)

Get the parameter value of license file in the system.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[in]paramTypeParameter type.
[out]paramValueParameter value associated with the parameter type.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the parameter value of license file, it takes, the type of the parameter and returns its value.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseSerialNumberGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
open_buffdesc serialNum 
)

Get the serial number of license file.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[out]serialNumSerial number of the license file.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the serial number license file.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseStatusGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
OPEN_CAPAB_LICENSE_STATUS_TYPE_t status 
)

Get the status of license in the system.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[out]statusStatus of the license.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the present status of the license with licenseIndex.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseTypeGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
OPEN_CAPAB_LICENSE_TYPE_t type 
)

Get the type of license.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[out]typeType of the license.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the type of the license with licenseIndex.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.
open_error_t openapiCapabLicenseVersionGet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex,
open_buffdesc version 
)

Get the version number of license file in the system.

Parameters
[in]client_handleclient handle from registration API
[in]licenseIndexLicense index.
[out]versionVersion number of the license file.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API gets the version number of license file.

OpEN API Version: 1.20

Examples:
capability_licensing_example.c.