STREAMS Programming Guide

Exit Print View

Updated: July 2014
 
 

M_FLUSH Message Handling

All modules and drivers are expected to handle M_FLUSH messages. An M_FLUSH message can originate at the stream head or from a module or a driver. The user can cause data to be flushed from queued messages of a stream by submitting an I_FLUSH ioctl(2). Data can be flushed from the read side, write side, or both sides of a stream.

ioctl(fd,I_FLUSH, arg);

The first byte of the M_FLUSH message is an option flag. The following table describes the possible values for this flag.

Table 8-1  M_FLUSH Arguments and bi_flag Values
Flag
Description
FLUSHR
Flush read side of stream
FLUSHW
Flush write queue
FLUSHRW
Flush both, read and write, queues
FLUSHBAND
Flush a specified priority band only