Embedded TCP/IP stack: TFTP server API

FNET

Embedded TCP/IP stack  4.1.0

Detailed Description

The user application can use the TFTP-server service to download and upload files from/to a remote TFTP client.
Current version of the TFTP server supports maximum of one simultaneously connected TFTP clients.
After the TFTP server is initialized by calling the fnet_tftp_srv_init() function, the user application should call the main service-polling function fnet_service_poll() periodically in the background.
For the TFTP-server service example, refer to the FNET Bootloader source code.

Configuration parameters:

Data Structures

struct  fnet_tftp_srv_params
 Input parameters for the fnet_tftp_srv_init() function. More...
 

Typedefs

typedef fnet_return_t(* fnet_tftp_srv_request_handler_t) (fnet_tftp_request_t request_type, const struct fnet_sockaddr *address, fnet_char_t *filename, fnet_char_t *mode, fnet_tftp_error_t *error_code, fnet_char_t **error_message, void *handler_param)
 Prototype of the TFTP-server callback function that is called when the TFTP server has received a new read or write request from a remote TFTP client. More...
 
typedef fnet_int32_t(* fnet_tftp_srv_data_handler_t) (fnet_tftp_request_t request, fnet_uint8_t *data, fnet_size_t data_size, fnet_tftp_error_t *error_code, fnet_char_t **error_message, void *handler_param)
 Prototype of the TFTP-server callback function prototype that is called when the TFTP server has received a new data packet (request_type equals to FNET_TFTP_REQUEST_WRITE). This callback function is also called when the TFTP server is ready to send a new data packet to the TFTP client (request_type equals to FNET_TFTP_REQUEST_READ). More...
 
typedef void(* fnet_tftp_srv_complete_handler_t) (fnet_tftp_request_t request, fnet_return_t status, void *handler_param)
 Prototype of the TFTP-server callback function that is called when the TFTP server has completed file data transfer. More...
 
typedef long fnet_tftp_srv_desc_t
 TFTP server descriptor. More...
 

Enumerations

Functions

fnet_tftp_srv_desc_t fnet_tftp_srv_init (struct fnet_tftp_srv_params *params)
 Initializes the TFTP-server service. More...
 
void fnet_tftp_srv_release (fnet_tftp_srv_desc_t desc)
 Releases the TFTP-server service. More...
 
fnet_bool_t fnet_tftp_srv_is_enabled (fnet_tftp_srv_desc_t desc)
 Detects if the TFTP Server service is enabled or disabled. More...
 

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