RFC 107

Output of the Host-Host Protocol Glitch Cleaning Committee

๐Ÿ“… published March 1971, from ietf

RFC 107 ๐ŸŽ€ Output of the Host-Host Protocol Glitch Cleaning Committee

Okay bestie, let's start with the title block tea โ˜•๐Ÿ’…:

  • Network Working Group, NIC # 5806 ๐ŸŒธ
  • Authors: Robert Bressler, Steve Crocker, William Crowter, Gary Grossman, Ray Tomlinson, James Withe ๐Ÿ‘‘
  • Where and when: UCLA, 23 March 1971 ๐Ÿฆ‹
  • Category or status: the original doesn't list one ๐Ÿคท
  • Supersedes: RFC #102, entirely ๐Ÿ’œ
  • Updates: Document #1, as an official modification ๐Ÿงš

Introduction โœจ

So the Host-Host Protocol Glitch Cleaning Committee had its second meeting at UCLA on 8, 9 March 1971 ๐ŸŒธ, after asking the whole network community what they thought. [The results of the (slightly larger) committee's first meeting are documented in RFC #102.] The committee agreed on several modifications to the protocol in Document #1, and they're all listed below ๐Ÿ’–.

At each meeting, the committee quickly handled all but one of the existing topics ๐Ÿ™ˆ. At the first meeting, most of the time went to the interrupt mechanism, and that discussion is summarized in RFC #102. At the second meeting, the committee spent almost all of its time on the notion of bytes ๐Ÿซ , and that discussion is summarized after the list of modifications.

This RFC entirely supersedes RFC #102 and is an official modification of Document #1. A revision of Document #1 will be written shortly to incorporate the changes listed here ๐Ÿฆ‹.

NCP implementers, listen up ๐Ÿ“ฃ: you need to incorporate these changes as soon as possible. You also need to estimate the date your NCPs will be ready and tell Steve Crocker or his secretary, Byrna Kristel ๐Ÿ’Œ.


Modifications ๐Ÿงš

I Bytes โœจ

Heretofore, a connection was a bit stream. Henceforth, it is to be a byte stream ๐ŸŒˆ, with the byte size, S, indicated in the STR command and in each message. The byte size meets the constraints: 1 <= S <= 255.

The choice of the byte size for a connection is a 3rd level protocol issue, but the size stays constant for the life of a connection ๐Ÿ’…. Each message must contain an integral number of text bytes (see below).

II Message Format ๐Ÿ’–

The message format is changed to the format shown in figure 1 ๐ŸŽ€.

The fields S and C are the byte size and byte count. The S field is 8 bits wide and must match the byte size specified in the STR which created the connection. The C field is 16 bit long and specifies the number of bytes in the text portion of the message. A zero value in the C field serves no purpose, but it is explicitly permitted ๐Ÿ™ƒ.

The M1 and M2 fields are each 8 bits long and must contain zero. The M3 field is zero or more bits long and must be all zero. The M3 may be used to fill out a message to a word boundary. It is followed by padding ๐Ÿงธ.

The text field consists of C bytes, where each byte is S bit long. The text field starts 72 bits after the start of the message ๐Ÿฆ‹.

Heads up, this part is important ๐Ÿšฉ: the partition of a byte stream into messages is an artifact required by the subnet. No semantic content is attached to message boundaries. In particular:
                            32 bits
                |<--------------------------------->|


                +-----------------------------------+
                |                                   |
                |              leader               |
                |                                   |
                +--------+--------+-----------------+
                |        |        |                 |
                |   M1   |    S   |        C        |
                |        |        |                 |
                +--------+--------+-----------------+
                |        |        ^                 |
                |   M2   |        |                 |
                |        |        |                 |
                +--------+        |                 |
                |                 |                 |
                |                 |                 |
                |                                   |
                |                Text               |
                //                                 //
                |                 |                 |
                |                 |                 |
                |                 |                 |
                |                 |                 |
                |                 |        +--------+
                |                 |        |        |
                |                 |        |   M3   |
                |                 v        |        |
                +-----------------+--------+--------+
                |                 |
                |  10 --------- 0 | <-- Padding
                |                 |
                +-----------------+

                            Typical Message

                                Figure 1
  1. A message with a zero value for C has no meaning ๐Ÿซ , although it is legal, and it does use up resource allocation. (See Flow Control below.)
  2. A receiver may not expect to see 3rd level control information synchronized with message boundaries. In particular, if the notion of record is defined for a connection, the receiver must expect multiple records and/or record fragments within one message. (However, control messages obey special rules. See below.)

III Message Data Types ๐ŸŽ€

No notion of data type is defined as part of the 2nd level protocol ๐Ÿ™…. 3rd level protocols may include the notion if they want. Either way, data types cannot be synchronized on message boundaries.

IV Reset and Reset Reply ๐Ÿ”„

A new pair of one bit control commands, RST (reset) and RRP (reset reply), are added โœจ. The RST is interpreted as a signal to purge the NCP tables of all existing entries which arose from the Host which sent the RST. The Host receiving the RST acknowledges by returning an RRP. The Host sending the RST may proceed to request connection after receiving either a RST or RRP in return. An RST is returned if the second Host comes up after the first Host ๐ŸŒธ.

V Flow Control ๐ŸŒธ

The flow control techniques are changed in two ways. First, the Cease mechanism is discontinued ๐Ÿ›‘. The 10HI and 11HI messages will no longer be recognized by the Imps, and the Imps will no longer generate the 10HI, 11HI or 12HI messages.

Second, the allocation mechanism now deals with two quantities: bits and messages ๐Ÿ“. The receiver allocates each of these quantities separately. The sender and receiver each must maintain a 16 bit unsigned counter for messages and a 32 bit unsigned counter for bits. When sending a message, the sender subtracts one from the message counter, and the text length from the bit counter. The receiver decrements its counter similarly when receiving the message. The sender is prohibited from sending if either counter would be decremented below zero. Similarly, the receiver is prohibited from raising the current message allocation above 2**16 - 1, or the current bit allocation above 2**32 - 1.

The TEXT LENGTH of a message is the product of S, the byte size, and C, the number of bytes. These values always appear in the first part of the message, as described under Message Format ๐Ÿงฎ.

The ALL, GVB, and RET commands are modified to treat two quantities. Their formats are given under Control Command, below. The GVB command is further modified to make it possible to ask for none of the allocation to be returned ๐Ÿ™ˆ. The new GVB command has four eight bit fields. The first two fields are the op code and the link, as before. The next two fields contain numbers fM and fB, which control how much of message and a bit allocation are to be returned. Each of these numbers is interpreted as "the number of 128ths of the current allocation" to be returned if it is in the range of 0 to 128, and is to be interpreted as "all of the current allocation", if it is in the range 128 to 255 ๐Ÿ’œ.

VI Control Message ๐Ÿซถ

The control link is changed to link 0, and link 1 is not to be used. The old and new protocols may therefore coexist ๐Ÿค.

Messages sent over the control link have the same format as other regular messages, as described above under Message Format. The byte size field must contain the value 8.

Control messages may not contain more than 120 bytes of text, so the value in the byte count field is thus limited to 120. This limitation is intended to help smaller hosts ๐Ÿงš.

Control messages must contain an integral number of control commands. Control commands, therefore, may not be split across control messages ๐Ÿ’….

The links are now assigned as follows:

   0          control link
   1          old protocol's control link - to be phased out
   2 - 31     links for connections
   32 - 190   reserved -- not for current use
   191        to be used only for measurement work under direction
               of the network measurement center (UCLA)
   192 - 255  available for any private experimental use.

VIII Fixed Length Control Commands ๐Ÿ’…

The ECO, ERP and ERR commands are now fixed length. The ECO and ERP are now 16 bit long: 8 bits of op code and 8 bits of data. The ERR command is now 96 bits long: 8 bits of op code, 8 bits of error code, and 80 bits of text. 80 bits is long enough to hold the longest non-ERR control command ๐Ÿ”ฅ.

IX Control Command Formats ๐Ÿ”ฅ

As mentioned above, the formats of the STR, ALL, GVB, RET, ECO, ERP and ERR commands have changed, and the commands RST and RRP have been added. The formats of these commands are given here ๐Ÿ‘‘.

      |  8  |          32           |          32           |  8  |
      +-----+-----------------------+-----------------------+-----+
      |     |                       |                       |     |
1.    | STR | send socket           | receive socket        |     |
      |     |                       |                       |  ^  |
      +-----+-----------------------+-----------------------+--|--+
                                                               |
      |  8  |  8  |   16      |           32          |        +-- byte size
      +-----+-----+-----------+-----------------------+
      |     |     |           |                       |
2.    | ALL | link| msg space | bit space             |
      |     |     |           |                       |
      +-----+-----+-----------+-----------------------+

      |  8  |  8  |   16      |           32          |
      +-----+-----+-----------+-----------------------+
      |     |     |           |                       |
3.    | RET | link| msg space | bit space             |
      |     |     |           |                       |
      +-----+-----+-----------+-----------------------+

      |  8  |  8  |  8  |  8  |
      +-----+-----+-----+-----+
      |     |     |     |     |
4.    | GVB | link|  fM |  fB |
      |     |     |  ^  |  ^  |
      +-----+-----+--|--+--|--+
                     |     |
                     |     +-- bit fraction
                     +-------- message fraction

      |  8  |  8  |
      +-----+-----+
      |     |     |
5.    | ECO |data |
      |     |     |
      +-----+-----+
      |  8  |  8  |
      +-----+-----+
      |     |     |
6.    | ERP |data |
      |     |     |
      +-----+-----+

      |  8  |  8  |                       80                        |
      +-----+-----+---------------------- // -----------------------+
      |     |     |                                                 |
7.    | ERR |     |  text                                           |
      |     |  ^  |                                                 |
      +-----+--|--+---------------------- // -----------------------+
               |
               +-- error code

      |  8  |
      +-----+
      |     |
8.    | RST |
      |     |
      +-----+

      |  8  |
      +-----+
      |     |
9.    | RRP |
      |     |
      +-----+

Okay so the op code values are right here, and these numbers are the whole point ๐Ÿ”ข:

            NOP   =   0
            RTS   =   1
            STR   =   2
            CLS   =   3
            ALL   =   4
            GVB   =   5
            RET   =   6
            INR   =   7
            INS   =   8
            ECO   =   9
            ERP   =  10
            ERR   =  11
            RST   =  12
            RRP   =  13

Discussion on Byte Streams โœจ

So the earlier spec said connections would just be conduits of bit streams ๐Ÿซง. That gave maximum generality but minimum efficiency ๐Ÿ˜ญ. Then everyone got obsessed with efficiency, the problem got examined, and it turned out bit streams caused two kinds of inefficiency ๐Ÿ’€

  1. Receiving Hosts had to do expensive shifting just to glue together the text of successive messages. Sending Hosts often had to shift text fields as well, so they could line up on word boundaries ๐Ÿฅฒ.
  2. Sending NCP's were banned from hanging onto ANY text for an indefinite time if they could send even one bit ๐Ÿšซ. This rule existed to prevent possible deadlocks, and the example is pure drama ๐ŸŽญ. Processes A and B are chatting over a pair of connections, one in each direction, and each one produces exactly one bit of output for every bit of input. If A's NCP holds a waiting bit because it wants to pack it together with later output from A, then B can't output, and neither can A. Lowkey a total standoff ๐Ÿ™ƒ. So unless there is some guarantee that the data in the sending NCP's buffers isn't crucially needed on the receive side, the sending NCP must assume otherwise and transmit any waiting data as soon as it's able โœจ.

These considerations led to the idea of a "transmission unit" that the NCP's would know about. The big question became what the typical and/or possible transmission unit sizes were ๐Ÿค”. For character-oriented interaction, 8-bit transmission units seemed reasonable ๐ŸŒธ. For line-oriented interaction, the transmission unit might best be the line itself, which means variable length, or it might be best to consider the transmission unit to be a character instead ๐Ÿ“. For file transfer, it might be desirable for the transmission unit to be a multiple of the word lengths of both machines, but the last part of the file may not form a whole transmission unit if the unit is too large ๐Ÿ“. The consensus became that the transmission unit should not be divisible under any circumstances, and should therefore be fairly small. The notion of transmission unit thus seems to be synonymous with byte, so the term "transmission unit" got dropped ๐Ÿ‘‹.

Subsequent discussion of the deadlocks and wakeup aspect revealed that there may be two byte sizes associated with a single connection ๐Ÿฆ‹:

  1. Transmission from the sending process to the sending NCP is in bytes of size S. The sending NCP must send a message whenever the link is unblocked, the message counter is at least 1, the bit counter is at least S, and the least S bits of text are ready. The message must contain an integral number of bytes.
  2. At the receiving side, there may be a different byte size R for transmission from the receiving NCP to the receiving process. An example of where R <> S is suggested by UCSB, which is providing a file system for transparently storing binary files ๐Ÿ’พ. It's reasonable that a using HOST might send with 36-bit bytes, while the UCSB file system might want to receive 32-bit increments ๐Ÿงฎ.

It is clear that from a network protocol point of view, only the byte S is relevant, and this is the quantity that gets communicated in the STR command in every message ๐Ÿ“ฌ. The choice of the byte size R is up to the receiving user, and its meaning is how often the receiving NCP should wake up the receiving process โฐ. It may also happen that a receiving process has an agreement with the receiving NCP that's more complex than "please wake me every R bits." For example, the NCP might scan for new-line characters before waking up the receiving process ๐Ÿ“.

In the new protocol, it's the receiver's option to refuse a request for connection on the basis of the proffered byte size ๐Ÿ™…โ€โ™€๏ธ. Conceptually, we imagine that NCP's are capable of handling all byte sizes, and that such a choice would be up to the third level programs (user programs, loggers, telnets, etc.) ๐Ÿงš. Some Hosts, small ones in particular, may know enough about their third level programs to restrict the variety of byte sizes which can be sent or received ๐Ÿ“. While it is a matter of local policy, the committee strongly suggests that NCP's be capable of handling all byte sizes ๐Ÿซถ. One of our committee, moreover, feels strongly that NCP's should be written to be able to receive all byte sizes S and provide for different byte sizes R for transmission to the user process ๐Ÿ‘‘.

[ This RFC was put into machine readable form for entry ]

[ into the online RFC archives by Enrico Bertone 4/97 ]

๐Ÿ“ฆ where this page comes from