38 #ifndef OPENAPI_TRANSFER_H_INCLUDED
39 #define OPENAPI_TRANSFER_H_INCLUDED
68 OPEN_NO_STATUS_CHANGE = 1,
69 OPEN_STATUS_CHANGED = 2,
70 OPEN_TRANSFER_FAILED = 3,
71 OPEN_TRANSFER_BAD_CRC = 4,
72 OPEN_FLASH_FAILED = 5,
73 OPEN_OPR_FILE_TYPE_FAILED = 6,
74 OPEN_OTHER_FILE_TYPE_FAILED = 7,
75 OPEN_NEXT_DATA_BLOCK_RECEIVED = 8,
76 OPEN_TRANSFER_FILE_NOT_FOUND = 9,
77 OPEN_TRANSFER_SUCCESS = 10,
78 OPEN_TFTP_FAILED = 11,
79 OPEN_OPR_FILE_VERSION_FAILED = 12,
80 OPEN_DIGITAL_SIGNATURE_VERIFY_FAILED = 13,
81 OPEN_DIGITAL_SIGNATURE_TRUNCATE_FAILED = 14,
82 OPEN_TRANSFER_STATUS_LAST = 15
88 OPEN_TRANSFER_CODE_NONE = 0,
89 OPEN_TRANSFER_CODE_STARTING = 1,
90 OPEN_TRANSFER_CODE_ERROR_STARTING = 2,
91 OPEN_TRANSFER_CODE_WRONG_FILE_TYPE = 3,
92 OPEN_TRANSFER_CODE_UPDATE_CONFIG = 4,
93 OPEN_TRANSFER_CODE_INVALID_CONFIG = 5,
94 OPEN_TRANSFER_CODE_WRITING_FLASH = 6,
95 OPEN_TRANSFER_CODE_FLASH_FAILED = 7,
96 OPEN_TRANSFER_CODE_CHECKING_CRC = 8,
97 OPEN_TRANSFER_CODE_CRC_FAILURE = 9,
98 OPEN_TRANSFER_CODE_UNKNOWN_DIRECTION = 10,
99 OPEN_TRANSFER_CODE_SUCCESS = 11,
100 OPEN_TRANSFER_CODE_FAILURE = 12,
101 OPEN_TRANSFER_CODE_WRONG_DEVICE = 13,
102 OPEN_TRANSFER_CODE_INSUFFICIENT_MEMORY = 14,
103 OPEN_TRANSFER_CODE_FLASH_FILE_OPEN_FAIL = 15,
104 OPEN_TRANSFER_CODE_ERROR_READING_FROM_FLASH = 16,
105 OPEN_TRANSFER_CODE_FILE_DOES_NOT_EXISTS = 17,
106 OPEN_TRANSFER_CODE_FILE_TOO_BIG = 18,
107 OPEN_TRANSFER_CODE_ERROR_WRITING_TO_FLASH = 19,
108 OPEN_TRANSFER_CODE_OVERWRITE_DENIED = 20,
109 OPEN_TRANSFER_CODE_LAST = 21
144 uint32_t *headerSize);
open_error_t openapiHttpTransferDownStartSet(openapiClientHandle_t *client_handle, open_buffdesc *filePathBuf, open_buffdesc *fileNameBuf)
Completes an HTTP(S) file download transfer operation.
Digital Signature verify for all downloads.
OPEN_FILE_TYPES_t
OPEN File Types.
Digital Signature verify for Image download only.
OPEN_COPY_CONFIG_DIRECTIVE_t
OPEN Configuration File Copy Combinations.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiTransferDownloadResultCodeGet(openapiClientHandle_t *client_handle, OPEN_TRANSFER_CODE_t *resultCode)
To retrieve the status of a transfer operation.
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.
Backup Configuration file.
open_error_t openapiTransferFileTypeGet(openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t *fileType)
Get the Transfer File Type.
open_error_t openapiTransferServerAddressGet(openapiClientHandle_t *client_handle, open_inet_addr_t *inetAddr)
Get the transfer server address.
OPEN_TRANSFER_MODES_t
OPEN File Transfer Types.
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.
"startup-config" to "backup-config"
"running-config" to "startup-config"
Digital Signature verify for config script download only.
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.
open_error_t openapiTransferModeGet(openapiClientHandle_t *client_handle, OPEN_TRANSFER_MODES_t *xfrMode)
Get the current transfer mode.
OPEN_TRANSFER_CODE_t
OPEN File Transfer Code.
open_error_t openapiTransferInProgressGet(openapiClientHandle_t *client_handle, OPEN_BOOL_t *isInProgress)
Retrieve the progress of a file transfer.
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.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
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 transf...
open_error_t openapiTransferServerAddressSet(openapiClientHandle_t *client_handle, open_inet_addr_t inetAddr)
Set the transfer server address.
No Digital Signature verify for all downloads.
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 transf...
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.
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.
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.
OPEN_DIGITAL_SIGNATURE_OPTION_t
OPEN Image Verification Options.
open_error_t openapiImageHeaderSizeGet(openapiClientHandle_t *client_handle, uint32_t *headerSize)
Determine the size the image file header for this device.
open_error_t openapiTransferModeSet(openapiClientHandle_t *client_handle, OPEN_TRANSFER_MODES_t xfrMode)
Set the current transfer mode.
"backup-config" to "startup-config"
"running-config" to "factory-default"
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.
OPEN_TRANSFER_STATUS_t
OPEN File Transfer Status.
open_error_t openapiTransferFileTypeSet(openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t fileType)
Set the Transfer File Type.
open_error_t openapiTransferDownStartSet(openapiClientHandle_t *client_handle)
Starts an asynchronous file download transfer operation.
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.