Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.4.4.5
openapi_transfer.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 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 {
52 
54 typedef enum
55 {
61 
63 typedef enum
64 {
65  OPEN_NO_STATUS_CHANGE = 1,
66  OPEN_STATUS_CHANGED = 2,
67  OPEN_TRANSFER_FAILED = 3,
68  OPEN_TRANSFER_BAD_CRC = 4,
69  OPEN_FLASH_FAILED = 5,
70  OPEN_OPR_FILE_TYPE_FAILED = 6,
71  OPEN_OTHER_FILE_TYPE_FAILED = 7,
72  OPEN_NEXT_DATA_BLOCK_RECEIVED = 8,
73  OPEN_TRANSFER_FILE_NOT_FOUND = 9,
74  OPEN_TRANSFER_SUCCESS = 10,
75  OPEN_TFTP_FAILED = 11,
76  OPEN_OPR_FILE_VERSION_FAILED = 12,
77  OPEN_DIGITAL_SIGNATURE_VERIFY_FAILED = 13,
78  OPEN_DIGITAL_SIGNATURE_TRUNCATE_FAILED = 14,
79  OPEN_TRANSFER_STATUS_LAST = 15
81 
83 typedef enum
84 {
85  OPEN_TRANSFER_CODE_NONE = 0,
86  OPEN_TRANSFER_CODE_STARTING = 1,
87  OPEN_TRANSFER_CODE_ERROR_STARTING = 2,
88  OPEN_TRANSFER_CODE_WRONG_FILE_TYPE = 3,
89  OPEN_TRANSFER_CODE_UPDATE_CONFIG = 4,
90  OPEN_TRANSFER_CODE_INVALID_CONFIG = 5,
91  OPEN_TRANSFER_CODE_WRITING_FLASH = 6,
92  OPEN_TRANSFER_CODE_FLASH_FAILED = 7,
93  OPEN_TRANSFER_CODE_CHECKING_CRC = 8,
94  OPEN_TRANSFER_CODE_CRC_FAILURE = 9,
95  OPEN_TRANSFER_CODE_UNKNOWN_DIRECTION = 10,
96  OPEN_TRANSFER_CODE_SUCCESS = 11,
97  OPEN_TRANSFER_CODE_FAILURE = 12,
98  OPEN_TRANSFER_CODE_WRONG_DEVICE = 13,
99  OPEN_TRANSFER_CODE_INSUFFICIENT_MEMORY = 14,
100  OPEN_TRANSFER_CODE_FLASH_FILE_OPEN_FAIL = 15,
101  OPEN_TRANSFER_CODE_ERROR_READING_FROM_FLASH = 16,
102  OPEN_TRANSFER_CODE_FILE_DOES_NOT_EXISTS = 17,
103  OPEN_TRANSFER_CODE_FILE_TOO_BIG = 18,
104  OPEN_TRANSFER_CODE_ERROR_WRITING_TO_FLASH = 19,
105  OPEN_TRANSFER_CODE_OVERWRITE_DENIED = 20,
106  OPEN_TRANSFER_CODE_LAST = 21
108 
110 typedef enum
111 {
118 
119 /*****************************************************************/
132  uint32_t *headerSize);
133 
134 /*****************************************************************/
160  open_buffdesc *headerData,
161  OPEN_BOOL_t *isValid);
162 
163 /*****************************************************************/
178  OPEN_TRANSFER_MODES_t *xfrMode);
179 
180 /*****************************************************************/
196  OPEN_TRANSFER_MODES_t xfrMode);
197 
198 /*****************************************************************/
216  OPEN_FILE_TYPES_t *fileType);
217 
218 /*****************************************************************/
236  OPEN_FILE_TYPES_t fileType);
237 
238 /*****************************************************************/
253  open_inet_addr_t *inetAddr);
254 
255 /*****************************************************************/
273  open_inet_addr_t inetAddr);
274 
275 /*****************************************************************/
296  open_buffdesc *filePath,
297  open_buffdesc *fileName);
298 
299 /*****************************************************************/
320  open_buffdesc *filePath,
321  open_buffdesc *fileName);
322 
323 /*****************************************************************/
343  open_buffdesc *imageLabel);
344 
345 /*****************************************************************/
366  open_buffdesc *imageLabel);
367 
368 /*****************************************************************/
390  open_buffdesc *username,
391  open_buffdesc *password);
392 
393 /*****************************************************************/
415  open_buffdesc *username,
416  open_buffdesc *password);
417 
418 /*****************************************************************/
434 
435 /*****************************************************************/
450  OPEN_BOOL_t *isInProgress);
451 
452 /*****************************************************************/
471  OPEN_TRANSFER_STATUS_t *resultCode,
472  open_buffdesc *resultStatus);
473 
474 /*****************************************************************/
489  OPEN_TRANSFER_CODE_t *resultCode);
490 
491 /*****************************************************************/
506  OPEN_DIGITAL_SIGNATURE_OPTION_t *dsvConfigOption);
507 
508 /*****************************************************************/
523  OPEN_DIGITAL_SIGNATURE_OPTION_t dsvConfigOption);
524 
525 #endif /* OPENAPI_TRANSFER_H_INCLUDED */
526