10d163575Sopenharmony_ci/* 20d163575Sopenharmony_ci * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 30d163575Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 40d163575Sopenharmony_ci * 50d163575Sopenharmony_ci * Redistribution and use in source and binary forms, with or without modification, 60d163575Sopenharmony_ci * are permitted provided that the following conditions are met: 70d163575Sopenharmony_ci * 80d163575Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, this list of 90d163575Sopenharmony_ci * conditions and the following disclaimer. 100d163575Sopenharmony_ci * 110d163575Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, this list 120d163575Sopenharmony_ci * of conditions and the following disclaimer in the documentation and/or other materials 130d163575Sopenharmony_ci * provided with the distribution. 140d163575Sopenharmony_ci * 150d163575Sopenharmony_ci * 3. Neither the name of the copyright holder nor the names of its contributors may be used 160d163575Sopenharmony_ci * to endorse or promote products derived from this software without specific prior written 170d163575Sopenharmony_ci * permission. 180d163575Sopenharmony_ci * 190d163575Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 200d163575Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 210d163575Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 220d163575Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 230d163575Sopenharmony_ci * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 240d163575Sopenharmony_ci * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 250d163575Sopenharmony_ci * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 260d163575Sopenharmony_ci * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 270d163575Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 280d163575Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 290d163575Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 300d163575Sopenharmony_ci */ 310d163575Sopenharmony_ci 320d163575Sopenharmony_ci#ifndef TFTPC_H 330d163575Sopenharmony_ci#define TFTPC_H 340d163575Sopenharmony_ci 350d163575Sopenharmony_ci#include "types_adapt.h" 360d163575Sopenharmony_ci 370d163575Sopenharmony_ci#if LWIP_TFTP /* don't build if not configured for use in lwipopts.h */ 380d163575Sopenharmony_ci 390d163575Sopenharmony_ci#if defined (__cplusplus) && __cplusplus 400d163575Sopenharmony_ciextern "C" { 410d163575Sopenharmony_ci#endif 420d163575Sopenharmony_ci 430d163575Sopenharmony_ci#define TFTP_NULL_UINT32 ((u32_t)0xffffffffUL) 440d163575Sopenharmony_ci 450d163575Sopenharmony_ci#define TFTP_NULL_INT32 (-1) 460d163575Sopenharmony_ci 470d163575Sopenharmony_ci/** @cond liteos 480d163575Sopenharmony_ci* @defgroup TFTP_Interfaces 490d163575Sopenharmony_ci* @ingroup Enums 500d163575Sopenharmony_ci* * This section contains the TFTP enums. 510d163575Sopenharmony_ci*/ 520d163575Sopenharmony_ci/** 530d163575Sopenharmony_ci* 540d163575Sopenharmony_ci* This Enum is used to specify the transfer mode of the file to be handled by TFTP client. 550d163575Sopenharmony_ci*/ 560d163575Sopenharmony_citypedef enum tagTFTPC_TransferMode { 570d163575Sopenharmony_ci TRANSFER_MODE_ASCII = 0, /**< Indicates that the mode of transfer is ASCII. */ 580d163575Sopenharmony_ci TRANSFER_MODE_BINARY, /**< Indicates that the mode of transfer is Binary */ 590d163575Sopenharmony_ci TRANSFER_MODE_BUTT /**< Indicates invalid transfer mode.*/ 600d163575Sopenharmony_ci} TFTPC_TRANSFER_MODE_E; 610d163575Sopenharmony_ci 620d163575Sopenharmony_ci/** 630d163575Sopenharmony_ci* This Enum is used to specify the transfer mode to be handled by TFTP client 640d163575Sopenharmony_ci* This Enum indicates the TFTP client transfer mode of the file 650d163575Sopenharmony_ci 660d163575Sopenharmony_ci*/ 670d163575Sopenharmony_citypedef enum tagTFTPC_ErrCode { 680d163575Sopenharmony_ci TFTPC_SOCKET_FAILURE = 1, /**< Error while creating UDP socket. */ 690d163575Sopenharmony_ci TFTPC_BIND_FAILURE = 2, /**< Error while binding to the UDP socket. */ 700d163575Sopenharmony_ci TFTPC_SELECT_ERROR = 3, /**< Error returned by select() system call. */ 710d163575Sopenharmony_ci TFTPC_RECVFROM_ERROR = 4, /**< Error while receiving data from the peer. */ 720d163575Sopenharmony_ci TFTPC_SENDTO_ERROR = 5, /**< Error while sending data to the peer. */ 730d163575Sopenharmony_ci TFTPC_FILE_NOT_FOUND = 6, /**< Requested file is not found. */ 740d163575Sopenharmony_ci 750d163575Sopenharmony_ci /**< This is the error sent by the server when host name cannot be resolved. */ 760d163575Sopenharmony_ci TFTPC_CANNOT_RESOLVE_HOSTNAME = 7, 770d163575Sopenharmony_ci TFTPC_INVALID_PARAVALUE = 8, /**< Input parameters passed to TFTP interfaces are invalid. */ 780d163575Sopenharmony_ci 790d163575Sopenharmony_ci /**< Error detected in TFTP packet or the error received from the TFTP server. */ 800d163575Sopenharmony_ci TFTPC_PROTO_ERROR = 9, 810d163575Sopenharmony_ci /**< Error during packet synchronization while sending or unexpected packet is received. */ 820d163575Sopenharmony_ci TFTPC_SYNC_FAILURE = 10, 830d163575Sopenharmony_ci /**< File size limit crossed, Max block can be 0xFFFF, each block containing 512 bytes. */ 840d163575Sopenharmony_ci TFTPC_FILE_TOO_BIG = 11, 850d163575Sopenharmony_ci TFTPC_SRC_FILENAME_LENGTH_ERROR = 12, /**< File name length greater than 256. */ 860d163575Sopenharmony_ci TFTPC_IP_NOT_WITHIN_RANGE = 13, /**< Host name IP is not valid. */ 870d163575Sopenharmony_ci TFTPC_ACCESS_ERROR = 14, /**< TFTP server returned file access error. */ 880d163575Sopenharmony_ci 890d163575Sopenharmony_ci /**< TFTP server returned error signifying that the DISK is full to write. */ 900d163575Sopenharmony_ci TFTPC_DISK_FULL = 15, 910d163575Sopenharmony_ci TFTPC_FILE_EXISTS = 16, /**< TFTP server returned error signifying that the file exists. */ 920d163575Sopenharmony_ci 930d163575Sopenharmony_ci /**< tftp_put_file_by_filename returned error signifying that the source file name do not exist. */ 940d163575Sopenharmony_ci TFTPC_FILE_NOT_EXIST = 17, 950d163575Sopenharmony_ci TFTPC_MEMALLOC_ERROR = 18, /**< Memory allocation failed in TFTP client. */ 960d163575Sopenharmony_ci TFTPC_FILEOPEN_ERROR = 19, /**< File open failed. */ 970d163575Sopenharmony_ci TFTPC_FILEREAD_ERROR = 20, /**< File read error. */ 980d163575Sopenharmony_ci TFTPC_FILECREATE_ERROR = 21, /**< File create error. */ 990d163575Sopenharmony_ci TFTPC_FILEWRITE_ERROR = 22, /**< File write error. */ 1000d163575Sopenharmony_ci TFTPC_TIMEOUT_ERROR = 23, /**< Max time expired while waiting for file to be received. */ 1010d163575Sopenharmony_ci 1020d163575Sopenharmony_ci /**< Error when the received packet is less than 4 bytes (error length) or greater than 512 bytes. */ 1030d163575Sopenharmony_ci TFTPC_PKT_SIZE_ERROR = 24, 1040d163575Sopenharmony_ci TFTPC_ERROR_NOT_DEFINED = 25, /**< Returned by TFTP server for protocol user error. */ 1050d163575Sopenharmony_ci TFTPC_DEST_PATH_LENGTH_ERROR = 26, /**< If the destination file path length is greater than 256. */ 1060d163575Sopenharmony_ci TFTPC_UNKNOWN_TRANSFER_ID = 27, /**< Returned by TFTP server for undefined transfer ID. */ 1070d163575Sopenharmony_ci 1080d163575Sopenharmony_ci /**< IOCTL function failed at TFTP client while setting the socket to non-block. */ 1090d163575Sopenharmony_ci TFTPC_IOCTLSOCKET_FAILURE = 28, 1100d163575Sopenharmony_ci TFTPC_MEMCPY_FAILURE = 29 /**< TFTP memcpy failure. */ 1110d163575Sopenharmony_ci} TFTPC_ERR_CODE_E; 1120d163575Sopenharmony_ci 1130d163575Sopenharmony_citypedef enum tagTFTPC_OpCode { 1140d163575Sopenharmony_ci TFTPC_OP_RRQ = 1, /* read request */ 1150d163575Sopenharmony_ci TFTPC_OP_WRQ, /* write request */ 1160d163575Sopenharmony_ci TFTPC_OP_DATA, /* data packet */ 1170d163575Sopenharmony_ci TFTPC_OP_ACK, /* acknowledgment */ 1180d163575Sopenharmony_ci TFTPC_OP_ERROR, /* error code */ 1190d163575Sopenharmony_ci TFTPC_OP_OPT /* option code */ 1200d163575Sopenharmony_ci} TFTPC_OPCODE_E; 1210d163575Sopenharmony_ci 1220d163575Sopenharmony_citypedef enum tagTFTPC_PROTOCOL_ErrCode { 1230d163575Sopenharmony_ci TFTPC_PROTOCOL_USER_DEFINED = 0, 1240d163575Sopenharmony_ci TFTPC_PROTOCOL_FILE_NOT_FOUND, 1250d163575Sopenharmony_ci TFTPC_PROTOCOL_ACCESS_ERROR, 1260d163575Sopenharmony_ci TFTPC_PROTOCOL_DISK_FULL, 1270d163575Sopenharmony_ci TFTPC_PROTOCOL_PROTO_ERROR, 1280d163575Sopenharmony_ci TFTPC_PROTOCOL_UNKNOWN_TRANSFER_ID, 1290d163575Sopenharmony_ci TFTPC_PROTOCOL_FILE_EXISTS, 1300d163575Sopenharmony_ci TFTPC_PROTOCOL_CANNOT_RESOLVE_HOSTNAME 1310d163575Sopenharmony_ci} TFTPC_PROT_ERRCODE_E; 1320d163575Sopenharmony_ci 1330d163575Sopenharmony_ci 1340d163575Sopenharmony_ci#ifndef TFTPC_MAX_SEND_REQ_ATTEMPTS 1350d163575Sopenharmony_ci#define TFTPC_MAX_SEND_REQ_ATTEMPTS 5 /* tftp max attempts */ 1360d163575Sopenharmony_ci#endif 1370d163575Sopenharmony_ci 1380d163575Sopenharmony_ci#ifndef TFTPC_TIMEOUT_PERIOD 1390d163575Sopenharmony_ci#define TFTPC_TIMEOUT_PERIOD 5 /* tftp timeout period,unit :s */ 1400d163575Sopenharmony_ci#endif 1410d163575Sopenharmony_ci 1420d163575Sopenharmony_ci#define TFTPC_SERVER_PORT 69 /* tftp server well known port no. */ 1430d163575Sopenharmony_ci 1440d163575Sopenharmony_ci/* MAX file size in TFTP is 32 MB. 1450d163575Sopenharmony_ci Reason for keeping 75 here , is ((75*512=38400bytes)/1024) = 37MB. So the recv/Send Loop can 1460d163575Sopenharmony_ci receive the complete MAX message from the network 1470d163575Sopenharmony_ci*/ 1480d163575Sopenharmony_ci#define TFTPC_MAX_WAIT_IN_LOOP 75 1490d163575Sopenharmony_ci 1500d163575Sopenharmony_ci#define TFTP_BLKSIZE 512 /* data block size (IEN-133) */ 1510d163575Sopenharmony_ci#define TFTP_HDRSIZE 4 /* TFTP header size */ 1520d163575Sopenharmony_ci#define TFTP_PKTSIZE (TFTP_BLKSIZE + TFTP_HDRSIZE) /* Packet size */ 1530d163575Sopenharmony_ci#define TFTP_MAX_MODE_SIZE 9 /* max size of mode string */ 1540d163575Sopenharmony_ci#define TFTP_MAXERRSTRSIZE 100 /* max size of error message string */ 1550d163575Sopenharmony_ci#define TFTP_MAX_PATH_LENGTH 256 /* Max path or filename length */ 1560d163575Sopenharmony_ci#define TFTP_MAX_BLK_NUM (0xFFFFL) /* MAximum block number */ 1570d163575Sopenharmony_ci 1580d163575Sopenharmony_ci/* IP address not including reserved IPs(0 and 127) and multicast addresses(Class D) */ 1590d163575Sopenharmony_ci#define TFTPC_IP_ADDR_MIN 0x01000000 1600d163575Sopenharmony_ci#define TFTPC_IP_ADDR_EX_RESV 0x7effffff 1610d163575Sopenharmony_ci#define TFTPC_IP_ADDR_CLASS_B 0x80000000 1620d163575Sopenharmony_ci#define TFTPC_IP_ADDR_EX_CLASS_DE 0xdfffffff 1630d163575Sopenharmony_ci 1640d163575Sopenharmony_ci#define TFTPC_FOUR 4 /* minimum packet size */ 1650d163575Sopenharmony_ci 1660d163575Sopenharmony_ci/****************************************************************************/ 1670d163575Sopenharmony_ci/* Structure definitions */ 1680d163575Sopenharmony_ci/****************************************************************************/ 1690d163575Sopenharmony_ci/* Tftp data packet */ 1700d163575Sopenharmony_citypedef struct tagTFTPC_DATA { 1710d163575Sopenharmony_ci u16_t usBlknum; /* block number */ 1720d163575Sopenharmony_ci u8_t ucDataBuf[TFTP_BLKSIZE]; /* Actual data */ 1730d163575Sopenharmony_ci} TFTPC_DATA_S; 1740d163575Sopenharmony_ci 1750d163575Sopenharmony_ci 1760d163575Sopenharmony_ci/* TFTP error packet */ 1770d163575Sopenharmony_citypedef struct tagTFTPC_ERROR { 1780d163575Sopenharmony_ci u16_t usErrNum; /* error number */ 1790d163575Sopenharmony_ci u8_t ucErrMesg[TFTP_MAXERRSTRSIZE]; /* error message */ 1800d163575Sopenharmony_ci} TFTPC_ERROR_S; 1810d163575Sopenharmony_ci 1820d163575Sopenharmony_ci 1830d163575Sopenharmony_ci/* TFTP packet format */ 1840d163575Sopenharmony_citypedef struct tagTFTPC_PACKET { 1850d163575Sopenharmony_ci u16_t usOpcode; /* Opcode value */ 1860d163575Sopenharmony_ci union { 1870d163575Sopenharmony_ci /* it contains mode and filename */ 1880d163575Sopenharmony_ci s8_t ucName_Mode[TFTP_MAX_PATH_LENGTH + TFTP_MAX_MODE_SIZE]; 1890d163575Sopenharmony_ci u16_t usBlknum; /* Block Number */ 1900d163575Sopenharmony_ci TFTPC_DATA_S stTFTP_Data; /* Data Packet */ 1910d163575Sopenharmony_ci TFTPC_ERROR_S stTFTP_Err; /* Error Packet */ 1920d163575Sopenharmony_ci } u; 1930d163575Sopenharmony_ci} TFTPC_PACKET_S; 1940d163575Sopenharmony_ci 1950d163575Sopenharmony_ci 1960d163575Sopenharmony_ci/** @defgroup TFTP_Interfaces 1970d163575Sopenharmony_ci* This section contains the TFTP Interfaces 1980d163575Sopenharmony_ci*/ 1990d163575Sopenharmony_ci/* 2000d163575Sopenharmony_ciFunc Name: lwip_tftp_get_file_by_filename 2010d163575Sopenharmony_ci*/ 2020d163575Sopenharmony_ci/** 2030d163575Sopenharmony_ci* @ingroup TFTP_Interfaces 2040d163575Sopenharmony_ci* @brief 2050d163575Sopenharmony_ci* This API gets the source file from the server. It then stores the received file in the destination path 2060d163575Sopenharmony_ci* on the client system. 2070d163575Sopenharmony_ci* 2080d163575Sopenharmony_ci* @param[in] ulHostAddr IP address of Host. This is the TFTP server IP. [NA] 2090d163575Sopenharmony_ci* @param[in] usTftpServPort TFTP server port. If the value is passed as 0 then the default TFTP 2100d163575Sopenharmony_ci* PORT 69 is used. [NA] 2110d163575Sopenharmony_ci* @param[in] ucTftpTransMode File transfer mode, either TRANSFER_MODE_BINARY or TRANSFER_MODE_ASCII. [NA] 2120d163575Sopenharmony_ci* @param[in] szSrcFileName Source file in the tftp server. [NA] 2130d163575Sopenharmony_ci* @param[in] szDestDirPath Destination file path in the in the client. [NA] 2140d163575Sopenharmony_ci* @param[out] [N/A] 2150d163575Sopenharmony_ci* 2160d163575Sopenharmony_ci* @return 2170d163575Sopenharmony_ci* ERR_OK: On success \n 2180d163575Sopenharmony_ci* TFTPC_ERR_CODE_E: On failure 2190d163575Sopenharmony_ci* 2200d163575Sopenharmony_ci* @note 2210d163575Sopenharmony_ci* \n 2220d163575Sopenharmony_ci* The behavior of this API is such that if the destination file already exists, it will be overwritten. 2230d163575Sopenharmony_ci*/ 2240d163575Sopenharmony_ciu32_t lwip_tftp_get_file_by_filename(u32_t ulHostAddr, 2250d163575Sopenharmony_ci u16_t usTftpServPort, 2260d163575Sopenharmony_ci u8_t ucTftpTransMode, 2270d163575Sopenharmony_ci s8_t *szSrcFileName, 2280d163575Sopenharmony_ci s8_t *szDestDirPath); 2290d163575Sopenharmony_ci 2300d163575Sopenharmony_ci 2310d163575Sopenharmony_ci/* @defgroup TFTP_Interfaces 2320d163575Sopenharmony_ci* This section contains the TFTP Interfaces 2330d163575Sopenharmony_ci*/ 2340d163575Sopenharmony_ci/* 2350d163575Sopenharmony_ciFunc Name: lwip_tftp_put_file_by_filename 2360d163575Sopenharmony_ci*/ 2370d163575Sopenharmony_ci/** 2380d163575Sopenharmony_ci* @ingroup TFTP_Interfaces 2390d163575Sopenharmony_ci 2400d163575Sopenharmony_ci* @brief 2410d163575Sopenharmony_ci* This API reads the contents of the source file on the client system and sends it to the server and 2420d163575Sopenharmony_ci* server then receives the data and stores it in the specified destination path. 2430d163575Sopenharmony_ci* 2440d163575Sopenharmony_ci* @param[in] ulHostAddr Indicates the IP address of Host. This is the TFTP server IP. 2450d163575Sopenharmony_ci* @param[in] usTftpServPort Indicates the TFTP server port. If the value is passed as 0 then the default TFTP 2460d163575Sopenharmony_ci* PORT 69 is used. 2470d163575Sopenharmony_ci* @param[in] ucTftpTransMode Indicates the file transfer mode, either TRANSFER_MODE_BINARY or TRANSFER_MODE_ASCII. 2480d163575Sopenharmony_ci* @param[in] szSrcFileName Indicates the source file in the client. 2490d163575Sopenharmony_ci* @param[in] szDestDirPath Indicates the destination file path on the tftp server. 2500d163575Sopenharmony_ci* 2510d163575Sopenharmony_ci* @return 2520d163575Sopenharmony_ci* ERR_OK: On success \n 2530d163575Sopenharmony_ci* TFTPC_ERR_CODE_E: On failure 2540d163575Sopenharmony_ci* 2550d163575Sopenharmony_ci*/ 2560d163575Sopenharmony_ciu32_t lwip_tftp_put_file_by_filename(u32_t ulHostAddr, 2570d163575Sopenharmony_ci u16_t usTftpServPort, 2580d163575Sopenharmony_ci u8_t cTftpTransMode, 2590d163575Sopenharmony_ci s8_t *szSrcFileName, 2600d163575Sopenharmony_ci s8_t *szDestDirPath); 2610d163575Sopenharmony_ci 2620d163575Sopenharmony_ci#ifdef TFTP_TO_RAWMEM 2630d163575Sopenharmony_ci/* @defgroup TFTP_Interfaces 2640d163575Sopenharmony_ci* This section contains the TFTP Interfaces 2650d163575Sopenharmony_ci*/ 2660d163575Sopenharmony_ci/* 2670d163575Sopenharmony_ciFunc Name: lwip_tftp_get_file_by_filename_to_rawmem 2680d163575Sopenharmony_ci*/ 2690d163575Sopenharmony_ci/** 2700d163575Sopenharmony_ci* @ingroup TFTP_Interfaces 2710d163575Sopenharmony_ci 2720d163575Sopenharmony_ci* @brief 2730d163575Sopenharmony_ci* This API gets the source file from the server. It then stores the received file in the target memory 2740d163575Sopenharmony_ci* on the client system. 2750d163575Sopenharmony_ci* 2760d163575Sopenharmony_ci* @param[in] ulHostAddr Indicates the IP address of the Host. This is the TFTP server IP. 2770d163575Sopenharmony_ci* @param[in] usTftpServPort Indicates the TFTP server port. If the value is passed as 0 then the default TFTP 2780d163575Sopenharmony_ci* PORT 69 is used. 2790d163575Sopenharmony_ci* @param[in] ucTftpTransMode Indicates the File transfer mode, either TRANSFER_MODE_BINARY or TRANSFER_MODE_ASCII. 2800d163575Sopenharmony_ci* @param[in] szSrcFileName Indicates the Source file in the TFTP server. 2810d163575Sopenharmony_ci* @param[in] szDestMemAddr Indicates the target memory address in the client. 2820d163575Sopenharmony_ci* @param[in/out] ulFileLength Indicates the target memory address can cache the size of the content, 2830d163575Sopenharmony_ci and The real size of the Source file. 2840d163575Sopenharmony_ci* 2850d163575Sopenharmony_ci* @return 2860d163575Sopenharmony_ci* ERR_OK: On success \n 2870d163575Sopenharmony_ci* TFTPC_ERR_CODE_E: On failure 2880d163575Sopenharmony_ci* @note 2890d163575Sopenharmony_ci 2900d163575Sopenharmony_ci* 1.You must define TFTP_TO_RAWMEM when using this API. \n 2910d163575Sopenharmony_ci* 2.The behavior of this API is such that if the destination file already exists, it will be overwritten. 2920d163575Sopenharmony_ci* @endcond 2930d163575Sopenharmony_ci*/ 2940d163575Sopenharmony_ci 2950d163575Sopenharmony_ciu32_t lwip_tftp_get_file_by_filename_to_rawmem(u32_t ulHostAddr, 2960d163575Sopenharmony_ci u16_t usTftpServPort, 2970d163575Sopenharmony_ci u8_t ucTftpTransMode, 2980d163575Sopenharmony_ci s8_t *szSrcFileName, 2990d163575Sopenharmony_ci s8_t *szDestMemAddr, 3000d163575Sopenharmony_ci u32_t *ulFileLength); 3010d163575Sopenharmony_ci#endif 3020d163575Sopenharmony_ci 3030d163575Sopenharmony_ci#if defined (__cplusplus) && __cplusplus 3040d163575Sopenharmony_ci} 3050d163575Sopenharmony_ci#endif 3060d163575Sopenharmony_ci 3070d163575Sopenharmony_ci#endif /* LWIP_TFTP */ 3080d163575Sopenharmony_ci 3090d163575Sopenharmony_ci#endif /* TFTPC_H */ 310