STREAMS Programming Guide

Exit Print View

Updated: July 2014
 
 

Other ioctl Commands

streamio(7I) details the ioctl(2) commands shown in Table 4–2.

Table 4-2  Other ioctl Commands
ioctl Calls
Description
I_ANCHOR
Prevents the removal of a STREAMS module with an I_POP call. Any process can place an anchor on a stream, but once placed, an anchor can only be removed by a privileged process.
I_LOOK
Retrieves the name of the module just below the stream head
I_FLUSH
Flushes all input or output queues
I_FLUSHBAND
Flushes a band of messages
I_FIND
Compares the names of all modules present in the stream to a specific name
I_PEEK
Enables the user to look at information in the first message on the stream head read queue without taking the message off the queue
I_SRDOPT
Sets the read mode using a series of flag options in the argument
I_GRDOPT
Indicates the read mode in an int
I_NREAD
Counts the data bytes in data blocks in the first message on the stream head read queue
I_FDINSERT
Creates a message from a user buffer, adds information about another stream, and sends the message downstream
I_SWROPT
Sets the write mode using the value of the argument
I_GWROPT
Returns the current write mode setting
I_SENDFD
Requests that the stream send a message with file pointer to the stream head at the other end of a STREAMS pipe
I_RECVFD
Retrieves the file descriptor of the message sent by an I_SENDFD ioctl(2) over a STREAMS pipe
I_ATMARK
Lets the application see if the current message on the stream head read queue is marked by a module downstream
I_CKBAND
Checks if the message of a given priority band exists on the stream head read queue
I_GETBAND
Returns the priority band of the first message on the stream head read queue
I_CANPUT
Checks if a certain band is writable
I_SETCLTIME
Enables the user to set the time the stream head will delay when a stream is closing if data exists on the write queues
I_GETCLTIME
Returns the close time delay
I_LINK
Connects two streams
I_UNLINK
Disconnects two streams
I_PLINK
Connects two streams with a persistent link below a multiplexing driver
I_PUNLINK
Disconnects two streams that have been connected with a persistent link