[comp.unix.questions] I_FDINSERT and STREAMS

iservice@gourock.sw.stratus.com (Ian Service) (08/31/90)

	Can someone please give me a clear explanation of I_FDINSERT and where it
might be used?

========================================================
All opinions are my own and do not represent anyone else.
Ian Service				iservice@gourock.sw.stratus.com
Stratus Computer Inc.	        	TEL (508) 460-2352
M/S M3-2-COM,  55 Fairbanks Boulevard	FAX (508) 480-8219
Marlboro MA 01752-1298

sar0@cbnewsl.att.com (stephen.a.rago) (09/06/90)

In article <2182@lectroid.sw.stratus.com>, iservice@gourock.sw.stratus.com (Ian Service) writes:
> 
> 	Can someone please give me a clear explanation of I_FDINSERT and where it
> might be used?

The I_FDINSERT ioctl is a STREAMS ioctl that is used to tell one stream
about another.  It creates an M_PROTO/M_PCPROTO message with optional
user data and stuffs the queue pointer from the driver at the end of
one stream in the message.  The message is sent down the  stream
referenced by the "fd" argument of the ioctl system call.  See
streamio(7) for more details.

It is used in the TLI library when accepting a connection on a stream
other than the one that the connect request came in on.  The only other
use for it I've seen is when creating loopback drivers, one may choose
to link two separate streams together by using this ioctl.

Steve Rago
sar@attunix.att.com