RFC 885 PROPOSED STANDARD TELNET · OPTIONS

Telnet EOR: Telnet end of record option

A Telnet option that lets each side mark where a record of data ends.

On rfc-editor.org ↗
PUBLISHED
December 1983
AUTHORS
J. Postel
STREAM
Legacy
OPTION CODE
25 (END-OF-RECORD)
EOR CODE
239 (decimal)
EOR SEQUENCE
IAC EOR, 2 octets
DEFAULT
WON'T / DON'T END-OF-RECORD
DOI
10.17487/RFC0885

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                          J. Postel
Request for Comments: 885                                            ISI
                                                           December 1983

                      TELNET END OF RECORD OPTION


This RFC specifies a standard for the ARPA Internet community.  Hosts on
the ARPA Internet that need to mark record boundaries within Telnet
protocol data are expected to adopt and implement this standard.

1.  Command Name and Code

   END-OF-RECORD     25

2.  Command Meanings

   IAC WILL END-OF-RECORD

      The sender of this command requests permission to begin
      transmission of the Telnet END-OF-RECORD (EOR) code when
      transmitting data characters, or the sender of this command
      confirms it will now begin transmission of EORs with transmitted
      data characters.

   IAC WON'T END-OF-RECORD

      The sender of this command demands to stop transmitting, or to
      refuses to begin transmitting, the EOR code when transmitting data
      characters.

   IAC DO END-OF-RECORD

      The sender of this command requests that the sender of data start
      transmitting the EOR code when transmitting data, or the sender of
      this command confirms that the sender of data is expected to
      transmit EORs.

   IAC DON'T END-OF-RECORD

      The sender of this command demands that the receiver of the
      command stop or not start transmitting EORs when transmitting
      data.

3.  Default

   WON'T END-OF-RECORD

   DON'T END-OF-RECORD

   END-OF-RECORD is not transmitted.

4. Motivation for the Option

   Many interactive systems use one (or more) of the normal data
   characters to indicate the end of an effective unit of data (i.e., a
   record), for example, carriage-return (or line-feed, or escape).
   Some systems, however, have some special means of indicating the end
   of an effective data unit, for example, a special key.  This Telnet
   option provides a means of communicating the end of data unit in a
   standard way.

5.  Description of the Option

   When the END-OF-RECORD option is in effect on the connection between
   a sender of data and the receiver of the data, the sender transmits
   EORs.

   It seems probable that the parties to the Telnet connection will
   transmit EORs in both directions of the Telnet connection if EORs are
   used at all;  however, the use of EORs must be negotiated
   independently for each direction.

   When the END-OF-RECORD option is not in effect, the IAC EOR command
   should be treated as a NOP if received, although IAC EOR should not
   normally be sent in this mode.

6.  Implementation Considerations

   As the EOR code indicates the end of an effective data unit, Telnet
   should attempt to send the data up to and including the EOR code
   together to promote communication efficiency.

   The end of record is indicated by the IAC EOR 2-octet sequence.  The
   code for EOR is 239 (decimal).

AI ELI5

On this page
PROBLEMSome systems end a unit of data with a special key rather than an ordinary character, and plain Telnet has no standard way to say where such a unit ends.
MECHANISMThe END-OF-RECORD option (code 25) is negotiated with WILL, WON'T, DO and DON'T, after which the sender ends each record with the two-octet sequence IAC EOR.
WHY IT MATTERSBoth ends can agree on record boundaries inside a Telnet stream, negotiated separately for each direction.

§1Why Mark the End of a Record

Many interactive systems use one of the normal data characters, for example carriage-return, line-feed or escape, to indicate the end of an effective unit of data, called a record. Some systems instead have a special means, such as a special key.

This Telnet option gives a standard way to communicate the end of a data unit. The option is assigned the name END-OF-RECORD and code 25.

Some computers end a thought by pressing Enter, others have a special button. This gives everybody the same way to say I am done with this piece.

§2Negotiating the Option

The usual Telnet option commands apply. IAC WILL END-OF-RECORD asks permission to begin sending EOR codes, or confirms that the sender now will. IAC DO END-OF-RECORD requests that the data sender start sending EORs, or confirms it is expected to. IAC WON'T and IAC DON'T refuse or demand a stop.

The default is WON'T and DON'T END-OF-RECORD, meaning no EOR is transmitted. Parties will probably use EORs in both directions if at all, but the use must be negotiated independently for each direction.

One side asks, can I put a full stop after each piece? The other says yes or no, and each direction of talking is settled on its own.

END-OF-RECORD OPTION COMMANDS (RFC 885)
  • IAC WILL END-OF-RECORDWILL — Sender asks to begin, or confirms it will begin, transmitting EORs.
  • IAC WON'T END-OF-RECORDWON'T — Sender demands to stop, or refuses to begin, transmitting EORs.
  • IAC DO END-OF-RECORDDO — Sender asks the data sender to start transmitting EORs, or confirms it is expected to.
  • IAC DON'T END-OF-RECORDDON'T — Sender demands the receiver stop or not start transmitting EORs.

§3How the Option Behaves

When the option is in effect between a sender and a receiver, the sender transmits EORs. The end of a record is indicated by the IAC EOR two-octet sequence, and the code for EOR is 239 (decimal).

When the option is not in effect, a received IAC EOR should be treated as a NOP, though it should not normally be sent. Because EOR marks the end of an effective data unit, Telnet should try to send the data up to and including the EOR code together, for communication efficiency.

The full stop is two small bytes sent right after the data. If nobody agreed to use it, a stray one is simply ignored.