RFC 466

Telnet logger/server for host LL-67

πŸ“… published February 1973, from ietf

RFC 466: TELNET LOGGER/SERVER For Host LL-67 ✨

Okay bestie, the title block is giving old-school πŸ¦‹. It's from the Network Working Group πŸ’œ and it's Request for Comments: 466 (NIC 14740). J. Winett of LL-67 wrote it on 27 February 1973, and the category is TELNET 🌸. It doesn't list anything it obsoletes or updates.

The writeup covers the TELNET LOGGER/SERVER for the CP/CMS system on the Lincoln Laboratory 360>67 (host 10) πŸ–₯️. It works with both half duplex and full duplex TELNET users, and the data can be in either ASCII or EBCDIC codes. Obviously this is so cute πŸ₯Ή

The hide-your-input and noecho TELNET controls are used for the EBCDIC print suppress (bypass) and print restore features during the login procedure. Half duplex terminals get the TELNET control break (reverse break) sent as an input prompt when input is wanted. That same code can also say that a previous line sent without an end of line sequence (CR-LF) should be printed. Iconic πŸ’…

This material has not been reviewed for public release and is intended only for use with the ARPA network. It should not be quoted or cited in any publication not related to the ARPA network. πŸ”’

Operation of the Lincoln Laboratory CP/CMS TELNET LOGGER/SERVER ✨

ICP Connection

The TELNET LOGGER/SERVER follows the ICP protocol for making a pair of connections. The LOGGER starts out enabled for a connection on socket X'00000001'. When an RFC is received for this socket, a pair of sockets gets picked for the TELNET connections. If the maximum number of TELNET users who can be served are already active, the initial connection gets refused. Currently, three TELNET users can be served 🧚

TELNET LOGGER

Once the ICP connections are set up, the LOGGER waits for a TELNET data type code, a string of network ASCII characters, or a null line (just CR-LF) to figure out whether it should run in ASCII or EBCDIC character codes. ASCII is assumed unless the first byte received is the TELNET EBCDIC data type code (X'A2'). Once something arrives, the LOGGER sends this welcome message:

Lincoln Laboratory CP/CMS Online

For example, if you want ASCII, send a null line (just CR-LF) on the send socket and the welcome message comes back in ASCII. Then the CP login procedure can start 🌈. If you want EBCDIC instead, the very first byte you send should be the TELNET data type code for EBCDIC (X'A2'). After that, everything stays in whichever code you started with. Main character energy πŸ‘‘

CP expects the user to type:

LOGIN userid

Here, the userid picks the virtual machine. CP then replies with:

ENTER PASSWORD:

Right after that, CP sends the EBCDIC code for bypass (x'24'), which gets mapped to the TELNET code hide-your-input πŸ™ˆ.

Now the user types in a password. Network passwords can be different from the ones typed on a local terminal, and the LOGGER maps network passwords to a matching CP password. So you can only get into an account from the network if a network password, a CP password, and a userid are all listed in a file that the LOGGER reads. If the userid from the network isn't in the LOGGER FILE (or the network password doesn't match the one in the file for that userid), the LOGGER passes an invalid userid (or password) to CP. Then CP's response for an invalid userid or password goes back to the network user. Not me getting locked out πŸ’€

After CP receives a password, CP sends the EBCDIC code for restore (X'14'), which gets mapped to the TELNET control noecho πŸ“

TELNET SERVER

CP/CMS runs on EBCDIC codes, so ASCII codes have to be translated into EBCDIC before they're sent to a virtual machine. The ASCII codes and their EBCDIC mappings are supposed to be in Figure 1 πŸŽ€

Heads up: Figure 1 isn't included in this copy of the text, so the table isn't here.

When the ASCII sequence CR-LF comes in, it gets mapped into the EBCDIC code NL. Whenever the TELNET control NOP shows up in an input string, it gets mapped into an EBCDIC idle (X'17') and then taken out of the string. So if TELNET NOP codes sit between a CR and an LF, they're removed first, and then the CR-LF becomes the EBCDIC NL. Lowkey genius 🧠

The TELNET control hide-your-input maps to the EBCDIC code for bypass (X'24'), and the TELNET control echo maps to the EBCDIC control for restore (X'14'). If the TELNET control echo is received, the SERVER should send the control noecho, but this feature hasn't been implemented yet 😭. For now, the TELNET control echo gets mapped to the EBCDIC code X'23'. If the TELNET break comes in, it's read as an attention signal and CP or CMS takes the matching action πŸ”₯.

CP/CMS works one line at a time and expects all input to be lines that end with an NL code. Characters get buffered until the newline code shows up πŸ“.

CP/CMS is also half duplex, so it only looks at characters when it's expecting input. If it isn't expecting input, a network interrupt is needed to make the SERVER process the characters that came in. When a network interrupt happens, the characters received before the TELNET data mark are examined and then thrown away. The one exception: if a TELNET break code is found, the right CP/CMS interrupt action gets triggered ✨

