RFC 121

Network on-line operators

πŸ“… published April 1971, from ietf

RFC 121: NETWORK ON-LINE OPERATORS πŸŽ€

okay bestie, this is RFC 121 πŸ¦‹ It's from the Network Working Group, written by M. Krilanovich at the Computer Research Lab, UCSB, with NIC number 5833, and it's dated 21 April 1971 πŸ“… The title block doesn't list a category or status, and it doesn't say it obsoletes or updates anything, so we're just going off what's on the page πŸ’…

PREFACE ✨

so these operators are built right into UCSB's On-Line System, and they're how On-Line System users get onto the Network through the NCP πŸ–₯️ (the NCP is the Network Control Program)

the operators are a set that makes using the Network way easier for On-Line System users. they're defined on LVL I on system 'NET', and they act as the interface between the users and the Network Control Program (NCP). the NCP supervises all Network operations at this site, so it's kind of the boss πŸ‘‘

now the big concept, the completion code variable πŸ”₯ every socket that isn't in the closed state gets its own unique variable called a completion code variable. it does two jobs at once: it identifies the local socket, and when an operation finishes, it holds a completion code that tells the user how it went. you can use it for other stuff too, as long as it's not for Network operations. its value at the start of a Network operation doesn't matter, the variable itself is the important part 🫢 and in every Network operation where a completion code variable is needed, the only acceptable type is a LO storage location, either case 1 or case 2.

when an operation needs a socket identified by its socket identifier, here's the format: the site number of UCSB is always used for local sockets, so you never specify it. a foreign socket's site number, if you do specify it, has to be a positive integer or a LO storage location, and it must be less than 256. if you don't specify it, the foreign site number defaults to the site number of UCSB πŸ“ a socket number is an integer. it can be unsigned (which means it's assumed positive), it can have an explicit minus sign, or it can be a LO storage location of any value. negative socket numbers are stored internally in two's complement form. so for the purpose of a socket's gender, a socket number counts as even or odd based on whether its absolute value is even or odd. yes, "gender" is the RFC's word, not mine πŸ™ˆ

the data also has rules, and this is where it gets fun πŸ’œ the data is grouped into messages with three fields, in this order: op code, length, and text. the op code is one byte and tells you how to read the text field. the length field is two bytes long and gives the length, in bits, of the text field, which is where the actual data lives. (the op code and length fields together are called a header.)

these are the op codes that are defined right now:

  op code                        meaning

    0          This op code is a NOP.  No text field exists, and the
               contents of the length field are unpredictable. (This
               op code is used mainly as a delimiter.)

    1          The text field contains EBCDIC characters, one
               character per byte.  The On-Line System operators
               consider the characters as intended for display as
               soon as the text field has been received.

    2          The text contains codes for keypushes, one byte per
               key.  The On-Line operators consider the keys as
               intended for execution as soon as the text field has
               been received.

    3          The same as for an op code of 2, except that the On-
               Line operators consider that the execution of the keys
               will be delayed until all data for that receive
               operation has been received.

the standard format for data sent or received by the On-Line System operators is a string of messages. the last message is marked by a header with a NOP op code, and that one's called a trailer πŸŽ€ these conventions are just the default situation, so any of them can be overridden with the right programming. below is a description of each operator, what it does, and its key sequence ✨


(1) OPEN 🌸

by invoking this operator, the user asks for the specified local socket to be taken out of the closed state so it's ready to take part in data transfer. there are three different operations this operator can do, and they're below πŸ¦‹

(A) CONNECT πŸ”—

invoking this one means the user wants the specified local socket logically connected to the specified foreign socket, with data transfer enabled between the two. processing at the terminal is suspended until the foreign socket either accepts or rejects the connection attempt. this operation is only valid when the local socket is in the closed state.

the key sequence is:

UP Q1 Q2,Q3[,Q4] RETURN

