Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
Enumerations | Functions
Transfer Download [OPENAPI_TRANSFER]

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_LICENSE = 4, OPEN_FILE_TYPE_TXTCFG = 5, OPEN_FILE_TYPE_ERRORLOG = 6, OPEN_FILE_TYPE_VALGLOG = 7,
  OPEN_FILE_TYPE_SYSTEM_MSGLOG = 8, OPEN_FILE_TYPE_TRAP_LOG = 9, OPEN_FILE_TYPE_SSHKEY_RSA2 =10, OPEN_FILE_TYPE_SSHKEY_DSA =11,
  OPEN_FILE_TYPE_SSHKEY_ECDSA =12, OPEN_FILE_TYPE_SSLPEM_ROOT =13, OPEN_FILE_TYPE_SSLPEM_SERVER =14, OPEN_FILE_TYPE_SSLPEM_DHSTRONG =15,
  OPEN_FILE_TYPE_SSLPEM_DHVSTRONG =16, OPEN_FILE_TYPE_CONFIG_SCRIPT =17, OPEN_FILE_TYPE_CORE_DUMP =18, OPEN_FILE_TYPE_CLI_BANNER =19,
  OPEN_FILE_TYPE_KERNEL =20, OPEN_FILE_TYPE_STARTUP_LOG =21, OPEN_FILE_TYPE_OPERATIONAL_LOG =22, OPEN_FILE_TYPE_TR069_ACS_SSLPEM_ROOT =23,
  OPEN_FILE_TYPE_TR069_CLIENT_SSLPRIV_KEY =24, OPEN_FILE_TYPE_TR069_CLIENT_SSL_CERT =25, OPEN_FILE_TYPE_IAS_USERS =26, OPEN_FILE_TYPE_TECHSUPPORT =27,
  OPEN_FILE_TYPE_OPENFLOW_SSL_CA_CERT =28, OPEN_FILE_TYPE_OPENFLOW_SSL_PRIV_KEY =29, OPEN_FILE_TYPE_OPENFLOW_SSL_CERT =30, OPEN_FILE_TYPE_SSL_CA_CERT =31,
  OPEN_FILE_TYPE_SSL_CLIENT_KEY =32, OPEN_FILE_TYPE_CLIENT_SSL_CERT =33, OPEN_FILE_TYPE_ROOT_CA_CERTIFICATES =34, OPEN_FILE_TYPE_CAPTURED_CPU_PKTS =35,
  OPEN_FILE_TYPE_STARTUP_CONFIG =36, OPEN_FILE_TYPE_FACTORY_DEFAULT_CONFIG =37, OPEN_FILE_TYPE_CRASH_LOG =38, OPEN_FILE_TYPE_APPLICATION =39,
  OPEN_FILE_TYPE_PUBLICKEY_IMAGE =40, OPEN_FILE_TYPE_PUBLICKEY_CONFIG =41, OPEN_FILE_TYPE_ALL_PERSISTENT_LOG =42, OPEN_FILE_TYPE_TECHSUPPORT_CMDS =43,
  OPEN_FILE_TYPE_PACKET_TRACE_PCAP =44, OPEN_FILE_TYPE_DHCP_CLIENT_CONFIG_FILES =45, OPEN_FILE_TYPE_SSHKEY_USER_PUBLIC_KEY =46, OPEN_FILE_TYPE_LAST
}
 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_FTP = 6, OPEN_TRANSFER_XMODEM = 7,
  OPEN_TRANSFER_YMODEM = 8, OPEN_TRANSFER_ZMODEM = 9, OPEN_TRANSFER_USB =10, OPEN_TRANSFER_LAST
}
 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 openapiFileCopy (openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *srcFileName, open_buffdesc *dstFileName)
 copies a given local file locally or remotely 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 openapiTransferDownloadFileTypeGet (openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t *pFileType)
 Get the Transfer Download File Type. More...
 
open_error_t openapiTransferDownloadFileTypeSet (openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t fileType)
 Set the Transfer Download File Type. 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 openapiTransferLicenseIndexSet (openapiClientHandle_t *client_handle, uint32_t licenseIndex)
 This API sets the index of the License file, that is to be transferred by the system. 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_error_t openapiTransferUploadFileTypeGet (openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t *pFileType)
 Get the Transfer upload File Type. More...
 
