home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 700s / rfc731.txt < prev    next >
Text File  |  1992-10-14  |  62KB  |  1,653 lines

  1.  
  2. John Day                               Data Entry Terminal Option
  3. June 27,1977                                            NIC 40652
  4.                                                           RFC 731
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                 Telnet Data Entry Terminal Option
  14.  
  15.  
  16.  
  17. 1.  Command Name and code:
  18.  
  19.         DET             20
  20.  
  21.  
  22. 2.  Command Meanings
  23.  
  24.      IAC WILL DET
  25.      The sender of this command REQUESTS or AGREES  to  send  and
  26.      receive subcommands to control the Data Entry Terminal.
  27.  
  28.      IAC WONT DET
  29.      The sender of this  command  REFUSES  to  send  and  receive
  30.      subcommands to control the Data Entry Terminal.
  31.  
  32.      IAC DO DET
  33.      The sender of this command REQUESTS or AGREES  to  send  and
  34.      receive subcommands to control the Data Entry Terminal.
  35.  
  36.      IAC DONT DET
  37.      The sender of this  command  REFUSES  to  send  and  receive
  38.      subcommands to control the Data Entry Terminal.
  39.  
  40.      The DET option  uses  five  classes  of  subcommands  1)  to
  41.      establish   the   requirements   and   capabilities  of  the
  42.      application and the terminal, 2) to format the  screen,  and
  43.      to  control  the  3)  edit,  4) erasure, and 5) transmission
  44.      functions.  The subcommands that perform these functions are
  45.      described below.
  46.  
  47.  
  48.      T__h_e_N__e_t_w_o_r_k_V__i_r_t_u_a_l_D__a_t_a_E__n_t_r_y_T__e_r_m_i_n_a_l(NVDET)
  49.  
  50.         The NVDET  consists  of  a  keyboard  and  a  rectangular
  51.         display.   The  keyboard  is capable of generating all of
  52.         the characters of the ASCII character set.  In  addition,
  53.         the  keyboard may possess a number of function keys which
  54.         when pressed cause a FN subcommand to be sent.  (Although
  55.         most DET's will support one or  more  peripheral  devices
  56.         such  as  a  paper  tape reader or a printer, this option
  57.  
  58.  
  59.                                 1
  60.  
  61. John Day                               Data Entry Terminal Option
  62. June 27,1977                                            NIC 40652
  63.                                                           RFC 731
  64.  
  65.  
  66.         does not consider their support.  Support  of  peripheral
  67.         devices should be treated by a separate option.)
  68.  
  69.         The screen of the data entry terminal is  a  rectangle  M
  70.         characters  by N lines.  The values of M and N are set by
  71.         negotiating the Output Line Width and  Output  Page  Size
  72.         options,  respectively.   The next writing position (x,y)
  73.         on the screen (where x is the character position and y is
  74.         the position of the line on the screen) is indicated by a
  75.         special display character called the cursor.  The  cursor
  76.         may  be  moved  to  any  position  on  the screen without
  77.         disturbing any characters already on the screen.   Cursor
  78.         addressing   in   existing   terminals  utilizes  several
  79.         topologies and addressing methods.  In order to make  the
  80.         burden of implementaton as easy as possible this protocol
  81.         supports two topologies (the finite plane and the helical
  82.         torus)  and three addressing methods ((x,y); x and y, and
  83.         relative  increments).   Since  the  finite  plane   with
  84.         absolute  addressing  is  the  least  ambiguous  and  the
  85.         easiest to translate to and from the others,  it  is  the
  86.         default scheme used by the NVDET.  The torodial form with
  87.         either  relative  or  absolute addressing is provided for
  88.         convience.
  89.  
  90.         Also  the NVDET provides a mechanism for defining on  the
  91.         screen  fields  with  special  attributes.   For example,
  92.         characters entered into these  fields  may  be  displayed
  93.         with  brighter intensity, highlighted by reverse video or
  94.         blinking, or protected from  modification  by  the  user.
  95.         This  latter  feature is one of the most heavily used for
  96.         applications where the DET displays a form to  be  filled
  97.         out by the user.
  98.  
  99.         The  definition  of  the   NVDET   uses   Telnet   option
  100.         subnegotiations  to  accomplish  all  of  its  functions.
  101.         Since none of the  ASCII  characters  sent  in  the  data
  102.         stream  have been used to define these functions, the DET
  103.         option can be used in a "raw" or even  "rare"  mode.   In
  104.         circumstances  where  the  application program knows what
  105.         kind of terminal is on the other end,  it  can  send  the
  106.         ASCII   characters  required  to  control  functions  not
  107.         supported by the option or an implementation.  In general
  108.         keeping all  NVDET  functions  out  of  the  data  stream
  109.         provides better flexibility.
  110.  
  111.      F__a_c_i_l_i_t_y_F__u_n_c_t_i_o_n_s  (for detailed semantics see Section 5.)
  112.  
  113.      IAC SB DET <DET facility subcommand><facility map> IAC SE
  114.  
  115.         where  <DET  facility  subcommand>  is  one  8-bit   byte
  116.  
  117.  
  118.                                 2
  119.  
  120. John Day                               Data Entry Terminal Option
  121. June 27,1977                                            NIC 40652
  122.                                                           RFC 731
  123.  
  124.  
  125.         indicating  the  class of the facilities to be described,
  126.         and <facility map> is a field of one or two  8-bit  bytes
  127.         containing  flags  describing  the facilities required or
  128.         desired by the sender.  The bits of the facility maps are
  129.         numbered from the right starting at zero.  Thus, if bit 2
  130.         is set the field will have a decimal  value  of  4.   The
  131.         values of the field are as follows:
  132.  
  133.         facility cmd:  EDIT FACILITIES     subcommand code: 1
  134.           facility map:                              bit numbers
  135.              Toroidal Cursor Addressing                  6
  136.              Incremental Cursor Addressing               5
  137.              Read Cursor Address                         4
  138.              Line Insert/Delete                          3
  139.              Char Insert/Delete                          2
  140.              Back Tab                                    1
  141.              Positive Addressing only                    0
  142.  
  143.         where:
  144.  
  145.         If the Toroidal Cursor Addressing bit is set, the  sender
  146.         requests  or  provides  that the SKIP TO LINE and SKIP TO
  147.         CHAR subcommands be supported.
  148.  
  149.         If the Incremental Cursor  Addressing  bit  is  set,  the
  150.         sender  requests or provides that the UP, DOWN, LEFT, and
  151.         RIGHT subcommands be supported.
  152.  
  153.         If the Read Cursor bit is set,  the  sender  requests  or
  154.         provides the READ CURSOR subcommand.
  155.  
  156.         If the Line Insert/Delete bit is set, the sender requests
  157.         or  provides  that  the  LINE  INSERT  and  LINE   DELETE
  158.         subcommands be supported.
  159.  
  160.         If the Char Insert/Delete bit is set, the sender requests
  161.         or  provides  that  the  CHAR  INSERT  and  CHAR   DELETE
  162.         subcommands be supported.
  163.  
  164.         If the Back Tab  bit  is  set,  the  sender  requests  or
  165.         provides that the BACK TAB subcommand be supported.
  166.  
  167.         If the Positive Addressing bit is set, then the sender is
  168.         informing the receiver that it can only move  the  cursor
  169.         in  the  positive direction.  (Note:  Terminals that have
  170.         this property also have a Home function to  get  back  to
  171.         the beginning.)
  172.  
  173.         facility cmd:  ERASE FACILITIES     subcommand code:  2
  174.           facility map:                                bit numbers
  175.  
  176.  
  177.                                 3
  178.  
  179. John Day                               Data Entry Terminal Option
  180. June 27,1977                                            NIC 40652
  181.                                                           RFC 731
  182.  
  183.  
  184.              Erase Field                                     4
  185.              Erase Line                                      3
  186.              Erase Rest of Screen                            2
  187.              Erase Rest of Line                              1
  188.              Erase Rest of Field                             0
  189.  
  190.         where:
  191.  
  192.         If a bit of the facility map for this facility command is
  193.         set,  the  sender  requests  or  provides  the   facility
  194.         indicated by the bit.  For a more complete description of
  195.         each  of  these functions see the Erase Functions section
  196.         below.
  197.  
  198.         facility cmd:  TRANSMIT FACILITIES     subcommand code:  3
  199.           facility map:                      bit numbers
  200.              Data Transmit                         5
  201.              Transmit Line                         4
  202.              Transmit Field                        3
  203.              Transmit Rest of Screen               2
  204.              Transmit Rest of Line                 1
  205.              Transmit Rest of Field                0
  206.  
  207.         where:
  208.  
  209.         If a bit of the facility map for this facility command is
  210.         set,  the  sender  requests  or  provides  the   facility
  211.         indicated by the bit.  For a more complete description of
  212.         each  of  these  functions  see  the  Transmit  Functions
  213.         section below.
  214.  
  215.         facility cmd:  FORMAT FACILITIES     subcommand code:  4
  216.           facility map:                               bit numbers
  217.                                         byte 0
  218.              Repeat                                         4
  219.              Blinking                                       3
  220.              Reverse Video                                  2
  221.              Right Justification                            1
  222.              Overstrike                                     0
  223.  
  224.                                         byte 1
  225.              Protection On/Off                              6
  226.              Protection                                     5
  227.              Alphabetic-only Protection                     4
  228.              Numeric-only Protection                        3
  229.              Intensity                                      0-2
  230.  
  231.         where:
  232.  
  233.         If the Repeat bit is set the sender requests or  provides
  234.  
  235.  
  236.                                 4
  237.  
  238. John Day                               Data Entry Terminal Option
  239. June 27,1977                                            NIC 40652
  240.                                                           RFC 731
  241.  
  242.  
  243.         the REPEAT subcommand.
  244.  
  245.         If the Blinking  bit  is  set,  the  sender  requests  or
  246.         provides  the ability to highlight a string of characters
  247.         by causing them to blink.
  248.  
  249.         If the Reverse Video bit is set, the sender  requests  or
  250.         provides  the ability to highlight a string of characters
  251.         by "reversing the video image," i.e., if  the  characters
  252.         are  normally  displayed  as  black characters on a white
  253.         background, this is reversed to be white characters on  a
  254.         black background, or vice versa.
  255.  
  256.         If  the  Right  Justification  bit  is  set,  the  sender
  257.         requests or provides the ability to cause entries of data
  258.         to be right justified in the field.
  259.  
  260.         If the Overstrike bit is  set,  the  sender  requests  or
  261.         provides  the  ability  to superimpose one character over
  262.         another on the screen much  like  a  hard  copy  terminal
  263.         would  do if the print mechanism struck the same position
  264.         on the paper with different characters.
  265.  
  266.         If the Protection On/Off bit is set, the sender  requests
  267.         or  provides  the  ability  to  turn  on  and  off  field
  268.         protection.
  269.  
  270.         If the Protection bit is  set,  the  sender  requests  or
  271.         provides  the  ability  to  protect  certain  strings  of
  272.         characters displayed on the screen from being altered  by
  273.         the  user of the terminal.  Setting this bit also implies
  274.         that   ERASE   UNPROTECTED   and   TRANSMIT   UNPROTECTED
  275.         subcommands (see below) are supported.
  276.  
  277.         If the Alphabetic-only Protection bit is set, the  sender
  278.         requests or provides the ability to constrain the user of
  279.         the  terminal such that he may only enter alphabetic data
  280.         into certain areas of the screen.
  281.  
  282.         If the Numeric-only Protection bit  is  set,  the  sender
  283.         requests or provides the ability to constrain the user of
  284.         the  terminal  such that he may only enter numerical data
  285.         into certain areas of the screen.
  286.  
  287.         The three bits of the  Intensity  field  will  contain  a
  288.         positive  binary  integer indicating the number of levels
  289.         of intensity that the sender  requests  or  provides  for
  290.         displaying the data.  The value of the 3 bit field should
  291.         be interpreted in the following way:
  292.  
  293.  
  294.  
  295.                                 5
  296.  
  297. John Day                               Data Entry Terminal Option
  298. June 27,1977                                            NIC 40652
  299.                                                           RFC 731
  300.  
  301.  
  302.            1        one visible intensity
  303.            2        two intensities; normal and bright
  304.            3        three intensities; off, normal, and bright
  305.           >3        >3 intensities; off, and the remaining levels
  306.                     proportioned from dimmest to brightest intensity.
  307.  
  308.         For the all of the above commands, if the appropriate bit
  309.         in <facility map> is not set, then the  sender  does  not
  310.         request or provide that facility.
  311.  
  312.  
  313.      E__d_i_t_i_n_g_F__u_n_c_t_i_o_n_s
  314.  
  315.         IAC SB DET MOVE CURSOR <x><y> IAC SE  subcommand code: 5
  316.  
  317.         where <x> is an 8-bit byte containing a  positive  binary
  318.         integer   representing  the  character  position  of  the
  319.         cursor, <y> is an 8-bit byte containing a positive binary
  320.         integer representing the line position of the cursor.
  321.  
  322.         This subcommand moves the cursor to the  absolute  screen
  323.         address (x,y) with the following boundary conditions:
  324.  
  325.           if x>M-1, set x=M-1 and send an ERROR subcommand
  326.           if y>N-1, set y=N-1 and send an  ERROR subcommand
  327.  
  328.         This describes a finite plane topology on the screen.
  329.  
  330.         IAC SB DET SKIP TO LINE <y> IAC SE    subcommand code: 6
  331.  
  332.         where <y> is a positive 8-bit binary number.
  333.  
  334.         This subcommand moves the cursor to the  absolute  screen
  335.         line y.  x remains constant.  For values of y>N-1
  336.           y = y mod N.
  337.  
  338.         IAC SB DET SKIP TO CHAR <x> IAC SE   subcommand code: 7
  339.  
  340.         where <x> is a positive 8-bit binary number.
  341.  
  342.         This  subcommand  moves  the  cursor  to   the   absolute
  343.         character  position  x.  y remains constant, unless x>M-1
  344.         in which case:
  345.           x' = (x mod M)
  346.           y' = (y+(x DIV N))
  347.           where x' and y' are the new values of  the cursor.
  348.  
  349.         These last two subcommands define a toroidal topology  on
  350.         the screen.
  351.  
  352.  
  353.  
  354.                                 6
  355.  
  356. John Day                               Data Entry Terminal Option
  357. June 27,1977                                            NIC 40652
  358.                                                           RFC 731
  359.  
  360.  
  361.         IAC SB DET UP IAC SE            subcommand code:  8
  362.         IAC SB DET DOWN IAC SE          subcommand code:  9
  363.         IAC SB DET LEFT IAC SE          subcommand code: 10
  364.         IAC SB DET RIGHT IAC SE         subcommand code: 11
  365.  
  366.         These subcommands are provided as a convenience for  some
  367.         terminals.   The  commands  UP, DOWN, LEFT, and RIGHT are
  368.         defined as
  369.  
  370.         UP:         (x,y)=(x, y-1 mod N)
  371.         DOWN:       (x,y)=(x, y+1 mod N)
  372.         LEFT:       (x,y)=(x-1, y); if x=0 then x-1 = 0
  373.         RIGHT:      (x,y)=(x+1 mod M, y) and y = y+1 if x+1>M-1
  374.  
  375.         Note:  DOWN, LEFT, and RIGHT cannot always be replaced by
  376.         the  ASCII  codes  for  linefeed,  backspace,  and  space
  377.         respectively.   The latter are format effectors while the
  378.         former are cursor controls.
  379.  
  380.         IAC SB DET HOME IAC SE      subcommand code:  12
  381.  
  382.         This subcommand positions the cursor to (0,0).   This  is
  383.         equivalent  to  a MOVE CURSOR 0,0 or the sequence SKIP TO
  384.         LINE 0, SKIP TO CHAR 0.  This subcommand is provided  for
  385.         convenience,  since  most terminals have it as a separate
  386.         control.
  387.  
  388.         IAC SB DET LINE INSERT IAC SE     subcommand code:  13
  389.  
  390.         This subcommand inserts a line of spaces between lines  y
  391.         (the  current  line,  determined  by  the position of the
  392.         cursor) and line y-1.  Lines y through N-2 move down  one
  393.         line,  i.e.  line  y  becomes line y+1;  y+1 becomes y+2,
  394.         ...; N-2 becomes N-1.  Line N-1 is lost off the bottom of
  395.         the  screen.   The  position  of   the   cursor   remains
  396.         unchanged.
  397.  
  398.         IAC SB DET LINE DELETE IAC SE     subcommand code:  14
  399.  
  400.         This subcommand deletes line y where  y  is  the  current
  401.         line  position of the cursor.  Lines y+1 through N-1 move
  402.         up one line, i.e.  line y+1 becomes line y;  y+2  becomes
  403.         y+1;  ...;  N-1  becomes N-2.  The N-1st line position is
  404.         set  to  all  spaces.   The   cursor   position   remains
  405.         unchanged.
  406.  
  407.         IAC SB DET CHAR INSERT IAC SE     subcommand code: 15
  408.  
  409.         This subcommand inserts the next character  in  the  data
  410.         stream  between  the xth and x-1st characters, where x is
  411.  
  412.  
  413.                                 7
  414.  
  415. John Day                               Data Entry Terminal Option
  416. June 27,1977                                            NIC 40652
  417.                                                           RFC 731
  418.  
  419.  
  420.         the current character position of the  cursor.   The  xth
  421.         through  M-2nd  characters  on  the  line are shifted one
  422.         character positon to the right.   The  new  character  is
  423.         inserted   at   the  vacated  xth  position.   The  M-1st
  424.         character is lost.  The position of  the  cursor  remains
  425.         unchanged.
  426.  
  427.         IAC SB DET CHAR DELETE IAC SE     subcommand code:  16
  428.  
  429.         This subcommand deletes the character on  the  screen  at
  430.         the x-th position.  The x-th character is removed and the
  431.         characters  x+1  through  M-1  are  shifted one character
  432.         position to the left to become  the  x-th  through  M-2nd
  433.         characters.   The M-1st character position is left empty.
  434.         (For most terminals it will be set to a  NUL  or  space.)
  435.         The cursor position remains unchanged.
  436.  
  437.         IAC SB DET READ CURSOR IAC SE     subcommand code:  17
  438.  
  439.         This subcommand requests the receiver to send the present
  440.         position of the cursor to the sender.
  441.  
  442.         IAC SB DET CURSOR POSITION <x><y> IAC SE
  443.                                           subcommand code:  18
  444.  
  445.         where <x> and <y> are positive 8-bit binary integers.
  446.  
  447.         This subcommand is sent by  a  Telnet  implementation  in
  448.         response  to  a  READ  CURSOR  subcommand  to  convey the
  449.         coordinates of the cursor to the other side.  Note: x  is
  450.         less than  M and y is less than  N.
  451.  
  452.         IAC  SB DET REVERSE TAB IAC SE     subcommand code:  19
  453.  
  454.         This subcommand causes the cursor to move to the previous
  455.         tab position.  If none exists on the  present  line,  the
  456.         cursor  moves  to the previous line and so on until a tab
  457.         is found or the address (0,0) is encountered.  When field
  458.         protection is in effect the cursor moves to the beginning
  459.         of the preceding unprotected field.
  460.  
  461.      T__r_a_n_s_m_i_t_F__u_n_c_t_i_o_n_s  (For detailed semantics see Section 5.)
  462.  
  463.         IAC SB DET TRANSMIT SCREEN IAC SE     subcommand code: 20
  464.  
  465.         This subcommand  causes  the  terminal  to  transmit  all
  466.         characters   on   the   screen  from  position  (0,0)  to
  467.         (M-1,N-1).   The  cursor  will  be  at  (0,0)  after  the
  468.         operation is complete.
  469.  
  470.  
  471.  
  472.                                 8
  473.  
  474. John Day                               Data Entry Terminal Option
  475. June 27,1977                                            NIC 40652
  476.                                                           RFC 731
  477.  
  478.  
  479.         IAC SB DET TRANSMIT UNPROTECTED IAC SE
  480.                                         subcommand code:  21
  481.  
  482.         This subcommand  causes  the  terminal  to  transmit  all
  483.         characters  in  unprotected fields from position (0,0) to
  484.         (M-1,N-1).  The unprotected fields are separated  by  the
  485.         field  separator subcommand.  The cursor will be at (0,0)
  486.         or at the beginning of the first unprotected field  after
  487.         the operation is complete.
  488.  
  489.         IAC SB DET TRANSMIT LINE IAC SE      subcommand code:  22
  490.  
  491.         This subcommand causes the terminal to transmit all  data
  492.         on  the  yth  line  where  y is determined by the present
  493.         position of the cursor.   Data  is  sent  from  character
  494.         position  (0,y)  to  the  end-of-line or position (M-1,y)
  495.         whichever comes first.  The  cursor  position  after  the
  496.         transmission  is  one character position after the end of
  497.         line  condition  or  the  beginning  of  the  next  line,
  498.         (0,y+1).
  499.  
  500.         IAC SB DET TRANSMIT FIELD IAC SE     subcommand code:  23
  501.  
  502.         This subcommand causes the terminal to transmit all  data
  503.         in  the  field  presently  occupied  by  the cursor.  The
  504.         cursor position after the operation is  complete  is  one
  505.         character position after the end of the field or, if that
  506.         position  is  protected,  at  the  beginning  of the next
  507.         unprotected field.
  508.  
  509.         IAC SB DET TRANSMIT REST OF SCREEN IAC SE
  510.                                         subcommand code:  24
  511.  
  512.         This subcommand  causes  the  terminal  to  transmit  all
  513.         characters on the screen from position (x,y) to (M-1,N-1)
  514.         or  until  the end of text.   (x,y) is the current cursor
  515.         position.  The cursor position after the operation is one
  516.         character position after  the  last  text  character,  or
  517.         (0,0) if the last filled character position is (M-1,N-1).
  518.  
  519.         IAC SB DET TRANSMIT REST OF LINE IAC SE
  520.                                         subcommand code:  25
  521.  
  522.         This subcommand  causes  the  terminal  to  transmit  all
  523.         characters on the yth line from position (x,y) to the end
  524.         of  line  or (M-1,y) whichever comes first.  (x,y) is the
  525.         current cursor position.  The cursor position  after  the
  526.         operation  is  one  character  position  after  the  last
  527.         character of the line or the first character of the  next
  528.         line.
  529.  
  530.  
  531.                                 9
  532.  
  533. John Day                               Data Entry Terminal Option
  534. June 27,1977                                            NIC 40652
  535.                                                           RFC 731
  536.  
  537.  
  538.  
  539.         IAC SB DET TRANSMIT REST OF FIELD IAC SE
  540.                                         subcommand code:  26
  541.  
  542.         This subcommand causes the receiver to transmit the  rest
  543.         of  the characters in the field currently occupied by the
  544.         cursor.  The cursor position after the  operation  is  at
  545.         the beginning of the next field.
  546.  
  547.         IAC SB DET DATA TRANSMIT <x><y> IAC SE
  548.                                         subcommand code:  27
  549.  
  550.         This subcommand is used to preface  data  sent  from  the
  551.         terminal  in  response  to  a  user  action or a TRANSMIT
  552.         command.  The parameters <x> and <y> indicate the initial
  553.         position of the cursor.   See  the  Transmit  Subcommands
  554.         subsection in Section 5 for more details.
  555.  
  556.  
  557.      E__r_a_s_e_F__u_n_c_t_i_o_n_s
  558.  
  559.         IAC SB DET ERASE SCREEN IAC SE     subcommand code: 28
  560.  
  561.         This subcommand causes all characters to be removed  from
  562.         the  screen.   All  fields regardless of their attributes
  563.         are deleted.  The cursor  position  after  the  operation
  564.         will  be (0,0).  Most terminals set the erased characters
  565.         to either NUL or space characters.
  566.  
  567.         IAC SB DET ERASE LINE IAC SE     subcommand code:  29
  568.  
  569.         This subcommand causes all characters on the yth line  to
  570.         be  removed  from  the screen, where y is the line of the
  571.         current cursor position.  All fields regardless of  their
  572.         attributes  are  deleted.  The cursor position after this
  573.         operation will be (0,y).  Note:  This  operation  can  be
  574.         easily  simulated  by  the  sequence:   LINE DELETE, LINE
  575.         INSERT.  However, the order is important to  insure  that
  576.         no data is lost off the bottom of the screen.
  577.  
  578.         IAC SB DET ERASE FIELD IAC SE     subcommand code:  30
  579.  
  580.         This  subcommand  causes  all  characters  in  the  field
  581.         occupied  by  the  cursor  to  be  removed.   The  cursor
  582.         position after the operation is at the beginning  of  the
  583.         field.
  584.  
  585.         IAC SB DET ERASE REST OF SCREEN IAC SE
  586.                                         subcommand code:  31
  587.  
  588.  
  589.  
  590.                                10
  591.  
  592. John Day                               Data Entry Terminal Option
  593. June 27,1977                                            NIC 40652
  594.                                                           RFC 731
  595.  
  596.  
  597.         This subcommand causes all characters from position (x,y)
  598.         to (M-1,N-1) to be removed from the screen.   All  fields
  599.         regardless  of  their attributes are deleted.  The cursor
  600.         position after  the  operation  is  unchanged.   This  is
  601.         equivalent  to  doing  an  ERASE REST OF LINE plus a LINE
  602.         DELETE for lines greater than y.
  603.  
  604.         IAC SB DET ERASE REST OF LINE IAC SE
  605.                                         subcommand code:  32
  606.  
  607.         This subcommand causes all characters from position (x,y)
  608.         to (M-1,y) to be  removed  from  the  screen  All  fields
  609.         regardless  of  their attributes are deleted.  The cursor
  610.         position after the operation is unchanged.
  611.  
  612.         IAC SB DET ERASE REST OF FIELD IAC SE
  613.                                         subcommand code:  33
  614.  
  615.         This subcommand causes all characters from position (x,y)
  616.         to the end of the current field to be  removed  from  the
  617.         screen.   The  cursor  position  after  the  operation is
  618.         unchanged.
  619.  
  620.         IAC SB DET ERASE UNPROTECTED IAC SE
  621.                                         subcommand code:  34
  622.  
  623.         This subcommand causes all characters on  the  screen  in
  624.         unprotected  fields  to  be removed from the screen.  The
  625.         cursor position after the operation is at  (0,0)  or,  if
  626.         that position is protected, at the beginning of the first
  627.         unprotected field.
  628.  
  629.      F__o_r_m_a_t_F__u_n_c_t_i_o_n_s
  630.  
  631.         IAC SB DET FORMAT DATA <format map><count> IAC SE
  632.                                         subcommand code:  35
  633.  
  634.         where <format  map>  is  an  8-bit  byte  containing  the
  635.         following flags:
  636.  
  637.           Blinking                                 7
  638.           Reverse Video                            6
  639.           Right Justification                      5
  640.           Protection                              3-4
  641.           Intensity                               0-2
  642.  
  643.         where:
  644.  
  645.         If the Blinking  bit  is  set,  the  following  field  of
  646.         <count>  characters  should  have  the Blinking attribute
  647.  
  648.  
  649.                                11
  650.  
  651. John Day                               Data Entry Terminal Option
  652. June 27,1977                                            NIC 40652
  653.                                                           RFC 731
  654.  
  655.  
  656.         applied  to it by the receiver.
  657.  
  658.         If the Reverse Video bit is set, the following  field  of
  659.         <count>  characters  should  be displayed by the receiver
  660.         with video reversed.
  661.  
  662.         If the Right Justification bit is set, the input  entered
  663.         into  the  field  of  <count>  characters should be right
  664.         justified.
  665.  
  666.         The Protection field is two bits wide and may take on the
  667.         following values:
  668.  
  669.           0         no protection
  670.           1         protected
  671.           2         alphabetic only
  672.           3         numeric only
  673.  
  674.         The protection attribute specifies that  the  other  side
  675.         may  modify  any  character  (no  protection),  modify no
  676.         characters   (protected),   enter    only    alphabetical
  677.         characters  (A-Z,  and  a-z)  (alphabetic only), or enter
  678.         only numerical characters (0-9,+,.,and -) (numeric  only)
  679.         in the following field of <count> bytes.
  680.  
  681.         The  Intensity  field  is  3  bits  wide  and  should  be
  682.         interpreted in the following way:
  683.  
  684.         The values 0-6 should be used as  an  indication  of  the
  685.         relative  brightness  to  be  used  when  displaying  the
  686.         characters in or entered into the following field <count>
  687.         characters wide.  The  number  of  levels  of  brightness
  688.         available  should  have  been  obtained previously by the
  689.         Format Facility  subcommand.   The  exact  algorithm  for
  690.         mapping these values to the available levels of intensity
  691.         is  left  to  the  implementors.   A  value  of  7 in the
  692.         intensity field indicates that the brightness  should  be
  693.         off,  and  any  characters  in  or entered into the field
  694.         should not be displayed.
  695.  
  696.         <count> is 2  bytes  that  should  be  interpreted  as  a
  697.         positive 16-bit binary integer representing the number of
  698.         characters  following  this command which are affected by
  699.         it.
  700.  
  701.         Data sent to the terminal or the Using Host for unwritten
  702.         areas of the screen not in the scope of the count  should
  703.         be  displayed  with the default values of the format map.
  704.         The default values are  No  Blinking,  Normal  Video,  No
  705.         Justification, No Protection and Normal Intensity.
  706.  
  707.  
  708.                                12
  709.  
  710. John Day                               Data Entry Terminal Option
  711. June 27,1977                                            NIC 40652
  712.                                                           RFC 731
  713.  
  714.  
  715.  
  716.         This subcommand is used to format data to be displayed on
  717.         the screen of the terminal.  The <format  map>  describes
  718.         the  attributes  that the field <count> bytes wide should
  719.         have.  This field is to start  at  the  position  of  the
  720.         cursor  when the command is acted upon.  The next <count>
  721.         displayable characters in the data  stream  are  used  to
  722.         fill  the  field.   Subsequent  REPEAT subcommands may be
  723.         used to specify the  contents  of  this  field.   If  the
  724.         sender  specifies  attributes  that  have not been agreed
  725.         upon by the use of the Format  Facility  subcommand,  the
  726.         Telnet  process  should  send  an Error Subcommand to the
  727.         sender, but format the screen as if the bit had not  been
  728.         set.
  729.  
  730.         IAC SB DET REPEAT <count><char> IAC SE
  731.                                         subcommand code:  36
  732.  
  733.         where  <count>  is  a  positive  8-bit  binary   integer.
  734.         <char> is an 8-bit byte containing an ASCII character.
  735.  
  736.         This subcommand is used to perform  data  compression  on
  737.         data  being  transferred  to  the  terminal  by  encoding
  738.         strings of identical characters as the  character  and  a
  739.         count.   The  repeated  characters may be part of a field
  740.         specified
  741.  
  742.         IAC SB DET SUPPRESS PROTECTION <negotiation> IAC SE
  743.                                             subcommand code:  37
  744.  
  745.         where <negotiation> may have the  values  of  the  Telnet
  746.         option negotiation:
  747.  
  748.                     251                 WILL
  749.                     252                 WONT
  750.                     253                 DO
  751.                     254                 DONT
  752.  
  753.         This subcommand is used to suppress the field  protection
  754.         in  a  non-destructive manner.  Many data entry terminals
  755.         provide the means by which protection may  be  turned  on
  756.         and  off  without modifying the contents of the screen or
  757.         the terminal's  memory.   Thus,  the  protection  may  be
  758.         turned  off  and back on without retransmitting the form.
  759.         The default setting of the option is that  protection  is
  760.         on, in other words
  761.  
  762.                     IAC SB DET SUPPRESS PROTECTION WONT IAC SE
  763.                     IAC SB DET SUPPRESS PROTECTION DONT IAC SE
  764.  
  765.  
  766.  
  767.                                13
  768.  
  769. John Day                               Data Entry Terminal Option
  770. June 27,1977                                            NIC 40652
  771.                                                           RFC 731
  772.  
  773.  
  774.         Negotiation of this subcommand follows the same rules  as
  775.         negotiations of the Telnet options.
  776.  
  777.         IAC SB DET FIELD SEPARATOR IAC SE    subcommand code:  38
  778.  
  779.         It is necessary when transmitting  only  the  unprotected
  780.         portion  of  the screen to provide a means for delimiting
  781.         the fields.   Existing  DET's  use  a  variety  of  ASCII
  782.         characters  such as Tab, Group Separator, Unit Separator,
  783.         etc.  In order to maintain transparency of the NVDET this
  784.         subcommand is used to separate the fields.  Clearly, this
  785.         incurs  rather  high  overhead.   This  overhead  can  be
  786.         avoided by using the Byte Macro Option (see Appendix 3).
  787.  
  788.      M__i_s_c_e_l_l_a_n_e_o_u_s_C__o_m_m_a_n_d_s
  789.  
  790.         IAC SB DET FN <code> IAC SE     subcommand code:  39
  791.  
  792.         where:  <code> is one byte.
  793.  
  794.         Many data-entry terminals provide  a  set  of  "function"
  795.         keys  which  when pressed send a one-character command to
  796.         the server.  This subcommand describes such  a  facility.
  797.         The  values  of  the <code> field are defined by the user
  798.         and server.  The option  merely  provides  the  means  to
  799.         transfer the information.
  800.  
  801.         IAC SB DET ERROR <cmd> <error code> IAC SE
  802.                                         subcommand code:  40
  803.  
  804.         where:
  805.                <cmd> is a byte containing the subcommand code  of
  806.         the subcommand in error.
  807.                 <error code> is a byte containing an error  code.
  808.         (For a list of the defined error codes see Appendix 2.)
  809.  
  810.         This  subcommand  is   provided  to  allow   DET   option
  811.         implementations  to  report  errors  they  detect  to the
  812.         corresponding Telnet process.  At this point it is  worth
  813.         reiterating  that  the  philosophy of this option is that
  814.         when an error is detected it should be reported; however,
  815.         the implementation should  attempt  its  best  effort  to
  816.         carry out the intent of the subcommand or data in error.
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.                                14
  827.  
  828. John Day                               Data Entry Terminal Option
  829. June 27,1977                                            NIC 40652
  830.                                                           RFC 731
  831.  
  832.  
  833. 3.  Default and Minimal Implementation Specifications
  834.  
  835.      D__e_f_a_u_l_t
  836.  
  837.         WON'T DET -- DON'T DET
  838.  
  839.         Neither host wishes to use the Data Entry Terminal option.
  840.  
  841.      M__i_n_i_m_a_l_I__m_p_l_e_m_e_n_t_a_t_i_o_n
  842.  
  843.           DET EDIT FACILITIES
  844.           DET ERASE FACILITIES
  845.           DET TRANSMIT FACILITIES
  846.           DET FORMAT FACILITIES
  847.           DET MOVE CURSOR <x><y>
  848.           DET HOME
  849.           DET ERASE SCREEN
  850.           DET TRANSMIT SCREEN
  851.           DET FORMAT DATA
  852.           DET ERROR <cmd> <error code>
  853.  
  854.         In  the  case  of  formatting  the  data,   the   minimal
  855.         implementation  should  be able to support a low and high
  856.         level  of  intensity  and  protection  for  all   or   no
  857.         characters in a field.  These functions, however, are not
  858.         required.
  859.  
  860.         The minimal implementation also requires that the  Output
  861.         Line  Width  and  Output  Page  Size  Telnet  options  be
  862.         supported.
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.                                15
  886.  
  887. John Day                               Data Entry Terminal Option
  888. June 27,1977                                            NIC 40652
  889.                                                           RFC 731
  890.  
  891.  
  892. 4.  Motivation
  893.  
  894.      The Telnet protocol was originally  designed  to  provide  a
  895.      means  for  scroll-mode  terminals,  such  as  the  standard
  896.      teletype, to communicate with processes through the network.
  897.      This was suitable for the vast  majority  of  terminals  and
  898.      users  at  that  time.   However,  as use of the network has
  899.      increased into  other  areas,  especially  areas  where  the
  900.      network  is  considered  to provide a production environment
  901.      for other work, the desires and  requirements  of  the  user
  902.      community  have  changed.   Therefore,  it  is  necessary to
  903.      consider  supporting  facilities  that  were  not  initially
  904.      supported.   This  Telnet  option  attempts  to  do that for
  905.      applications that require data entry terminals.
  906.  
  907.      This option in effect defines the Network Virtual Data Entry
  908.      Terminal.  Although the description of this option is  quite
  909.      long, this does not imply that the Telnet protocol is a poor
  910.      vehicle  for this facility.  Data Entry Terminals are rather
  911.      complex and varied in their abilities.  This option attempts
  912.      to support both the minimal set of useful functions that are
  913.      either common to all or can be easily simulated and the more
  914.      sophisticated functions supplied in some terminals.
  915.  
  916.      Unlike most real data entry  terminals  where  the  terminal
  917.      functions  are  encoded  into  one or more characters of the
  918.      native character set, this option performs all such controls
  919.      within the Telnet  subnegotiation  mechanism.   This  allows
  920.      programs  that  are  intimately  familiar  with  the kind of
  921.      terminal they are communicating with to send  commands  that
  922.      may   not   be   supported  by  either  the  option  or  the
  923.      implementation.  In other words, it is possible  to  operate
  924.      in  a  "raw"  or  at  least "rare" mode using as much of the
  925.      option as necessary.
  926.  
  927.      Although many data entry  terminals  support  a  variety  of
  928.      peripheral  devices such as printers, cassettes, etc.  it is
  929.      beyond  the  scope  of  this  option   to   entertain   such
  930.      considerations.   A  separate  option  should  be defined to
  931.      handle this aspect of these devices.
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.                                16
  945.  
  946. John Day                               Data Entry Terminal Option
  947. June 27,1977                                            NIC 40652
  948.                                                           RFC 731
  949.  
  950.  
  951. 5.  Description
  952.  
  953.  
  954.  
  955. G__e_n_e_r_a_l_N__o_t_e_s
  956.  
  957.      All implementations of this option are required to support a
  958.      certain minimal set of  the  subcommands  for  this  option.
  959.      Section  3  contains  a  complete list of the subcommands in
  960.      this minimal set.   In  keeping  with  the  Telnet  protocol
  961.      philosophy that an implementation should not have to be able
  962.      to parse commands it does not implement, every subcommand of
  963.      this  option  is  either in the minimal set or is covered by
  964.      one of the facility  subcommands.   An  implementation  must
  965.      "negotiate"  with  its  correspondent  for permission to use
  966.      subcommands not in the minimal set before using  them.   For
  967.      details of this negotiation process see the section below on
  968.      facility subcommands.
  969.  
  970.      Most data entry terminals are used in a  half  duplex  mode.
  971.      (Although  most  DET's  on  the market can be used either as
  972.      data entry terminals or as standard  interactive  terminals,
  973.      we  are  only concerned here with their use as DET's.)  When
  974.      this option is used, it  is  suggested  that  the  following
  975.      Telnet   options   be   refused:   Echo,  Remote  Controlled
  976.      Transmission and Echoing, and Suppress  Go-Ahead.   However,
  977.      this  option  could  be used to support a simple full duplex
  978.      CRT  based  application  using  the  basic  cursor   control
  979.      functions  provided  here.   For these cases, one or more of
  980.      the above list of  options might be required.   (Support  of
  981.      sophisticated   interactive   calligraphic  applications  is
  982.      beyond the scope of this   option  and  should  be  done  by
  983.      another option or the Network Graphics Protocol.)
  984.  
  985.      In RFC 728, it was noted that a  synch  sequence  can  cause
  986.      undesired  interactions between Telnet Control functions and
  987.      the data stream.  A  synch  sequence  causes  data  but  not
  988.      control  functions  to  be  flushed.   If a control function
  989.      which has an effect on the  data immediately following it is
  990.      present in the data stream when a synch sequence occurs, the
  991.      control function will have its effect not  on  the  intended
  992.      data  but  on  the data immediately following the Data Mark.
  993.      The  following  DET  subcommands  are  susceptible  to  this
  994.      pitfall:
  995.  
  996.                     CHAR INSERT
  997.                     DATA TRANSMIT
  998.                     FORMAT DATA
  999.  
  1000.      The undesired interactions are best avoided by the  receiver
  1001.  
  1002.  
  1003.                                17
  1004.  
  1005. John Day                               Data Entry Terminal Option
  1006. June 27,1977                                            NIC 40652
  1007.                                                           RFC 731
  1008.  
  1009.  
  1010.      of  the  synch  sequence  deleting these subcommands and all
  1011.      data associated with them before continuing to  process  the
  1012.      control  functions.   This implies that the Data Mark should
  1013.      not occur in the middle of the data  associated  with  these
  1014.      subcommands.
  1015.  
  1016. F__a_c_i_l_i_t_y_S__u_b_c_o_m_m_a_n_d_s
  1017.  
  1018.      These four subcommands are  used  by  the  User  and  Server
  1019.      implementations  to negotiate the subcommands and attributes
  1020.      of the terminal that may be utilized.  This negotiation  can
  1021.      be  viewed  as  the  terminal  (User  Host)  indicating what
  1022.      facilities are provided and the Server Host (or  application
  1023.      program) indicating what facilities are desired.
  1024.  
  1025.      W__h_e_n_S__e_n_t:_  A Server Telnet  implementation  using  the  DET
  1026.      option must send a facility subcommand requesting the use of
  1027.      a  particular  subcommand  or  terminal attribute not in the
  1028.      minimal  implementation  before  the  first  use   of   that
  1029.      subcommand  or  attribute.   The  User Telnet implementation
  1030.      should respond  as  quickly  as  possible  with  its  reply.
  1031.      Neither  the  User  nor Server are required to negotiate one
  1032.      subcommand  at  a  time.   Also,  a  Telnet   implementation
  1033.      responding  to a facility subcommand is not required to give
  1034.      permission only for that subcommand.   It may send a  format
  1035.      map  indicating  all  facilities  of  that  class  which  it
  1036.      supports.   However,  a  Telnet  implementation   requesting
  1037.      facilities  must send a facility subcommand before its first
  1038.      use  of  the  subcommand  regardless  of   whether   earlier
  1039.      negotiations  have  indicated the facility is provided.  The
  1040.      facility cannot  be  used  until  a  corresponding  facility
  1041.      subcommand   has   been   received.    There  are  no  other
  1042.      constraints on when the facility subcommands  may  be  sent.
  1043.      In  particular,  it  is  not necessary for an application to
  1044.      know at the beginning of a session all  facilities  that  it
  1045.      will use.
  1046.  
  1047.      A__c_t_i_o_n_W__h_e_n_R__e_c_i_e_v_e_d:_  There are two possible  actions  that
  1048.      may   be  taken  when  a  facility  subcommand  is  received
  1049.      depending on whether  the  receiver  is  a  requestor  or  a
  1050.      provider (User).
  1051.  
  1052.      Requestor:  When a facility  subcommand  is  received  by  a
  1053.      requestor  and it is in the state of Waiting for a Reply, it
  1054.      should go into the state of Not  Waiting.   It  should  then
  1055.      take  the  facility  map   it  had sent and form the logical
  1056.      intersection with  the  facility  map  received.   (For  the
  1057.      Intensity  attribute,  one  should  take  the minimum of the
  1058.      number received  and  the  number  requested.)   The  result
  1059.      indicates  the facilities successfully negotiated.  Note: if
  1060.  
  1061.  
  1062.                                18
  1063.  
  1064. John Day                               Data Entry Terminal Option
  1065. June 27,1977                                            NIC 40652
  1066.                                                           RFC 731
  1067.  
  1068.  
  1069.      the receiver is not in the Waiting  for  Reply  state,  then
  1070.      this is the provider case described next.
  1071.  
  1072.      Provider:  When  a  facility  subcommand   is  received,  it
  1073.      should send a facility subcommand with a facility map of the
  1074.      facilities  it provides as soon as possible.  It should then
  1075.      determine what  new  facilities  it  is  providing  for  the
  1076.      Requestor   by  forming  the  logical  intersection  of  the
  1077.      facility map received and the one sent.
  1078.  
  1079.      Note:  Although in most cases  the  requestor  will  be  the
  1080.      Server   Host  and  the  provider  will  be  the  User  Host
  1081.      supporting the terminal, this distinction may not always  be
  1082.      true.
  1083.  
  1084. T__r_a_n_s_m_i_t_S__u_b_c_o_m_m_a_n_d_s
  1085.  
  1086.      There are two kinds of transmit subcommands:  those used  to
  1087.      request  that  data  be  sent  to  the requestor, and one to
  1088.      preface data sent to the requestor.  The  first  kind  allow
  1089.      the requestor to control when, from where and to some degree
  1090.      how  much  data  is  transmitted  from  the terminal.  Their
  1091.      explanation is straightforward and may be found  in  Section
  1092.      2.
  1093.  
  1094.      Data may be sent from  the  terminal  as  a  result  of  two
  1095.      events:  the user of the terminal caused the transmission or
  1096.      in  response  to  a  transmit subcommand.  Some programs may
  1097.      wish to know from  where  on  the  screen  the  transmission
  1098.      began.   (This  is  reasonable,  since the terminal user may
  1099.      move the cursor around  considerably  before  transmitting.)
  1100.      Other  programs  may  not  need  such information.  The DATA
  1101.      TRANSMIT subcommand is provided in  case  this  function  is
  1102.      needed.  When used this subcommand prefaces data coming from
  1103.      the  terminal.   The parameters  <x> and <y> give the screen
  1104.      coordinates of the beginning of the transmission.  <x>  must
  1105.      be  less  than or equal to M-1 and  <y> must be less than or
  1106.      equal to N-1.  It is assumed that all data between this DATA
  1107.      TRANSMIT and the  next one starts at the  coordinates  given
  1108.      by  the  first  subcommand   and continues filling each line
  1109.      thereafter according to the constraints of  the  screen  and
  1110.      the  format  effectors  in the data.  Thus an intelligent or
  1111.      sloppy user-host DET implementation (depending on your point
  1112.      of view) need only include a DATA TRANSMIT  subcommand  when
  1113.      the  new  starting  point  is different from the last ending
  1114.      point.
  1115.  
  1116.  
  1117. 6.  Sample Interaction
  1118.  
  1119.  
  1120.  
  1121.                                19
  1122.  
  1123. John Day                               Data Entry Terminal Option
  1124. June 27,1977                                            NIC 40652
  1125.                                                           RFC 731
  1126.  
  1127.  
  1128. The nomenclature of RFC 726 will be used to describe this  example.   To
  1129. quote that RFC:
  1130.  
  1131.      "S:"  is sent from serving host to using host.
  1132.      "U:"  is sent from using host to serving host.
  1133.      "T:"  is entered by the terminal user.
  1134.      "P:"  is printed on the terminal.
  1135.  
  1136.      Text  surrounded  by  square  brackets([])  is  commentary.    Text
  1137.      surrounded  by angle brackets (<>) is to be taken as a single unit.
  1138.      E.g,  carriage  return  is  <cr>,  and  the  decimal  value  27  is
  1139.      represented <27>.
  1140.  
  1141.      We assume that the user  has  established  the  Telnet  connection,
  1142.      logged  on, and an application program has just been started either
  1143.      by the user directly or through a canned start up  procedure.   The
  1144.      presentation on the page is meant to merely group entities together
  1145.      and  does not imply the position of message boundaries.  One should
  1146.      assume that any part of the dialogue may be sent  as  one  or  many
  1147.      messages.   The  first  action  of  the  program  or  Telnet  is to
  1148.      negotiate the DET option:
  1149.  
  1150. S: <IAC><DO><DET>
  1151.  
  1152. U:  <IAC><WILL><DET>
  1153.  
  1154. S:<IAC><DO><OUTPUT PAGE SIZE>           [First negotiate the screen
  1155.                                         size.  In this case we are
  1156. U:<IAC><WILL><NAOP>                     asking the user the size of the
  1157.                                         terminal.  This could have been
  1158. U:<IAC><SB><NAOP><DR><25><IAC><SE>      done before the DET option was
  1159.                                         negotiated.]
  1160. S:<IAC><SB><NAOP><DS><0><IAC><SE>
  1161.  
  1162. S:<IAC><DO><OUTPUT LINE WIDTH>
  1163.  
  1164. U:<IAC><SB><NAOL><DR><80><IAC><SE>      [Defines the screen to be 25
  1165.                                         lines by 80 characters.
  1166. S:<IAC><SB><NAOL><DS><0><IAC><SE>       The server may use this
  1167.                                         information when formatting
  1168.                                         the screen.]
  1169. S:<IAC><SB><DET><FORMAT FACILITIES>     [Now set the terminal attributes.]
  1170.   <Repeat><Protection, 3 Levels
  1171.   Intensity><IAC><SE>
  1172.  
  1173. U:<IAC><SB><DET><FORMAT FACILITIES>
  1174.   <Repeat, Blinking><Protection, 3
  1175.   Levels Intensity><IAC><SE>
  1176.  
  1177. S:<IAC><SB><DET><ERASE SCREEN><IAC><SE>     [Erase the screen and
  1178.  
  1179.  
  1180.                                20
  1181.  
  1182. John Day                               Data Entry Terminal Option
  1183. June 27,1977                                            NIC 40652
  1184.                                                           RFC 731
  1185.  
  1186.  
  1187.                                             start sending the form.]
  1188.   <IAC><SB><DET><FORMAT DATA>
  1189.   <Protection=1, Intensity=1><0>
  1190.   <5><IAC><SE>Name:
  1191.  
  1192.   <IAC><SB><DET><MOVE CURSOR><0><1>
  1193.     <IAC><SE>
  1194.  
  1195.   <IAC><SB><DET><FORMAT DATA>
  1196.     Protection=1, Intensity=1><0>
  1197.     <8><IAC><SE>
  1198.  
  1199.   Address:
  1200.   <IAC><SB><MOVE CURSOR><0><4><IAC>
  1201.     <SE>
  1202.  
  1203.   <IAC><SB><DET><FORMAT DATA>
  1204.     Protection=1, Intensity=1><0>
  1205.     <17><IAC><SE>
  1206.   Telephone number:
  1207.  
  1208.   <IAC><SB><DET><MOVE CURSOR><32><4>
  1209.   <IAC><SE>
  1210.  
  1211.   <IAC><SB><DET><FORMAT DATA>
  1212.     Protection=1, Intensity=1><0>
  1213.     <24><IAC><SE>
  1214.   Social Security Number:
  1215.  
  1216.   <IAC><SB><DET><FORMAT DATA>           [Establish a field that doesn't
  1217.     <Protection=1, Intensity=7>         display what is typed into it.]
  1218.     <0><11><IAC><SE>
  1219.  
  1220.   <IAC><SB><DET><MOVE CURSOR><32>
  1221.     <5><IAC><SE>
  1222.  
  1223.   <IAC><SB><DET><FORMAT FACILITIES>     [Get permission to use Blinking
  1224.     <Blinking><0><IAC><SE>              Attribute.]
  1225.  
  1226. U:<IAC><SB><DET><FORMAT FACILITIES>
  1227.     <Repeat, Blinking><Protection,
  1228.     3 Levels Intensity><IAC><SE>
  1229.  
  1230. S:<IAC><SB><DET><FORMAT DATA>
  1231.   <Blinking=1, Protection=1,
  1232.   Intensity=1><0><29><IAC><SE>
  1233.  
  1234.   Your SSN will not be printed.
  1235.  
  1236.   <IAC><SB><DET><HOME><IAC><SE>
  1237.  
  1238.  
  1239.                                21
  1240.  
  1241. John Day                               Data Entry Terminal Option
  1242. June 27,1977                                            NIC 40652
  1243.                                                           RFC 731
  1244.  
  1245.  
  1246.   <IAC><GA>
  1247.  
  1248. The previous exchange has placed a form on the screen that looks like:
  1249.  
  1250. Name:
  1251. Address:
  1252.  
  1253.  
  1254. Telephone Number:                       Social Security Number:
  1255.                                    "Your SSN will not be printed."
  1256.  
  1257. where the quoted string is blinking.
  1258.  
  1259. The terminal user is  now  free  to  fill  in  the  form  provided.   He
  1260. positions  the  cursor at the beginning of the first field (this usually
  1261. is done by hitting the tab key) and begins typing.  We do not show  this
  1262. interaction  since  it  does  not generate any interaction with the User
  1263. Telnet program or the network.  After the terminal  user  has  completed
  1264. filling in the form, he strikes the transmit key to send the unprotected
  1265. part  of the form, but first the User Telnet program negotiates the Byte
  1266. Macro Option to condense the Field Separator subcommand:
  1267.  
  1268. U:<IAC><DO><BM>                         [Negotiate Byte Macro Option.]
  1269.  
  1270. S:<IAC><WILL><BM>                       [Define decimal 166 to be the
  1271.                                         Field Separator subcommand
  1272. U:<IAC><SB><BM><DEFINE>                 (see Appendix 3)]
  1273.   <166><6><IAC SB DET FIELD
  1274.   SEPARATOR IAC SE><IAC><SE>
  1275.  
  1276. S:<IAC><SB><BM><ACCEPT><166>            [The server accepts the macro.]
  1277.   <IAC><SE>
  1278.  
  1279.  
  1280. U:<IAC><SB><DET><DATA TRANSMIT><0><6>
  1281.   <IAC><SE>
  1282.   John Doe <166> 1515 Elm St., Urbana, Il 61801
  1283.   <166> 217-333-9999 <166> 123-45-6789 <166>
  1284.  
  1285. S:<IAC><SB><DET><ERASE SCREEN><IAC><SE>
  1286.   Thank you.
  1287.  
  1288. And so on.
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.                                22
  1299.  
  1300. John Day                               Data Entry Terminal Option
  1301. June 27,1977                                            NIC 40652
  1302.                                                           RFC 731
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309. Appendix 1 - Subcommands, opcodes and syntax
  1310.  
  1311.  
  1312.  
  1313.                1    EDIT FACILITIES     <Facilty map>
  1314.                2    ERASE FACILITIES    <Facility map>
  1315.                3    TRANSMIT FACILITIES <Facility map>
  1316.                4    FORMAT FACILITIES    <Facility map 1> <Facility map 2>
  1317.                5    MOVE CURSOR          <x> <y>
  1318.                6    SKIP TO LINE         <y>
  1319.                7    SKIP TO CHAR         <x>
  1320.                8    UP
  1321.                9    DOWN
  1322.                10   LEFT
  1323.                11   RIGHT
  1324.                12   HOME
  1325.                13   LINE INSERT
  1326.                14   LINE DELETE
  1327.                15   CHAR INSERT
  1328.                16   CHAR DELETE
  1329.                17   READ CURSOR
  1330.                18   CURSOR POSITION      <x><y>
  1331.                19   REVERSE TAB
  1332.                20   TRANSMIT SCREEN
  1333.                21   TRANSMIT UNPROTECTED
  1334.                22   TRANSMIT LINE
  1335.                23   TRANSMIT FIELD
  1336.                24   TRANSMIT REST OF SCREEN
  1337.                25   TRANSMIT REST OF LINE
  1338.                26   TRANSMIT REST OF FIELD
  1339.                27   DATA TRANSMIT <x><y>
  1340.                28   ERASE SCREEN
  1341.                29   ERASE LINE
  1342.                30   ERASE FIELD
  1343.                31   ERASE REST OF SCREEN
  1344.                32   ERASE REST OF LINE
  1345.                33   ERASE REST OF FIELD
  1346.                34   ERASE UNPROTECTED
  1347.                35   FORMAT DATA <format map>
  1348.                36   REPEAT     <count><char>
  1349.                37   SUPPRESS PROTECTION <negotiation>
  1350.                38   FIELD SEPARATOR
  1351.                39   FN <code>
  1352.                40   ERROR  <cmd><error code>
  1353.  
  1354.  
  1355.  
  1356.  
  1357.                                23
  1358.  
  1359. John Day                               Data Entry Terminal Option
  1360. June 27,1977                                            NIC 40652
  1361.                                                           RFC 731
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369. Appendix 2 - Error Codes
  1370.  
  1371.  
  1372.  
  1373.                1    Facility not previously negotiated.
  1374.                2    Illegal subcommand code.
  1375.                3    Cursor Address Out of Bounds.
  1376.                4    Undefined FN value.
  1377.                4    Can't negotiate acceptable line width.
  1378.                5    Can't negotiate acceptable page length.
  1379.                6    Illegal parameter in subcommand.
  1380.                7    Syntax error in parsing subcommand.
  1381.                8    Too many parameters in subcommand.
  1382.                9    Too few parameters in subcommand.
  1383.                10   Undefined parameter value
  1384.                11   Unsupported combination of Format Attributes
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.                                24
  1417.  
  1418. John Day                               Data Entry Terminal Option
  1419. June 27,1977                                            NIC 40652
  1420.                                                           RFC 731
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.                Appendix 3 - Use of the Byte Macro Option
  1430.  
  1431.  
  1432.  
  1433.  
  1434.      One of the major drawbacks of the DET option is  that  because  the
  1435.      functions  are  encoded  as  Telnet option subnegotiations a fairly
  1436.      high overhead is incurred.  A function like Character Insert  which
  1437.      is encoded as a single byte in most terminals requires six bytes in
  1438.      the DET option.  Originally the only other solution that would have
  1439.      accomplished  the  same  transparency  that  the use of subcommands
  1440.      provides would  have  been  to  define  additional  Telnet  control
  1441.      functions.   However,  since  this would entail modification of the
  1442.      Telnet protocol itself, it was  felt  that  this  was  not  a  wise
  1443.      solution.    Since  then the Telnet Byte Macro Option (RFC 729) has
  1444.      been defined.  This option allows the user and  server  Telnets  to
  1445.      map  an arbitrary character string into a single byte which is then
  1446.      transferred over the net.  Thus the Byte Macro Option provides  the
  1447.      means  for  implementations  to avoid the overhead for heavily used
  1448.      subcommands.  The rest of this appendix suggests how the Byte Macro
  1449.      Option should be applied to the DET option.
  1450.  
  1451.      In keeping with the specification of the Byte Macro Option,   macro
  1452.      bytes  will  be  chosen  from  the  range 128 to 239.   For the DET
  1453.      option, it is suggested that macro  bytes be chosen by  adding  the
  1454.      subcommand  code to 128.  In addition, an unofficial DET subcommand
  1455.      might be defined indicating that each side was willing  to  support
  1456.      macro bytes for all subcommands (but not necessarily support all of
  1457.      the  subcommands  themselves)  according  to  this algorithm.  This
  1458.      subcommand would be:
  1459.  
  1460.      IAC SB DET DET-MACRO <negotiation> IAC SE
  1461.                                         subcommand code:  254
  1462.  
  1463.      where <negotiation> may  have  the  values  of  the  Telnet  option
  1464.      negotiation:
  1465.                     251       WILL
  1466.                     252       WONT
  1467.                     253       DO
  1468.                     254       DONT
  1469.  
  1470.      This subcommand is sent by a Telnet implementation to  indicate its
  1471.      willingness to adopt byte macros for all  of  the  DET  subcommands
  1472.      according to the following algorithm:
  1473.  
  1474.  
  1475.                                25
  1476.  
  1477. John Day                               Data Entry Terminal Option
  1478. June 27,1977                                            NIC 40652
  1479.                                                           RFC 731
  1480.  
  1481.  
  1482.  
  1483.         The macro byte for subcommand i will be i+128 and will represent
  1484.         the following string for parameterless subcommands:
  1485.  
  1486.         IAC SB DET <subcommand code> IAC SE
  1487.  
  1488.         and the following string for subcommands  with  parameters:
  1489.  
  1490.         IAC SB DET <subcommand code>
  1491.  
  1492.         The default setting for this subcommand is that the  macros  are
  1493.         not in effect, in other words,
  1494.  
  1495.              IAC SB DET DET-MACRO WONT IAC SE
  1496.              IAC SB DET DET-MACRO DONT IAC SE
  1497.  
  1498.         Negotiation  of  this  subcommand  follows  the  same  rules  as
  1499.         negotiations of the Telnet options.
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.                                26
  1535.  
  1536. John Day                               Data Entry Terminal Option
  1537. June 27,1977                                            NIC 40652
  1538.                                                           RFC 731
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.                                References
  1548.  
  1549.  
  1550.  
  1551.      1.  ADM-1 Interactive Display Terminal Operator's Handbook
  1552.            Lear-Siegler, Inc. 7410-31.
  1553.  
  1554.      2.  ADM-Interactive Display Terminal Operator's Handbook
  1555.             Lear-Siegler, Inc. EID, 1974.
  1556.  
  1557.      3.  Burroughs TD 700/800 Reference Manual, Burroughs Corp., 1973
  1558.  
  1559.      4.  Burroughs TD 820 Reference Manual, Burroughs Corp. 1975.
  1560.  
  1561.      5.  CC-40  Communications Station:  General Information Manual.
  1562.            Computer Communication, Inc.  Pub. No. MI-1100. 1974.
  1563.  
  1564.      6.  Crocker, David.  "Telnet Byte Macro Option," RFC 729, 1977.
  1565.  
  1566.      7.  Data Entry Virtual Terminal Protocol for Euronet, DRAFT, 1977.
  1567.  
  1568.      8.  Day, John.  "A Minor Pitfall in the Telnet Protocol,"
  1569.            RFC 728, 1977.
  1570.  
  1571.      9.  Hazeltine 2000 Desk Top Display Operating Instructions.
  1572.            Hazeltine IB-1866A, 1870.
  1573.  
  1574.      10.  How to Use the Consul 980:  A Terminal Operator's Guide
  1575.            and Interface Manual.  Applied Digital Data Systems, Inc.
  1576.             98-3000.
  1577.  
  1578.      11.  How to Use the Consul 520:  A Terminal Operator's Guide
  1579.            and Interface Manual.  Applied Digital Data Systems, Inc.
  1580.            52-3000.
  1581.  
  1582.      12.  Honeywell 7700 Series Visual Information Projection (VIP)
  1583.             Systems:  Preliminary Edition. 1973.
  1584.  
  1585.      13.  An Introduction to the IBM 3270 Information Display System.
  1586.             IBM GA27-2739-4. 1973.
  1587.  
  1588.      14.  Naffah, N.  "Protocole Appareil Virtuel type Ecran"
  1589.             Reseau Cyclades.  TER 536. 1976.
  1590.  
  1591.  
  1592.  
  1593.                                27
  1594.  
  1595. John Day                               Data Entry Terminal Option
  1596. June 27,1977                                            NIC 40652
  1597.                                                           RFC 731
  1598.  
  1599.  
  1600.      15.  Postel, Jon and Crocker, David.  "Remote Controlled
  1601.             Transmission and Echoing Telnet Option", RFC 726
  1602.             NIC 39237, Mar. 1977.
  1603.  
  1604.      16.  Schicker, Peter.  "Virtual Terminal Protocol (Proposal 2).
  1605.             INWG Protocol Note #32., 1976.
  1606.  
  1607.      17.  UNISCOPE Display Terminal :  Programmer Reference .  Sperry-
  1608.             Univac UP-7807 Rev. 2, 1975.
  1609.  
  1610.      18.  Universal Terminal System 400:  System Description.  Sperry-
  1611.             Univac UP-8357, 1976.
  1612.  
  1613.      19.  Walden, David C. "Telnet Output Line Width Option."
  1614.             NIC # 20196, 1973, also in ARPANET Protocol Handbook, 1976.
  1615.  
  1616.      20.  Walden, David C.  "Telnet Output Page Size"  NIC # 20197,
  1617.             1973, also in ARPANET Protocol Handbook, 1976.
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.                                28
  1653.