where

  • Q1 is the completion code variable to be associated with the local socket.
  • Q2 is the socket number of the local socket.
  • Q3 is the socket number of the foreign socket.
  • Q4 is the site number of the foreign socket.

the following completion codes are possible for this operation:

0, The operation was successful and the connection has been
   established
4, The specified completion code variable is already
   assigned to a socket; the operation was suppressed
8, The specified local socket is not in the closed state;
   the operation was suppressed
12, All communication paths to the specified foreign site
   are in use; the operator was suppressed
16, Local resources are insufficient to support another
   connection; the operation was suppressed
20, The connection attempt was rejected by the foreign
   process
28, The specified foreign site is invalid; the operation was
   suppressed
36, Either hardware at the foreign site is inoperative or
   the NCP's counter-part at the foreign site does not exist
   or has failed
40, Local and foreign sockets are both either send or
   receive sockets; the operation was suppressed
44, By operator command, all Network operations were
   terminated; the socket will be closed
60, An NCP control transmission error occurred; the
   operation as suppressed

(B) LISTEN πŸ‘‚

this one is a request to be notified of any connection attempt aimed at the specified local socket. processing at the terminal is suspended until such a call comes in. this operation is only valid when the designated local socket is in the closed state.

the key sequence is:

UP Q1 Q2 RETURN

where

  • Q1 is the completion code variable to be associated with the local socket.
  • Q2 is the socket number of the local socket.

the following completion codes are possible for this operation:

0, The operation was successful and a call has been received
4, The specified completion code variable is already
          assigned to a socket; the operation was suppressed
8, The specified local socket is not in the closed state;
          the operation was suppressed
12, Local resource are insufficient to support another
          connection; the operation was suppressed
44, By operator command, all Network operations were
          terminated; the socket will be closed

(C) ACCEPT 🀝

this one accepts the connection with the foreign socket whose call caused a successful completion of a previous LISTEN operation by the specified local socket. after it finishes, data can be transferred to or from the local socket, depending on its gender. this operation is only valid when the last operation referencing the local socket was a LISTEN. processing at the terminal is suspended until it's done.

the key sequence is:

UP Q RETURN

where

  • Q is the completion code variable associated with the local socket by a previous LISTEN operation.

the following completion codes are possible for this operation:

0, The operation as successful, and the connection is
    established
4, The specified local socket is in the closed state
    (the NCP may have received an abort notification
    from the foreign process); the operation was
    suppressed
8, The previous operation specifying the designated
    local socket was not a LISTEN; the operation was
    suppressed
12, All communication paths to the specified foreign
    site are in use; the socket has been returned to
    the closed state

(2) CLOSE πŸšͺ

this operation is a request for the specified local socket to be returned to the closed state. if the last operation involving this socket was a LISTEN, this operation refuses the foreign process's connection attempt. if the last operation was a CONNECT, the attempt is aborted. if a connection is already established, any data still in transit from the local socket is allowed to reach the foreign socket, and it can be either received or flushed before the local socket closes πŸ’–

processing at the terminal is suspended until the socket has been returned to the closed state.

the key sequence is:

DWN Q

where

  • Q is the completion code variable associated with the local socket.

the following completion codes are possible for this operation:

0, The operation was successful, and the socket has
    been returned to the closed state
8, The specified completion code variable is not
    currently assigned to a socket; the operation was
    suppressed
12, The specified local socket is in the process of
    being closed the operation was suppressed, but the
    local socket will be closed
36, Either hardware at the foreign site is
    inoperative, or the NCP's counterpart at the
    foreign site does not exist or has failed
44, By operator command, all Network operations were
    terminated; the socket will be closed
60, An NCP control transmission error occurred; the
    operation was aborted
64, A transmission error occurred the operation was
    aborted, but the socket will be closed

(3) SEND πŸ“¨

to be continued in part 2 πŸŽ€πŸ’…

This operation sends data out to the foreign socket. ✨ Processing at the terminal pauses until the foreign socket has received the data, or until the NCP has queued it locally. πŸ’Œ

