ietf
[Top] [All Lists]

Re: sockets vs. fds

2008-12-05 12:25:52
On Fri, 5 Dec 2008, Dave CROCKER wrote:
Melinda Shore wrote:

Not to go too far afield, but I think there's consensus among us old
Unix folk that the mistake that CSRG made wasn't in the use of
addresses but in having "sockets" instead of using file descriptors.
This was actually fixed in SysVRSomethingOrOther with the introduction
of a network pseudo-filesystem (open("/net/192.168.1.1", ... ) with
ioctls but never got traction.

It isn't immediately obvious to me why file descriptors would have had a
major impact, so can you elaborate?

This isn't a question of sockets versus file descriptors, since sockets
*are* file descriptors. It is actually a question of how to specify
network addresses in the API, i.e. the BSD sockaddr structure versus the
Plan 9 extended pathname semantics. Using pathnames for everything would
eliminate warts like embedding pathnames in sockaddrs in order to address
a local IPC endpoint. On the other hand, filesystem pathnames are a
uniform hierarchial namespace, which isn't true for the combination of
network protocol, address, and port - what happens if you opendir("/net/")?

Tony.
-- 
f.anthony.n.finch  <dot(_at_)dotat(_dot_)at>  http://dotat.at/
FITZROY: WESTERLY 6 TO GALE 8 DECREASING 4 OR 5 FOR A TIME THEN BECOMING
CYCLONIC LATER. VERY ROUGH OR HIGH. SQUALLY SHOWERS. MODERATE OR GOOD.
_______________________________________________
Ietf mailing list
Ietf(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/ietf

<Prev in Thread] Current Thread [Next in Thread>