streamio.7 (2010 09)
s
streamio(7) streamio(7)
the databuf strbuf structure must be set to the number of bytes of data infor-
mation 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) mes-
sage 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 the
O_NONBLOCK is
set. Instead, it fails and sets
errno
to [EAGAIN].
I_FDINSERT also blocks, unless prevented by the lack of internal resources, wait-
ing for the availability of message blocks, regardless of priority or whether
O_NONBLOCK has been specified. No partial message is sent.
I_FDINSERT can also fail if an error message was received by the stream head of
the stream corresponding to fildes in the
strfdinsert structure. In this case,
errno will be set to the value in the message.
I_FIND Compares the names of all modules currently present on the stream to the name
specified in arg. The command returns a value of 1 if the module is present and a
value of 0 (zero) if the module is not present.
I_FLUSH This request flushes all input and/or output queues, depending on the value of arg.
Valid arg values are:
FLUSHRW Flush write and read queues.
FLUSHW Flush write queues.
FLUSHR Flush read queues.
If a pipe or FIFO does not have any modules pushed, the read queue of the streams
head on either end is flushed depending on the value of arg.
If
FLUSHR is set and fildes is a pipe, the read queue for that end of the pipe is
flushed and the write queue for the other end is flushed. If fildes is a FIFO, both
queues are flushed.
If
FLUSHW is set and fildes is a pipe and the other end of the pipe exists, the read
queue for the other end of the pipe is flushed and the write queue for this end is
flushed. If fildes is a FIFO, both queues of the FIFO are flushed.
If
FLUSHRW is set, all read queues are flushed, that is the read queue for the FIFO
and the read queue of boths ends of the pipe are flushed.
Correct flushing handling of a pipe or FIFO with modules pushed is achieved via
the
pipemod module. This module should be the first module pushed onto a pipe
so that it is at the midpoint of the pipe itself.
I_FLUSHBAND
Flushes a particular band of messages. arg points to a bandinfo structure that
has the following members:
unsigned char bi_pri:
int bi_flag;
The value of the bi_flag field can be FLUSHR, FLUSHW,or FLUSHRW as described
for the I_FLUSH command.
I_GETBAND Returns the priority band of the first message on the stream head read queue in the
integer referenced by arg .
I_GETCLTIME
Returns the close time delay in the long pointed by arg.
I_SETCLTIME
Allows the user to set the time that the stream head will delay when a stream is
closing, and there is data on the write queues. Before closing each module and
driver, the stream head will delay for the specified amount of time to allow the data
to drain. If, after the delay, data is still present, data will be flushed. arg is a
pointer to the number of milliseconds to delay, rounded up to the nearest valid
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010