handling network using filesystem [was Re: no ioctls for serial ports?]

Pavel Machek
2001-05-20T11:19:29Z

Hi!

> > I thought about how to do networking without sockets, and it seems to
> > me like this kind of modify syscall is needed, because network sockets
> > connect to *two* different places (one local address and one
> > remote). Sockets are really nasty :-(.
>
> Pavel, take a look at http://plan9.bell-labs.com/sys/man/3/ip

Looks nice, and it seems they are even able to run BSD socket
emulation over that. Wow.

However, it is still mid-ugly:

Opening the clone file reserves a connection. The file
descriptor returned from the open(2) will point to the
control file, ctl, of the newly allocated connection.
Reading ctl returns a text string representing the number
of the connection. Connections may be used either to lis­
ten for incoming calls or to initiate calls to other
machines.

So, you open "clone". That creates directory for you. You can get its
number by reading from "clone" file.

That's pretty strange, agreed?
Pavel
--
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 at discuss@linmodems.org