RFC1073-Telnet window Size Option Chinese version

zhaozj2021-02-08  241

Status of this memo

This memo describes a proposed Telnet option to allow the client to pass the size of the window size to the Telnet server. The distribution of this memo is unlimited.

1. Command Name and Option Code Name = NAWS (Negotiate About Window Size) Dimensions Code of Dimensions of Window = 31

2. Command Meaning IAC Will NAWS is sent by the Telnet client to recommend NAWS.

IAC Won't NAWS is sent by Telnet client to refuse to use NAWS.

IAC DO NAWS is sent by Telnet server to recommend NAWS.

IAC Don't NAWS is sent by Telnet server to refuse to use NAWS.

IAC SB Naws <16-bit value> <16-bit value> IAC SE is sent by the Telnet client, inform the width and height of the window of this window. Window Size Information passes this option from the Telnet client to the Telnet server. This information is referenced. The server may accept this option, but does not use the delivery information. The client and server are used to use the standard Telnet Will / Do / Don't / Won't mechanism to negotiate send window size information. If the client and the server are agreed, the client can send a sub-negotiation to deliver the size of the window. If the window size of the client later changes (for example, the window size is changed by the user), the client may send this sub-negotiation again. Because the server may not allow update window size information when the server is being executed, the server may send a Don't NAWS to the client to block more sub-negotiations after accepting the initial window size. A negotiation loop will not form the following rules.

The sub-negotiation contains two values, the width value and height value of the window representing the character. Each value in these two values ​​is transmitted in two bytes as a set of standard Internet bytes and bits. This allows the maximum value of the width or height of the window to be 65535 characters. For width or height, a value equal to zero means that there is no character width or height to be sent. In this case, the Telnet server will assume that the width or height is related to the operating system (it will be possible to be based on terminal type information, this terminal type information is sent using the TELNET option using Terminal Type).

The syntax of the sub-negotiation is

IAC SB Naws Width [1] Width [0] Height [1] Height [0] IAC SE is as required by the Telnet protocol, there must be twice in the sub-negotiation of 255 where the 255 occurrence of 255 is displayed. For the character difference between and IAC (it has a 255 value).

3. The default specification won't naws don't naws This option does not assume any default window sizes. Terminal types typically passed by the Terminal Type Telnet option may imply a window size, but for this option, it is unnecessary.

4. Motivation With the increasing popularity of the window system, the Telnet client is always running in a variable size window. In order to properly control the cursor correctly, the Telnet server needs to know the size of the window. The window may change the size during the session of Telnet, and the updated window size needs to be transmitted to the server. This memo determines an option for the window height and width from the client to the server to send characters represented by the client.

Telnet Options: Negotiation Output Ring (NAOL) and negotiation output page size (NAOP) is not very appropriate in semantics, they are not public [see RFC-1011 "official Internet protocol", and "Defense Agreement Manual"]. The NAOL and NAOP options are two-way (that is, the server can control the client's line width or page size), limit 253 characters in each axis.

This option is a better model for the normal window negotiation process. The client fully controls its window size, just simply telling how big the current window is currently. Moreover, the height and width of 253 characters is very low, so the new option has a limit of 65535 characters. Finally, this option simultaneously sends the height and width of the window because the window height and width are usually changed simultaneously. Many operating systems and window applications are more likely to think that the height and width of the window are changed at the same time. 5. Description and implementation Note This option is typically the Telnet client running under x window. After the user adjusts the size of the client window, it will definitely communicate with the Telnet client. In 4.3BSD UNIX, signal SIGWINCH may be captured by Telnet client and a new NAWS sub-negotiation is sent to the server. After receiving the NAWS sub-negotiation, the server may make appropriate IOCTL to process this new message, then issue the SIGWInch signal to its child process, which may be a shell.

6. Examples In the following examples, all numbers in the data stream are Tenjin.

1). Server recommends that the client agrees to use NAWS (Server Send) IAC WILL NAWS (Client Send) IAC SB NAWS 0 80 0 24 IAC SE [window 80 character wide, 24 characters] [Time users change window size] (Client Send) IAC SB NAWS 0 80 0 64 IAC SE [Window 80 Character Width, 64 Characters] All Digital Forms (Server Send) 255 253 31 (Client Send) 255 253 31 (Client Send) 255 250 31 0 80 0 24 255 240 (Client Send) 255 250 31 0 80 0 64 255 240

2). Client recommends that the server agrees to use NAWS

(Client Send) IAC WILL NAWS (Server Send) IAC Do Naws (Client Send) IAC SB Naws 1 44 0 24 IAC SE [Window 300 Character Width, 24 Characters]

3). Client suggestion, server refuses to use NAWS

(Client Send) IAC WILL NAWS (Server Send) IAC Don't Naws4). Server recommends that client refuses to use NAWS

(Server Send) IAC Do Naws (Client Send) IAC Won't Naws

7. A more detailed version of this option based on the X Window system has been achieved by Glenn Marcy and the author I am implemented in Carnegie-Mellon University. It is widely used in computer systems at Carnegie-Mellon University. Mr. Marcy helps write an earlier version of this memo and record more options.

转载请注明原文地址:https://www.9cbs.com/read-1631.html

New Post(0)