1.2.1.22 TFTP Client Module

The TCP/IP Stack Library Trivial File Transfer Protocol (TFTP) module is a simple protocol used to transfer files.

The TFTP client module supports reading and writing of files (or mail) from/to a remote server.

Note: The TFTP client module cannot list directories, and currently has no provisions for user authentication.

Abstraction Model

tftp_diagram

TFTP Client Server Communication

TFTP Write Request (WRQ)

The following diagram illustrates a write request.

TCPIP TFTP WRQ

TFTP Read Request (RRQ)

The following diagram illustrates a read request.

TCPIP TFTP RRQ

Library Interface

NameDescription
Macros
TCPIP_TFTPC_ARP_TIMEOUTThe number of seconds to wait before declaring a TIMEOUT error on PUT.
TCPIP_TFTPC_CMD_PROCESS_TIMEOUTThe number of seconds to wait before declaring a TIMEOUT in seconds error on GET or PUT command processing.
TCPIP_TFTPC_DEFAULT_IFThe default TFTP interface for multi-homed hosts.
TCPIP_TFTPC_FILENAME_LENThe maximum value for the file name size.
TCPIP_TFTPC_HOSTNAME_LENThe maximum TFTP host name length size.
TCPIP_TFTPC_MAX_RETRIESThe number of attempts before declaring a TIMEOUT error.
TCPIP_TFTPC_TASK_TICK_RATEThe TFTP client task rate in milliseconds. The default value is 100 milliseconds. The lower the rate (higher the frequency) the higher the module priority and higher module performance can be obtained The value cannot be lower than the TCPIP_STACK_TICK_RATE.
TCPIP_TFTPC_USER_NOTIFICATIONallow TFTP client user notification if enabled, the TCPIP_TFTPC_HandlerRegister/TCPIP_TFTPC_HandlerDeRegister functions exist and can be used
TFTP_CONFIG_HThis is macro TFTP_CONFIG_H.
Functions
TCPIP_TFTPC_GetEventNotificationGet the details of the TFTP client file mode communication event details.
TCPIP_TFTPC_HandlerDeRegisterDeregisters a previously registered TFTP Client handler.
TCPIP_TFTPC_HandlerRegisterRegisters a TFTPC Handler.
TCPIP_TFTPC_SetCommandTFTP client command operation configuration.
TCPIP_TFTPC_SetServerAddressSet the Server IP address for TFTP Client .
TCPIP_TFTPC_TaskStandard TCP/IP stack module task function.
Data Types and Constants
_TFTP_CMD_TYPEFile command mode used for TFTP PUT and GET commands.
TCPIP_TFTP_CMD_TYPEFile command mode used for TFTP PUT and GET commands.
TCPIP_TFTPC_MODULE_CONFIGPlaceholder for TFTP Client module configuration.
__TFTPC_HThis is macro __TFTPC_H.
TCPIP_TFTPC_EVENT_HANDLERTFTPC event handler prototype.
TCPIP_TFTPC_EVENT_TYPETFTP client Event Type
TCPIP_TFTPC_HANDLETFTPC handle.
TCPIP_TFTPC_OPERATION_RESULTStandard error codes for TFTP PUT and GET command operation.