Embedded TCP/IP stack
4.7.0
|
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
).
request_type | Request type (read or write) defined by fnet_tftp_request_t. It's set during the TFTP-client service initialization as part of the fnet_tftp_cln_params_t. |
data | Pointer to the data buffer which content defined by request_type:
|
data_size | Size of the buffer pointed by the data parameter, in bytes.
|
tftp_result | Result code returned by the TFTP-client service:
|
handler_param | User-application specific parameter. It's set during the TFTP-client service initialization as part of fnet_tftp_cln_params_t. |
request_type
equals to FNET_TFTP_REQUEST_READ,request_type
equals to FNET_TFTP_REQUEST_WRITE, data
. If this number is less than FNET_TFTP_DATA_SIZE_MAX, it will mean that this data packet is the last one (the TFTP-client service is released automatically after the last packet is acknowledged by the remote server).Definition at line 113 of file fnet_tftp_cln.h.