The possible key sequences are:

      STORE  Q1 Q2 text Q2
      STORE +Q1 Q2 text Q2
      STORE -Q1 Q2 text Q2
      STORE .Q1[X]Q3 RETURN

where

  • Q1 is the completion code variable associated with the local socket. πŸŽ€
  • Q2 is any key except RESET.
  • 'Text' is a string of any length made of any keys except Q2 and RESET.
  • Q3 is an unsigned integer. If it's preceded by 'X', the integer is hexadecimal. πŸ”₯
  • [X]Q3 should have a value less than 256. πŸ’…

If Q1 is the first key after STORE, the keys in 'text' aren't executed. Instead, they're sent as one byte per key, in one or more standard messages. Those messages get a header carrying the op code that says which keys to execute as soon as they arrive, plus a trailer at the end. πŸ¦‹ If a '+' comes before Q1, the headers and text get sent, but there's no trailer. If a '-' comes before Q1, only the text gets sent. And if a '.' comes before Q1, [X]Q3 gets sent as a one-byte number, with no header or trailer. Very precise, very iconic. πŸ‘‘

These completion codes are possible for this operation:

  • 0: The operation was successful, and the data has been sent. ✨
  • 4: The specified local socket isn't a send socket, so the operation was suppressed. πŸ™ˆ
  • 8: The specified completion code variable isn't assigned to a socket, so the operation was suppressed.
  • 12: A previous send operation is still in progress, so this one was suppressed. πŸ’€
  • 16: The connection isn't fully open, so the operation was suppressed.
  • 20: The foreign socket ended the connection before the send finished. Not all the data was transmitted. 😭
  • 36: Either the hardware at the foreign site is down, or the NCP's counterpart there doesn't exist or has failed. 🌧️
  • 44: An operator command terminated all Network operations, so the socket will be closed. πŸ›‘
  • 52: One or more interrupts came in from the foreign socket, so the operation was suppressed.
  • 60: An NCP control transmission error happened. The operation was aborted and the socket will be closed. πŸ’”
  • 64: A transmission error happened. The operation was aborted and the socket will be closed. πŸ’”

(4) RECEIVE 🧚

This operation receives data from the foreign socket. Processing at the terminal pauses until the data the foreign socket sent has arrived at the local socket and been processed. 🌸

The possible key sequences are:

      LOAD  Q1
      LOAD +Q1
      LOAD -Q1 Q2, Q3 RETURN
      LOAD .Q1 Q4 RETURN

where

  • Q1 is the completion code variable associated with the local socket. πŸ’œ
  • Q2 is a positive integer, or a LO storage location, less than 256.
  • Q3 is a positive integer, or a LO storage location, less than 65536.
  • Q4 is a positive integer less than 5. πŸ“

If Q1 is the first key after LOAD, one or more standard messages get received and executed. Depending on the op code, the data may or may not be executed as soon as it arrives. Manual keypushes stay paused until a trailer comes in. 🫢 If Q1 is preceded by a '+', it works the same way, except only one message with no trailer is received. The operation only runs if there's data queued for the local socket and ready to be received. ('LOAD +' is mainly meant for use with the Network On-Line Interface. πŸ–₯️) If Q1 is preceded by a '-', a string of text whose length in bits is Q3 gets received and processed according to the op code Q2. And if a '.' comes before Q1, Q4 bytes of data are read and placed, right justified, in the LO accumulator. ✨

These completion codes are possible for this operation:

  • 0: The operation was successful, and the data has been received. πŸŽ‰
  • 4: The specified local socket isn't a receive socket, so the operation was suppressed.
  • 8: The specified completion code variable isn't assigned to a socket, so the operation was suppressed.
  • 12: A previous receive operation is still in progress, so this one was suppressed. πŸ™…β€β™€οΈ
  • 16: The connection isn't fully open, so the operation was suppressed.
  • 20: The foreign socket ended the connection before the receive finished. The data is unpredictable. 😡
  • 36: Either the hardware at the foreign site is down, or the NCP's counterpart there doesn't exist or has failed. 🌧️
  • 44: An operator command terminated all Network operations, so the socket will be closed.
  • 52: One or more interrupts came in from the foreign socket, so the operation was suppressed.
  • 60: An NCP control transmission error happened. The operation was suppressed and the socket will be closed. πŸ’”
  • 200: There was no data queued for the local socket, so the operation was suppressed. This one only applies to 'LOAD +'. πŸ₯Ί