On output, EBCDIC codes get mapped into network ASCII if a mapping exists. If there isn't one, they get mapped into the TELNET control NOP. An NL code becomes CR-LF. The EBCDIC code for bypass becomes the TELNET control hide-your-input, and the EBCDIC code for restore becomes the TELNET control noecho. Also, X'23' becomes the TELNET control echo, and X'38' becomes the TELNET control break πŸ’–.

Since CP/CMS is a one-line-at-a-time, half duplex system, the TELNET control break gets sent as an end of message signal and also as an input prompt code. If characters were output without an NL, the break works as an end of message code. For a user TELNET running in one-line-at-a-time mode, that tells it to print the characters that were already sent without waiting for the end of line sequence. If the user TELNET is also in half duplex mode, the break works as an input prompt and tells the user the system is ready for input πŸ¦‹.

If a full duplex user TELNET sends input early, the TELNET SERVER will already have that input ready for immediate processing. So for a full duplex user TELNET, the break used as a prompt should be ignored 🫢.

CP/CMS runs half duplex, but it still supports half duplex terminals through the reverse break feature. That lets the system cancel an input mode so it can send a priority output message. In that case, the TELNET SERVER sends a TELNET SYNC. A half duplex user TELNET should read that as a cue to cancel input mode, which means it revokes a previous TELNET break that was treated as an input prompt 🌸.

No codes in the output character stream can make the TELNET data mark get sent. πŸ’…


Part 2 is coming πŸ«ΆπŸ’œ

LOGOUT ✨

okay so bestie, logging out is actually simple πŸ’… When a user logs out from their virtual machine, CP passes the equivalent of a line disconnect to the LOGGER πŸ“ž Then the LOGGER closes the TELNET send and receive sockets πŸ”Œ Done and dusted, no drama 🫢


