[Simh] Question on telnet mantra in simh
Holger Veit
holger.veit at iais.fraunhofer.de
Tue Nov 9 03:15:49 EST 2010
Hi,
while implementing telnet support in my terminal emulator, I came across
the "Telnet Mantra"
in sim_tmxr.c:
static char mantra[] = {
TN_IAC, TN_WILL, TN_LINE,
TN_IAC, TN_WILL, TN_SGA,
TN_IAC, TN_WILL, TN_ECHO,
TN_IAC, TN_WILL, TN_BIN,
TN_IAC, TN_DO, TN_BIN
};
I think I understand that the simh terminal multiplexer is a server in
telnet speech, accessed by some sort of telnet client program operated
by the user.
Now, RFC1184 (and also the obsolete RFC1116) says about the line mode (2.1):
IAC WILL LINEMODE
The sender of this command REQUESTS permission to begin sub-
negotiation of the editing/signaling status. This should only be
sent by the client side of the connection.
While the other lines seem to be compliant with the other RFCs (855,
856, 857, 858),
TN_IAC, TN_WILL, TN_LINE appears to be unexpected by initial use of the
server, even
if the telnet implementation in simh will later never actually negotiate
any line mode settings
at all. RFC1184 is here restricting RFC858 which allows a IAC WILL LINE
as an offer to use LINE, i.e. a client that can do ABC can then rely on
sending LINE sub commands.
However, with RFC1184, a client does not need to expect a TN_WILL,
TN_LINE from the server (although the server is not explicitly
prohibited - "must not", rather "should not" - to issue it), and the
client ist not obliged to even react in any way to this. But if it does,
this will result in a problem as simh cannot deal with sub commands
properly, due to the lack of correct SA/SE processing states.
So I think, the first line is at best useless, and should be removed,
or, perhaps better, replaced by a IAC WONT LINEMODE.
Am I overseeing anything?
--
Holger
More information about the Simh
mailing list