(5) CHECK πŸ”

This operation displays the status of the specified local socket. There's no completion code variable for it, since it always succeeds and the socket is identified by its socket number. 🧠 It's valid at any time and, with one exception noted below, always finishes immediately. ⭐

The possible key sequences are:

      DISPLAY (Q RETURN...)...
      DISPLAY (Q?)...
      DISPLAY RETURN...

where

  • Q is the socket number of the local socket whose status should be displayed.

Successive RETURNs display the status of local sockets with successively higher socket numbers. Once DISPLAY has been pushed, it doesn't need to be pushed again for later occurrences of Q. πŸ¦‹

If Q is followed by a '?', processing at the terminal stays suspended until the socket is no longer in the closed state. Then the status gets displayed. If the socket isn't closed when the '?' is pushed, it responds as if the '?' were a RETURN. πŸ’…

If DISPLAY is followed right away by a RETURN, the status of every non-closed socket owned by the terminal is displayed. Each one is preceded by its associated completion code variable. If that's more info than fits on one tube, successive RETURNs display the rest. πŸ“Ί

The status has this format:

      'lclno' 'mnem' 'fgnsite' 'fgnno' 'deficit'

where

  • 'lclno' is the socket number of the local socket. 🌷
  • 'mnem' is a mnemonic of up to eight characters for the status.
  • 'fgnsite' is the site number of the foreign socket, or blank.
  • 'fgnno' is the socket number of the foreign socket, or blank.
  • 'deficit' is the send/receive deficit in the form 'bytes.bits', or blank.

These are the possible mnemonics and what they mean. πŸ“–

   'MNEM'                               MEANING
   ______                               _______

   OPEN           A connection is fully established.
                  No SEND/RECEIVE operation is in progress.
                  'fgnsite' and 'fgnno' are the site number and
                  the socket number of the connected socket.
                  'deficit' is the number of bits queued locally
                  at the socket by the NCP and available to
                  satisfy a future RECEIVE operation, or awaiting
                  output as the result of a previous SEND
                  operation.

   LISTEN         A LISTEN has been issued.

   CONNECT        A CONNECT has been issued. 'fngsite' and 'fgnno'
                  are the site and socket numbers of the foreign
                  socket.

   DECISION       A LISTEN has been completed. 'fgnsite' and
                  'fgnno' are the site and socket numbers of the
                  calling socket.

   CALL(S)        One or more calls have been received for the
                  local socket.  No LISTEN or CONNECT has been
                  issued.

   I/O            A connection is fully established.  A
                  SEND/RECEIVE operation is in progress. 'fgnsite'
                  and 'fgnno' are the site and socket numbers of
                  the connected socket. 'deficit' is the number of
                  bits yet to be sent or received.

   CLOSED         The socket is in the closed state.

   <--DRAIN       The foreign socket is attempting to close the
                  connection.  The NCP has data yet to be read by
                  the local socket. 'fgnsite' and 'fgnno' are the
                  site and socket numbers of the connected socket.
                  'deficit' is the number of bits yet to be
                  received.

   DRAINED        The foreign socket is attempting to close the
                  connection.  The NCP is awaiting arrival at the
                  foreign site of data currently in transit.
                  'fgnsite' and 'fgnno' are the site and socket
                  numbers of the connected socket.

   CLOSING        The local socket has issued a CLOSE.  The NCP is
                  in the process of returning  the local socket to
                  the closed state. 'fgnsite' and 'fgnno' are the
                  site and socket numbers of the connected socket.

   DRAIN-->       The local socket has issued a CLOSE.  The NCP is
                  completing the last SEND operation before
                  returning the local socket to the closed state.
                  'fgnsite' and 'fgnno' are the site and socket
                  numbers of the connected socket. 'deficit' is
                  the number of bits the NCP has yet to transmit.

