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

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

NameDescription
Macros
TCPIP_FTPC_DATA_SKT_RX_BUFF_SIZE_DFLTSpecify 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_DFLTSpecify 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_CLIENTSpecify the maximum number of supported simultaneous FTP client connections.
TCPIP_FTPC_TASK_TICK_RATEThe 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_TMOSpecify the time-out for FTP Client commands, in seconds This is the time to wait for a response from FTP server
TCPIP_FTPC_COMMANDSSpecify whether FTP Client command in the tcpip_commands is enabled
Functions
TCPIP_FTPC_Change_DirFTP Client change working directory
TCPIP_FTPC_ChangeToParentDirFTP Client make parent directory as working directory
TCPIP_FTPC_ConnectFTP Client Connect function.
TCPIP_FTPC_DeleteFileFTP Client delete file
TCPIP_FTPC_DisconnectFTP Client Disconnect function.
TCPIP_FTPC_Get_StatusFTP Client status info function
TCPIP_FTPC_Get_WorkingDirFTP Client print the name of working directory
TCPIP_FTPC_GetFileFTP Client Get file function
TCPIP_FTPC_ListFTP Client List function
TCPIP_FTPC_LoginFTP Client Login function
TCPIP_FTPC_LogoutFTP Client instance logout
TCPIP_FTPC_MakeDirFTP Client create a new directory
TCPIP_FTPC_NameListFTP Client Name List function
TCPIP_FTPC_PutFileFTP Client Put file function
TCPIP_FTPC_RemoveDirFTP Client remove the directory
TCPIP_FTPC_SetActiveModeSet FTP Client connection mode as Active
TCPIP_FTPC_SetModeSet FTP Client Transfer Mode
TCPIP_FTPC_SetPassiveModeSet FTP Client connection mode as Passive
TCPIP_FTPC_SetStructSet FTP Client File structure type
TCPIP_FTPC_SetTypeSet FTP Client Data representation type
TCPIP_FTPC_TaskStandard TCP/IP stack module task function.
Data Types and Constants
TCPIP_FTPC_CMDFTP Client Commands
TCPIP_FTPC_CTRL_EVENT_TYPEFTPC Control Socket Events
TCPIP_FTPC_DATA_EVENT_TYPEFTPC Data Socket Events
TCPIP_FTPC_DATA_REP_TYPEFTPC data representation types
TCPIP_FTPC_DATA_STRUCT_TYPEFTPC data structure types
TCPIP_FTPC_ERROR_TYPEFTPC Error Types
TCPIP_FTPC_RETURN_TYPEFTPC API return types
TCPIP_FTPC_TRANSFER_MODE_TYPEFTPC Transfer Modes
TCPIP_FTPC_CTRL_CONN_TYPEFTP Client control connection parameters.
TCPIP_FTPC_DATA_CONN_TYPEFTP Client data connection parameters.
TCPIP_FTPC_FILE_OPT_TYPEFTP file handling options
TCPIP_FTPC_MODULE_CONFIG_TYPEFTP Client Module Configuration run-time parameters.
TCPIP_FTPC_STATUS_TYPEFTP Client status information.
TCPIP_FTPC_CONN_HANDLE_TYPEDefines a handle for FTP Client Connection
TCPIP_FTPC_CTRL_EVENT_CALLBACK_TYPEDefines a FTP Client callback for control socket events
TCPIP_FTPC_DATA_EVENT_CALLBACK_TYPEDefines a FTP Client callback for data socket events