From: Charles Hedrick (hedrick@athos.rutgers.edu)
Date: 02/15/93


From: hedrick@athos.rutgers.edu (Charles Hedrick)
Subject: more about KA9Q - incoming telnet
Date: 16 Feb 1993 04:11:14 GMT

I've updated KA9Q to fix incoming telnet. This is based on patches
from Quowong P. Liu. However I've done a fairly serious redesign of
the "telunix" code, so that it is event-driven, like the rest of KA9Q.
(Previously it executed a bunch of code every time through KA9Q's main
dispatch loop. This loop typically happens for every character typed
by a user or arriving from the tty line. I thought doing a wait4 and
a read for every telnet connection every time through the main loop
was a bit excessive. The new code uses bits in the main select and
upcalls from the TCP code so that all of this testing isn't needed.)

Incoming telnet is still a pretty minimal implementation. It doesn't
implement any telnet options. But as far as I can tell it gets the
basic full-duplex telnet functionality right. I believe it handles
CR's correctly, which a lot of implementations get wrong (largely
because early versions of Berkeley's telnetd got it wrong, I think).
If you want /etc/utmp and /etc/wtmp to be updated when a job logs off,
you'll have to set up protection so that whoever runs KA9Q can write
to /etc/utmp and /etc/wtmp.

Together with the previous change, which implemented a telnet program
that can be run in multiple windows, this takes care of what I had on
my list to do for KA9Q. Unless release of kernel SLIP is very greatly
delayed (or I run into bugs in the newer features), I don't have plans
for doing anything more to KA9Q. I can come up with an infinite set
of things I'd like to do, but I'm not likely to get to them.

I have to say that it's really nice to be able to run telnet sessions
in multiple windows (the main feature of the version I put out last
Saturday). I don't know why I didn't do a separate telnet program for
KA9Q long ago. (However I should note that I have noticed one
limitation to the implementation I'm using. You can't ^Z the telnet
program, nor run it in the background. That's because the program is
really an optical illusion -- there's nothing there to ^Z. I hope
this isn't a serious limitation.)

The new code is on cs.rutgers.edu, in /pub/linux. It's
ka9qsrc.10.tar.Z and ka9qbin.10.tar.Z (source and binaries
respectively). In about a week, if I haven't run into any trouble,
I'll send this version to tsx-11 and have them replace the current
version there with it. Note that this code is linked with jump table
4.2. It's been out long enough that this seems safe. It probably
requires 4.2, since it uses __sigaction (though only for incoming
telnet).