try to preserve To, etc (or translate from Apparently-To)
[unix-history] / usr / src / libexec / telnetd / telnetd.8
index aed04dc..5431a9b 100644 (file)
@@ -2,33 +2,28 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)telnetd.8   5.1 (Berkeley) %G%
+.\"    @(#)telnetd.8   6.3 (Berkeley) %G%
 .\"
 .\"
-.TH TELNETD 8C "4 March 1983"
+.TH TELNETD 8C ""
 .UC 5
 .SH NAME
 telnetd \- DARPA TELNET protocol server
 .SH SYNOPSIS
 .B /etc/telnetd
 .UC 5
 .SH NAME
 telnetd \- DARPA TELNET protocol server
 .SH SYNOPSIS
 .B /etc/telnetd
-[
-.B \-d
-] [
-.I port
-]
 .SH DESCRIPTION
 .I Telnetd
 .SH DESCRIPTION
 .I Telnetd
-is a server which supports the DARPA standard TELNET
-virtual terminal protocol.  The TELNET server operates
-at the port indicated in the ``telnet'' service description;
-see
-.IR services (5).
-This port number may be overridden (for debugging purposes)
-by specifying a port number on the command line.  If the
-.B \-d
-option is specified, each socket created by
-.I telnetd
-will have debugging enabled (see SO_DEBUG in
-.IR socket (2)).
+is a server which supports the DARPA standard
+.B TELNET
+virtual terminal protocol.
+.I Telnetd
+is invoked by the internet server (see
+.IR inetd (8)),
+normally for requests to connect to the
+.B TELNET
+port as indicated by the
+.I /etc/services
+file (see
+.IR services (5)).
 .PP
 .I Telnetd
 operates by allocating a pseudo-terminal device (see
 .PP
 .I Telnetd
 operates by allocating a pseudo-terminal device (see
@@ -40,29 +35,92 @@ the slave side of the pseudo-terminal as
 and
 .BR stderr .
 .I Telnetd
 and
 .BR stderr .
 .I Telnetd
-manipulates the master side of the pseudo terminal,
-implementing the TELNET protocol and passing characters
-between the client and login process.
+manipulates the master side of the pseudo-terminal,
+implementing the
+.B TELNET
+protocol and passing characters
+between the remote client and the login process.
 .PP
 .PP
-When a TELNET session is started up, 
+When a
+.B TELNET
+session is started up, 
 .I telnetd
 .I telnetd
-sends a TELNET option to the client side indicating
-a willingness to do ``remote echo'' of characters.
-The pseudo terminal allocated to the client is configured
-to operate in ``cooked'' mode, and with XTABS and CRMOD
+sends
+.B TELNET
+options to the client side indicating
+a willingness to do
+.I remote echo
+of characters, to
+.I suppress go
+.IR ahead ,
+and to receive
+.I terminal type information
+from the remote client.
+If the remote client is willing, the remote terminal type is
+propagated in the environment of the created login process.
+The pseudo-terminal allocated to the client is configured
+to operate in \*(lqcooked\*(rq mode, and with XTABS and CRMOD
 enabled (see
 .IR tty (4)).
 enabled (see
 .IR tty (4)).
-Aside from this initial setup, the only mode changes
-.I telnetd
-will carry out are those required for echoing characters
-at the client side of the connection.
 .PP
 .I Telnetd
 .PP
 .I Telnetd
-supports binary mode, and most of the common TELNET options,
-but does not, for instance, support timing marks.  Consult
-the source code for an exact list of which options are not
-implemented.
+is willing to
+.IR do :
+.IR echo ,
+.IR binary ,
+.I suppress go
+.IR ahead ,
+and
+.I timing
+.IR mark .
+.I Telnetd
+is willing to have the remote client
+.IR do :
+.IR binary ,
+.I terminal
+.IR type ,
+and
+.I suppress go
+.IR ahead .
 .SH "SEE ALSO"
 telnet(1C)
 .SH BUGS
 .SH "SEE ALSO"
 telnet(1C)
 .SH BUGS
-A complete list of the options supported should be given here.
+Some
+.B TELNET
+commands are only partially implemented.
+.PP
+The
+.B TELNET
+protocol allows for
+the exchange of the number of lines and columns on the user's terminal,
+but
+.I telnetd
+doesn't make use of them.
+.PP
+Because of bugs in the original 4.2 BSD
+.IR telnet (1C),
+.I telnetd
+performs some dubious protocol exchanges to try to discover if the remote
+client is, in fact, a 4.2 BSD
+.IR telnet (1C).
+.PP
+.I Binary mode
+has no common interpretation except between similar operating systems
+(Unix in this case).
+.PP
+The terminal type name received from the remote client is converted to
+lower case.
+.PP
+The
+.I packet
+interface to the pseudo-terminal
+(see
+.IR pty (4))
+should be used for more
+intelligent flushing of input and output queues.
+.PP
+.I Telnetd
+never sends
+.B TELNET
+.I go ahead
+commands.