Telnet

From TinyMUX
Jump to: navigation, search

What is Telnet

The Telnet protocol provides a way for both sides of a network connection (client and server) to express interest and support for certain options. Usually, there is no evidence of this conversation on the screen; it is not typically shown. Many common Internet protocols take the Telnet protocol as a starting point.

An important character in the telnet protocol is IAC (chr(255)). For either side to transmit y-umlaut, it must appear twice (IAC IAC). On the receiving side, any pair of IACs is understood to mean y-umlaut.

PennMUSH and TinyMUX both support the basic Telnet protocol including the commands: Are You There (AYT) and NOP (No Operation). NOP is somewhat useful in keeping NAT/Firewalls happy (see KEEPALIVE).

The Negotiation About Screen Size (NAWS) option along with width() and height() softcode functions expose the client window's height and width.

Server Differences

TinyMUX version 2.4 added support for AYT, SGA, EOR, and NAWS. Version 2.7 added support for Environment (ENV), Character Sets (CHARSET), and Terminal Type (TTYPE).

PennMUSH also supports LINEMODE and ECHO. While PennMUSH does not and will not support @program, it has @prompt as a way for softcode to generate SGA/EOR.

Prompts

MUD clients have a non-standard concept called prompts which are outside of the telnet RFCs. A prompt is a partial line of text (that is, it does not end in CRLF) followed by either IAC GA or IAC EOR. Prompts maintain their left-bottom position as new text from the server arrives. New text is placed above the prompt.

Many MUSH clients have a separate input box, so the cursor is never positioned next to a prompt anyway, however MUSHClient does have a 'Keep Commands On Prompt Line' option which will position entered text on these partial prompt lines. It does recognize these partial lines, but it does not appear to go so far as to display new text from the server above the last prompt.

This use of IAC GA is not consistent with the defined use of Go-Ahead (GA) command. The Go-Ahead command was original designed to manage a half-duplex channels. Go-Ahead acts as a sort of token that must be held before one side or the other can transmit. Of course, TCP/IP connections are always full-duplex, telnetd tries to negotiate the Surpress Go-Ahead (SGA) option, and despite whether that negotiation is successful, teletnd never sends a IAC GA itself.

We have not been able to coax SimpleMU to display a partial-line. It doesn't implement this non-standard use of IAC GA which one can argue is Good (tm). It also doesn't display any part of the line until CRLF is received which one can argue is Bad (tm). We haven't tried terminating with an IAC EOR, yet.

TinyFugue 4 doesn't support prompts. TinyFugue 5 apparently does.

Many other modern clients have standardized on the behavior of interpreting the IAC GA sequence as a newline, rather than trying to position the prompt in a static position.

The only prompt in TinyMUX occurs when @program is used.

Surpress Go-Ahead (SGA) and End Of Record (EOR) are negotiated in both directions except that either EOR must be disabled or SGA must be disabled so that prompts can be presented properly.

Related RFCs

The full range of telnet RFC's is quite large and beyond our scope.

Telnet extended ASCII option
Remote Controlled Transmission and Echoing Telnet option
Telnet logout option
Revised Telnet byte macro option
Telnet SUPDUP option
Telnet SUPDUP-Output option
Telnet send-location option
Telnet Protocol Specification
Telnet Option Specification
Telnet Binary Transmission
Telnet Echo Option
Telnet Suppress Go Ahead Option
Telnet Status Option
Telnet Timing Mark Option
Telnet Extended Options: List Option
Telnet end of record option
TACACS user identification Telnet option
Output marking Telnet option
Telnet terminal location number option
Telnet 3270 regime option
Telnet Data Entry Terminal option: DODIIS implementation
Telnet X.3 PAD option
Telnet window size option
Telnet terminal speed option
Telnet terminal-type option
Telnet X display location option
The Q Method of Implementing TELNET Option Negotiation
Telnet Linemode Option
Telnet Remote Flow Control Option
Telnet Authentication: Kerberos Version 4
Telnet Authentication: SPX
Telnet Environment Option
TELNET CHARSET Option
Telnet Com Port Control Option
Telnet Authentication Option
Telnet Authentication: Kerberos Version 5
TELNET Authentication Using DSA
Telnet Authentication: SRP
Telnet Data Encryption Option
Telnet Encryption: DES3 64 bit Cipher Feedback
Telnet Encryption: DES3 64 bit Output Feedback
Telnet Encryption: CAST-128 64 bit Output Feedback
Telnet Encryption: CAST-128 64 bit Cipher Feedback