Telnet Environment Option
RFC 1408

Document Type RFC - Historic (January 1993; No errata)
Updated by RFC 1571
Last updated 2013-03-02
Stream IETF
Formats plain text pdf html
Stream WG state WG Document
Document shepherd No shepherd assigned
IESG IESG state RFC 1408 (Historic)
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                  D. Borman, Editor
Request for Comments: 1408                           Cray Research, Inc.
                                                            January 1993

                       Telnet Environment Option

Status of this Memo

   This RFC specifies an IAB standards track protocol for the Internet
   community, and requests discussion and suggestions for improvements.
   Please refer to the current edition of the "IAB Official Protocol
   Standards" for the standardization state and status of this protocol.
   Distribution of this memo is unlimited.

Abstract

   This document specifies a mechanism for passing environment
   information between a telnet client and server.  Use of this
   mechanism enables a telnet user to propagate configuration
   information to a remote host when connecting.

1.  Command Names and Codes

      ENVIRON         36
          IS               0
          SEND             1
          INFO             2

          VAR              0
          VALUE            1
          ESC              2
          USERVAR          3

2.  Command Meanings

   IAC WILL ENVIRON

      The sender of this command is willing to send environment
      variables.

   IAC WONT ENVIRON

      The sender of this command refuses to send environment variables.

Telnet Working Group                                            [Page 1]
RFC 1408               Telnet Environment Option            January 1993

   IAC DO ENVIRON

      The sender of this command is willing to receive environment
      variables.

   IAC DONT ENVIRON

      The sender of this command refuses to accept environment
      variables.

   IAC SB ENVIRON SEND [ type ... [ type ... [ ... ] ] ] IAC SE

      The sender of this command requests that the remote side send its
      environment variables.  The "type" may be either VAR or USERVAR,
      to indicate either well known or user variable names.  Only the
      side that is DO ENVIRON may initiate a SEND command.  If a list of
      variables is specified, then only those variables should be sent.
      If no list is specified, then the default environment, of both
      well known and user defined variables, should be sent.  If one of
      the variables has no name, then all the variables of that type
      (well known or user defined)  in the default environment should be
      sent.

   IAC SB ENVIRON IS type ... [ VALUE ... ] [ type ... [ VALUE ... ] [

   The sender of this command is sending environment variables.  This
      command is sent in response to a SEND request.  Only the side that
      is WILL ENVIRON may send an IS command.  The "type"/VALUE pairs
      must be returned in the same order as the SEND request specified
      them, and there must be a response for each "type ..." explicitly
      requested.  The "type" will be VAR or USERVAR.  Multiple
      environment variables may be sent.  The characters following a
      "type" up to the next "type" or VALUE specify the variable name.
      The characters following a VALUE up to the next "type" specify the
      value of the variable.  If a "type" is not followed by a VALUE
      (e.g., by another VAR, USERVAR, or IAC SE) then that variable is
      undefined.  If a VALUE is immediately followed by a "type" or IAC,
      then the variable is defined, but has no value.  If an IAC is
      contained between the IS and the IAC SE, it must be sent as IAC
      IAC.  If a variable or a value contains a VAR, it must be sent as
      ESC VAR.

      If a variable or a value contains a USERVAR, it must be sent as
      ESC USERVAR.  If a variable or a value contains a VALUE, it must
      be sent as ESC VALUE.  If a variable or a value contains an ESC,
      it must be sent as ESC ESC.

Telnet Working Group                                            [Page 2]
RFC 1408               Telnet Environment Option            January 1993

   IAC SB ENVIRON INFO type ... [ VALUE ... ] [ type ... [ VALUE ... ] [

   The sender of this command is sending information about environment
      variables that have changed.  It is identical to the IS command,
      except that the command is INFO instead of IS.  Only the side that
      is WILL ENVIRON may send an INFO command.  The INFO command is not
      to be used to send initial information; the SEND/IS sequence is to
      be used for that.  The INFO command is to be used to propagate
      changes in environment variables, and may be spontaneously
      generated.

3.  Default Specification

   The default specification for this option is

      WONT ENVIRON
      DONT ENVIRON

   meaning there will not be any exchange of environment information.
Show full document text