📄 rfc318.txt
字号:
Network Working Group Jon Postel
Request for Comments: 318 UCLA-NMC
NIC: 9348 April 3, 1972
References: RFC 139, 158, and NIC 7104
Telnet Protocol
At the October 1971 Network Working Group Meeting, I promised to
promptly produce a document which clearly and succinctly specified
and explained the Official Telnet Protocol. This document fails to
meet any part of that promise. This document was not produced
promptly. This document is neither clear nor succinct. There is NO
Official Telnet Protocol.
The following pages present my understanding of the ad hoc Telnet
protocol. There are some who have serious questions about this
protocol. The proposed changes to the protocol are given in Section
IV.
Any comments should be promptly directed to me via the Network
Information Center (Ident = JBP) or by phone (213) 825-2368 or by
mail.
Jon Postel
SPADE Group
3804 Boelter Hall
UCLA
Los Angeles, California 90024
Postel [Page 1]
RFC 318 Telnet Protocol April 1972
I. DEFINITION OF THE NETWORK VIRTUAL TERMINAL
The Network Virtual Terminal (NVT) is a bi-directional character
device. The characters are represented by 8 bit codes. The NVT has
no timing characteristics. The character codes 0 through 127 are the
USASCII codes. (Note all code values are given in decimal.) The
codes 128 through 255 are used for special control signals. The NVT
is described as having a printer and a keyboard. The printer
responds to incoming data and the keyboard produces outgoing data.
The Printer
The NVT printer has an unspecified carriage width (common values are
40, 72, 80, 120, 128, 132). The printer can produce representations
of all 95 USASCII graphics (codes 32 through 126). Of the 33 USASCII
control codes (0 through 31 and 127) the following 8 have specific
meaning to the NVT printer.
NAME CODE MEANING
NULL (NUL) 0 A no operation.
BELL (BEL) 7 Produces an audible or visible signal.
Back Space (BS) 8 Backspaces the printer one character
position.
Horizontal Tab (HT) 9 Moves the printer to next horizontal
tab stop.
Line Feed (LF) 10 Moves the printer to next line (keeping
the same horizontal position).
Vertical Tab (VT) 11 Moves the printer to the next vertical
tab stop.
Form Feed (FF) 12 Moves the printer to the top of the
next page.
Carriage Return (CR) 13 Moves the printer to the left margin
of the current line.
The remaining USASCII codes (1 through 6, 14 through 31, and 127) do
not cause the NVT printer to take any action.
Postel [Page 2]
RFC 318 Telnet Protocol April 1972
The Keyboard
The NVT Keyboard has keys or key combinations or key sequences for
generating all of the 128 USASCII codes. Note that although there
are codes which have no effect on the NVT printer, the NVT Keyboard
is capable of generating these codes.
The End of the Line Convention
The end of a line of text shall be indicated by the character
sequence Carriage Return Line Feed (CR, LF). This convention applies
to both the sending (Keyboard) and receiving (Printer) (virtual)
mechanisms.
Break and Reverse Break
The Telnet control signals provide a BREAK signal which can be used
to simulate the use of the break or attention or interrupt button
found on most terminals. This signal has no effect on the NVT. When
the BREAK Telnet control signal is used from server to user it is
sometimes called "reverse break". Such a reverse break has no effect
on the NVT.
II. DEFINITION OF TELNET PROTOCOL
The purpose of Telnet Protocol is to provide a standard method of
interfacing terminals devices at one site to processes at another
site.
The Telnet Protocol is built up from three major substructures, first
the Initial Connection Protocol (ICP), second the Network Virtual
Terminal (NVT), and third the Telnet control signals described
herein.
Telnet user and server processes follow the ICP to establish
connections. The term "Logger" has been associated with the set of
processes in the serving system which respond to the ICP and perform
the initial interactions e.g. obtain a name and password. The ICP is
defined and the initial socket number and byte size parameters are
defined in "Current Network Protocols" (NIC #7104).
The data transmitted between the user and server programs (and vice
versa) is treated as a character stream with embedded control
signals.
Note that all code values are given in decimal.
Postel [Page 3]
RFC 318 Telnet Protocol April 1972
TELNET CONTROL SIGNALS
NAME CODE MEANING
DATA MARK 128 Used to mark a point in the data stream.
Used in conjunction with INS. See SYNCH.
BREAK 129 User-to-Server: Has the same meaning to
the server as the "Break," "Interrupt," or
"Attention" button found on many terminals.
Server-to-User: Has the same meaning to
to use as the "reverse break" used with
some terminals.
NOP 130 No Operation.
NO ECHO 131 User-to-Server: Asks the server not to
return Echos of the transmitted data.
Server-to-User: States that the server is
not sending echos of the transmitted data.
Sent only as a reply to ECHO or NO ECHO,
or to end the hide your input.
ECHO 132 User-to-Server: Asks the server to send
Echos of the transmitted data.
Server-to User: States that the server is
sending echos of the transmitted data.
Sent only as a reply to ECHO or NO ECHO.
Hide your input 133 The intention is that a server will send
this signal to a user system which is
echoing locally (to the user) when the user
is about to type something secret (e.g. a
password). In this case, the user system
is to suppress local echoing or overprint
the input (or something) until the server
sends a NOECHO signal. In situations where
the user system is not echoing locally,
this signal must not be sent by the server.
INS --- This is the "Interrupt on Send" signal,
defined by the Host-to-Host protocol and
implemented by the Network Control Program
(NCP). See SYNCH.
Postel [Page 4]
RFC 318 Telnet Protocol April 1972
SYNCH --- This is a condition indicated by the
combination of the DATA MARK and the INS.
User-to-Server: The Server is to examine
the input data stream looking for a DATA
MARK signal; if a DATA MARK is found, the
server must not process further until an
INS is received. If the server receives an
INS, it is required to examine the data
stream at once, taking any appropriate
action on "break type" characters (e.g.
etx, sub, BREAK), up to a DATA MARK signal
and thereupon continue its normal processing.
The passed over characters may be discarded.
Server-to-User: If the user finds a DATA
MARK in the data stream, it must wait for
an INS. If the user receives an INS, it
must examine and discard characters up to
and including a DATA MARK.
DATA TYPES
Telnet normally deals in ASCII characters, but there are provisions
for escaping to other code sets. If one of these escapes is used, it
is undefined (here) whether or not the Telnet signals still have
meaning or even how to return to the ASCII set: The Telnet signals
used to indicate a change of code set are:
CODE MEANING
160 ASCII - Standard Telnet
161 Transparent
162 EBCDIC
USER TELNET SIGNALS
The following signals are to be available to the human user to cause
the user Telnet to take the indicated action.
Transmit Now - Transmit all data entered and locally
buffered now. Intended to be used with line
mode.
Suppress end-of-line - Transmit all data entered and locally
buffered now, and do not transmit the
end-of-line immediately following this signal.
Postel [Page 5]
RFC 318 Telnet Protocol April 1972
STANDARD TELNET IMPLEMENTATION
Using Site
1) User is able to enter and transmit all ASCII codes
2) User is able to cause the Telnet signals BREAK, SYNCH, ECHO and
NOECHO to be transmitted.
3) Provides for the User Telnet signals, (e.g. Transmit Now).
4) Implements the CR LF end-of-line convention.
5) Provides local echo for local user terminals.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -