home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 100s / rfc123.txt < prev    next >
Text File  |  1997-05-28  |  5KB  |  166 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         S. Crocker
  8. Request for Comments: 123                                           UCLA
  9. NIC #5837                                                    20 April 71
  10. Categories: D.1
  11. Obsoletes: RFCs 66, 80
  12. Updates: RFCs 98, 101
  13.  
  14.  
  15.                         A Proferred Official ICP
  16.  
  17. By Initial Connection Protocol (ICP), I mean a third level protocol
  18. which is initiated by a user process at one site in order to contact a
  19. server process at another site.  Typically, the user process will be a
  20. Telnet and the server process will be a logger, but there may be other
  21. cases.
  22.  
  23. In this RFC, I wish to describe a family of ICPs suitable for
  24. establishing one pair of connections (one in each direction) between any
  25. user process and any server process, and to propose further a particular
  26. subset of this family as the standard ICP for connecting user processes
  27. to loggers on systems which accept teletype-like devices.
  28.  
  29. Notation
  30.  
  31. We have no standard notation for describing system calls which initiate
  32. and close connections or cause data to be sent, so I will use the
  33. following ad hoc notation.
  34.  
  35. Init (local = l, foreign = f, size = s)
  36.  
  37.    causes the local Host to attempt to establish a connection between
  38.    socket l at the local Host and socket f, with a byte size of s for
  39.    the connection.
  40.  
  41.    l is a 32 bit local socket number,
  42.    f is a 40 bit foreign socket number, the high-order eight bits
  43.    of which specify the foreign Host, and
  44.    s is an eight bit non-zero byte size.
  45.    The sum of l and f must be odd.
  46.  
  47. Listen (local = l, size = s)
  48.  
  49.    causes the local Host to wait for a request for connection to local
  50.    socket l with byte size s.  The process will be woken when a
  51.    connection is established.  The parameters l and s are the same as
  52.    for Init.
  53.  
  54.  
  55.  
  56.  
  57.  
  58.                                                                 [Page 1]
  59.  
  60. Send (socket = l, data = d)
  61.  
  62.    The data named by d is sent over the connection attached to local
  63.    socket l. l must be a send socket attached to a connection.  d is the
  64.    name of a data area.
  65.  
  66. Receive (socket = l, data = d)
  67.  
  68.    The receive side counterpart to send.
  69.  
  70. Close (socket = l)
  71.  
  72.    Any connection currently attached to a local socket l is closed.
  73.  
  74. A Family of ICPs
  75.  
  76. Briefly, a server process at a site attaches a well-advertised send
  77. socket L and listens.  A user process initiates connection to L from its
  78. receive socket U.  The byte size for this connection is 32.  The server
  79. process then transmits a 32-bit even number S and closes the connection.
  80. The 32-bit number S and its successor, S+1, are the socket number the
  81. server will use.  The final steps are for sockets S and S+1 at the
  82. server site to be connected to sockets U+1 and U respectively at the
  83. user site.
  84.  
  85. Using the notation, the server executes the following sequence:
  86.  
  87.    Listen (socket = L, size = 32)
  88.    [Wait until a user connects]
  89.    Send (socket = L, data = S)
  90.    Close (socket = L)
  91.    Init (local = S, foreign = U+1, size = Bu)
  92.    Init (local = S+1, foreign = U, size = Bs)
  93.  
  94. The user executes the following:
  95.  
  96.    Init (local = U, foreign = L, size = 32)
  97.    Receive (socket = U, data = S)
  98.    Close (socket = U)
  99.    Init (local = U+1, foreign = S, size = Bu)
  100.    Init (local = U, foreign = S+1, size = Bs)
  101.  
  102. Note that L is a send socket (odd), while S and U are receive sockets
  103. (even).  Where L, S or U are used as values of local, they are 32-bit
  104. numbers; where they are values of foreign, they are 40-bit numbers.  The
  105. parameters Bs and Bu are the byte sizes to be sent by the server and
  106. user, respectively.
  107.  
  108.  
  109.  
  110.  
  111.                                                                 [Page 2]
  112.  
  113. Examination of the above sequences reveals that an ICP is characterized
  114. by the three numbers L, Bs and Bu, and must meet the restrictions that
  115.  
  116.    (a) L is a send socket,
  117.    (b) Bs and Bu are legal byte sizes, and
  118.    (c) for each L there is only on pair of associated byte sizes.
  119.  
  120. This last restriction prevents two distinct services from being
  121. available through the same socket and distinguished only by the byte
  122. sizes.
  123.  
  124. Telnet ICP
  125.  
  126. For connecting teletype-like users, i.e. interactive and ASCII, to Hosts
  127. serving such users, I propose an ICP of the form described above and
  128. characterized by L = 1, Bs = Bu = 8. [There has been some confusion
  129. about socket numbers.  Here I specifically mean L = X00000001]
  130.  
  131. Formalities
  132.  
  133. I propose that the Telnet ICP be made official.  Comments should be
  134. published before the May NWG meeting, the subject will be discussed
  135. there, and we will decide there to accept or reject this protocol.
  136.  
  137.  
  138.        [ This RFC was put into machine readable form for entry ]
  139.           [ into the online RFC archives by Jeff Sorte 5/97 ]
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.                                                                 [Page 3]
  165.  
  166.