The network protocol tutorial you are reading is the Telnet environment variable.
1. Command name and code
Environ36
Is0
Send1
Info2
Var0
Value1
Esc2
Uservar3
2. Command meaning
Iacwillenviron
The sender of this command will send environment variables.
Iacwontenviron
The sender of this command rejects sending environment variables.
Iacdoenviron
The sender of this command will receive environment variables.
Iacdontenviron
The sender of this command rejects the environment variable.
Iacsbenvironsend [type... [type... [...] iacse
The sender of this command requests the remote end to send its environment variable. "Type" can be either var or
Uservar is used to specify both the consumer variable name and the user variable name. Only the doenviron client can send messages.
Start a send command. If a list of variables is specified, only these variables can be sent. If no column is specified
Table, you should send all the environment variables and User-Defined variables are default environment variables. If one
If the variable is not named, all types of variables (custom or custom variables) in the default environment should be sent ).
Iacsbenvironistype... [value...] [type... [value...] [
The sender of this command is sending environment variables. Send this command to respond to a send request. Only
One end in willenviron status can send an is command. The "type"/value pair must follow
Requests are returned in the same order, and must be responded to each explicit "type..." request.
"Type" can be var or uservar. Multiple environment variables may be sent. After a "type ",
A feature of "type" or value specifies the variable name. Thecharactersfollowinga in a value
Until the next "type" feature specifies the variable value. If a "type" is not followed by
Value (for example, with other var, uservar, or iacse), this variable is not defined.
If the value is followed by a "type" or IAC, the variable has been defined, but there is no value.
If an IAC is included in IS and iacse, it must be sent as iacia. If a variable or
A value contains a var, which must be sent as an escvar.
If a variable or value contains a uservar, it must be sent as escuservar.
Send. If a variable or value contains a value, it must be sent as an escvalue. For example
If a variable or value contains an ESC, it must be sent as an escesc.
Iacsbenvironinfotype... [value...] [type... [value...] [
The sender of this command is sending information about the changed environment variables. Besides using info in the command
Besides is, it is the same as the is command. Only one end in willenviron status can send an info
Command. The info command is not used to send initialization information; The send/is sequence is used in this case. Info life
It is used to broadcast changes to environment variables, and can be generated naturally.
3. Default Specification
The default specification for this option is
Wontenviron
Dontenviron
This means that no environment information is exchanged.
4. Motivation
Some operating systems have the startup information and environment that contain the information that is broadcasted to the remote machine when the telnet connection is established.
Environment variable. Some new information that needs to be broadcast through a telnet session is proposed.
Option is more desirable, but the telnet session itself does not really need to know, you can use this common information option.
5. lifecycle variable
The user variable is used to transmit the user or account name on the remote system that the client wants to log on. User change
The format of the numeric value is determined by the system and determined by the remote system.
The job variable is used to transmit the Business ID that the client wants to use when logging on to the remote system. Job
The numerical format of a variable is determined by the system and determined by the remote system.
The Acct variable is used to send the account ID that the client wants to use when logging on to the remote system. Acct
The numerical format of a variable is determined by the system and determined by the remote system.
Printer is used to determine the default position of the printer output. Because there is no mark on the network
Naming method, so the current format of this variable is not clear.
Systemtype is the type of the operating system used to transmit this variable. Its value and FTP [2]
The value of system (syst) in is the same. The format of this value should be the same as that in assignednumbers document [3 ].
The first word of a system name listed in previous versions is the same.
The display variable is used to transmit the X Display position of the client. The value format of the display variable is as follows:
<Host>: <dispnum> [. <screennum>]
The message is the same as the message obtained by using the telnetx-display-Location Option. If
The X-DISPLAY-LOCATION options received by the display environment variables [4] and the inconsistent information they contain, should
Use the information recently received.
Because it is impossible to predict the variables that all users want to exchange, the uservar type is provided to support user transmission.
Any variable/value pair. The additional type allows the application to distinguish between the value obtained by the remote host software and the value obtained by the user
Provided value. Paranoid implementations are likely to treat these two types with the same level of trust. Variable and user variable
The result of a namespace conflict is a standard application.
6. Application Rules
Will and do are only used to capture and acknowledge the results of future negotiation at the beginning of the connection.
Once the two hosts have exchanged a will command and a do command, the doenviron sender can
Free request to send environment variables. Once the do sender can send a request (iacsbenvironsendiac
Se), then the sender of will can transmit the current environment variable information (through iacsbenvironis... IAC
Se command ). Although this option can be used during the entire Telnet connection
It often occurs when the connection is started. This is because many operating systems transmit environment information only when the process is created.
So the information is required before the user logs on. In this section, any reference is in shorthand
Type to record the ASCII value string. For example, "Joe" indicates three octal decimal sequences of 106111101.
The receiving host does not need to upload all the variables it receives from the environment. For example
Terminal-type
[1] If the option is used to determine the terminal type, the server can ignore the term variable. Similarly, some startup information is also available.
For other purposes. For example, the values of the "user", "Acct", and "proj" variables can be used to determine which one
The account has been logged on and may never be uploaded to the user environment. Generally, if the server uses more precise methods
The value of an environment variable has been detected, or if it cannot understand a variable name, it will be ignored in
The value sent in the ENVIRON option. The server may also prefer to upload all unknown information to the user's environment.
. This is the recommended method in the application, because it makes the user more flexible to use.
The following is an example of this option:
Host1host2
Iacdoenviron
Iacwillenviron
[Now HOST 1 can request environment variables freely]
Iacsbenvironsendvar "user"
Var "Acct" varuservariacse
[Now, the server explicitly requests to obtain the default settings of the user and Acct variables, environment variables, and users
The default settings of custom variables. Note: The client references the user information twice because it explicitly requests,
Another reason is that it is part of the default environment.]
Iacsbenvironisvar "user"
Value "Joe" Var "Acct" Value
"Kernel" Var "user" value "Joe"
Var "display" value "foo: 0.0"
Uservar "shell" value "/bin/CSH"
IACS
The network protocol tutorial you are reading is the Telnet environment variable. E
When user variables or ambiguous variables are defined
There is no data), it is legal. For example:
Iacsbenvironisiacse
Effective responses to any of the following:
Iacsbenvironsendiacse
Iacsbenvironsendvariacse
Iacsbenvironsenduservariacse
Iacsbenvironsendvaruservariacse
(The last example is the same as the first one ...)
It is expected that any application supporting the telnetenviron option will fully support this specification.
7. Security Issues Involved
It is important for the implementer of the ENVIRON option to understand the interaction and logic/proof process of the setting options. Should not
We often carefully analyze which variable is "secure" when setting the client logon ". An example of an incorrect option will change the Parameter
Allowed intruders to abolish or damage the login/certification program itself.