Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site cheviot.uucp
Path: utzoo!linus!philabs!prls!amdimage!amdcad!amd!vecpyr!lll-crg!seismo!mcvax!ukc!cheviot!robert
From: robert@cheviot.uucp (Robert Stroud)
Newsgroups: net.lan
Subject: Re: socket library under System V?
Message-ID: <413@cheviot.uucp>
Date: Thu, 15-Aug-85 09:37:22 EDT
Article-I.D.: cheviot.413
Posted: Thu Aug 15 09:37:22 1985
Date-Received: Tue, 20-Aug-85 06:42:32 EDT
References: <284@SCIRTP.UUCP> <3070002@csd2.UUCP>
Reply-To: robert@cheviot.UUCP (Robert Stroud)
Organization: U. of Newcastle upon Tyne, U.K.
Lines: 39

David Hinnant (dfh@SCIRTP.UUCP) asked about library implementations
of the 4.2 socket interface.

Joachim Martillo (martillo@csd2.UUCP) replied and argued that the socket
interface gave a uniform approach to ipc whilst the library approach was
inflexible and inefficient because of all the protocol dependent code
which got linked into the user program. (See <3070002@csd2.UUCP> for the
original article).

I always thought that a library implementation of sockets simply mapped 
calls like socket, bind and send more or less directly into open,
ioctl and write. I don't see why you can't keep all the protocol dependent
code inside the kernel. Is it really that difficult to bend the socket
interface to fit the conventional device driver interface? If it is a
little awkward, then all the more reason to hide the grotty details in
a library, but why go to the trouble of introducing a new set of system
calls when the old ones are more or less adequate?? 

I'm not necessarily suggesting that the socket abstraction is a bad one, 
but does it have to be in the kernel? We all use the  library
and that's not part of the kernel...!

Please don't flame me about this - it's a serious question and I would
appreciate some discussion of the issues involved. It has been suggested that
the 8th Edition concept of a Stream can be used to implement sockets, 
presumably through the ordinary open/read/write/ioctl special device 
interface. Would anyone care to expand on this?

One of the systems I use, (a Perq running PNX), provides both a datagram
and transport service on an Ethernet in a conventional way without sockets
so it can be done!

Robert Stroud,
Computing Laboratory,
University of Newcastle upon Tyne.

ARPA robert%cheviot.newcastle@ucl-cs.ARPA
UUCP ...!ukc!cheviot!robert
JANET robert@uk.ac.newcastle.cheviot (or robert@neda)