[comp.protocols.tcp-ip] TYPE L

rcc@k1bc.UUCP (Bob Clements) (07/01/88)

Here's a late-filed followup on "TYPE L".

A couple of weeks ago there were some messages about "TYPE L".
There was some confusion as to what it was really for.  The comments
said that "L" stood for "Logical".  That's wrong.

When FTP was first invented there were a fair number of systems
on the (then brand-new) ARPANET which were not 8-bit (or 16 or 32)
machines.  In particular, there were 36 bit DEC machines and
36 bit Honeywell/Multics machines.   Each of these machines had
its own natural way of storing 8 bit bytes.  The storage technique
on the DEC-10 machines stored 32 bits in a 36-bit word, leaving
four unused bits at the right-hand end of a word.

So if you fetched a file from a DEC-10 in 8-bit mode, you could
get 32 of each 32 bits that way. But you might want all 36 bits,
as in a graphics file or some such. How to distinguish them?
The two types "I" and "L" were invented.  Type "I" for Image
said that you wanted all the bits.  The DEC-10 did some shifting
and gave you 72 bits (9 octets) from each two words.

On the other hand, if all you wanted was a stream of 8-bit bytes,
you didn't care about the extra four bits. You used TYPE "L",
which stood for LOCAL.  It meant that each machine would
store the bytes in the most efficient way for its own architecture.

Each TYPE was guaranteed reversible. If you stored the bytes in
TYPE I and got them back in TYPE I you would get the same file.
Similarly for TYPE L.  But in between, they might be stored
differently, depending on the machine hardware.  Un*x FTP's
implementor invented the "tenex" command as a shorthand for
TYPE L 8, since BBN-TENEX (progenitor of TOPS20) was the most
common operating system for DEC-10s on the ARPANET.

So there's today's ancient history lesson.  
Sorry to dredge all that up, but I wrote the first TENEX FTP
and I felt an urge to explain.

/Rcc
clements@bbn.com