streamio.7 (2010 09)

s
streamio(7) streamio(7)
value on the system. The default is fifteen seconds.
I_GETSIG Returns the events for which the calling process has registered to receive a
SIG-
POLL signal. Events are returned as in arg bitmask as defined for the
I_SETSIG
command.
I_GRDOPT Returns the current read mode setting in an int pointed to by the argument arg.
Read modes are described in read (2).
I_GWROPT Returns the current write mode setting, as described in
I_SWROPT, in the int that
is pointed to by the argument arg.
I_LINK Connects two streams, where fildes is the file descriptor of the stream connected to
the multiplexing driver, and arg is the file descriptor of the stream connected to
another driver. The stream designated by arg gets connected below the multiplex-
ing driver. I_LINK requires the multiplexing driver to send an acknowledgement
message to the stream head regarding the linking operation. This call returns a
multiplexor ID number (an identifier used to disconnect the multiplexor, see
I_UNLINK) on success, and 1 on failure.
I_LIST Allows the user to list all the module names on the stream, up to and including the
topmost driver name. If arg is NULL, the return value is the number of modules,
including the driver, that are on the stream pointed to by fildes. This allows the
user to allocate enough space for the module names. If arg is not NULL, it should
point to a str_list structure that has the following members:
int sl_nmods;
struct str_mlist *sl_modlist;
The str_mlist structure has the following member:
char l_name[FMNAMESZ+1];
sl_nmods indicates the number of entries the user has allocated in the array. On
success, the return value is 0, sl_modlist contains the list of module names, and
sl_nmods indicates the number of entries that have been filled in.
I_LOOK Retrieves the name of the module located just below the streams head of the stream
pointed to by fildes, and places it in a null terminated character string pointed at by
arg. The buffer pointed to by arg should be at least FNAMESZ+1 bytes long. A
#include <stropts.h> declaration is required.
I_NREAD Counts the number of data bytes in data blocks in the first message on the stream
head read queue, and places this value in the location pointed to by arg. The
return value for the command is the number of messages on the stream head read
queue. For example, if zero is returned in arg, but the ioctl return value is
greater than zero, this indicates that a zero-length message is next on the queue.
I_PEEK Allows the user process to look (peek) at the contents of the first message on the
stream head read queue. This is done without taking the message off the queue.
The I_PEEK ioctl operates the same way as the getmsg() function, except
that it does not remove the message. The arg parameter points to a strpeek
structure (in the <stropts.h> header file) with the following members:
struct strbuf ctlbuf;
struct strbuf databuf;
long flags;
The strbuf structure pointed to by ctlbuf and databuf has the following
members:
int maxlen;
int len;
char *buf
The maxlen field of the strbuf structure must specify the number of bytes of con-
trol or data information to be retrieved. The flags field can be set to RS_HIPRI or
0 (zero). If this field is set to RS_HIPRI, the I_PEEK ioctl looks for a high
priority message on the queue. If the field is set to 0, the I_PEEK ioctl looks at
the first message on the queue.
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3