Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Enumerations | |
enum | OPEN_COPY_CONFIG_DIRECTIVE_t { OPEN_COPY_CONFIG_DIRECTIVE_RTOF = 1, OPEN_COPY_CONFIG_DIRECTIVE_RTOS = 2, OPEN_COPY_CONFIG_DIRECTIVE_STOB = 3, OPEN_COPY_CONFIG_DIRECTIVE_BTOS = 4 } |
OPEN Configuration File Copy Combinations. More... | |
enum | OPEN_DIGITAL_SIGNATURE_OPTION_t { OPEN_DIGITAL_SIGNATURE_VERIFY_NONE = 0, OPEN_DIGITAL_SIGNATURE_VERIFY_IMAGE_ONLY = 1, OPEN_DIGITAL_SIGNATURE_VERIFY_CONFIG_SCRIPT_ONLY = 2, OPEN_DIGITAL_SIGNATURE_VERIFY_ALL = 3, OPEN_DIGITAL_SIGNATURE_VERIFY_LAST = 4 } |
OPEN Image Verification Options. More... | |
enum | OPEN_FILE_TYPES_t { OPEN_FILE_TYPE_NONE = 0, OPEN_FILE_TYPE_CODE = 1, OPEN_FILE_TYPE_CONFIG = 2, OPEN_FILE_TYPE_BACKUP_CONFIG = 3, OPEN_FILE_TYPE_LAST = 4 } |
OPEN File Types. More... | |
enum | OPEN_TRANSFER_CODE_t { OPEN_TRANSFER_CODE_NONE = 0, OPEN_TRANSFER_CODE_STARTING = 1, OPEN_TRANSFER_CODE_ERROR_STARTING = 2, OPEN_TRANSFER_CODE_WRONG_FILE_TYPE = 3, OPEN_TRANSFER_CODE_UPDATE_CONFIG = 4, OPEN_TRANSFER_CODE_INVALID_CONFIG = 5, OPEN_TRANSFER_CODE_WRITING_FLASH = 6, OPEN_TRANSFER_CODE_FLASH_FAILED = 7, OPEN_TRANSFER_CODE_CHECKING_CRC = 8, OPEN_TRANSFER_CODE_CRC_FAILURE = 9, OPEN_TRANSFER_CODE_UNKNOWN_DIRECTION = 10, OPEN_TRANSFER_CODE_SUCCESS = 11, OPEN_TRANSFER_CODE_FAILURE = 12, OPEN_TRANSFER_CODE_WRONG_DEVICE = 13, OPEN_TRANSFER_CODE_INSUFFICIENT_MEMORY = 14, OPEN_TRANSFER_CODE_FLASH_FILE_OPEN_FAIL = 15, OPEN_TRANSFER_CODE_ERROR_READING_FROM_FLASH = 16, OPEN_TRANSFER_CODE_FILE_DOES_NOT_EXISTS = 17, OPEN_TRANSFER_CODE_FILE_TOO_BIG = 18, OPEN_TRANSFER_CODE_ERROR_WRITING_TO_FLASH = 19, OPEN_TRANSFER_CODE_OVERWRITE_DENIED = 20, OPEN_TRANSFER_CODE_LAST = 21 } |
OPEN File Transfer Code. | |
enum | OPEN_TRANSFER_MODES_t { OPEN_TRANSFER_NONE = 0, OPEN_TRANSFER_TFTP = 1, OPEN_TRANSFER_SFTP = 2, OPEN_TRANSFER_SCP = 3, OPEN_TRANSFER_HTTP = 4, OPEN_TRANSFER_HTTPS = 5, OPEN_TRANSFER_LAST = 6 } |
OPEN File Transfer Types. More... | |
enum | OPEN_TRANSFER_STATUS_t { OPEN_NO_STATUS_CHANGE = 1, OPEN_STATUS_CHANGED = 2, OPEN_TRANSFER_FAILED = 3, OPEN_TRANSFER_BAD_CRC = 4, OPEN_FLASH_FAILED = 5, OPEN_OPR_FILE_TYPE_FAILED = 6, OPEN_OTHER_FILE_TYPE_FAILED = 7, OPEN_NEXT_DATA_BLOCK_RECEIVED = 8, OPEN_TRANSFER_FILE_NOT_FOUND = 9, OPEN_TRANSFER_SUCCESS = 10, OPEN_TFTP_FAILED = 11, OPEN_OPR_FILE_VERSION_FAILED = 12, OPEN_DIGITAL_SIGNATURE_VERIFY_FAILED = 13, OPEN_DIGITAL_SIGNATURE_TRUNCATE_FAILED = 14, OPEN_TRANSFER_STATUS_LAST = 15 } |
OPEN File Transfer Status. | |
Functions | |
open_error_t | openapiCopyConfigFile (openapiClientHandle_t *client_handle, OPEN_COPY_CONFIG_DIRECTIVE_t directive) |
This API copies configuration files that are located on the switch. More... | |
open_error_t | openapiDigitalSignatureVerifyConfigGet (openapiClientHandle_t *client_handle, OPEN_DIGITAL_SIGNATURE_OPTION_t *dsvConfigOption) |
To get the option to verify digital signature of downloaded file. More... | |
open_error_t | openapiDigitalSignatureVerifyConfigSet (openapiClientHandle_t *client_handle, OPEN_DIGITAL_SIGNATURE_OPTION_t dsvConfigOption) |
To set the option to verify digital signature of downloaded file. More... | |
open_error_t | openapiHttpTransferDownStartSet (openapiClientHandle_t *client_handle, open_buffdesc *filePathBuf, open_buffdesc *fileNameBuf) |
Completes an HTTP(S) file download transfer operation. More... | |
open_error_t | openapiImageHeaderCheck (openapiClientHandle_t *client_handle, open_buffdesc *headerData, OPEN_BOOL_t *isValid) |
Test an image file header to determine if it is appropriate for this device. More... | |
open_error_t | openapiImageHeaderSizeGet (openapiClientHandle_t *client_handle, uint32_t *headerSize) |
Determine the size the image file header for this device. More... | |
open_error_t | openapiTransferDownloadResultCodeGet (openapiClientHandle_t *client_handle, OPEN_TRANSFER_CODE_t *resultCode) |
To retrieve the status of a transfer operation. More... | |
open_error_t | openapiTransferDownStartSet (openapiClientHandle_t *client_handle) |
Starts an asynchronous file download transfer operation. More... | |
open_error_t | openapiTransferFileLocalGet (openapiClientHandle_t *client_handle, open_buffdesc *imageLabel) |
Get the label by which the file to be transferred is known by on the local system. More... | |
open_error_t | openapiTransferFileLocalSet (openapiClientHandle_t *client_handle, open_buffdesc *imageLabel) |
Set the label by which the file to be transferred is known by on the local system. More... | |
open_error_t | openapiTransferFileRemoteGet (openapiClientHandle_t *client_handle, open_buffdesc *filePath, open_buffdesc *fileName) |
Get the path and name of the file on the remote system that is designated for transfer. More... | |
open_error_t | openapiTransferFileRemoteSet (openapiClientHandle_t *client_handle, open_buffdesc *filePath, open_buffdesc *fileName) |
Set the path and name of the file on the remote system that is designated for transfer. More... | |
open_error_t | openapiTransferFileTypeGet (openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t *fileType) |
Get the Transfer File Type. More... | |
open_error_t | openapiTransferFileTypeSet (openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t fileType) |
Set the Transfer File Type. More... | |
open_error_t | openapiTransferInProgressGet (openapiClientHandle_t *client_handle, OPEN_BOOL_t *isInProgress) |
Retrieve the progress of a file transfer. More... | |
open_error_t | openapiTransferModeGet (openapiClientHandle_t *client_handle, OPEN_TRANSFER_MODES_t *xfrMode) |
Get the current transfer mode. More... | |
open_error_t | openapiTransferModeSet (openapiClientHandle_t *client_handle, OPEN_TRANSFER_MODES_t xfrMode) |
Set the current transfer mode. More... | |
open_error_t | openapiTransferRemoteUserCredentialsGet (openapiClientHandle_t *client_handle, open_buffdesc *username, open_buffdesc *password) |
Get the credentials (username and password) of remote host that will serve the file during the transfer operation. More... | |
open_error_t | openapiTransferRemoteUserCredentialsSet (openapiClientHandle_t *client_handle, open_buffdesc *username, open_buffdesc *password) |
Set the credentials (username and password) of remote host that will serve the file during the transfer operation. More... | |
open_error_t | openapiTransferResultGet (openapiClientHandle_t *client_handle, OPEN_TRANSFER_STATUS_t *resultCode, open_buffdesc *resultStatus) |
To retrieve the status of a transfer task in string format. More... | |
open_error_t | openapiTransferServerAddressGet (openapiClientHandle_t *client_handle, open_inet_addr_t *inetAddr) |
Get the transfer server address. More... | |
open_error_t | openapiTransferServerAddressSet (openapiClientHandle_t *client_handle, open_inet_addr_t inetAddr) |
Set the transfer server address. More... | |
OPEN Configuration File Copy Combinations.
Definition at line 123 of file openapi_transfer.h.
OPEN Image Verification Options.
Definition at line 113 of file openapi_transfer.h.
enum OPEN_FILE_TYPES_t |
OPEN File Types.
Definition at line 56 of file openapi_transfer.h.
OPEN File Transfer Types.
Definition at line 44 of file openapi_transfer.h.
open_error_t openapiCopyConfigFile | ( | openapiClientHandle_t * | client_handle, |
OPEN_COPY_CONFIG_DIRECTIVE_t | directive | ||
) |
This API copies configuration files that are located on the switch.
The source and destination files as well as their direction is limited to those defined in OPEN_COPY_CONFIG_DIRECTIVE_t.
[in] | client_handle | Client handle from registration API. |
[in] | directive | Source to destination definition. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.20
open_error_t openapiDigitalSignatureVerifyConfigGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_DIGITAL_SIGNATURE_OPTION_t * | dsvConfigOption | ||
) |
To get the option to verify digital signature of downloaded file.
[in] | client_handle | Client handle from registration API. |
[out] | dsvConfigOption | Enumerated value indicating the digital signature verify option. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiDigitalSignatureVerifyConfigSet | ( | openapiClientHandle_t * | client_handle, |
OPEN_DIGITAL_SIGNATURE_OPTION_t | dsvConfigOption | ||
) |
To set the option to verify digital signature of downloaded file.
[in] | client_handle | Client handle from registration API. |
[in] | dsvConfigOption | Enumerated value indicating the digital signature verify option. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiHttpTransferDownStartSet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | filePathBuf, | ||
open_buffdesc * | fileNameBuf | ||
) |
Completes an HTTP(S) file download transfer operation.
[in] | client_handle | Client handle from registration API. |
[in] | filePathBuf | The complete path to the downloaded file written into a temporary location by the webserver |
[in] | fileNameBuf | The original source filename. Used when preserving its name. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.20
open_error_t openapiImageHeaderCheck | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | headerData, | ||
OPEN_BOOL_t * | isValid | ||
) |
Test an image file header to determine if it is appropriate for this device.
[in] | client_handle | Client handle from registration API. |
[in] | headerData | Buffer containing the file header from the beginning of the file. The size of which is determined by calling openapiImageHeaderSizeGet(). |
[out] | isValid | OPEN_TRUE indicates the code image is intended or suitable for this system, else OPEN_FALSE |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiImageHeaderSizeGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | headerSize | ||
) |
Determine the size the image file header for this device.
[in] | client_handle | Client handle from registration API. |
[out] | headerSize | Size of the image file's header. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OpEN API Version: 1.10
open_error_t openapiTransferDownloadResultCodeGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_TRANSFER_CODE_t * | resultCode | ||
) |
To retrieve the status of a transfer operation.
[in] | client_handle | Client handle from registration API. |
[out] | resultCode | Enumerated value indicating the transfer download result code |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferDownStartSet | ( | openapiClientHandle_t * | client_handle | ) |
Starts an asynchronous file download transfer operation.
[in] | client_handle | Client handle from registration API. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferFileLocalGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | imageLabel | ||
) |
Get the label by which the file to be transferred is known by on the local system.
[in] | client_handle | Client handle from registration API. |
[out] | imageLabel | Label of the file on the local system |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferFileLocalSet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | imageLabel | ||
) |
Set the label by which the file to be transferred is known by on the local system.
[in] | client_handle | Client handle from registration API. |
[in] | imageLabel | Label of the file on the local system |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferFileRemoteGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | filePath, | ||
open_buffdesc * | fileName | ||
) |
Get the path and name of the file on the remote system that is designated for transfer.
[in] | client_handle | Client handle from registration API. |
[out] | filePath | Path to the file on the remote system |
[out] | fileName | Name of the file on the remote system |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferFileRemoteSet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | filePath, | ||
open_buffdesc * | fileName | ||
) |
Set the path and name of the file on the remote system that is designated for transfer.
[in] | client_handle | Client handle from registration API. |
[in] | filePath | Path to the file on the remote system |
[in] | fileName | Name of the file on the remote system |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferFileTypeGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_FILE_TYPES_t * | fileType | ||
) |
Get the Transfer File Type.
[in] | client_handle | Client handle from registration API. |
[out] | fileType | Current file transfer type. OPEN_FILE_TYPES_t |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferFileTypeSet | ( | openapiClientHandle_t * | client_handle, |
OPEN_FILE_TYPES_t | fileType | ||
) |
Set the Transfer File Type.
[in] | client_handle | Client handle from registration API. |
[in] | fileType | On success, transfer file type. OPEN_FILE_TYPES_t |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferInProgressGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_BOOL_t * | isInProgress | ||
) |
Retrieve the progress of a file transfer.
[in] | client_handle | Client handle from registration API. |
[out] | isInProgress | OPEN_TRUE indicates a code download is in progress. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferModeGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_TRANSFER_MODES_t * | xfrMode | ||
) |
Get the current transfer mode.
[in] | client_handle | Client handle from registration API. |
[out] | xfrMode | Currently set transfer type. OPEN_TRANSFER_MODES_t |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferModeSet | ( | openapiClientHandle_t * | client_handle, |
OPEN_TRANSFER_MODES_t | xfrMode | ||
) |
Set the current transfer mode.
[in] | client_handle | Client handle from registration API. |
[in] | xfrMode | On success, current transfer type. OPEN_TRANSFER_MODES_t |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferRemoteUserCredentialsGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | username, | ||
open_buffdesc * | password | ||
) |
Get the credentials (username and password) of remote host that will serve the file during the transfer operation.
[in] | client_handle | Client handle from registration API. |
[out] | username | Remote host username |
[out] | password | Remote host password |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferRemoteUserCredentialsSet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | username, | ||
open_buffdesc * | password | ||
) |
Set the credentials (username and password) of remote host that will serve the file during the transfer operation.
[in] | client_handle | Client handle from registration API. |
[in] | username | Remote host username |
[in] | password | Remote host password |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferResultGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_TRANSFER_STATUS_t * | resultCode, | ||
open_buffdesc * | resultStatus | ||
) |
To retrieve the status of a transfer task in string format.
[in] | client_handle | Client handle from registration API. |
[out] | resultCode | Enumerated value indicating the transfer download result |
[out] | resultStatus | String value describing resultCode |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferServerAddressGet | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t * | inetAddr | ||
) |
Get the transfer server address.
[in] | client_handle | Client handle from registration API. |
[out] | inetAddr | IPv4 or IPv6 address in network byte order of the server. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiTransferServerAddressSet | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t | inetAddr | ||
) |
Set the transfer server address.
[in] | client_handle | Client handle from registration API. |
[in] | inetAddr | IPv4 or IPv6 address in network byte order of the server. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters are not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10