RFC 1572 (rfc1572) - Page 2 of 7


Telnet Environment Option



Alternative Format: Original Text Document



RFC 1572               Telnet Environment Option            January 1994


   IAC DO NEW-ENVIRON

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

   IAC DONT NEW-ENVIRON

      The sender of this command refuses to accept environment
      variables.

   IAC SB NEW-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 NEW-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 NEW-ENVIRON IS type ... [ VALUE ... ] [ type ... [ VALUE ... ]
   [ ... ] ] IAC SE

      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 NEW-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