Revised Telnet byte macro option
RFC 735

Document Type RFC - Proposed Standard (November 1977; No errata)
Obsoletes RFC 729
Last updated 2013-03-02
Stream Legacy
Formats plain text pdf html bibtex
Stream Legacy state (None)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state RFC 735 (Proposed Standard)
Telechat date
Responsible AD (None)
Send notices to (None)
RFC 735                                          DHC RHG  3 Nov 77 42083
Telnet Byte Macro Option

Network Working Group                                   David H. Crocker
RFC: #735                                                       Rand-ISD
NIC: #42083                                      (Dcrocker at Rand-Unix)
                                                     Richard H. Gumpertz
                                              Carnegie-Mellon University
                                                   (Gumpertz at CMU-10A)

Obsoletes: RFC #729 (NIC #40306)                         3 November 1977

                    Revised TELNET Byte Macro Option

1. Command name and code:

   BM 19

2. Command Meanings:

   IAC WILL BM

      The sender of this command REQUESTS or AGREES to use the BM
      option, and will send single data characters which are to be
      interpreted as if replacement data strings had been sent.

   IAC WON'T BM

      The sender of this option REFUSES to send single data characters
      which are to be interpreted as if replacement data strings had
      been sent. Any existing BM <macro byte> definitions are discarded
      (i.e., reset to their original data interpretations).

   IAC DO BM

      The sender REQUESTS or AGREES to have the other side (sender of
      WILL BM) send single data characters which are to be interpreted
      as if replacement data strings had been sent.

   IAC DON'T BM

      The sender REFUSES to allow the other side to send single data
      characters which are to be interpreted as if replacement data
      strings had been sent. Any existing BM <macro byte> definitions
      are to be discarded.

                                   1


RFC 735                                          DHC RHG  3 Nov 77 42083
Telnet Byte Macro Option

   IAC SB BM <DEFINE> <macro byte> <count>
                                             <replacement string> IAC SE

      where:

         <macro byte> is the data byte actually to be sent across the
         network; it may NOT be Telnet IAC (decimal 255, but may be any
         other 8-bit character.

         <count> is one 8-bit byte binary number, indicating how many
         <replacement string> characters follow, up to the ending IAC
         SE, but not including it. Note that doubled IACs in the
         definition should only be counted as one character per pair.

         <replacement string> is a string of zero or more Telnet ASCII
         characters and/or commands, which the <macro byte> is to
         represent; any character may occur within a <replacement
         string>. Note, however, that an IAC in the string must be
         doubled, to be interpreted later as an IAC; to be interpreted
         later as data byte 255, it must be quadrupled in the original
         <replacement string> specification.

      The indicated <macro byte> will be sent instead of the indicated
      <replacement string>. The receiver of the <macro byte> (the sender
      of the DO BM) is to behave EXACTLY as if the <replacement string>
      string of bytes had instead been received from the network. This
      interpretation is to occur before any other Telnet
      interpretations, unless the <macro byte> occurs as part of a
      Telnet command; in this case no special interpretation is to be
      made. In particular, an entire Telnet subnegotiation (i.e. from
      IAC SB through IAC SE) is to be considered a Telnet command in
      which NO replacement should be done.

      The effect of a particular <macro byte> may be negated by reseting
      it to "expand" into itself.

      IAC SB BM <DEFINE> X <0> IAC SE may be used to cause X to be
      ignored in the data stream.

      <DEFINE> is decimal 1.

   IAC SB BM <ACCEPT> <macro byte> IAC SE

      The receiver of the <DEFINE> for <macro byte> accepts the
      requested definition and will perform the indicated replacement
      whenever a <macro byte> is received and is not part of any IAC
      Telnet command sequence.

                                   2


RFC 735                                          DHC RHG  3 Nov 77 42083
Telnet Byte Macro Option

      <ACCEPT> is decimal 2.

   IAC SB BM <REFUSE> <macro byte> <REASON> IAC SE

      The receiver of the <DEFINE> for <macro byte> refuses to perform
      the indicated translation from <macro byte> to <replacement
      string> because the particular <macro byte> is not an acceptable
      choice, the length of the <replacement string> exceeds available
      storage, the length of the actual <replacement string> did not
      match the length predicted in the <count>, or for some unspecified
      reason.

      <REFUSE> is decimal 3.

      <REASON> may be

         <BAD-CHOICE>        which is decimal 1;

         <TOO-LONG>          (for receiver's storage) which is decimal
                             2;

         <WRONG-LENGTH>      (of actual string compared with promised
Show full document text