[comp.protocols.tcp-ip] Need detailed FTP documentation

de5@ornl.gov (Dave Sill) (12/05/90)

Where can I find detailed information about what conversions FTP will
perform in different modes and between different systems?  E.g., does
it do byte order swaps in binary mode between a VMS VAX and
SPARCstation?  What conversions does ASCII mode imply?  Etc.

The man page doesn't have it, and the RFC index doesn't show anything
promising. 

Thanks in advance.  Please reply by e-mail.  

-- 
Dave Sill (de5@ornl.gov)
Martin Marietta Energy Systems
Workstation Support

romkey@ASYLUM.SF.CA.US (John Romkey) (12/07/90)

In FTP ASCII mode, posit the existence of a newline convention for the
two systems doing the FTP. I'm not sure what VMS does; suppose it
indicates newline by storing a carriage return line feed sequence (CR
LF). Suppose the other end is a UNIX system, indicating newline with
just linefeeds. [There have been other systems, like Symbolics lisp
machines, that would indicate line feed with a character > 128
decimal]

As the server picks up the file it's going to send, it maps every
instance of the newline indicator (CR LF in this case) to CR LF over
the TCP connection. So in this example, no work is done. It also maps
any lone CR to CR NUL. The client, receiving the file, maps every
instance of CR LF to its local newline format, in this instance, LF.
And it umaps CR NUL to just CR.

Basically, FTP has its own representation of newlines for the file
while the file is in transit. The transmitter must encode the file
from its own format into that representation; the receiver must decode
it from FTP's representation into its own format.

In image (binary) mode, FTP doesn't know anything about byte swaps or
file formats. It picks up a pile of bytes off the disk, sends them,
and the receiver writes what it receives. If you're moving a binary
database between processors with different word sizes and byte orders,
there's no way for FTP to know how to convert those. You've got to do
that conversion either before or after you move the file.

There's also a mode called "local n" for dealing with non-8 bit word
systems, like TOPS-20 or lisp machines, which doesn't really matter
here.

		- john romkey			Epilogue Technology
USENET/UUCP/Internet:  romkey@asylum.sf.ca.us	FAX: 415 594-1141