25 #ifndef _FNET_TFTP_CLN_H_ 27 #define _FNET_TFTP_CLN_H_ 29 #if FNET_CFG_TFTP_CLN || defined(__DOXYGEN__) 31 #include "fnet_tftp.h" 168 #if defined(__cplusplus) 228 #if defined(__cplusplus) fnet_return_t fnet_tftp_cln_init(fnet_tftp_cln_params_t *params)
Initializes the file transfer with the TFTP-client service.
fnet_uint32_t fnet_time_t
Unsigned integer type representing time uinits. It can be seconds or milliseconds.
fnet_tftp_cln_state_t
TFTP-client states. Used mainly for debugging purposes.
void * handler_param
Optional application-specific parameter. It is passed to the handler callback function as an input p...
fnet_return_t
General return codes, used by most of API functions.
The TFTP-client service is not initialized or released.
void fnet_tftp_cln_release(void)
Aborts the transfer and releases the TFTP-client service.
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
fnet_char_t * file_name
Name of the file to retrieve or create on the remote TFTP server.
Receives or sends DATA packets from/to the remote server.
Input parameters for the fnet_tftp_cln_init() function.
The TFTP-client service is initialized. Sends Read/Write request (PRQ).
The DATA transfer is completed, or received error, or terminated by the application. Frees the allocated resources.
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 receiv...
fnet_time_t timeout
Timeout for the TFTP server response in seconds. If no response from a TFTP server is received durin...
fnet_tftp_cln_state_t fnet_tftp_cln_state(void)
Retrieves the current state of the TFTP-client service.
fnet_tftp_cln_handler_t handler
Pointer to the callback function defined by fnet_tftp_cln_handler_t().
char fnet_char_t
Type representing the charecter.
fnet_tftp_request_t
The TFTP request type. It defines a TFTP service behavior, if it will read or write a file from/to a ...
fnet_tftp_request_t request_type
Request type (read or write) defined by fnet_tftp_request_t.
Socket address structure.