As per Relevance of the word terminal, we have this rfc below:
Network Working Group D.
Request For Comments: 1073 BBN
October 1988
Telnet Window Size
Status of this
This RFC describes a proposed Telnet option to allow a client
convey window size to a Telnet server. Distribution of this memo
unlimited
1. Command Name and Option
Name = NAWS (Negotiate About Window Size
Code = 31
2. Command
IAC WILL
Sent by the Telnet client to suggest that NAWS be used
IAC WON'T
Sent by the Telnet client to refuse to use NAWS
IAC DO
Sent by the Telnet server to suggest that NAWS be used
IAC DON'T
Sent by the Telnet server to refuse to use NAWS
IAC SB NAWS <16-bit value> <16-bit value> IAC
Sent by the Telnet client to inform the Telnet server of
window width and height
The window size information is conveyed via this option from
Telnet client to the Telnet server. The information is advisory
The server may accept the option, but not use the information that
sent
The client and server negotiate sending the window size
using the standard Telnet WILL/DO/DON'T/WON'T mechanism. If
Waitzman [Page 1]
RFC 1073 Telnet Window Size Option October 1988
client and server agree, the client may then send a subnegotiation
convey the window size. If the client's window size is later
(for instance, the window size is altered by the user), the
may again send the subnegotiation. Because certain
systems, on which a server may be executing, may not allow the
size information to be updated, the server may send a DON'T NAWS
the client to forbid further subnegotiation after it was
accepted. A negotiation loop will not form following these rules
The subnegotiation consists of two values, the width and the
of the window in characters. The values are each sent as two bytes
in the Internet standard byte and bit order. This allows a
window width or height of 65535 characters. A value equal to zero
acceptable for the width (or height), and means that no
width (or height) is being sent. In this case, the width (or height
that will be assumed by the Telnet server is operating
specific (it will probably be based upon the terminal
information that may have been sent using the TERMINAL TYPE
option).
The syntax for the subnegotiation is
IAC SB NAWS WIDTH[1] WIDTH[0] HEIGHT[1] HEIGHT[0] IAC
As required by the Telnet protocol, any occurrence of 255 in
subnegotiation must be doubled to distinguish it from the
character (which has a value of 255).
3. Default
WON'T
DON'T
This option does not assume any default window size information
Often the terminal type, passed with the TERMINAL TYPE Telnet option
may imply a window size, but that is not necessary for this option
4.
With the increasing popularity of windowing systems, a Telnet
is often run inside a variable-sized window, and the Telnet
needs to know the window size for proper cursor control. The
may also have its size changed during the Telnet session and
updated window size needs to be conveyed to the server. This
specifies an option to send the window height and width in
from a client to a server
Waitzman [Page 2]
RFC 1073 Telnet Window Size Option October 1988
The Telnet options Negotiate Output Line Width (NAOL) and
Output Page Size (NAOP) do not have the correct semantics for
purpose, and they are not in common use [see RFC-1011 "
Internet Protocols", and the "Defense Protocol Handbook"]. The
and NAOP options are bidirectional (i.e., the server might
the client's line width or page size), and are limited to 253
characters in each axis
This option is a better model of the normal window
process. The client has total control over the size of its
and simply tells the server what the current window size is
Furthermore, the 253 character height and width limitation is too
so the new option has a limit of 65535 characters. Finally,
option sends the window height and width concurrently because
are typically changed simultaneously and many operating systems
windowing applications prefer to think in terms of
changes in height and width
5. Description and Implementation
A typical user of this option might be a Telnet client running
X. After a user resizes the client's window, this must
communicated to the Telnet client. In 4.3 BSD Unix, the
SIGWINCH (window changed) might be caught by the Telnet process and
new NAWS subnegotiation sent to the server. Upon receipt of a
subnegotiation, the server might do the appropriate ioctl to
the new information, and then could send a SIGWINCH to its child
probably a shell
6.
In the following examples all numbers in the data stream are
decimal
1. Server suggest and client agrees to use NAWS
(server sends) IAC DO
(client sends) IAC WILL
(client sends) IAC SB NAWS 0 80 0 24 IAC
[A window 80 characters wide, 24 characters high
[some time occurs and the user changes the window size
(client sends) IAC SB NAWS 0 80 0 64 IAC
[A window 80 characters wide, 64 characters high
Waitzman [Page 3]
RFC 1073 Telnet Window Size Option October 1988
In all numeric form
(server sends) 255 253 31
(client sends) 255 251 31
(client sends) 255 250 31 0 80 0 24 255 240
(client sends) 255 250 31 0 80 0 64 255 240
2. Client suggests and server agrees to used NAWS
(client sends) IAC WILL
(server sends) IAC DO
(client sends) IAC SB NAWS 1 44 0 24 IAC
[A window 300 characters wide, 24 characters high
3. Client suggest and server refuses to use NAWS
(client sends) IAC WILL
(server sends) IAC DON'T
4. Server suggests and client refuses to use NAWS
(server sends) IAC DO
(client sends) IAC WON'T
7.
A more elaborate, X window system specific, version of this
has been implemented at Carnegie-Mellon University by Glenn Marcy
the author. It is widely used in the Carnegie-Mellon
Computer Science Department. Mr. Marcy helped write an early
of this memo documenting the more elaborate option
Waitzman [Page 4]
if you see any problems within the linking, don't worry be happy,
this is version 0.1 of the Relevance System and you gotta expect some crappy subroutines sometimes,
just be content we did not write this in Java, which would have made this "bigger and better" HAHAHHA.
RFC documents can be found at I.E.T.F.
Relevance System Copyright © 2002 Spectrum WorldResearch
other technical nosh by ServerMasters Corporation
collaboration of BobX