STREAMS-UX Programmer's Guide (February 2007)

Multiplexing
STREAMS Multiplexor
Chapter 5
123
STREAMS Multiplexor
A STREAMS multiplexing driver or multiplexor is a special purpose STREAMS driver that provides a way to
route messages between different streams. Various multiplexor configurations can be built and dismantled as
explained in the previous sections.
The upper-half of the multiplexor:
Deals with the streams opened to the multiplexor.
Follows the same rules as the streams drivers do regarding unrecognized messages, flushing, and
M_IOCTL processing.
The lower-half of the multiplexor:
Deals with the streams linked below the multiplexor.
Acts like a stream head when processing messages.
A STREAMS multiplexor differs from the regular STREAMS driver in the following ways:
A multiplexor routes messages between multiple streams, instead of between an I/O device and the
streams connected to the device.
For multiplexing drivers, the first two fields in the streamtab structure, st_rdinit and st_wrinit
define the read-side and the write-side qinit structures of the upper-half of the multiplexor. The other
two entries, st_muxrinit and st_muxwinit, define the read-side and the write-side qinit structures of
the lower-half of the multiplexor.