streams & sockets (Re: Creating a socket with ISC's libinet.a)

Hwa Jin Bae hwajin at
Thu Jan 18 10:22:10 AEST 1990

In article <404 at zok.UUCP> mark at zok.UUCP (Mark W. Snitily) writes:
   I'm rather comfortable with sockets but know very little about streams.
   What references (books/journals/source code) would people out there
   recommend for learning about streams for the first time?

The STREAMS has no conceptual resemblance to sockets.  It is a kernel
facility that lets you build device drivers and individual modules 
that can be used to implement various system level functions.  It contains
a well defined collection of functions that can be used to manage
bidirectional queues of messages and defines a structure of the software
implementation of STREAMS conforming drivers and modules.  For example,
I've written varous network interface STREAMS drivers for the Motorola System
V Unix for their Delta-series machines that get I_LINK'ed below a multiplexing
IP protocol STREAMS module (actually a driver).  It is a nice model for
implementing modular pieces of software in the kernel.  [There are a couple
individual acquaintences of mine who have implemented a user level hook
into the kernel STREAMS mechanism so that you can actually develop a STREAMS
driver/module at the user level before putting it into the kernel, which
makes the development process go much easier.]

The socket mechanism is a programmer interface to the Berkeley based
networking protocol implementation.  AT&T defines a different programmer
interface called TLI which resembles the semantics of OSI protocol services.
You can actually write a program that uses TCP sockets on a Sun workstation
and another program that uses TCP TLI end-points on a 386 Unix box and
have them talk to each other without any problems, for example.

AT&T and Prentice Hall publishes a set of documents for both TLI and 
STREAMS.  Call your local Unix bookstores.  They'll have both a
"STREAMS primer" and "STREAMS programmer's guide" as well as a
"network programmers guide".

I guess I hear too many people confuse STREAMS with TLI thesedays and
thus have the occasional urge to elaborate the redundant details.
hwajin at
Wind River Systems

More information about the Comp.unix.i386 mailing list