📄 rfc1053.txt
字号:
RESPONSE-SET and RESPONSE-IS messages should be sent in reply to a peer's [RESPONSE-]IS or SEND message. They reflect negotiation at the telnet level, rather than changes in the higher-level environment. A host which sends a SEND message may complain about the status indicated in the answering RESPONSE-IS by sending RESPONSE-SET but not SET. Under this scheme, a possible rule for preventing infinite negotiations would be for the host to send at most zero, one, or some fixed number, of RESPONSE-SET messages following receipt of one IS message or one higher-level host-side request. After that, the host telnet simply accepts the user telnet's last offer as well as it can. Note that only the host needs to worry about loop prevention, since it does all the asking. A given parameter should not be listed more than once in a single message. A sample negotiation might look like this. (Here line breaks are not meaningful; ASCII carriage returns and line feeds are indicated by <CR> and <LF>; other characters stand for themselves. In the IAC SB octet values.)Levy & Jacobson [Page 6]RFC 1053 Telnet X.3 PAD Option April 1988 Host: <CR><LF>% (User types "cd gibber<CR>") User: cd gibber<CR><LF> Host: Password required.<CR>LF> (Host disables echoing) IAC SB X.3-PAD SET 2 0 IAC SE (Host polls for status) IAC SB X.3-PAD SEND IAC SE User: (User telnet has disabled local echo. Note that some parameters (e.g., 9, 10, 11) are not present, presumably unimplemented, and a few extension parameters (129, 134) in extension set 1 are also defined.) IAC SB X.3-PAD RESPONSE-IS 1 29 2 0 3 2 4 0 5 0 7 17 8 0 12 0 13 3 15 1 16 8 17 21 18 0 128 1 129 23 134 1 IAC SE Host: password: (User types "squeak<CR>", User: squeak<CR><LF> which is not echoed.) Host: (Host re-enables echoing) IAC SB X.3-PAD SET 2 1 IAC SE (Host polls for status) IAC SB X.3-PAD SEND IAC SE User: IAC SB X.3-PAD RESPONSE-IS 1 29 2 1 3 2 4 0 5 0 7 17 8 0 12 0 13 3 15 1 16 8 17 21 18 0 128 1 129 23 134 1 IAC SE6. Parameters In outline, the X.3-PAD option uses the following parameters. Parameter 0 indicates whether the user telnet notifies the host about parameter changes made for local reasons. Parameters 1 through 22 are basically those of CCITT X.3, with some changes in interpretation; they are listed in detail below. Parameters 23 through 127 are reserved for potential extensions to CCITT's X.3 definition. Parameter 128 selects an "extension set", determining the meaning of parameters 129 through 255. One extension set is proposed in this RFC, others may be added. The extension mechanism is explained under parameter 128's description.Levy & Jacobson [Page 7]RFC 1053 Telnet X.3 PAD Option April 1988 Parameters 129 through 255 are meaningful only when defined in the extension set indicated by the current value of parameter 128. It should NOT be assumed that all implementations will necessarily support all parameters defined here, or all values of those parameters. Supported parameter/value combinations, however, should behave as described here. The following parameter is specific to this Telnet option. Parameter 0 -- Notify host of user-initiated parameter changes. Code 0 -- Host is not notified. Code 1 -- User telnet notifies host by sending IS message. If the user telnet, for some local reason, changes a parameter, should it send an IS message to the host? This is desirable, since the host telnet cannot be sure of knowing the user telnet's current status otherwise. On the other hand, some user telnets may be unable to send notification. Consider a user calling from an X.25 PAD through an X.25-to-telnet gateway. The user may change local PAD parameters freely, but since normal PADs send no message when this happens, the gateway cannot inform the host telnet. Moreover, some sloppy host telnets may not wish to know about user parameter changes. In normal usage, the host will ask to SET parameter 0 to its preferred state upon initialization; the user telnet accepts the setting if it can; then the host polls (using SEND) for the user telnet's decision. A disappointed host might periodically poll for changes, or admonish the (human) user not to change parameters, or remain silent and simply work oddly if changes are made.The following parameters are as defined by the 1984 CCITT X.3 standard.Numbers are in decimal.Parameter 1 -- Character to escape to local telnet command mode. Code 0 -- No ASCII character performs this function (though some special mechanism, e.g., a function key, still may). Code 1 -- DLE (ASCII code 16). Codes 32 through 126 -- ASCII code of the character. Codes 2 through 31 are not defined by X.3, but might also be taken to refer to the corresponding ASCII control characters. X.3 seems to be unable to name SOH (control-A) as a command escape character.Levy & Jacobson [Page 8]RFC 1053 Telnet X.3 PAD Option April 1988Parameter 2 -- Local echo of characters typed by the user. Code 0 -- No local echo. Code 1 -- Local echo. Several echoing styles are possible. Parameter 13 selects whether a carriage return echoes as itself or as CR LF. Parameter 20 may suppress echoing of particular ASCII characters. The extension parameter 134 selects a style for echoing non-printing characters such as ESC.Parameter 3 -- Set of forwarding characters. The value is bit-encoded; each nonzero bit specifies a set of characters. The user telnet should accept characters from the user's keyboard, buffering them until it receives any of the specified characters (or until some other forwarding condition is satisfied, see below), and then sending the buffer to the host. It may forward earlier if necessary, e.g., if it runs out of buffer space. It MUST eventually forward after receiving one of the indicated characters. Code 0 -- No forwarding characters. Code 1 -- Alphanumeric characters (a-z, A-Z, 0-9). Code 2 -- CR. Code 4 -- ESC, BEL, ENQ, ACK. Code 8 -- DEL, CAN, DC2. Code 16 -- ETX, EOT. Code 32 -- HT, LF, VT, FF. Code 64 -- ASCII character codes 0 through 31 not listed above. Note that there is no way provided here to forward on printable, non-alphanumeric characters (punctuation marks). Codes may be added to select the union of the associated sets of characters.Parameter 4 -- Forward after idle time. When this parameter is nonzero, the user telnet sends its input buffer to the host after a given period in which no characters are typed, even if no forwarding character was received. Code 0 -- Infinite time limit. Codes 1 through 255 -- Time limit in 1/20 second units. The value "1" may be taken to mean "forward immediately" if timedLevy & Jacobson [Page 9]RFC 1053 Telnet X.3 PAD Option April 1988 input is inconvenient to provide. For other values, when timing is available but the exact requested value is not, rounding to larger time delays is suggested. If timing is requested but none is available, immediate forwarding on every character is much preferred over an infinite time limit. Note the interaction with parameter 15, Local editing, and the notes made under that heading.Parameter 5 -- Flow control of user-to-host data. A user telnet may be overwhelmed by data typed by the user. If parameter 5 is 1, it may output X-OFF (DC3, ASCII code 19) to ask the user to suspend input and X-ON (DC1, ASCII code 17) when the user may resume typing. Code 0 -- X-OFF and X-ON considered normal output data. Code 1 -- X-OFF and X-ON used to control user input. The extension parameters 130 and 131, if defined, specify other codes to be used instead of ASCII DC3 and DC1.Parameter 6, referring to messages sent from the PAD to the user, does not seem to be relevant in this context.Parameter 7 -- Function of Break, Interrupt, Attention, etc. This parameter describes handling of some special key or other character, implementation-defined, on the user's keyboard. It is bit-encoded; codes may be added to select multiple functions. Multiple functions may be performed in any order. Any messages generated should be promptly sent to the host. Code 0 -- No action. Code 1 -- Send interrupt packet (Telnet IAC IP). Code 2 -- Reset (break Telnet connection). Code 4 -- Discard input from user not yet consumed by host. Code 8 -- Escape to local Telnet command mode. Code 16 -- Discard output from host (see parameter 8). The X.25 'Interrupt', 'Reset', and 'Indication of Break' messages are here translated to Telnet equivalents. See section 8 for suggestions on discarding input and output.Levy & Jacobson [Page 10]RFC 1053 Telnet X.3 PAD Option April 1988Parameter 8 -- Discarding output from host. This parameter is intended as a flag, indicating whether host output is being ignored. Code 0 -- Host output is sent to user. Code 1 -- Host output is discarded. This parameter is normally used in conjunction with parameter 7 when the 16's bit (Discard output on Break/Interrupt/Attention) is set. An implementation is suggested in section 8 of this RFC. Note that, if a signal from the user causes parameter 8 to be changed and parameter 0 is set to 1, an X.3-PAD IS message should be sent to the host.Parameter 9 -- Padding after carriage return. This parameter selects insertion of ASCII NUL padding characters after output of each carriage return. Codes 0 through 7 -- Insert that many padding characters.Parameter 10 -- Line folding.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -