Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.9.0.2
openapi_transfer.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2020 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_transfer.h
28 *
29 * @purpose Transfer Download
30 *
31 * @component OpEN
32 *
33 * @create 2/18/2016
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_TRANSFER_H_INCLUDED
39 #define OPENAPI_TRANSFER_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
54 
56 typedef enum
57 {
65 
67 typedef enum
68 {
69  OPEN_NO_STATUS_CHANGE = 1,
70  OPEN_STATUS_CHANGED = 2,
71  OPEN_TRANSFER_FAILED = 3,
72  OPEN_TRANSFER_BAD_CRC = 4,
73  OPEN_FLASH_FAILED = 5,
74  OPEN_OPR_FILE_TYPE_FAILED = 6,
75  OPEN_OTHER_FILE_TYPE_FAILED = 7,
76  OPEN_NEXT_DATA_BLOCK_RECEIVED = 8,
77  OPEN_TRANSFER_FILE_NOT_FOUND = 9,
78  OPEN_TRANSFER_SUCCESS = 10,
79  OPEN_TFTP_FAILED = 11,
80  OPEN_OPR_FILE_VERSION_FAILED = 12,
81  OPEN_DIGITAL_SIGNATURE_VERIFY_FAILED = 13,
82  OPEN_DIGITAL_SIGNATURE_TRUNCATE_FAILED = 14,
83  OPEN_TRANSFER_STATUS_LAST = 15
85 
87 typedef enum
88 {
89  OPEN_TRANSFER_CODE_NONE = 0,
90  OPEN_TRANSFER_CODE_STARTING = 1,
91  OPEN_TRANSFER_CODE_ERROR_STARTING = 2,
92  OPEN_TRANSFER_CODE_WRONG_FILE_TYPE = 3,
93  OPEN_TRANSFER_CODE_UPDATE_CONFIG = 4,
94  OPEN_TRANSFER_CODE_INVALID_CONFIG = 5,
95  OPEN_TRANSFER_CODE_WRITING_FLASH = 6,
96  OPEN_TRANSFER_CODE_FLASH_FAILED = 7,
97  OPEN_TRANSFER_CODE_CHECKING_CRC = 8,
98  OPEN_TRANSFER_CODE_CRC_FAILURE = 9,
99  OPEN_TRANSFER_CODE_UNKNOWN_DIRECTION = 10,
100  OPEN_TRANSFER_CODE_SUCCESS = 11,
101  OPEN_TRANSFER_CODE_FAILURE = 12,
102  OPEN_TRANSFER_CODE_WRONG_DEVICE = 13,
103  OPEN_TRANSFER_CODE_INSUFFICIENT_MEMORY = 14,
104  OPEN_TRANSFER_CODE_FLASH_FILE_OPEN_FAIL = 15,
105  OPEN_TRANSFER_CODE_ERROR_READING_FROM_FLASH = 16,
106  OPEN_TRANSFER_CODE_FILE_DOES_NOT_EXISTS = 17,
107  OPEN_TRANSFER_CODE_FILE_TOO_BIG = 18,
108  OPEN_TRANSFER_CODE_ERROR_WRITING_TO_FLASH = 19,
109  OPEN_TRANSFER_CODE_OVERWRITE_DENIED = 20,
110  OPEN_TRANSFER_CODE_LAST = 21
112 
114 typedef enum
115 {
122 
124 typedef enum
125 {
131 
132 /*****************************************************************/
145  uint32_t *headerSize);
146 
147 /*****************************************************************/
173  open_buffdesc *headerData,
174  OPEN_BOOL_t *isValid);
175 
176 /*****************************************************************/
191  OPEN_TRANSFER_MODES_t *xfrMode);
192 
193 /*****************************************************************/
208  OPEN_TRANSFER_MODES_t xfrMode);
209 
210 /*****************************************************************/
228  OPEN_FILE_TYPES_t *fileType);
229 
230 /*****************************************************************/
249  OPEN_FILE_TYPES_t fileType);
250 
251 /*****************************************************************/
266  open_inet_addr_t *inetAddr);
267 
268 /*****************************************************************/
286  open_inet_addr_t inetAddr);
287 
288 /*****************************************************************/
309  open_buffdesc *filePath,
310  open_buffdesc *fileName);
311 
312 /*****************************************************************/
333  open_buffdesc *filePath,
334  open_buffdesc *fileName);
335 
336 /*****************************************************************/
356  open_buffdesc *imageLabel);
357 
358 /*****************************************************************/
382  open_buffdesc *imageLabel);
383 
384 /*****************************************************************/
406  open_buffdesc *username,
407  open_buffdesc *password);
408 
409 /*****************************************************************/
431  open_buffdesc *username,
432  open_buffdesc *password);
433 
434 /*****************************************************************/
461  open_buffdesc *filePathBuf,
462  open_buffdesc *fileNameBuf);
463 
464 /*****************************************************************/
480 
481 /*****************************************************************/
496  OPEN_BOOL_t *isInProgress);
497 
498 /*****************************************************************/
517  OPEN_TRANSFER_STATUS_t *resultCode,
518  open_buffdesc *resultStatus);
519 
520 /*****************************************************************/
535  OPEN_TRANSFER_CODE_t *resultCode);
536 
537 /*****************************************************************/
552  OPEN_DIGITAL_SIGNATURE_OPTION_t *dsvConfigOption);
553 
554 /*****************************************************************/
569  OPEN_DIGITAL_SIGNATURE_OPTION_t dsvConfigOption);
570 
571 /*****************************************************************/
588  OPEN_COPY_CONFIG_DIRECTIVE_t directive);
589 
590 /*********************************************************************************/
609  uint32_t licenseIndex);
610 
611 #endif /* OPENAPI_TRANSFER_H_INCLUDED */
612