Transfer Parameter Commands
All data transfer parameters have default values, and the commands specifying data transfer parameters are required only if the default parameter values are to be changed. The default value is the last specified value, or if no value has been specified, the standard default value as stated here. This implies that the server must "remember" the applicable default values. The commands may be in any order except that they must precede the FTP service request. The following commands specify data transfer parameters.
BYTE SIZE (BYTE)
The argument is a decimal integer (1 through 255) specifying the byte size for the data connection. The default byte size is 8 bits. A server may reject certain byte sizes that he has not implemented.
DATA SOCKET (SOCK)
The argument is a HOST-SOCKET specification for the data socket to be used in data connection. There may be two data sockets, one for transfer from the "active" DTP to the "passive" DTP and one for "passive" to "active". An odd socket number defines a send socket and an even socket number defines a receive socket. The default HOST is the user Host to which TELNET connections are made. The default data sockets are (U+4) and (U+5) where U is the socket number used in the TELNET ICP and the TELNET connections are on sockets (U+2) and (U+3). The server has fixed data sockets (S+2) and (S+3) as well, and under normal circimstances this command and its reply are not needed.
PASSIVE (PASV)
This command requests the server-DTP to "listen" on both of his data sockets and to wait for an RFC to arrive for one socket rather than initiate one upon receipt of a transfer command. It is assumed the server has already received a SOCK command to indicate the foreign socket from which the RFC will arrive to ensure the security of the transfer.
REPRESENTATION TYPE (TYPE)
The argument specifies the representation type as described in the Section on Data Representation and Storage. Several types take a second parameter. The first parameter is denoted by a single TELNET character, as is the second Format parameter for ASCII and EBCDIC; the second parameter for local byte is a decimal integer to indicate Bytesize. The parameters are separated by a <SP> (Space, ASCII code 32.). The following codes are assigned for type:
\ /
A - ASCII ! ! N - Non-print
!-><-! T - TELNET format effectors
E - EBCDIC! ! C - Carriage Control (ASA)
/ \
I - Image
L # - Local byte Bytesize
The default representation type is ASCII Non-print. If the Format parameter is changed, and later just the first argument is changed, Format then returns to the Non-print default.
FILE STRUCTURE (STRU)
The argument is a single TELNET character code specifying file structure described in the Section on Data Representation and Storage. The following codes are assigned for structure:
F - File (no record structure)
R - Record structure
The default structure is File (i.e., no records).
TRANSFER MODE (MODE)
The argument is a single TELNET character code specifying the data transfer modes described in the Section on Transmission Modes. The following codes are assigned for transfer modes:
S - Stream
B - Block
C - Compressed
The default transfer mode is Stream.