跳到主要内容

I. 网络虚拟终端的定义

网络虚拟终端(Network Virtual Terminal,NVT)是一种双向字符设备。字符用 8 位编码表示。NVT 没有时序特性。字符编码 0 到 127 为 USASCII 编码。(注意:所有编码值均以十进制给出。)编码 128 到 255 用于特殊控制信号。NVT 被描述为带有一台打印机和一个键盘:打印机响应传入的数据,键盘产生传出的数据。

打印机​

NVT 打印机的行宽未作规定(常见值有 40、72、80、120、128、132)。打印机能够输出全部 95 个 USASCII 图形字符(编码 32 到 126)。在 33 个 USASCII 控制码(0 到 31 以及 127)中,下列 8 个对 NVT 打印机具有特定含义。

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.

其余的 USASCII 编码(1 到 6、14 到 31 以及 127)不会使 NVT 打印机执行任何动作。

键盘​

NVT 键盘具有可产生全部 128 个 USASCII 编码的按键、组合键或按键序列。注意,尽管有些编码对 NVT 打印机没有任何作用,NVT 键盘仍能够产生这些编码。

行结束约定​

文本行的结束应以字符序列回车换行(Carriage Return Line Feed,CR, LF)表示。该约定同时适用于(虚拟的)发送机制(键盘)和接收机制(打印机)。

Break 与反向 Break​

Telnet 控制信号提供了 BREAK 信号,可用来模拟大多数终端上的中断(break)、注意(attention)或打断(interrupt)按钮。该信号对 NVT 没有任何作用。当 Telnet 控制信号 BREAK 由服务器发往用户时,有时称为“反向 break”(reverse break)。这种反向 break 对 NVT 同样没有任何作用。