open_error_t openapiTransferUploadFileTypeSet (openapiClientHandle_t *client_handle, OPEN_FILE_TYPES_t fileType)
 Set the Transfer upload File Type. More...
 
open_error_t openapiTransferUpStartSet (openapiClientHandle_t *client_handle)
 Starts an asynchronous file upload transfer operation. More...
 

Detailed Description

Enumeration Type Documentation

OPEN Configuration File Copy Combinations.

Enumerator
OPEN_COPY_CONFIG_DIRECTIVE_RTOF 

"running-config" to "factory-default"

OPEN_COPY_CONFIG_DIRECTIVE_RTOS 

"running-config" to "startup-config"

OPEN_COPY_CONFIG_DIRECTIVE_STOB 

"startup-config" to "backup-config"

OPEN_COPY_CONFIG_DIRECTIVE_BTOS 

"backup-config" to "startup-config"

Definition at line 171 of file openapi_transfer.h.

OPEN Image Verification Options.

Enumerator
OPEN_DIGITAL_SIGNATURE_VERIFY_NONE 

No Digital Signature verify for all downloads.

OPEN_DIGITAL_SIGNATURE_VERIFY_IMAGE_ONLY 

Digital Signature verify for Image download only.

OPEN_DIGITAL_SIGNATURE_VERIFY_CONFIG_SCRIPT_ONLY 

Digital Signature verify for config script download only.

OPEN_DIGITAL_SIGNATURE_VERIFY_ALL 

Digital Signature verify for all downloads.

OPEN_DIGITAL_SIGNATURE_VERIFY_LAST 

For bounds checking.

Definition at line 161 of file openapi_transfer.h.

OPEN File Types.

Enumerator
OPEN_FILE_TYPE_NONE 

Invalid file type.

OPEN_FILE_TYPE_CODE 

Compressed executable.

OPEN_FILE_TYPE_CONFIG 

Configuration file.

OPEN_FILE_TYPE_BACKUP_CONFIG 

Backup Configuration file.

OPEN_FILE_TYPE_LICENSE 

License file.

OPEN_FILE_TYPE_TXTCFG 

Text Configuration.

OPEN_FILE_TYPE_ERRORLOG 

Error Log.

OPEN_FILE_TYPE_VALGLOG 

Valgrind Log.

OPEN_FILE_TYPE_SYSTEM_MSGLOG 

Buffered Log.

OPEN_FILE_TYPE_TRAP_LOG 

Trap Log.

OPEN_FILE_TYPE_SSHKEY_RSA2 

SSH-2 RSA Key.

OPEN_FILE_TYPE_SSHKEY_DSA 

SSH-2 DSA Key.

OPEN_FILE_TYPE_SSHKEY_ECDSA 

SSH-2 ECDSA Key.

OPEN_FILE_TYPE_SSLPEM_ROOT 

SSL PEM Root Certificate.

OPEN_FILE_TYPE_SSLPEM_SERVER 

SSL PEM Server Certificate.

OPEN_FILE_TYPE_SSLPEM_DHSTRONG 

SSL PEM DH1024.

OPEN_FILE_TYPE_SSLPEM_DHVSTRONG 

SSL PEM DH2048.

OPEN_FILE_TYPE_CONFIG_SCRIPT 

Config Script.

OPEN_FILE_TYPE_CORE_DUMP 

Core Dump.

OPEN_FILE_TYPE_CLI_BANNER 

CLI Banner.

OPEN_FILE_TYPE_KERNEL 

Kernel.

OPEN_FILE_TYPE_STARTUP_LOG 

Startup Log.

OPEN_FILE_TYPE_OPERATIONAL_LOG 

Operational Log.

OPEN_FILE_TYPE_TR069_ACS_SSLPEM_ROOT 

TRO69 ACS SSL PEM Root.

OPEN_FILE_TYPE_TR069_CLIENT_SSLPRIV_KEY 

TRO69 Client SSL Priv Key.

OPEN_FILE_TYPE_TR069_CLIENT_SSL_CERT 

TRO69 Client SSL Certificate.

OPEN_FILE_TYPE_IAS_USERS 

IAS USERS.

OPEN_FILE_TYPE_TECHSUPPORT 

Tech Support.

OPEN_FILE_TYPE_OPENFLOW_SSL_CA_CERT 

Openflow CA Certificate file.

OPEN_FILE_TYPE_OPENFLOW_SSL_PRIV_KEY 

Openflow Private Key file.

OPEN_FILE_TYPE_OPENFLOW_SSL_CERT 

Openflow Switch Certificate file.

OPEN_FILE_TYPE_SSL_CA_CERT 

Root CA cert.

OPEN_FILE_TYPE_SSL_CLIENT_KEY 

Client SSL Key.

OPEN_FILE_TYPE_CLIENT_SSL_CERT 

Client SSL Certificate.

OPEN_FILE_TYPE_ROOT_CA_CERTIFICATES 

Root CA Certificates.

OPEN_FILE_TYPE_CAPTURED_CPU_PKTS 

CPU Packets Capture.

OPEN_FILE_TYPE_STARTUP_CONFIG 

Startup Config.

OPEN_FILE_TYPE_FACTORY_DEFAULT_CONFIG 

Factory Default config.

OPEN_FILE_TYPE_CRASH_LOG 

Crash Logs.

OPEN_FILE_TYPE_APPLICATION 

Application.

OPEN_FILE_TYPE_PUBLICKEY_IMAGE 

Public Key Image.

OPEN_FILE_TYPE_PUBLICKEY_CONFIG 

Public Key Configuration.

OPEN_FILE_TYPE_ALL_PERSISTENT_LOG 

All persistent log files.

OPEN_FILE_TYPE_TECHSUPPORT_CMDS 

Tech Support Commands.

OPEN_FILE_TYPE_PACKET_TRACE_PCAP 

Packet Trace.

OPEN_FILE_TYPE_DHCP_CLIENT_CONFIG_FILES 

DHCP Client configuration files.

OPEN_FILE_TYPE_SSHKEY_USER_PUBLIC_KEY 

SSH user public key.

OPEN_FILE_TYPE_LAST 

For bounds checking.

Definition at line 61 of file openapi_transfer.h.

OPEN File Transfer Types.

Enumerator
OPEN_TRANSFER_NONE 

Invalid xfer type.

OPEN_TRANSFER_TFTP 

Transfer via tftp.

OPEN_TRANSFER_SFTP 

Transfer via sftp.

OPEN_TRANSFER_SCP 

Transfer via scp.

OPEN_TRANSFER_HTTP 

Transfer via http.

OPEN_TRANSFER_HTTPS 

Transfer via https.

OPEN_TRANSFER_FTP 

Transfer via FTP.

OPEN_TRANSFER_XMODEM 

Transfer via XMODEM.

OPEN_TRANSFER_YMODEM 

Transfer via YMODEM.

OPEN_TRANSFER_ZMODEM 

Transfer via ZMODEM.

OPEN_TRANSFER_USB 

Transfer via USB.

OPEN_TRANSFER_LAST 

For bounds checking.

Definition at line 44 of file openapi_transfer.h.

Function Documentation

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.

Parameters
[in]client_handleClient handle from registration API.
[in]directiveSource to destination definition.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.20

Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[out]dsvConfigOptionEnumerated value indicating the digital signature verify option.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[in]dsvConfigOptionEnumerated value indicating the digital signature verify option.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiFileCopy ( openapiClientHandle_t client_handle,
uint32_t  unit,
open_buffdesc srcFileName,
open_buffdesc dstFileName 
)

copies a given local file locally or remotely

Parameters
[in]client_handleClient handle from registration API.
[in]unitUnit number
[in]srcFileNameSource file name
[in]dstFileNameTarget file name
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.25

Note
This is used to copy image1 <–> image2
Examples:
transfer_example.c.
open_error_t openapiHttpTransferDownStartSet ( openapiClientHandle_t client_handle,
open_buffdesc filePathBuf,
open_buffdesc fileNameBuf 
)

Completes an HTTP(S) file download transfer operation.

Parameters
[in]client_handleClient handle from registration API.
[in]filePathBufThe complete path to the downloaded file written into a temporary location by the webserver
[in]fileNameBufThe original source filename. Used when preserving its name.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.20

Note
Caller is responsible to check transfer progress and final result using openapiTransferInProgressGet() and openapiTransferResultGet().
This function will block management port access until complete.
This function must only be called after a webserver on the switch has finished the file transfer and the data is located in the file specified by filePathBuf.
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.

