Subject: Re: dialin/dialout crapola
To: None <mycroft@mit.edu, tech-kern@NetBSD.ORG>
From: Chris Torek <torek@BSDI.COM>
List: tech-kern
Date: 03/21/1998 07:29:38
>Weighing the pros and cons, I have to say that the SunOS method looks
>like the most attractive of the options.
We implemented this at the U of MD on our VAXen (using a separate
major device rather than a bit in the minor device, but that was
just because we were running nearly 128 ttys already on one machine).
It really does `just work'.
Now, the *naming* of the dial-out devices is a bit tricky. Having
/dev/cua0 correspond to /dev/ttyJ17 is Just Wrong. The names should
be like disk raw-vs-block names: /dev/ttyXYZ and /dev/dtyXYZ, or
/dev/ttyXYZ and /dev/dialXYZ, or /dev/ttys/XYZ and /dev/dial/XYZ,
or whatever. The exact naming is not important, as long as it is
consistent.
The "kernel magic" could be implemented entirely in common code, so
that one would only have to get it right in one place. (The lowest
level of "tty" driver should just track and deliver hardware state.)
Unfortunately, POSIX mandates all the silliness with CLOCAL and
nonblocking opens and such. Someone with actual POSIX documentation
might be able to figure out whether POSIX forbids doing it right,
but I suspect it does.
Chris