STREAMS-UX Programmer's Guide (February 2007)
Multiplexing
Persistent Links
Chapter 5
121
Dismantling Persistent Links
Use ioctl I_PUNLINK to dismantle the persistent link between a stream opened to the multiplexor and the
stream connected below the multiplexing driver. Its format is:
ioctl(muxfd, I_PUNLINK, muxid);
muxfd
Is a file descriptor associated with a stream opened to a multiplexing driver (upper stream).
muxid
Is the muxid returned by the I_PLINK ioctl for the stream that was connected below the
multiplexor.
There may be multiple streams persistently linked beneath a multiplexing driver. Each of these persistent
links can be individually unlinked with the I_PUNLINK ioctl by specifying the muxid associated with them,
or an I_PUNLINK ioctl with the muxid value of MUXID_ALL.
The following code snippet will dismantle the configuration given in Figure 5.4.
...
muxfd = open("/dev/mux", O_RDWR);
/* retrive the saved muxid */
ioctl(muxfd, I_PUNLINK, muxid);
...