ICP: Proffered Official Initial Connection Protocol
How a user process, typically Telnet, reaches a server process, typically a Logger, on another ARPANET host.
Postel, J., "Proffered Official Initial Connection Protocol", RFC 165, DOI 10.17487/RFC0165, May 1971, <https://www.rfc-editor.org/info/rfc165>.
@misc{rfc165,
series = {Request for Comments},
number = 165,
howpublished = {RFC 165},
publisher = {RFC Editor},
doi = {10.17487/RFC0165},
url = {https://www.rfc-editor.org/info/rfc165},
author = {J. Postel},
title = {{Proffered Official Initial Connection Protocol}},
pagetotal = 5,
year = 1971,
month = may,
} RFC text
Network Working Group J. Postel
Request for Comments: 165 UCLA - NMC
Obsoletes: 123, 143, 145 May 25, 1971
NIC: 6779
A Preferred Official Initial Connection Protocol*
This document specifies the their level protocol used to connect a
user process at one site with a server process at another site. In
one instance, the user process will be a Telnet and the server
process will be a Logger, but there will be other cases.
This document describes a family of Initial Connection Protocols
(ICP's) suitable for establishing one pair of connections between any
user process and any server process, and further to describe the
parameter values for connecting Telnets and Loggers. The description
will be at two levels, the third or user level, and the second or NCP
level.
Third Level Description
Notation
There is no standard notation for describing system calls, which
initiate and close connections or cause data to be sent, so the
following *ad hoc* notation will be used.
Init (local = l, foreign = f, size = s)
Causes the local Host to attempt to establish a connection
between socket l at the local Host and socket f, with 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 (local = l, size = s)
Causes the local Host to wait for a request for connection to
local socket l with byte size s. The process will be woken
when a connection is established. The parameters l and s are
the same as for Init.
Send (socket = l, data = d)
The data named by d is 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 (socket = l, data = d)
The receive side counterpart to send.
Close (socket = l)
Any connection currently attached to local socket l is
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 initiates connection to L from
its receive socket U. The byte size for this connection is 32. The
server process then 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 be connected to sockets U+3 and U+2
respectively at the user site.
Using the notation, the server executes the following 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 executes 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). Where L, S, or U are used as values of local, they are 32-
bit numbers; where they are values of foreign, they are 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).
Examination of the above sequences reveals that an ICP is
characterized by three numbers L, Bs, and Bu, and must meet the
restrictions that
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 prevents two district services from being
available through the same socket and distinguished only by the byte
sizes.
Second Level Description
Notation
The following notation will be used for the NCP Control Command 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 imply no ordering except that ordering required by
the Host-Host Protocol. Note that steps S7 and S8 can be reversed as
can U6 and U7. Also, notice that at any time after S2 the server
could initiate steps S7 and S8 in parallel with steps S3 through S6,
and that at any time after U4 the user could initiate steps U6 and U7
in parallel with step U5.
Following the above, exchanges ALL commands would be exchanged and
data transfers could begin.
At this level the parameters of the above ICP family are L, _m1_,
_b1_, _s1_, _s2_, _s3_, _l1_, _l2_, _l3_.
L is a well known socket number and will be specified for each type
of service.
m1 and b1 are allocation quantities for the transfer of 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
as _s2_ and _s3_ are to be 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 is legal for the NCP to receive RTS or STR before the
corresponding local Init or Listen is issued. Therefore, it is
suggested that requests for connection to idle sockets be 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 will become official if no serious
objections are raised before 2 June 71. A telephone survey of
Network Liaisons will be conducted by Jon Postel before that date.
If no objections are raised, this protocol will be declared official
by the Working Group chairman.
* This document is based on RFC 123 by S. Crocker and discussions by
the ICP Committee.
AI ELI5
On this page
§1What an Initial Connection Protocol Is
This RFC specifies the third-level protocol used to connect a user process at one site with a server process at another. In the main case the user process is a Telnet and the server process is a Logger, but the RFC says there will be other cases. It describes a family of Initial Connection Protocols (ICPs) that set up one pair of connections between any user and any server, and gives the parameter values for Telnets and Loggers.
The description is at two levels: the third (user) level, which uses an ad hoc notation of calls such as Init, Listen, Send, Receive and Close, and the second (NCP) level, which uses control commands.
It is the rulebook for how a program on one computer first knocks on the door of a program on another computer.
§2The User-Level Exchange
A server process attaches a well-advertised send socket L and listens. The user process connects to L from its receive socket U, with a byte size of 32. The server sends a 32-bit even number S and closes the connection. S and its successor S+1 are the socket numbers the server will use. The final step connects server sockets S and S+1 to user sockets U+3 and U+2 respectively.
L is a send socket (odd), while S and U are receive sockets (even). Each ICP is characterized by three numbers: L and the byte sizes Bs and Bu. L must be a send socket, both sizes must be legal, and each L has only one pair of byte sizes, so two services cannot share one socket and differ only by byte size.
Moving to new sockets frees L to accept the next caller.
You call the front desk number. The desk tells you a private room number and hangs up, then you both meet in the private room.
- Init: U to L, size 32The server is listening on well-known send socket L.
- Send S, then Close LS is a 32-bit even socket number.
- Init: S to U+3Byte size Bu.
- Init: S+1 to U+2Byte size Bs.
§3The NCP-Level Commands
At the second level the same exchange uses NCP control commands: RTS and STR to match sockets, ALL to allocate, and CLS to close. The user starts with RTS from U to L. The server answers with STR, sends S as one 32-bit byte under an allocation, and both sides then issue CLS. The server and user then use RTS and STR for the pairs (S, U+3) and (S+1, U+2). Some of these steps can be swapped or run in parallel.
The specified values are message allocation m1 = 1, bit allocation b1 = 32 and byte size s1 = 32. Links are not specified. Because some hosts have difficulty sending 32-bit bytes, it is temporarily allowed to send S as four 8-bit bytes in one message. The NCP may receive RTS or STR before the local Init or Listen, so requests for idle sockets should be queued as time and space allow.
The same hello is done again in the computers' own short codes: ask, answer, hang up, then set up the two new lines.
§4Telnet and Logger, and Approval
For connecting Telnet and Logger processes the parameters are L = 1 (written X'00000001'), Bs = s3 = 8, and Bu and s2 left to the process.
The document is a proposed official protocol. It would become official if no serious objections were raised before 2 June 71; Jon Postel planned a telephone survey of Network Liaisons, and the Working Group chairman would then declare it official. It is based on RFC 123 by S. Crocker and discussions by the ICP Committee.
For the everyday case of logging in to another computer, the front desk number is 1, and the private lines send one small letter at a time.