sockets library and streams

Doug McCallum dougm at ico.ISC.COM
Wed Apr 26 23:33:25 AEST 1989


In article <634 at eecea.eece.ksu.edu> terry at eecea.eece.ksu.edu (Terry Hull) writes:
>I was wondering if anyone had implemented a sockets library on top of
>streams.  I want to run sockets code on a machine that has a streams
>library, but no sockets library.  It will be a '386 running UNIX SysV
>R3.2.  Alternatively, has anyone tried this and given up?  

I believe that All of the commercial TCP/IP packages for STREAMS have
socket interfaces.  Do you have a protocol you are using or just the
STREAMS mechanism.  STREAMS by itself does not give you a protocol to
work with.

By "streams library", do you mean TLI or just plain STREAMS system calls?

It is possible to implement most of the socket semantics with a library
but you would need at least a pushable module to hold some of the state
necessary.  If you are talking to a protocol that implements the "transport
provider interface" used by TLI, you need to map into those primitives.

Interactive's TCP/IP product implements sockets as a combination library
and pushable module that parallels the TLI module (timod).  The library
uses socket primitives and the module maps those into TPI primitives.  
here are a few places where sockets require operations to be done in a
different sequence than TLI/TPI.  There are also a few places where you
just cannot do things the same way.

So, it can be done and depending on how close you need to match semantics,
it can be done either as a "simple" library or you might need some
additional work.

		Doug McCallum
		Interactive Systems Corp.
		dougm at ico.isc.com



More information about the Comp.unix.questions mailing list