Skip to main content

6. Sample Interaction

The nomenclature of RFC 726 will be used to describe this example. To quote that RFC:

"S:"  is sent from serving host to using host.
"U:" is sent from using host to serving host.
"T:" is entered by the terminal user.
"P:" is printed on the terminal.

Text surrounded by square brackets([]) is commentary. Text
surrounded by angle brackets (<>) is to be taken as a single unit.
E.g, carriage return is <cr>, and the decimal value 27 is
represented <27>.

We assume that the user has established the Telnet connection, logged on, and an application program has just been started either by the user directly or through a canned start up procedure. The presentation on the page is meant to merely group entities together and does not imply the position of message boundaries. One should assume that any part of the dialogue may be sent as one or many messages. The first action of the program or Telnet is to negotiate the DET option:

S: <IAC><DO><DET>

U: <IAC><WILL><DET>

S:<IAC><DO><OUTPUT PAGE SIZE>              [First negotiate the screen
                                           size.  In this case we are
                                           asking the user the size of
                                           the terminal.  This could
                                           have been done before the
                                           DET option was negotiated.]

U:<IAC><WILL><NAOP>

U:<IAC><SB><NAOP><DR><25><IAC><SE>

S:<IAC><SB><NAOP><DS><0><IAC><SE>

S:<IAC><DO><OUTPUT LINE WIDTH>

U:<IAC><SB><NAOL><DR><80><IAC><SE>         [Defines the screen to be
                                           25 lines by 80 characters.
                                           The server may use this
                                           information when formatting
                                           the screen.]

S:<IAC><SB><NAOL><DS><0><IAC><SE>

S:<IAC><SB><DET><FORMAT FACILITIES>
<Repeat><Protection, 3 Levels
Intensity><IAC><SE>                        [Now set the terminal
                                           attributes.]

U:<IAC><SB><DET><FORMAT FACILITIES>
<Repeat, Blinking><Protection, 3
Levels Intensity><IAC><SE>

S:<IAC><SB><DET><ERASE SCREEN><IAC><SE>    [Erase the screen and start
                                           sending the form.]

  <IAC><SB><DET><FORMAT DATA>
  <Protection=1, Intensity=1><0>
  <5><IAC><SE>Name:

  <IAC><SB><DET><MOVE CURSOR><0><1><IAC><SE>

  <IAC><SB><DET><FORMAT DATA>
  <Protection=1, Intensity=1><0>
  <8><IAC><SE>Address:

  <IAC><SB><MOVE CURSOR><0><4><IAC><SE>

  <IAC><SB><DET><FORMAT DATA>
  <Protection=1, Intensity=1><0>
  <17><IAC><SE>Telephone number:

  <IAC><SB><DET><MOVE CURSOR><32><4><IAC><SE>

  <IAC><SB><DET><FORMAT DATA>
  <Protection=1, Intensity=1><0>
  <24><IAC><SE>Social Security Number:

  <IAC><SB><DET><FORMAT DATA>
  <Protection=1, Intensity=7>
  <0><11><IAC><SE>                         [Establish a field that
                                           doesn't display what is
                                           typed into it.]

  <IAC><SB><DET><MOVE CURSOR><32><5><IAC><SE>

  <IAC><SB><DET><FORMAT FACILITIES>
  <Blinking><0><IAC><SE>                   [Get permission to use
                                           Blinking Attribute.]

U:<IAC><SB><DET><FORMAT FACILITIES>
<Repeat, Blinking><Protection,
3 Levels Intensity><IAC><SE>

S:<IAC><SB><DET><FORMAT DATA>
<Blinking=1, Protection=1,
Intensity=1><0><29><IAC><SE>

  Your SSN will not be printed.

  <IAC><SB><DET><HOME><IAC><SE>
  <IAC><GA>

The previous exchange has placed a form on the screen that looks like:

Name:
Address:
Telephone Number: Social Security Number:
"Your SSN will not be printed."

where the quoted string is blinking.

The terminal user is now free to fill in the form provided. He positions the cursor at the beginning of the first field (this usually is done by hitting the tab key) and begins typing. We do not show this interaction since it does not generate any interaction with the User Telnet program or the network. After the terminal user has completed filling in the form, he strikes the transmit key to send the unprotected part of the form, but first the User Telnet program negotiates the Byte Macro Option to condense the Field Separator subcommand:

U:<IAC><DO><BM>                            [Negotiate Byte Macro
Option.]

S:<IAC><WILL><BM> [Define decimal 166 to be
the Field Separator
subcommand (see Appendix
3)]

U:<IAC><SB><BM><DEFINE>
<166><6><IAC SB DET FIELD
SEPARATOR IAC SE><IAC><SE>

S:<IAC><SB><BM><ACCEPT><166><IAC><SE> [The server accepts the
macro.]

U:<IAC><SB><DET><DATA TRANSMIT><0><6><IAC><SE>
John Doe <166> 1515 Elm St., Urbana, Il 61801
<166> 217-333-9999 <166> 123-45-6789 <166>

S:<IAC><SB><DET><ERASE SCREEN><IAC><SE>
Thank you.

And so on.