DARPA TELNET protocol daemon
telnetd [-nQ] [-D modifier] [-debug [port]]
By default, the QNX implementation of telnetd runs the termdef utility to configure the editing keys for the session.
The termdef utility is not run if any of the following conditions is true:
The telnetd daemon is a server that supports the DARPA-standard TELNET virtual-terminal protocol. It is invoked by the internet server (see inetd), normally for requests to connect to the TELNET port that's indicated by the /etc/services file.
By specifying the -debug option, you can start up telnetd manually instead of through inetd. If you start telnetd this way, you can use the port argument to run telnetd on an alternate TCP port number.
You can use the -D option for debugging. This option lets telnet print out debugging information to the connection, letting you see what telnetd is doing.
The telnetd daemon operates by allocating a pseudo-terminal device for a client, then creating a login process that has the slave side of the pseudo-terminal as standard input, standard output, and standard error. The telnetd daemon manipulates the master side of the pseudo-terminal, implementing the TELNET protocol and passing characters between the remote client and the login process.
When a TELNET session is started up, telnetd sends TELNET options to the client side that indicate a willingness to do remote echo of characters, to suppress go-ahead, and to do remote flow control, as well as to receive terminal-type information, terminal-speed information, and window-size 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 cooked mode, and with XTABS and CRMOD enabled.
The telnetd daemon is willing to do:
It's also willing to have the remote client do:
Because of bugs in the original 4.2 BSD telnet, telnetd performs some protocol exchanges to try to discover if the remote client is, in fact, a 4.2 BSD telnet.
Binary mode has no common interpretation except between similar operating systems (UNIX in this case).
The terminal-type name received from the remote client is converted to lowercase.
The telnetd daemon never sends TELNET go-ahead commands.