Internet Direct (Indy)
Home
PreviousUpNext
TIdFSP Class

Implements a File Service Protocol (FSP) version 2 client.

Pascal
TIdFSP = class(TIdUDPClient);

TIdFSP is a TIdUDPClient descendant that implements the File Service Protocol (FSP) version 2, as described in the specification document: 

File Service Protocol (FSP) version 2  

The File Service Protocol is also referred to using the following names: 

 

File Sharing Protocol 
File Slurping Protocol 
File Sucking Protocol 
Flaky Stream Protocol 
FTPs' Sexier Partner 

 

There is no official RFC for the FSP protocol, and FSP is not recognized as an Internet Standard protocol. The protocol is not copyrighted and has been placed into the public domain. 

 

FSP Protocol Design

 

FSP protocol was not designed to transfer data in a secure fashion. It was designed as an alternative protocol for providing lightweight access to a collection of public files. FSP has the same user-level security as an anonymous FTP file server. FSP has better network-level security than anonymous FTP, because it was designed to resist various denial-of-service attacks. FSP protocol v3 will be designed to be fully secure. FSP3 will not be backward compatible with FSP2. 

 

Passwords

 

Recently, password support was added to the FSP protocol. Passwords, however, are transmited in clear text over the network which makes them a weak protection for a determined intruder. 

 

Transport

 

FSP uses UDP datagrams as its' transport medium. The minimum UDP packet size (not including the size of UDP, IP and link-layer headers) is 12 bytes. The maximum UDP packet size is 1024 bytes + 12 bytes for the FSP packet header. 

 

FSP Packet format

 

Each FSP packet contains storage for header, data, and optional extra data that indicate the operation to perform and data to transfer using the FSP protocol. The FSP packet information is represented in TIdFSP using the TIdFSPPacket class, and conforms to the requirements outlined in the specification document. 

 

FSP Protocol Commands

 

The FSP protocol defines several commands - some of which are required in an FSP client implementation, while others are optional. Commands are indicated in TIdFSPPacket using the numeric value defined in the FSP protocol specification, and include the following: 

 

Command 
Description 
Method 
Terminate an FSP session. 
Delete a directory. 
Delete a file. 
Sending an error message back to client. 
SendCmd 
Directory listings. 
List 
File transfer. 
Get 
Information about directory flags. 
Close and install file open file. 
Put 
Create a directory. 
Rename file or directory. 
File status. 
Open a file for writing. 
Put 
Get server version and setup string. 
Version 

 

The current FSP client implementation in TIdFSP does not implement the following FSP commands: 

 

Command 
Description 
Return server's extended info block. 
Set directory protection. 
Atomic get+delete a file. 
Atomic get+delete a file done. 
Change password. 
Reserved for FSP 3. 
Reserved for testing of new header. 

 

TIdFSP Client Configuration

 

The default port number used in the FSP client is IdPORT_FSP as indicated in the Port property. Any change required to the Port property must be performed prior to callin Connect to establish an FSP session. 

Use ClientMaxPacketSize to read or write the maximum client packet size to support in exchanges using the FSP client commands. Use ServerMaxPacketSize to determine the maximum packet size supported in exchanges with the FSP server. Both values are used in determining the optimal payload packet size and the maximum buffer size used in FSP protocol exchanges. 

Use ServerMaxThruPut to determine the maximum server thoughput (in bytes per second) allowed for connections to the FSP server. 

Use ThruputControl to determine if throughput control is supported for the FSP server connection. 

Details about the FSP server implmentation for the current connection read using the Version method can be accesses in the following properties: 

 

Property 
Description 
Description of the server. 
Server performs logging. 
Server is read-only. 
Reverse lookups are required. 
Server is in private mode. 
Server accepts extra data. 

 

Using TIdFSP Client

 

One of the key features implemented in TIdFSP is its' ability to parse and store structured directory and status listings returned in the List, GetDirInfo, and GetStatInfo methods. While similiar to the features implemented in TIdFTP, the content available in directory and status information is well defined in the FSP protocol. 

Use the following properties to access collections containing the structured return values: 

 

 

Use the following methods to perform file, directory, and status operations as defined in the FSP protocol: 

 

 

Use the following event handlers to respond to client notifications occurring when FSP packets and/or files are sent and received: 

 

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.