rfc1184.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,291 行 · 第 1/4 页
TXT
1,291 行
The sender of this command REQUESTS that the list of octet
triplets be used to set the local character to be used to send to
perform the specified function.
There are four levels that a function may be set to.
SLC_NOSUPPORT is the lowest, SLC_CANTCHANGE is the next higher
level, SLC_VALUE is above that, and SLC_DEFAULT is the highest
level.
If the SLC_LEVELBITS in the second octet are equal to SLC_DEFAULT,
Telnet Working Group [Page 6]
RFC 1184 Telnet Linemode Option October 1990
then this particular function should use the system default on the
other side of the connection.
If the SLC_LEVELBITS in the second octet are equal to SLC_VALUE,
then this function is supported, and the current value is
specified by the third octet.
If the SLC_LEVELBITS in the second octet are equal to
SLC_CANTCHANGE, then this is a function that is supported, but the
value for this function, specified in the third octet, cannot be
changed.
If the SLC_LEVELBITS in the second octet are equal to
SLC_NOSUPPORT, then this particular function is not supported and
should be disabled by the other side.
If this is a response to a previous request to change a special
character, and we are agreeing to the change, then the SLC_ACK bit
must be set in the second octet.
If the SLC_FLUSHIN bit is set in the second octet, then whenever
this function is sent, a Telnet "sync" should be sent at the same
time to flush the input stream.
If the SLC_FLUSHOUT bit is set in the second octet, then whenever
this function is sent, output data should be flushed.
Only the client may send an octet triplet with the first octet
equal to zero. In this case, the SLC_LEVELBITS may only be set to
SLC_DEFAULT or SLC_VALUE, and the third octet does not matter.
When the server receives 0 SLC_DEFAULT 0, it should switch to its
system default special character settings, and send all those
special characters to the client. When the server receives 0
SLC_VALUE 0, it should just send its current special character
settings. Note that if the server does not support some of the
editing functions, they should be sent as XXX SLC_DEFAULT 0,
rather than as XXX SLC_NOSUPPORT 0, so that the client may choose
to use its own values for those functions, rather than have to
disable those functions even if it supports them.
If any of the octets in the list of octet triplets is equal to
IAC, it must be sent as a double IAC.
When a connection is established, it is the responsibility of the
client to either request the remote default values for the special
characters, or to send across what all the special characters should
be set to.
Telnet Working Group [Page 7]
RFC 1184 Telnet Linemode Option October 1990
The function values can be put into two groups, functions that are to
be translated to their Telnet equivalents before being sent across
the Telnet connection, and functions that are to be recognized and
processed locally.
First, we have those characters that are to be mapped into their
Telnet equivalents:
SLC_SYNCH Synch. See RFC 854, "TELNET PROTOCOL SPECIFICATION",
for a complete description.
SLC_BRK Break. See RFC 854, "TELNET PROTOCOL SPECIFICATION",
for a complete description.
SLC_IP Interrupt Process. See RFC 854, "TELNET PROTOCOL
SPECIFICATION", for a complete description.
SLC_AO Abort Output. See RFC 854, "TELNET PROTOCOL
SPECIFICATION", for a complete description.
SLC_AYT Are You There. See RFC 854, "TELNET PROTOCOL
SPECIFICATION", for a complete description.
SLC_EOR End of Record. See RFC 885, "TELNET END OF RECORD
OPTION" for a complete description.
SLC_ABORT Abort. See section 2.5 for a complete description.
SLC_EOF End of File. See section 2.5 for a complete
description.
SLC_SUSP Suspend. See section 2.5 for a complete description.
Next, we have the locally interpreted functions.
SLC_EC Erase Character. This is the character that is typed to
erase one character from the input stream. See RFC 854,
"TELNET PROTOCOL SPECIFICATION", for a complete
description.
SLC_EL Erase Line. This is the character that is typed to
erase the entire contents of the current line of input.
See RFC 854, "TELNET PROTOCOL SPECIFICATION", for a
complete description.
SLC_EW Erase Word. This is the character that is typed to
erase one word from the input stream.
Telnet Working Group [Page 8]
RFC 1184 Telnet Linemode Option October 1990
SLC_RP Reprint Line. This is the character that is typed to
cause the current line of input to be reprinted, leaving
the cursor at the end of the line.
SLC_LNEXT Literal Next. This is the character that is typed to
indicate that the next character is to be taken
literally, no character processing should be done with
it, and if it is a special character that would normally
get mapped into a Telnet option, that mapping should
not be done.
SLC_XON Start Output. This is the character that is sent to
resume output to the users terminal.
SLC_XOFF Stop Output. This is the character that is sent to stop
output to the users terminal.
SLC_FORW1 Forwarding character. This is a character that should
cause all data currently being buffered, and this
character, to be sent immediately.
SLC_FORW2 Forwarding character. This is another character that is
to be treated in the same manner as SLC_FORW1.
SLC_MCL Move cursor one character left. When visual editing is
supported, this is the character that, when typed, will
move the cursor one character to the left in the
display.
SLC_MCR Move cursor one character right. When visual editing is
supported, this is the character that, when typed, will
move the cursor one character to the right in the
display.
SLC_MCWL Move cursor one word left. When visual editing is
supported, this is the character that, when typed, will
move the cursor one word to the left in the display.
SLC_MCWR Move cursor one word right. When visual editing is
supported, this is the character that, when typed, will
move the cursor one word to the right in the display.
SLC_MCBOL Move cursor to the begining of the line. When visual
editing is supported, this is the character that, when
typed, will move the cursor to the begining of the line
that is being edited.
SLC_MCEOL Move cursor to the end of the line. When visual editing
Telnet Working Group [Page 9]
RFC 1184 Telnet Linemode Option October 1990
is supported, this is the character that, when typed,
will move the cursor to the end of the line that is
being edited.
SLC_INSRT Enter insert mode. When visual editing is supported,
after this character is typed, all normal characters
that are subsequently typed will be inserted into the
display.
SLC_OVER Enter overstrike mode. When visual editing is
supported, after this character is typed, all normal
charactersthat are subsequently typed will overwrite
any characters in the current display. If the
SLC_INSRT and SLC_OVER variables are set to the same
value, then that value is to act as a toggle between
overstrike and insert mode.
SLC_ECR Erase character to the right. When visual editing is
supported, this is the character that, when typed, will
erase one character to the right of the cursor.
SLC_EWR Erase word to the right. When visual editing is
supported, this is the character that, when typed,
will erase one word to the right of the cursor.
SLC_EBOL Erase to the begining of the line. When visual editing
is supported, this is the character that, when typed,
will erase all the characters to the left of the cursor.
SLC_EEOL Erase to the end of the line. When visual editing is
supported, this is the character that, when typed, will
erase all characters to the right of the cursor.
For SLC_EEOL, SLC_EWR, and SLC_ECR, if a system has a cursor that is
not diplayed between characters, but is positioned over a character,
that character is assumed to be to the right of the cursor. Thus,
the SLC_ECR will erase the character that is under the current cursor
position.
2.5 New control characters
IAC ABORT
Abort. Similar to "IAC IP", but means only to abort or terminate
the process to which the NVT is connected. (The Telnet spec says
IP may "suspend, interrupt, abort or terminate" the process.) If a
system does not have two methods of interrupting a process, then
ABORT and IP should have the same effect.
Telnet Working Group [Page 10]
RFC 1184 Telnet Linemode Option October 1990
IAC SUSP
Suspend the execution of the current process attached to the NVT
in such a way that another process will take over control of the
NVT, and the suspended process can be resumed at a later time. If
the receiving system does not support this functionality, it
should be ignored.
IAC EOF
End Of File. The recipient should notify the process connected to
the NVT that an end of file has been reached. This is intended
for systems that support the ability for the user to type in an
EOF character at the keyboard.
3. Default Specification
The default specification for this option is
WONT LINEMODE
DONT LINEMODE
meaning there will not be any subnegotiation of the mode of the
connection.
If WILL LINEMODE is negotiated, the defaults are:
IAC SB LINEMODE MODE 0 IAC SE
IAC SB LINEMODE WONT FORWARDMASK IAC SE
If DO LINEMODE is negotiated, the defaults are:
IAC SB LINEMODE MODE 0 IAC SE
IAC SB LINEMODE DONT FORWARDMASK IAC SE
Character values for SLC default to SLC_NOSUPPORT.
4. Motivation
With increasing Telnet usage, it has become apparent that the ability
to do command line processing on the local machine and send completed
lines to the remote machine is a feature necessary in several
environments. First, in the case of a connection over long delay
equipment, it is very frustrating to the user to have the echoing of
his data take several seconds. Second, some supercomputers, due to
their nature, are not good at handling and processing single
character input. For these machines, it is better to have the front
Telnet Working Group [Page 11]
RFC 1184 Telnet Linemode Option October 1990
end computer do the character processing, and leave the
supercomputer's cycles available for doing vectorized number
crunching.
There have been attempts to make local line editing work within the
existing Telnet specs. Indeed, the 4.3 BSD tape includes a version
of Telnet that attempts to do this through recognition of the state
of the ECHO and SUPRESS-GO-AHEAD options; other implementations do
this recognition purely through the ECHO option.
There are problems with both of these methods. Using just the ECHO
provides no mechanism to have ECHO to the user turned off, and leave
local character processing on, for example, when a user is typing a
password.
The usage of the SUPRESS-GO-AHEAD comes from reading into RFC 858,
where it states:
"In many TELNET implementations it will be desirable to couple the
SUPRESS-GO-AHEAD option to the echo option so that when the echo
option is in effect, the SUPPRESS-GO-AHEAD option is in effect
simultaneously: both of these options will normally have to be in
effect simultaneously to effect what it commonly understood to be
character at a time echoing by the remote computer."
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?