[comp.unix.programmer] using STREAMS for IPC

tq@Software.Mitel.COM (Tom Quan) (03/23/91)

From reading about STREAMS (I'm new to the "modern" UNIX programming
facilities), it's quite clear that it's a beautiful facility for
setting up a communications channel between processes on different
machines.  However, I've also read a reference that says STREAMS can be
used for inter-process communication.  Presumably, this means allowing
two processes on the same machine talk efficiently.

How can STREAMS be set up for IPC?  From reading AT&T's System V
documentation on STREAMS, I've seen no instructions on this.
Hopefully, you don't have to write your own pseudo-driver to connect up
two streams.

Was there an IPC extension for STREAMS in a later release which I'm
unaware of?  (We run ISC 2.2, which gives System V Release 3.2
support.)  Or am I missing something obvious?

Thanks in advance to anyone who can shed some light on this for me.
-- 
Tom Quan
Mitel Corporation, Kanata, Ontario, Canada
tq@software.mitel.com,  uunet!mitel!software!tq

woods@eci386.uucp (Greg A. Woods) (03/28/91)

[ GRRR! -- Why was Followup-to: set to tq@software.mitel.com???? ]
[ Looks like the message-id was broken too! ]

In article <7073@tq> tq@Software.Mitel.COM (Tom Quan) writes:
> How can STREAMS be set up for IPC?  From reading AT&T's System V
> documentation on STREAMS, I've seen no instructions on this.
> Hopefully, you don't have to write your own pseudo-driver to connect up
> two streams.

Reading from Richard Stevens' "UNIX Network Programming" (Prentice
Hall), section 7.9  "Stream Pipes":

	"Stream pipes are implemented using a ``loop around'' driver.
	An example of this type of loop-around driver is shown in
	Section 10.4.1 of Bach [1986] ("The design of the UNIX
	Operating System", Prentice Hall).  A complete implementation
	is given in chapter 10 of AT&T [1989d] ("UNIX System V Release
	3.2 -- STREAMS Programmer's Guide", Prentice Hall).  The
	operation of a loop-around driver is simple:  two streams
	are connected through the driver so that the output of one is
	the input of the other, and vice versa.

	Stream pipes exist in System V Release 3.2, but are not
	documented.  They appear to be provided for and used by AT&T's
	Remote File System (RFS).  The streamio(7) manual page for
	System V/386 Release 3.2 mentions that stream pipes are
	required with the I_SENDFD and I_RECVFD stream commands, yet
	nowhere in the manuals do they describe how to create and use
	stream pipes. [....]"

Stevens goes on with an example of how to createcreate and use a
stream pipe.
-- 
							Greg A. Woods
woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP		ECI and UniForum Canada
+1-416-443-1734 [h]  +1-416-595-5425 [w]  VE3TCP	Toronto, Ontario CANADA
Political speech and writing are largely the defense of the indefensible-ORWELL