25 #ifndef _FNET_TFTP_SRV_H_ 27 #define _FNET_TFTP_SRV_H_ 29 #if FNET_CFG_TFTP_SRV || defined(__DOXYGEN__) 31 #include "fnet_tftp.h" 150 void *handler_param);
168 void *handler_param);
236 #if defined(__cplusplus) 297 #if defined(__cplusplus) fnet_bool_t fnet_tftp_srv_is_enabled(fnet_tftp_srv_desc_t desc)
Detects if the TFTP Server service is enabled or disabled.
TFTP server is waiting for a request from a TFTP client.
fnet_uint32_t fnet_time_t
Unsigned integer type representing time uinits. It can be seconds or milliseconds.
fnet_tftp_srv_complete_handler_t complete_handler
Pointer to the optional callback function defined by fnet_tftp_srv_complete_handler_t(). This parameter is optional and can be set to zero.
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...
fnet_tftp_srv_data_handler_t data_handler
Pointer to the callback function defined by fnet_tftp_srv_data_handler_t().
fnet_tftp_srv_desc_t fnet_tftp_srv_init(fnet_tftp_srv_params_t *params)
Initializes the TFTP-server service.
fnet_return_t
General return codes, used by most of API functions.
fnet_tftp_srv_request_handler_t request_handler
Pointer to the callback function defined by fnet_tftp_srv_request_handler_t().
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
void fnet_tftp_srv_release(fnet_tftp_srv_desc_t desc)
Releases the TFTP-server service.
The TFTP server is not initialized or released.
fnet_index_t retransmit_max
Maximum number of retransmissions. If no response from a TFTP client is received till maximum retran...
void * handler_param
Optional application-specific parameter. It is passed to the request_handler, data_handler and compl...
fnet_tftp_srv_state_t
TFTP server states. Used mainly for debugging purposes.
The DATA transfer is completed, or received error, or terminated by the application.
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...
unsigned int fnet_index_t
Unsigned integer type representing the index.
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 rece...
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 ...
long fnet_tftp_srv_desc_t
TFTP server descriptor.
Input parameters for the fnet_tftp_srv_init() function.
Sends or receives DATA packets to the remote TFTP client.
Socket address structure.
fnet_tftp_error_t
TFTP error codes indicating the nature of the error according to RFC 1350.
fnet_time_t timeout
Timeout for the TFTP client response in seconds. If no response from a TFTP client is received durin...