1.2.1.10 FTP Client Module
The File Transfer Protocol (FTP) Client module will allow your application to upload the files to, and download the files from, any FTP server. This protocol enables transfer of data reliably and efficiently between different devices, without worrying about the different file storage systems among hosts.
Abstraction Model
![FTP Model](GUID-DDF57F50-6889-4FE7-AFAB-F6D32B846A49-low.png)
How The Library Works
Files are transferred via the data connection. The control connection is used for the transfer of commands and the replies to these commands. Several commands are concerned with the transfer of data between hosts. These data transfer commands include the command which specify how the data is to be transmitted and the way in which the data is to be represented.
The mechanism of transferring data consists of setting up the data connection to the appropriate ports and choosing the parameters for the transfer.
The passive data transfer process shall "listen" on the data port prior to sending a transfer request command.
The FTP request command determines the direction of the data transfer. The server, upon receiving the transfer request, will initiate the data connection to the port. When the connection is established, the data
transfer begins between DTP’s, and the server-PI sends a confirming reply to the user-PI.
It is possible for the user to specify an alternate data port by use of the PORT command.
In general, it is the server’s responsibility to maintain the data connection, to initiate it and to close it.
Library Interface
Name | Description |
---|---|
Macros | |
TCPIP_FTPC_DATA_SKT_RX_BUFF_SIZE_DFLT | Specify the Default Receive Buffer Size for the FTP Client Data Socket if 0, the TCP Socket Receive buffer size will be used by FTPC data socket |
TCPIP_FTPC_DATA_SKT_TX_BUFF_SIZE_DFLT | Specify the Default Transmit Buffer Size for the FTP Client Data Socket if 0, the TCP Socket Transmit buffer size will be used by FTPC data socket |
TCPIP_FTPC_MAX_NUM_CLIENT | Specify the maximum number of supported simultaneous FTP client connections. |
TCPIP_FTPC_TASK_TICK_RATE | The FTP Client task rate in 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_FTPC_TMO | Specify the time-out for FTP Client commands, in seconds This is the time to wait for a response from FTP server |
TCPIP_FTPC_COMMANDS | Specify whether FTP Client command in the tcpip_commands is enabled |
Functions | |
TCPIP_FTPC_Change_Dir | FTP Client change working directory |
TCPIP_FTPC_ChangeToParentDir | FTP Client make parent directory as working directory |
TCPIP_FTPC_Connect | FTP Client Connect function. |
TCPIP_FTPC_DeleteFile | FTP Client delete file |
TCPIP_FTPC_Disconnect | FTP Client Disconnect function. |
TCPIP_FTPC_Get_Status | FTP Client status info function |
TCPIP_FTPC_Get_WorkingDir | FTP Client print the name of working directory |
TCPIP_FTPC_GetFile | FTP Client Get file function |
TCPIP_FTPC_List | FTP Client List function |
TCPIP_FTPC_Login | FTP Client Login function |
TCPIP_FTPC_Logout | FTP Client instance logout |
TCPIP_FTPC_MakeDir | FTP Client create a new directory |
TCPIP_FTPC_NameList | FTP Client Name List function |
TCPIP_FTPC_PutFile | FTP Client Put file function |
TCPIP_FTPC_RemoveDir | FTP Client remove the directory |
TCPIP_FTPC_SetActiveMode | Set FTP Client connection mode as Active |
TCPIP_FTPC_SetMode | Set FTP Client Transfer Mode |
TCPIP_FTPC_SetPassiveMode | Set FTP Client connection mode as Passive |
TCPIP_FTPC_SetStruct | Set FTP Client File structure type |
TCPIP_FTPC_SetType | Set FTP Client Data representation type |
TCPIP_FTPC_Task | Standard TCP/IP stack module task function. |
Data Types and Constants | |
TCPIP_FTPC_CMD | FTP Client Commands |
TCPIP_FTPC_CTRL_EVENT_TYPE | FTPC Control Socket Events |
TCPIP_FTPC_DATA_EVENT_TYPE | FTPC Data Socket Events |
TCPIP_FTPC_DATA_REP_TYPE | FTPC data representation types |
TCPIP_FTPC_DATA_STRUCT_TYPE | FTPC data structure types |
TCPIP_FTPC_ERROR_TYPE | FTPC Error Types |
TCPIP_FTPC_RETURN_TYPE | FTPC API return types |
TCPIP_FTPC_TRANSFER_MODE_TYPE | FTPC Transfer Modes |
TCPIP_FTPC_CTRL_CONN_TYPE | FTP Client control connection parameters. |
TCPIP_FTPC_DATA_CONN_TYPE | FTP Client data connection parameters. |
TCPIP_FTPC_FILE_OPT_TYPE | FTP file handling options |
TCPIP_FTPC_MODULE_CONFIG_TYPE | FTP Client Module Configuration run-time parameters. |
TCPIP_FTPC_STATUS_TYPE | FTP Client status information. |
TCPIP_FTPC_CONN_HANDLE_TYPE | Defines a handle for FTP Client Connection |
TCPIP_FTPC_CTRL_EVENT_CALLBACK_TYPE | Defines a FTP Client callback for control socket events |
TCPIP_FTPC_DATA_EVENT_CALLBACK_TYPE | Defines a FTP Client callback for data socket events |