Now for the big ASCII/EBCDIC chart 🧚 Every character gets its code in both systems, so you can translate between them without losing your mind 🀯 Here's the whole thing:

   ASCII    ASCII    ASCII    SYMBOLS    EBCDIC    EBCDIC
   DEC      OCT      HEX                 HEX       DEC

     0        0      (00)      NUL       (00)       00
     1        1      (01)      SOH       (01)       01
     2        2      (02)      STX       (02)       02
     3        3      (03)      ETX       (03)       03
     4        4      (04)      EOT       (37)       55
     5        5      (05)      ENQ       (2D)       45
     6        6      (06)      ACK       (2E)       46
     7        7      (07)      BEL       (2F)       47
     8       10      (08)      BS        (16)       22
     9       11      (09)      HT        (05)       05
    10       12      (0A)      LF        (25)       37
    11       13      (0B)      VT        (0B)       11
    12       14      (0C)      FF        (0C)       12
    13       15      (0D)      CR        (0D)       13
    14       16      (0E)      SO        (0E)       14
    15       17      (0F)      SI        (0F)       15
    16       20      (10)      DLE       (10)       16
    17       21      (11)      DC1       (11)       17
    18       22      (12)      DC2       (12)       18
    19       23      (13)      DC3       (13)       19
    20       24      (14)      DC4       (3C)       60
    21       25      (15)      NAK       (3D)       61
    22       26      (16)      SYN       (32)       50
    23       27      (17)      ETB       (26)       38
    24       30      (18)      CAN       (18)       24
    25       31      (19)      EM        (19)       25
    26       32      (1A)      SUB       (3F)       63
    27       33      (1B)      CTL       (27)       39
    28       34      (1C)      FS        (1C)       28
    29       35      (1D)      GS        (1D)       29
    30       36      (1E)      RS        (1E)       30
    31       37      (1F)      US        (1F)       31

                       ASCII/EBCDIC Code Mappings
                                FIGURE 1
   ASCII    ASCII    ASCII    SYMBOLS    EBCDIC    EBCDIC
   DEC      OCT      HEX                 HEX       DEC

    32       40      (20)      SP        (40)       64
    33       41      (21)      !         (5A)       90
    34       42      (22)      "         (7F)      127
    35       43      (23)      #         (7B)      123
    36       44      (24)      $         (5B)       91
    37       45      (25)      %         (6C)      108
    38       46      (26)      &         (50)       80
    39       47      (27)      '         (7D)      124
    40       50      (28)      (         (4D)       77
    41       51      (29)      )         (5D)       93
    42       52      (2A)      *         (5C)       92
    43       53      (2B)      +         (4E)       78
    44       54      (2C)      ,         (6D)      109
    45       55      (2D)      -         (60)       96
    46       56      (2E)      .         (4B)       75
    47       57      (2F)      /         (61)       97
    48       60      (30)      0         (F0)      240
    49       61      (31)      1         (F1)      241
    50       62      (32)      2         (F2)      242
    51       63      (33)      3         (F3)      243
    52       64      (34)      4         (F4)      244
    53       65      (35)      5         (F5)      245
    54       66      (36)      6         (F6)      246
    55       67      (37)      7         (F7)      247
    56       70      (38)      8         (F8)      248
    57       71      (39)      9         (F9)      249
    58       72      (3A)      :         (7A)      122
    59       73      (3B)      ;         (5E)       94
    60       74      (3C)      <         (4C)       76
    61       75      (3D)      =         (7E)      126
    62       76      (3E)      >         (6E)      110
    63       77      (3F)      ?         (6F)      111

                        ASCII/EBCDIC Code Mappings
                           FIGURE 1 (CONTINUED)
   ASCII    ASCII    ASCII    SYMBOLS    EBCDIC    EBCDIC
   DEC      OCT      HEX                 HEX       DEC

    64      100      (40)      @         (7C)      124
    65      101      (41)      A         (C1)      193
    66      102      (42)      B         (C2)      194
    67      103      (43)      C         (C3)      195
    68      104      (44)      D         (C4)      196
    69      105      (45)      E         (C5)      197
    70      106      (46)      F         (C6)      198
    71      107      (47)      G         (C7)      199
    72      110      (48)      H         (C8)      200
    73      111      (49)      I         (C9)      201
    74      112      (4A)      J         (D1)      209
    75      113      (4B)      K         (D2)      210
    76      114      (4C)      L         (D3)      211
    77      115      (4D)      M         (D4)      212
    78      116      (4E)      N         (D5)      213
    79      117      (4F)      O         (D6)      214
    80      120      (50)      P         (D7)      215
    81      121      (51)      Q         (D8)      216
    82      122      (52)      R         (D9)      217
    83      123      (53)      S         (E2)      226
    84      124      (54)      T         (E3)      227
    85      125      (55)      U         (E4)      228
    86      126      (56)      V         (E5)      229
    87      127      (57)      W         (E6)      230
    88      130      (58)      X         (E7)      231
    89      131      (59)      Y         (E8)      232
    90      132      (5A)      Z         (E9)      233
    91      133      (5B)      [         (AD)      173
    92      134      (5C)     <cent>     (4A)       74  (BACK-SLASH)
    93      135      (5D)      ]         (BD)      189
    94      136      (5E)      ^         (71)      113  (CARAT)
    95      137      (5F)      _         (6D)      109

                        ASCII/EBCDIC Code Mappings
                           FIGURE 1 (CONTINUED)
   ASCII    ASCII    ASCII    SYMBOLS    EBCDIC    EBCDIC
   DEC      OCT      HEX                 HEX       DEC

    96      140      (60)      `         (79)      121  (GRAVE)
    97      141      (61)      a         (81)      129
    98      142      (62)      b         (82)      130
    99      143      (63)      c         (83)      131
   100      144      (64)      d         (84)      132
   101      145      (65)      e         (85)      133
   102      146      (66)      f         (86)      134
   103      147      (67)      g         (87)      135
   104      150      (68)      h         (88)      136
   105      151      (69)      i         (89)      137
   106      152      (6A)      j         (91)      145
   107      153      (6B)      k         (92)      146
   108      154      (6C)      l         (93)      147
   109      155      (6D)      m         (94)      148
   110      156      (6E)      n         (95)      149
   111      157      (6F)      o         (96)      150
   112      160      (70)      p         (97)      151
   113      161      (71)      q         (98)      152
   114      162      (72)      r         (99)      153
   115      163      (73)      s         (A2)      162
   116      164      (74)      t         (A3)      163
   117      165      (75)      u         (A4)      164
   118      166      (76)      v         (A5)      165
   119      167      (77)      w         (A6)      166
   120      170      (78)      x         (A7)      167
   121      171      (79)      y         (A8)      168
   122      172      (7A)      z         (A9)      169
   123      173      (7B)      {         (8B)      139
   124      174      (7C)      |         (4F)       79  (BAR/OR)
   125      175      (7D)      }         (9B)      155
   126      176      (7E)    <bent bar>  (5F)       95  (TILDE/NOT)
   127      177      (7F)      DEL       (07)        7
   ASCII   ASCII   ASCII    TELNET         EBCDIC     EBCDIC
   DEC     OCT     HEX     CONTROLS        HEX        DEC

   128     100     (80)   DATA-MARK        (80)       128
   129     101     (81)   BREAK            (38)        56
   130     102     (82)   NOP              (17)        23  IDLE
   131     103     (83)   NOECHO           (14)        20  RESTORE
   132     104     (84)   ECHO             (23)        35
   133     105     (85)   HIDE-YOUR INPUT  (24)        36  BYPASS

                        ASCII/EBCDIC Code Mappings
                           FIGURE 1 (CONTINUED)
        [This RFC was put into machine readable form for entry]
    [into the online RFC archives by Helene Morin, Via Genie, 12/99]
πŸ“¦ where this page comes from