[comp.unix.internals] Quest: Sockets in SYSVR3

endrizzi@sctc.com (Michael Endrizzi) (06/18/91)

BSD4.2 embeds the socket structure within a
file table entry. SYS V does not. Where is it
located? Are sockets written as a library
routines talking to a device driver where the
socket information is kept?  When a process forks,
how do the sockets get dup'd?

Not sure if any of this is proprietary. 


			Thanks,

				Dreez

endrizzi@sctc.com (Michael Endrizzi) (06/18/91)

endrizzi@sctc.com (Michael Endrizzi) writes:


>BSD4.2 embeds the socket structure within a
>file table entry. SYS V does not. Where is it
>located? Are sockets written as a library
>routines talking to a device driver where the
>socket information is kept?  When a process forks,
>how do the sockets get dup'd?

Several people mentioned that SYSVR3 does not
have sockets and I agree. I was thinking about
the socket packages that are provided by 3rd
party vendors. I am curious if they integrate 
sockets into the file system or write them as
a device driver.  If any of this is public domain
I am interested in acquiring the code.

However, SYSVR4 does have sockets based on streams
and I am curious how it maintains sockets for dup
and fork operations.


				Dreez

rstevens@noao.edu (Rich Stevens) (06/20/91)

> However, SYSVR4 does have sockets based on streams
> and I am curious how it maintains sockets for dup
> and fork operations.

For all the details on SVR4 sockets, take a look at

	%T Implementing Berkeley Sockets in System V Release 4
	%A I. Vessey
	%A G. Skinner
	%J Proceedings of the 1990 Winter USENIX Conference
	%C Washington, D.C.
	%P 177-193
	%D 1990

In summary, the paper says that it takes both a user library
(socklib) and a streams module (sockmod) to provide sockets
over streams.

	Rich Stevens  (rstevens@noao.edu)

simon@fuquad.westford.ccur.com (Simon Rosenthal) (06/21/91)

In article <1991Jun19.184132.29431@noao.edu> rstevens@noao.edu (Rich Stevens) writes:
>> However, SYSVR4 does have sockets based on streams
>> and I am curious how it maintains sockets for dup
>> and fork operations.
> --
>In summary, the paper says that it takes both a user library
>(socklib) and a streams module (sockmod) to provide sockets
>over streams.
>
>	Rich Stevens  (rstevens@noao.edu)

We are just finishing up a sockets-over-SVR4 Streams implementation.
For binary compatibility reasons, we chose to maintain all existing
socket system calls, and move the socket-to-sockmod "glue" that would
be in a user library such as the one referenced above into the kernel.
No problems with forks, dups, or fcntl operations.

The ATT SVR4 'Programmer's Guide : Networking Interfaces' (published by
Prentice-Hall) has a chapter on moving sockets applications to SVR4 and
the differences between Berkeley and SVR4 sockets implementations.

- Simon
_______________________________________________________________________________
Simon Rosenthal:                         ___________
Concurrent Computer Corporation         / _________/_ 
Westford, MA 01886                     /_/________/ /
Internet: simon@westford.ccur.com       /__________/