Embedded TCP/IP stack: TFTP client API

FNET

Embedded TCP/IP stack  4.1.0

Detailed Description

The user application can use the TFTP-client service to download and upload files from/to a remote TFTP server.
After the TFTP client is initialized by calling the fnet_tftp_cln_init() function, the user application should call the main service-polling function fnet_service_poll() periodically in the background.
The TFP client service is released automatically as soon as the requested file is fully received/sent or an error occurs. Your application code may continue to call fnet_service_poll() to handle other services, but this will not have any impact on the TFTP client communication until you initialize the next file transfer by calling fnet_tftp_cln_init() again.

For the TFTP-client service example, refer to the FNET Bootloader source code.

Configuration parameters:

Data Structures

struct  fnet_tftp_cln_params
 Input parameters for the fnet_tftp_cln_init() function. More...
 

Typedefs

typedef fnet_int32_t(* fnet_tftp_cln_handler_t) (fnet_tftp_request_t request_type, fnet_uint8_t *data, fnet_size_t data_size, fnet_return_t tftp_result, void *handler_param)
 TFTP-client event handler callback function prototype, that is called when the TFTP client has received a new data packet (request_type equals to FNET_TFTP_REQUEST_READ), when the TFTP client is ready to send a new data packet to the TFTP server (request_type equals to FNET_TFTP_REQUEST_WRITE), or when an error occurs (tftp_result equals to FNET_ERR). More...
 

Enumerations

Functions

fnet_return_t fnet_tftp_cln_init (struct fnet_tftp_cln_params *params)
 Initializes the file transfer with the TFTP-client service. More...
 
void fnet_tftp_cln_release (void)
 Aborts the transfer and releases the TFTP-client service. More...
 
fnet_tftp_cln_state_t fnet_tftp_cln_state (void)
 Retrieves the current state of the TFTP-client service. More...
 

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net