Parameters
[in]client_handleClient handle from registration API.
[in]headerDataBuffer containing the file header from the beginning of the file. The size of which is determined by calling openapiImageHeaderSizeGet().
[out]isValidOPEN_TRUE indicates the code image is intended or suitable for this system, else OPEN_FALSE
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
The caller is responsible for sending the number of bytes directly from the top of the code image file.
Buffer containing the file header should have no more than OPENAPI_STK_HEADER_SIZE bytes.
Examples:
transfer_example.c.
open_error_t openapiImageHeaderSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  headerSize 
)

Determine the size the image file header for this device.

Parameters
[in]client_handleClient handle from registration API.
[out]headerSizeSize of the image file's header.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferDownloadFileTypeGet ( openapiClientHandle_t client_handle,
OPEN_FILE_TYPES_t pFileType 
)

Get the Transfer Download File Type.

Parameters
[in]client_handleClient handle from registration API.
[out]pFileTypeCurrent file transfer type. OPEN_FILE_TYPES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.25

Examples:
transfer_example.c.
open_error_t openapiTransferDownloadFileTypeSet ( openapiClientHandle_t client_handle,
OPEN_FILE_TYPES_t  fileType 
)

Set the Transfer Download File Type.

Parameters
[in]client_handleClient handle from registration API.
[in]fileTypeOn success, transfer file type. OPEN_FILE_TYPES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.25

Note
Note: If the file type is license file, then please call openapiTransferLicenseIndexSet first before calling this API.
Examples:
transfer_example.c.
open_error_t openapiTransferDownloadResultCodeGet ( openapiClientHandle_t client_handle,
OPEN_TRANSFER_CODE_t resultCode 
)

To retrieve the status of a transfer operation.

Parameters
[in]client_handleClient handle from registration API.
[out]resultCodeEnumerated value indicating the transfer download result code
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferDownStartSet ( openapiClientHandle_t client_handle)

Starts an asynchronous file download transfer operation.

Parameters
[in]client_handleClient handle from registration API.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
Caller is responsible to check transfer progress and final result using openapiTransferInProgressGet() and openapiTransferResultGet().
Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[out]imageLabelLabel of the file on the local system
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
This API provides the identifying string (label) used to refer to the file residing in non-volatile memory on the switch, such as "active" or "backup".
Buffer size for image labels should be openapiImageFileNameMaxLengthGet().
Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[in]imageLabelLabel of the file on the local system
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
This API sets the identifying string (label) used to refer to the file residing in non-volatile memory on the switch, such as "active" or "backup".
The imageLabel should be no longer that openapiImageFileNameMaxLengthGet(). bytes.
Note: Please do not call this function to set the file name of a license file, the license file name is fixed and is set automatically by openapiTransferLicenseIndexSet. Also, if the file type is set to license, this API will fail.
Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[out]filePathPath to the file on the remote system
[out]fileNameName of the file on the remote system
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.
Note
Caller must provide a buffer for filePath of at least OPENAPI_FILEPATH_LEN_MAX bytes.
Caller must provide a buffer for fileName of at least OPENAPI_FILENAME_LEN_MAX bytes.

OpEN API Version: 1.10

Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[in]filePathPath to the file on the remote system
[in]fileNameName of the file on the remote system
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.
Note
The filePath should be no longer that OPENAPI_FILEPATH_LEN_MAX bytes
The fileName should be no longer that OPENAPI_FILENAME_LEN_MAX bytes

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferFileTypeGet ( openapiClientHandle_t client_handle,
OPEN_FILE_TYPES_t fileType 
)

Get the Transfer File Type.

Parameters
[in]client_handleClient handle from registration API.
[out]fileTypeCurrent file transfer type. OPEN_FILE_TYPES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
Only OPEN_FILE_TYPE_CODE is supported by OpEN API for this release.
open_error_t openapiTransferFileTypeSet ( openapiClientHandle_t client_handle,
OPEN_FILE_TYPES_t  fileType 
)

Set the Transfer File Type.

Parameters
[in]client_handleClient handle from registration API.
[in]fileTypeOn success, transfer file type. OPEN_FILE_TYPES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
Only OPEN_FILE_TYPE_CODE is supported by OpEN API for this release. Note: If the file type is license file, then please call openapiTransferLicenseIndexSet first before calling this API.
open_error_t openapiTransferInProgressGet ( openapiClientHandle_t client_handle,
OPEN_BOOL_t isInProgress 
)

Retrieve the progress of a file transfer.

Parameters
[in]client_handleClient handle from registration API.
[out]isInProgressOPEN_TRUE indicates a code download is in progress.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferLicenseIndexSet ( openapiClientHandle_t client_handle,
uint32_t  licenseIndex 
)

This API sets the index of the License file, that is to be transferred by the system.

      License files downloaded by the system has pre defined names and are set by the
      system automatically. The user has to specify the index of license file.
Parameters
[in]client_handleClient handle from registration API.
[in]licenseIndexThe index of license file to be set in the system.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.20

Note
The user has to set the Index number for the file. In some platforms only 1 active license file is allowed, but in others upto 16 such license files are allowed. This API should be called first before file type is set to license.
Examples:
transfer_example.c.
open_error_t openapiTransferModeGet ( openapiClientHandle_t client_handle,
OPEN_TRANSFER_MODES_t xfrMode 
)

Get the current transfer mode.

Parameters
[in]client_handleClient handle from registration API.
[out]xfrModeCurrently set transfer type. OPEN_TRANSFER_MODES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferModeSet ( openapiClientHandle_t client_handle,
OPEN_TRANSFER_MODES_t  xfrMode 
)

Set the current transfer mode.

Parameters
[in]client_handleClient handle from registration API.
[in]xfrModeOn success, current transfer type. OPEN_TRANSFER_MODES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[out]usernameRemote host username
[out]passwordRemote host password
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
This is used with SCP and SFTP file transfers only
The buffer for username should be at least OPENAPI_TRANSFER_USERNAME_LEN_MAX bytes.
The buffer password should be at least OPENAPI_TRANSFER_PASSWORD_LEN_MAX bytes.
Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[in]usernameRemote host username
[in]passwordRemote host password
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
This is used with SCP and SFTP file transfers only
The username should be no longer than OPENAPI_TRANSFER_USERNAME_LEN_MAX bytes.
The password should be no longer than OPENAPI_TRANSFER_PASSWORD_LEN_MAX bytes.
Examples:
transfer_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[out]resultCodeEnumerated value indicating the transfer download result
[out]resultStatusString value describing resultCode
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.
Note
The buffer for resultStatus should be at least OPENAPI_TRANSFER_RESULT_LEN_MAX bytes.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferServerAddressGet ( openapiClientHandle_t client_handle,
open_inet_addr_t inetAddr 
)

Get the transfer server address.

Parameters
[in]client_handleClient handle from registration API.
[out]inetAddrIPv4 or IPv6 address in network byte order of the server.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Examples:
transfer_example.c.
open_error_t openapiTransferServerAddressSet ( openapiClientHandle_t client_handle,
open_inet_addr_t  inetAddr 
)

Set the transfer server address.

Parameters
[in]client_handleClient handle from registration API.
[in]inetAddrIPv4 or IPv6 address in network byte order of the server.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.10

Note
The inet address used for this API can come from the inetAddr value output by the openapiInetAddrFromIPAddrHostNameStr() API.
Examples:
transfer_example.c.
open_error_t openapiTransferUploadFileTypeGet ( openapiClientHandle_t client_handle,
OPEN_FILE_TYPES_t pFileType 
)

Get the Transfer upload File Type.

Parameters
[in]client_handleClient handle from registration API.
[out]pFileTypeCurrent file transfer type. OPEN_FILE_TYPES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.25

Examples:
transfer_example.c.
open_error_t openapiTransferUploadFileTypeSet ( openapiClientHandle_t client_handle,
OPEN_FILE_TYPES_t  fileType 
)

Set the Transfer upload File Type.

Parameters
[in]client_handleClient handle from registration API.
[in]fileTypeOn success, transfer file type. OPEN_FILE_TYPES_t
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.25

Examples:
transfer_example.c.
open_error_t openapiTransferUpStartSet ( openapiClientHandle_t client_handle)

Starts an asynchronous file upload transfer operation.

Parameters
[in]client_handleClient handle from registration API.
Return values
OPEN_E_NONEif validation is successful.
OPEN_E_PARAMif parameters are not defined correctly.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.25

Note
Caller is responsible to check transfer progress and final result using openapiTransferInProgressGet() and openapiTransferResultGet().
Examples:
transfer_example.c.