Disconnects the two specified streams.
The I_UNLINK operation is used for disconnecting multiplexed STREAMS configurations.
The I_UNLINK operation disconnects the two streams specified by the fildes parameter and the arg parameter. The fildes parameter is the file descriptor of the stream connected to the multiplexing driver. The fildes parameter must correspond to the stream on which the ioctl I_LINK operation was issued to link the stream below the multiplexing driver. The arg parameter is the multiplexer ID number that was returned by the I_LINK operation. If the value of the arg parameter is -1, then all streams that were linked to the fildes parameter are disconnected. As in the I_LINK operation, this operation requires the multiplexing driver to acknowledge the unlink.
If unsuccessful, the errno global variable is set to one of the following values:
|ENXIO||Hangup received on the fildes parameter.|
|ETIME||Time out before acknowledgment message was received at stream head.|
|ENOSR||Unable to allocate storage to perform the I_UNLINK operation due to insufficient STREAMS memory resources.|
|EINVAL||The arg parameter is an invalid multiplexer ID number or the fildes parameter is not the stream on which the I_LINK operation that returned the arg parameter was performed.|
An I_UNLINK operation can also fail while waiting for the multiplexing driver to acknowledge the link request, if a message indicating an error or a hangup is received at the stream head of the fildes parameter. In addition, an error code can be returned in the positive or negative acknowledgment message. For these cases, the I_UNLINK operation fails and the errno global variable is set to the value in the message.
This operation is part of STREAMS Kernel Extensions.
The streamio operations.
The I_LINK streamio operation, I_PUNLINK streamio operation.
List of Streams Programming References, Understanding streamio (STREAMS ioctl) Operations, Understanding STREAMS Drivers and Modules, Understanding STREAMS Messages in AIX Version 4.3 Communications Programming Concepts.