[comp.unix.questions] Files for all devices??

jeffrey@sci.ccny.cuny.edu (Jeffrey L Bromberger) (04/02/91)

OK.  Here's a simple question.  Unfortunately, I can't think of a good
answer to it.

We're running 4.3BSD (pretty much vanilla) on a VAX (780).  In /dev,
there is a node for *every* piece of hardware.  Every tty, disk, tape,
etc. has an entry.

So, how come no entry for the DEUNA ethernet card?  I realize it's
configured as a pseudo-device, but ptys (also pseudodevices) have
entries!  Doesn't this go against the policy of "everything has a
filename"?

Many thanks in advance for any insight you can send my way.

j
-- 
Jeffrey L. Bromberger
System Operator---City College of New York---Science Computing Facility
jeffrey@sci.ccny.cuny.edu			jeffrey@ccnysci.BITNET
	Anywhere!{cmcl2,philabs,phri}!ccnysci!jeffrey

torek@elf.ee.lbl.gov (Chris Torek) (04/03/91)

In article <1991Apr1.203925.19204@sci.ccny.cuny.edu>
jeffrey@sci.ccny.cuny.edu (Jeffrey L Bromberger) writes:
>So, how come no [/dev] entry for the DEUNA ethernet card?  I realize it's
>configured as a pseudo-device ...

Actually, it is configured as a regular `device':

	device	de0	at uba? csr 0174510		vector deintr

(`vector deintr' really belongs elsewhere, but this is a completely
different topic).  The argument against a /dev entry begins with
`what would you do with it?'

(Of course, the same argument can be used against block devices, which
exist primarily to give names to an internal interface.  I occasionally
argue for /dev entries for network interfaces.  Certainly `permissions
on /dev entries' is a better approach than `magic socket options'.  Alas,
you really *do* want filters inserted over top of raw interfaces.
`Protocol stacks' make sense here but the demultiplexing becomes hairy.)
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov

rbj@uunet.UU.NET (Root Boy Jim) (04/04/91)

In article <11687@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes:
?In article <1991Apr1.203925.19204@sci.ccny.cuny.edu>
?jeffrey@sci.ccny.cuny.edu (Jeffrey L Bromberger) writes:
?>So, how come no [/dev] entry for the DEUNA ethernet card?  I realize it's
?>configured as a pseudo-device ...
?
?Actually, it is configured as a regular `device':
?
?	device	de0	at uba? csr 0174510		vector deintr
?
?(`vector deintr' really belongs elsewhere, but this is a completely
?different topic).  The argument against a /dev entry begins with
?`what would you do with it?'

Why, open it for starters. Then you could ioctl instead of
bind, listen, accept and connect, [gs]etsockopt.

When NBS first went to networking, someone was having problems
with one of their VAXen. I volunteered to help, and after
I tried 'ifconfig ex0' (they had an il), I spent quite a bit
of time looking for it in /dev. I then logged onto all the
other (three) systems that were up and running and started
looking for stuff there too. What a dirty trick!
-- 
		[rbj@uunet 1] stty sane
		unknown mode: sane