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](GUID-2B0BBC96-8D5B-469C-8E93-95FAA63B4FBA-low.png)
TFTP Client Server Communication
TFTP Write Request (WRQ)
The following diagram illustrates a write request.
![TCPIP TFTP WRQ](GUID-F055E860-D348-4339-94DE-31AD5B539075-low.png)
TFTP Read Request (RRQ)
The following diagram illustrates a read request.
![TCPIP TFTP RRQ](GUID-994291E0-070A-4D50-80D0-6A6FDFB8162E-low.png)
Library Interface
Name | Description |
---|---|
Macros | |
TCPIP_TFTPC_ARP_TIMEOUT | The number of seconds to wait before declaring a TIMEOUT error on PUT. |
TCPIP_TFTPC_CMD_PROCESS_TIMEOUT | The number of seconds to wait before declaring a TIMEOUT in seconds error on GET or PUT command processing. |
TCPIP_TFTPC_DEFAULT_IF | The default TFTP interface for multi-homed hosts. |
TCPIP_TFTPC_FILENAME_LEN | The maximum value for the file name size. |
TCPIP_TFTPC_HOSTNAME_LEN | The maximum TFTP host name length size. |
TCPIP_TFTPC_MAX_RETRIES | The number of attempts before declaring a TIMEOUT error. |
TCPIP_TFTPC_TASK_TICK_RATE | The 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_NOTIFICATION | allow TFTP client user notification if enabled, the TCPIP_TFTPC_HandlerRegister/TCPIP_TFTPC_HandlerDeRegister functions exist and can be used |
TFTP_CONFIG_H | This is macro TFTP_CONFIG_H. |
Functions | |
TCPIP_TFTPC_GetEventNotification | Get the details of the TFTP client file mode communication event details. |
TCPIP_TFTPC_HandlerDeRegister | Deregisters a previously registered TFTP Client handler. |
TCPIP_TFTPC_HandlerRegister | Registers a TFTPC Handler. |
TCPIP_TFTPC_SetCommand | TFTP client command operation configuration. |
TCPIP_TFTPC_SetServerAddress | Set the Server IP address for TFTP Client . |
TCPIP_TFTPC_Task | Standard TCP/IP stack module task function. |
Data Types and Constants | |
_TFTP_CMD_TYPE | File command mode used for TFTP PUT and GET commands. |
TCPIP_TFTP_CMD_TYPE | File command mode used for TFTP PUT and GET commands. |
TCPIP_TFTPC_MODULE_CONFIG | Placeholder for TFTP Client module configuration. |
__TFTPC_H | This is macro __TFTPC_H. |
TCPIP_TFTPC_EVENT_HANDLER | TFTPC event handler prototype. |
TCPIP_TFTPC_EVENT_TYPE | TFTP client Event Type |
TCPIP_TFTPC_HANDLE | TFTPC handle. |
TCPIP_TFTPC_OPERATION_RESULT | Standard error codes for TFTP PUT and GET command operation. |