Technical data
SunOS 5.5 Ioctl Requests streamio(7I)
I_FDINSERT Creates a message from user specified buffer(s), adds information about
another stream and sends the message downstream. The message con-
tains a control part and an optional data part. The data and control
parts to be sent are distinguishedby placement in separate buffers, as
described below.
arg points to a strfdinsert structure, which contains the following
members:
struct strbuf ctlbuf;
struct strbuf databuf;
long flags;
int fildes;
int offset;
The len field in the ctlbuf strbuf structure (see putmsg(2)) must be set
to the size of a pointer plus the number of bytes of control information
to be sent with the message. fildes in the strfdinsert structure specifies
the file descriptor of the other stream. offset, which must be word-
aligned, specifies the number of bytes beyond the beginning of the con-
trol buffer where I_FDINSERT will store a pointer. This pointer will be
the address of the read queue structure of the driver for the stream
corresponding to fildes in the strfdinsert structure. The len field in the
databuf strbuf structure must be set to the number of bytes of data
information to be sent with the message or zero if no data part is to be
sent.
flags specifies the type of message to be created. An ordinary (non-
priority) message is created if flags is set to 0, a high priority message is
created if flags is set to RS_HIPRI. For normal messages, I_FDINSERT
will block if the stream write queue is full due to internal flow control
conditions. For high priority messages,I_FDINSERT does not block on
this condition. For normal messages, I_FDINSERT does not block when
the write queue is full and O_NDELAY or O_NONBLOCK is set. Instead,
it fails and sets errno toEAGAIN.
I_FDINSERT also blocks, unless prevented by lack of internal resources,
waiting for the availabilityof message blocks, regardless of priority or
whetherO_NDELAY or O_NONBLOCK has been specified. No partial
message is sent. On failure, errno is set to one of the following values:
EAGAIN A non-priority message was specified, theO_NDELAY
or O_NONBLOCK flag is set, and the stream write
queue is full due to internalflow control conditions.
ENOSR Buffers could not be allocated for the message that was
to be created due to insufficientSTREAMS memory
resources.
EFAULT arg points, or the buffer area specified in ctlbuf or data-
buf is, outside the allocated address space.
modified 24 Jan 1995 7I-331










