From mboxrd@z Thu Jan 1 00:00:00 1970 From: steve@quintile.net (Steve Simon) Date: Thu, 21 Sep 2017 20:13:50 +0100 Subject: [TUHS] Sockets and the true UNIX In-Reply-To: <20170921185705.2A31A156E523@mail.bitblocks.com> References: <20170921160112.ctpv4a52t5rjcqzg@matica.foolinux.mooo.com> <201709211613.v8LGDcuN015299@darkstar.fourwinds.com> <20170921185705.2A31A156E523@mail.bitblocks.com> Message-ID: <081D35B4-094C-490E-981D-0ABC9D808EE9@quintile.net> sockets and streams, but what about tli (i think) transport level interface - that exists in one of the sys-v variants. maybe that was streams and i just didn't realise or maybe it was something else? -Steve > On 21 Sep 2017, at 19:56, Bakul Shah wrote: > >> On Thu, 21 Sep 2017 09:13:38 -0700 Jon Steinhart wrote: >> Jon Steinhart writes: >> >> Maybe this is naive of me, but I have never liked parts of the sockets >> interface. I understand that at some level it was a political/legal >> keeping the networking code independent of the rest of the kernel. >>> From a technical and historical standpoint, I view it as the tip of >> the iceberg bloating the number of system calls. > > In a sense the socket interface is a lower level interface > compared to other syscalls. But complicated by the fact that > it tries to be general. > >> In particular, I have often thought that it would have been a better >> and more consistent with the philosophy to have it implemented as >> open("/dev/tcp") and so on. Granted that networking added some new >> functionality that justified some of the system calls, just not socket(). > > This is more or less how plan9 networking is done. Among > other things you can write scripts that can do networking even > though the shell knows nothing about networking. See > http://doc.cat-v.org/plan_9/4th_edition/papers/net/ > > The key is to realize that each protocol defines its own > namespace so this fits naturally in plan9. Allowing services > (programs, kernel or drivers) to define their own namespaces > and making them accessible via a tiny interface to any program > is the main invention of plan9. Similarly ctl files instead > of ioctls.