RFC 165

Proffered Official Initial Connection Protocol

๐Ÿ“… published May 1971, from ietf

A Preferred Official Initial Connection Protocol ๐ŸŽ€

Okay bestie, first the receipts ๐Ÿงพโœจ This is RFC 165, titled A Preferred Official Initial Connection Protocol, written by J. Postel from UCLA - NMC, dated May 25, 1971, and filed under NIC 6779. It obsoletes RFCs 123, 143, and 145, so those are retired now ๐Ÿ’… The header doesn't list any updates. Its status is a proposed official protocol, which means it isn't official yet, it's just really hoping to be ๐Ÿ‘‘

Okay so this doc specifies the their level protocol (yes, that's literally what it says ๐Ÿ’€) used to connect a user process at one site with a server process at another site. In one case the user process is a Telnet and the server process is a Logger, but there will be other cases too ๐ŸŒธ

This doc describes a family of Initial Connection Protocols (ICP's) that can set up one pair of connections between any user process and any server process ๐Ÿฆ‹. It also spells out the parameter values for connecting Telnets and Loggers. The description happens at two levels: the third or user level, and the second or NCP level ๐Ÿ’–


Third Level Description ๐Ÿงš

Notation

There's no standard notation for describing the system calls that open and close connections or send data, so we're making up our own ad hoc notation ๐Ÿ™ˆ

Init

Init (local = l, foreign = f, size = s)

Causes the local Host to attempt to set up a connection between socket l at the local Host and socket f, using a byte size of s for the connection.

  • l is a 32 bit local socket number,
  • f is a 40 bit foreign socket number, the high-order eight bits of which specify the foreign Host, and
  • s is an eight bit non-zero byte size.

The sum of l and f must be odd. ๐Ÿงฎ

Listen

Listen (local = l, size = s)

Causes the local Host to wait for a connection request to local socket l with byte size s. The process gets woken up when a connection is established. The parameters l and s work the same as they do for Init.

Send

Send  (socket = l, data = d)

The data named by d gets sent over the connection attached to local socket l. l must be a send socket attached to a connection. d is the name of a data area.

Receive

Receive (socket = l, data = d)

The receive side counterpart to send.

Close

Close (socket = l)

Any connection currently attached to local socket l gets closed.


A Family of ICP's ๐ŸŒˆ

Briefly: a server process at a site attaches a well-advertised send socket L and listens ๐Ÿ“ข. A user process starts a connection to L from its receive socket U. The byte size for this connection is 32. Then the server process transmits a 32-bit even number S and closes the connection. The 32-bit number S and its successor, S+1, are the socket numbers the server will use. The final steps are for sockets S and S+1 at the server site to get connected to sockets U+3 and U+2 respectively at the user site ๐ŸŽ€

Using the notation, the server runs this sequence:

      Listen (socket = L, size = 32)
      [Wait until a user connects]
      Send (socket = L, data = S)
      Close (socket = L)
      Init (local = S, Foreign = U+3, size Bu)
      Init (local = S+1, foreign = U+2, size Bs)

The user runs the following:

      Init (local = U, foreign = L, size = 32)
      Receive (socket = U, data = S)
      Optional Close (socket = U)
      Listen or Init (local U+3, foreign = S, size = Bu)
      Listen or Init (local = U+2, foreign = S+1, size = Bs)

Note that L is a send socket (odd), while S and U are receive sockets (even). When L, S, or U are used as values of local, they're 32-bit numbers. When they're values of foreign, they're 40-bit numbers. The parameters Bs and Bu are the byte sizes to be sent by the server and user, respectively. If the user side declines to close socket U, then it must be handled automatically by the second level (see page 4) ๐Ÿ™Œ

Looking at the sequences above, an ICP is characterized by three numbers L, Bs, and Bu, and it must meet these restrictions:

  • a) L is a send socket,
  • b) Bs and Bu are legal byte sizes, and
  • c) For each L there is only one pair of associated byte sizes.

This last restriction stops two different services from sitting on the same socket and only being told apart by their byte sizes ๐Ÿ™…โ€โ™€๏ธ


Second Level Description ๐Ÿง 

Notation

Here's the notation for the NCP Control Commands used in ICP:

STR (ls, fs, s)
        ls = local send socket
        fs = foreign receive socket
        s = byte size

RTS (ls, fs, l)
        ls = local receive socket
        fs = foreign send socket
        l = link

ALL (l, m, b)
        l = link
        m = message allocation
        b = bit allocation

CLS (ls, fs)
        ls  = local socket
        fs = foreign socket

The same family of ICP's is now described again.

   Server                          User

   S1: listening on socket L.      U1: RTS (U, L, _l1_)

   S2: Wait for match.             U2: Wait for match.

   S3: STR (L, U, _s1_)

   S4: Wait for allocation.        U3: All (_l1_, _m1_, _b1_)

   S5: Send data S in_s1_ bit      U4: Receive data S in s1 bit bytes.
       bytes as allowed by             _s1_ bit bytes.
       allocation m1_, _b1_).

   S6: CLS (L, U)                  U5: CLS (U, L)

   S7: RTS (S, U+3, _l2_)          U6: STR (U+3, S, _s2_)

   S8: STR (S+1, U+2, _s3_)        U7: RTS (U+2, S+1, _l3_)

The labels here don't imply any ordering, except the ordering the Host-Host Protocol requires ๐Ÿ“‹ Steps S7 and S8 can be swapped, and so can U6 and U7. Also, the server can start S7 and S8 in parallel with S3 through S6 any time after S2, and the user can start U6 and U7 in parallel with U5 any time after U4 โœจ

After all that, ALL commands get exchanged and data transfers can begin ๐Ÿš€

At this level the parameters of the above ICP family are L, m1, b1, s1, s2, s3, l1, l2, and l3. L is a well known socket number and gets specified for each type of service.

m1 and b1 are allocation quantities for transferring a socket number:

  • m1 is specified to be 1.
  • b1 is specified to be 32.
  • s1, s2, and s3 are byte sizes. Only s1 is to be specified, since s2 and s3 are left to the process involved.
  • s1 is specified to be 32.
  • l1, l2, and l3 are links and are not specified.
Note: Some hosts currently have difficulty sending 32 bit bytes. Thus, it is temporarily allowed to send the socket number S as four 8 bit bytes in one message.

It's legal for the NCP to receive RTS or STR before the corresponding local Init or Listen is issued. Therefore, it's suggested that requests for connection to idle sockets get queued as allowed by time and space limitations ๐ŸŒธ


Telnet - Logger ICP ๐Ÿ“ž

For connecting Telnet and Logger processes, the ICP parameters are L=1, Bu, s2, and Bs = s3 = 8. (To clarify the socket number required, L = X'00000001'.) ๐Ÿ’œ


Formalities ๐Ÿ“œ

This proposed official protocol becomes official if no serious objections get raised before 2 June 71 ๐Ÿ’Œ Jon Postel will run a telephone survey of Network Liaisons before that date. If no objections are raised, the Working Group chairman will declare this protocol official ๐Ÿ‘‘

* This document is based on RFC 123 by S. Crocker and discussions by the ICP Committee.
๐Ÿ“ฆ where this page comes from