[comp.bugs.2bsd] dial in / out on same line

steve@nuchat.UUCP (Steve Nuchia) (02/08/88)

This thread seems to be dancing around the tty driver issues
concerning bidirectional use of a line.

This is about the only thing Microport got right from the
beginning, and seeing how well their mechanism (I don't
know where it originated) works I implemented it for my
2.10 BSD client, who is quite pleased also.

You use two different device files for each physical line -
using a bit in the minor device number as a flag differentiating
the incoming and outgoing version.

The open on the incoming (usually getty) blocks waiting for carrier.  
Only one logical device can be open on a line at one time, attempts
to open the outgoing side while the incoming side is open (carrier
high) fail.

One compilcation is that you need to play games with the uucp lock
files to make uucp hunt for an open line properly.

I've got a DHV11 driver for 2.10 (should work in 4.3 too) that
deals with that board's braindamage nicely and implements the
scheme described.  I've also got a getty replacement for microport
that plays the right uucp lockfile games.

The driver requires the proper lisence horse hockey but I can
give the getty away for the asking.

-- 
Steve Nuchia	    | [...] but the machine would probably be allowed no mercy.
uunet!nuchat!steve  | In other words then, if a machine is expected to be
(713) 334 6720	    | infallible, it cannot be intelligent.  - Alan Turing, 1947

sob@academ.UUCP (Stan Barber) (02/11/88)

It should be pointed out that this scheme is much like the SunOS scheme.
It should also be pointed out that it is far superior to acucntrl-type
approaches. Alas, some of use don't have kernel sources.... sigh.



-- 
Stan	     uucp:{killer,rice,hoptoad}!academ!sob     Opinions expressed here
Olan         domain:sob@tmc.edu                            are ONLY mine &
Barber       CIS:71565,623   BBS:(713)790-9004               noone else's.