📄 295.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://apue.dhs.org"><font face="黑体"><big><big>apue</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> ● UNIX网络编程 (BM: clown) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="index.htm">回到开始</a>][<a href="288.htm">上一层</a>][<a href="296.htm">下一篇</a>]
<hr><p align="left"><small>发信人: tianxing (天行健,君子自强不息), 信区: Winsock <br>
标 题: Telnet Protocol(英文版二) <br>
发信站: 武汉白云黄鹤站 (Thu Jun 29 19:12:02 2000), 站内信件 <br>
<br>
<br>
<br>
Postel [Page 9] <br>
RFC 318 Telnet Protocol April 1972 <br>
be part of a CR LF pair as a CR NUL pair. Then the receiving program <br>
can always hold a CR and examine the next character to determine if a <br>
new line function is intended. This solution is strongly <br>
recommended. <br>
One other question arises here, "Is it permitted to send the Telnet <br>
signal NOP (code 130) between a CR and a LF when these are intended <br>
to signify new line?" The answer is "yes, the NOP signal may occur <br>
anywhere in the data stream." <br>
Echoing <br>
The decision to have the assumed condition for echo be that the using <br>
site will provide any echo necessary for its terminals was taken <br>
because of the difficulties faced by some installations that cannot <br>
turn off their echo or that have terminals that print locally as a <br>
result of key strokes. Serving sites could take the position "have <br>
user turn echo off," but this seems an unnecessary burden on the <br>
user. In addition, some serving sites may choose not to supply any <br>
echo service, in which case the no echo assumption will supply a <br>
network-wide condition, while other assumptions would give a mixed <br>
starting condition. <br>
The convention of using "ECHO," "NO ECHO" signals seems to fill both <br>
the requirements for dynamic echo control and for a minimum <br>
implementation of Telnet Protocol. Note that when the user request <br>
ECHO or NO ECHO the server replies by switching to the desired mode <br>
(and possibly returning the signal for the new mode), or by <br>
continuing in the current mode and returning the signal for the <br>
current mode. The server never spontaneously sends an ECHO or NO <br>
ECHO signal. Except that a NOECHO may be used to cancel a HIDE YOUR <br>
INPUT. <br>
Hide Your Input <br>
The HIDE YOUR INPUT signal presents some difficulty in that it is <br>
unclear how much is to be hidden. The server site usually knows how <br>
long the secret is but the user Telnet in general does not. <br>
Furthermore, if the user site cannot suppress the local echoing, <br>
there is a difficult implementation problem. One possibility is for <br>
the using site to overprint a full line with a mask, then have the <br>
user type his secret on the mask. If the secret were longer than one <br>
line, the use of the mask should be repeated. <br>
The use of HIDE YOUR INPUT can be avoided altogether by having the <br>
serving site send a mask (which it knows to be just long enough) on <br>
which the user is to type the secret information. <br>
Postel [Page 10] <br>
RFC 318 Telnet Protocol April 1972 <br>
EXAMPLE: <br>
1. Default assumption is user site is echoing <br>
2. Server-to User: Password Please CR LF <br>
3. Server-to-User: XXXXCRIIIIICRMMMMCR NUL <br>
4. User-to-Server: "password" CR LF <br>
5. Server-to-User: Ready CR LF <br>
Breaks and Attentions <br>
There is a special control signal on some terminals that has no <br>
corresponding bit pattern in ASCII, but is transmitted by a special <br>
electrical signal. This control signal is Attn on a 2741 and Break <br>
on a Teletype. This signal is represented by the Telnet control <br>
signal BREAK. There is a corresponding control signal for use from <br>
serving sites to using sites for reverse break. Notice, however, <br>
that the NVT is a bi-directional character device, thus there is no <br>
need to "turn the line around". <br>
Some systems treat the Break as an extra code available for use in <br>
conjunction with the data stream. For example, one system uses Break <br>
as a special editing code meaning "delete the current line to this <br>
point." In these cases, the code may simply be inserted in the data <br>
stream with no special additional action by the user. <br>
Other systems use Break or Attn in special interrupt fashion, to mean <br>
stop processing the application and give me the supervisor, or cancel <br>
the present job, etc. (Other systems which inspect input on a <br>
character at a time basis use normal characters for this purpose, <br>
such as <etx>.) In these cases, because of differences in the ways <br>
both serving and using sites operate, it is necessary to take a route <br>
in addition to the normal Telnet data stream to indicate that the <br>
special control signal is embedded in the data stream. <br>
Example -- Problem: <br>
The PDP-10 normally will, when it fills its input buffer, continue <br>
to accept characters from a terminal examining each to see if it <br>
is a control character, then act on it if it is or throw it away <br>
if it is not. <br>
Since the Telnet server at the serving site is at the mercy of the <br>
NCP with respect to controlling the bunching, and therefore, <br>
arrival at the Telnet of bursts of characters, Telnet <br>
Postel [Page 11] <br>
RFC 318 Telnet Protocol April 1972 <br>
implementations might be expected to choke off flow to the buffers <br>
until they are ready to accept characters without throwing them <br>
away. <br>
Under this condition, the serving process might be outputting to <br>
the using terminal, the input buffers at the server fill up, (with <br>
user generated characters) and <etx> get stuck (at the user's <br>
site) in the data stream that has been choked off. <br>
A similar problem could occur with Multics or some IBM system as a <br>
line at a time server. The user at a using site gets his process at <br>
the serving site into an output loop and wants to break the process <br>
without having to release his Telnet connection. The buffers clog <br>
the connection, transmission is choked off, and the <etx>, Break, or <br>
other user control signal gets stuck in the pipeline. <br>
Example -- Solution: <br>
The user at the using site knows he is entering a special control <br>
signal (Break, Attn, <etx>, etc.) and follows it with a SYNCH. <br>
(The local instructions at using sites for accomplishing this may <br>
differ from site to site.) <br>
User to Using Site Telnet <br>
Send SYNCH. <br>
Using Site Telnet to Serving Site Telnet: <br>
DATA MARK in Data Stream. <br>
Using Site Telnet to Using Site NCP: <br>
Send an INS. <br>
Serving Site NCP to Telnet Server: <br>
Interrupt "INS received". <br>
Serving Site Telnet: <br>
Examines the input data stream (looking for special control <br>
signals) until it sees DATA MARK then resumes normal <br>
handling. <br>
Thus, depending on the server's local implementation to <br>
provide adequate service, a special handling of the data <br>
stream can be invoked whenever an INS is received in order <br>
Postel [Page 12] <br>
RFC 318 Telnet Protocol April 1972 <br>
to get to the special character. When it sees DATA MARK, it <br>
recognizes it as a synchronization point and knowing that <br>
the special character has been passed on, strips the DATA <br>
MARK from the data stream and returns to normal mode. <br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -