Network PL1 subprograms
RFC 120

Document Type RFC - Unknown (April 1971; No errata)
Last updated 2013-03-02
Stream Legacy
Formats plain text pdf html bibtex
Stream Legacy state (None)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state RFC 120 (Unknown)
Telechat date
Responsible AD (None)
Send notices to (None)
NETWORK PL1 SUBPROGRAMS

                             April 21, 1971

                            Mark Krilanovich

                         Computer Research Lab

                        University of California

                       Santa Barbara, California

                                                                [Page 1]
RFC 120                 NETWORK PL1 SUBPROGRAMS

                                PREFACE

   The subroutines described in this document have been implemented at UCSB
   and make the Network (via the NCP) accessible to PL1 programs executing
   in the 360/75.  They are callable from within any PL1 main program or
   subroutine compiled at UCSB.

   A  set  of  assembly-language  written  subprograms  is  provided  to
   facilitate  the use of the Network by PL1 programmers.  They serve as
   an interface between the user and the Network Control Program  (NCP),
   which supervises all Network operations at this site.

   A concept  fundamental  to  PL1  Network  operations  is  that  of  a
   completion code variable.  Associated with each socket that is not in
   the closed state is a  unique  variable,  called  a  completion  code
   variable.   This  variable  serves  two  purposes:  it identifies the
   local socket referenced, and upon  completion  of  the  operation  it
   contains  a  completion code to indicate the outcome of the operation
   to the programmer.  It may be used at any time for any purpose  other
   than  Network  operations.   Its  value at the beginning of a Network
   operation is immaterial;  rather, it is the variable itself  that  is
   important.   In  all  Network  operations, whenever a completion code
   variable is called  for,  the  only  acceptable  attributes  for  the
   variable are BINARY FIXED(31,0)ALIGNED.

   In general, the subprograms will initiate the  operation,  and  enter
   the WAIT state (consume no CPU time) until notified by the NCP of the
   completion of the operation.  For  such  operations,  the  programmer
   supplies  a  time  limit,  with  attributes BINARY FIXED(31,0), which
   specifies, in tenths of a second, the  maximum  length  of  time  the
   subprogram  is  to  wait for the operation to complete.  If this time
   limit is exceeded, a completion code  is  supplied  to  indicate  the
   error,  and  control  is  returned  to  the calling program, with the
   operation still pending.

   In those operations requiring a socket to be specified by its  socket
   identifier,   the  following  format  is  used.   The  identifier  is
   specified as a BINARY FIXED(31,0) array, singly dimensioned  with  at
   least  two  elements,  and  with a lower subscript bound of one.  The
   first element is taken to be the site number, and the second  element
   the  socket  number.   A  socket number may have any value, positive,
   negative, or zero.  Since negative numbers are represented internally
   in two's complement form, for the purposes of the gender of a socket,
   a socket number is even or odd  according  to  whether  its  absolute
   value is even or odd, respectively.

                                                                [Page 2]
RFC 120                 NETWORK PL1 SUBPROGRAMS

   Following is a description  of  each  subprogram,  its  function  and
   calling sequence.

(1)  OPEN

     By invoking this subprogram, the user requests that  the  specified
     local  socket be removed from the closed state and thus be prepared
     to  participate  in  data  transfer.   There  are  three   distinct
     operations  that can be performed by this subprogram, and these are
     described below:

     (A)  CONNECT

          By initiating this  operation,  the  user  requests  that  the
          specified local socket be logically connected to the specified
          foreign socket, and that data transfer between the two sockets
          be enabled.  The subprogram will wait until the foreign socket
          either  accepts  or  rejects  the  connection  attempt.   This
          operation  is  valid  only  when  the  socket is in the closed
          state.

          The calling sequence is as follows:

               CALL @OPEN(cmpcd, time,lclsck,fgnsck,ws);

          where

               'cmpcd' is the completion code variable to be associated
                    with the local socket.
               'time' is the length of time the subprogram is to wait
                    for the completion of the operation.
               'lclsck' is the socket identifier of the local socket.
               'fgnsck' is the socket identifier of the foreign socket.
               'ws' is a workspace which has the same attributes as a
                    socket identifier, and, if the operation if
                    successful, will become associated with the local
                    socket for the life of the connection.  In response
                    to certain future operations, information may be
Show full document text