STREAMS-UX Programmer's Guide (February 2007)

Multiplexing
Building and Dismantling Multiplexors
Chapter 5
112
Figure 5-2 Multiplexor After Link
I_LINK returns an integer value muxid that is used by the multiplexing driver to identify the stream
connected below it. This value is used for routing data through the multiplexor or dismantling the
multiplexor.
The stream associated with muxfd is known as the controlling stream of a multiplexor link. The controlling
stream is the only stream that can be used to dismantle the multiplexor that was created via the I_LINK
command.
Once I_LINK is successful the file descriptor associated with the lower stream can be closed. However, this
will not trigger a close as STREAMS framework maintains a reference to it. When the lower stream is
unlinked, the STREAMS framework closes the stream, if there are no other references to it.
A user process cannot access streams linked below a multiplexor for the duration of the link. If the lower
stream file descriptors are not closed, all future read (), write (), ioctl (), poll (), getmsg (), and
putmsg () system calls issued to them will fail. This is because the I_LINK associates the stream head of
each of the lower streams with the multiplexor thereby denying the user from direct access.