[TUHS] Re.: is networking different?

Paul Ruizendaal via TUHS tuhs at tuhs.org
Tue Jul 5 07:31:15 AEST 2022


> On 4 Jul 2022, at 22:44, Larry McVoy <lm at mcvoy.com> wrote:
> 
> On Mon, Jul 04, 2022 at 10:09:52PM +0200, Paul Ruizendaal via TUHS wrote:
>> With the above one could do
>> 
>> open("/net/inet/org.tuhs.www:80", O_RDWR | O_STREAM)
>> 
>> to connect to the TUHS web server, and do
>> 
>> open("/net/inet/any:80", O_RDWR | O_STREAM | O_CREAT, 0600)
>> 
>> to create a "listening" (rendez-vous) socket.
> 
> Decades ago, I tried to make a library that worked like this and it
> was problematic.  There are all sorts of setsockopt things that
> you sometimes need to set.
> 
> I'd love to be wrong on this, if anyone has a working, for all of the
> normal use cases, library like this, I'd love to see it.

Wouldn’t setsockopt map nicely to ioctl when there is a file system switch? The ioctl would switch into the network stack specific version naturally.

setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &val, sizeof(int))

would become

ioctl(sd, SO_BROADCAST, &val)

More generally, the issue of meta-data and avoiding that ioctl becomes an intractable dumping ground is not easy to solve.






More information about the TUHS mailing list