(6) IDENTIFY πŸͺͺ

This operation identifies a local socket by its completion code variable. It's valid at any time and always finishes immediately. Since it always succeeds, it has no completion codes, and the contents of the completion code variable don't change. πŸ’–

The key sequence is:

      ID Q...

where

  • Q is the completion code variable associated with the local socket.

The response displays Q. After that comes 'IS UNDEFINED' if the socket is closed, or the socket number associated with it if it isn't closed. Once ID has been pushed, it doesn't need to be pushed again for later occurrences of Q. 🌈


(7) PURGE 🧹

This operator is used to dissociate all completion code variables from sockets and to issue a CLOSE to every socket currently in use at the terminal 🧹. It's valid at any time and always completes immediately. Since it always succeeds, there are no completion codes for it, and the contents of the completion code variables don't change πŸ’….

The key sequence is:

DEL RETURN

(8) SIGNAL ✨

okay so this one lets you send a signal to the foreign process πŸ“‘. What the signal means is totally up to the user 🫢. Here's the vibe: the next time the foreign socket tries to start a RECEIVE or SEND, that operation gets suppressed and it gets a completion code saying a signal was received 😭. Meanwhile, processing at the terminal is paused until the signal has actually been sent to the foreign NCP πŸ›‘. This one only works when the socket is fully open πŸ”“.

The key sequence is:

REFL Q

where

  • Q is the completion code variable associated with the local socket.

These are the completion codes you can get back:

  • 0: the operation worked and the signal was sent πŸŽ‰
  • 4: the completion code variable you named isn't assigned to a socket, so the operation was suppressed πŸ™ˆ
  • 8: the connection isn't fully open, so the operation was suppressed πŸ’€

(9) CONVERSATIONAL CONTROLLER πŸ’¬

this operator is mainly for the Network On-Line Interface, and it's how you hold a full "conversation" with the foreign process πŸ—£οΈ. Any data queued up locally for the specified local receive socket gets received and shown as characters πŸ‘€. Whatever keys you push get sent out of the specified local send socket ⌨️. You get to choose whether upper keyboard buttons get sent too πŸ’–. Either way, ERASE, REPEAT, ENTER, PRED, and RESET never get sent 🚫. Pushing any of those except RESET pauses data reception until you push a button that isn't one of those four 😀. Pushing RESET always ends the whole operation πŸ”š.

The key sequence goes like this:

ARG [,] [-]Q1[-]Q2

where

  • Q1 is the completion code variable associated with the local send socket.
  • Q2 is the completion code variable associated with the local receive socket.

If you put a ',' after ARG, both upper and lower keyboard buttons get sent, and the operation only ends when you push RESET πŸŽ€. If there's no ',' after ARG, only lower keyboard buttons get sent, and the operation ends when you push RESET or any upper keyboard button πŸ›‘. A '-' in front of Q1 means no headers get sent, and a '-' in front of Q2 means no headers get received 🧒. Either way, if headers are being received, the operation ends when a trailer comes in, and a matching trailer gets sent if headers are being sent πŸ”.

The completion codes for the send socket are the same as for SEND, and the ones for the receive socket are the same as for RECEIVE πŸ“¦. If you hit a non-zero completion code, a message pops up saying either 'OUTPUT ERROR' or 'INPUT ERROR' 🚨. Which one you get depends on whether the send socket or the receive socket is the one that hit the non-zero code. Then the operation ends 🏁.


[ This RFC was put into machine readable form for entry ] [ into the online RFC archives by Gruss Gottfried 01/98 ]

πŸ“¦ where this page comes from