Re: devfs - the missing link

From: Pavel Machek (pavel@suse.cz)
Date: Mon May 22 2000 - 17:42:28 EST


Hi!

> The primary UNIX tradition is "Everything's a File(tm)". This
> architectural guideline has helped UNIX stay (internally) pretty
> clean for the last 25 years. We should stay with that principle,
> but we should look at what UNIX has gathered to itself over the
> years, as we may want to ``prune the tree'' for Linux 3.0.
>
> That's certainly not the only Unix tradition, and I'm very doubtful it's
> even the primary tradition. A much more important one IMO is "minimize
> what's done in the kernel", and "don't put policy in the kernel".
>
> For example, just because you *can* put something as a file doesn't mean
> that you should. I assume --- I *hope*! --- everyone understands why it
> would be insane for "ls -lR /ipv4/mit.edu" to make the kernel do a DNS
> Zone transfer, and then display all 100,000+ hosts at MIT as a directory
> listing.

Well, but doing fopen( "/tcp4byname/vger.rutgers.edu/80", O_RDONLY ), _has_
some beauty in it. Granted, dns should stay userland, so you should
have something like userfs making it look like symlink

        /tcp4byname/vger.rutgers.edu -> /tcp4/2.4.31.3

and have kernel handle /ipv4 directory. (And no, readdir in /tcp4 or
/tcp4byname would not give you much more than . or ..). That way, you
would not have separate interface for connecting sockets, you could
simply chown local tcp ports and discard "less than 1024 is only for
root" uglyness etc. You would not need netcat, for example, plain cat
would do.
                                                                Pavel
PS: I do not know if network could be flattened like this. I'm not
sure about multicast and similar.

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:16 EST