Embedded TCP/IP stack
4.7.0
|
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.
request_type | Request type (read or write) defined by fnet_tftp_request_t. |
address | TFTP-client socket address that sent this request. |
filename | Requested file name (null-terminated string). |
mode | Data transfer mode (null-terminated string). It contains the string "netascii", "octet", or "mail" . According to RFC1350:
|
error_code | Pointer to the error code that will be sent to the remote TFTP client. Changing of this parameter is optional, by default the error code is set to FNET_TFTP_ERROR_NOT_DEFINED. This parameter is used only when this callback function returns FNET_ERR. |
error_message | Pointer to a null-terminated error message string. Changing of this parameter is optional, by default the error string is set to "Not defined". This parameter is used only when this callback function returns FNET_ERR. |
handler_param | User-application specific parameter. It's set during the TFTP-server service initialization as part of fnet_tftp_srv_params_t. |
Definition at line 86 of file fnet_tftp_srv.h.