Connects two specified streams.
The I_PLINK operation is used for connecting multiplexed STREAMS configurations with a permanent link.
The I_PLINK operation connects two streams, where the fildes parameter is the file descriptor of the stream connected to the multiplexing driver, and the arg parameter is the file descriptor of the stream connected to another driver. The stream designated by the arg parameter gets connected by a permanent link below the multiplexing driver. The I_PLINK operation requires the multiplexing driver to send an acknowledgment message to the stream head regarding the linking operation. This call creates a permanent link which can exist even if the file descriptor associated with the upper stream to the multiplexing driver is closed. This call returns a multiplexer ID number (an identifier used to disconnect the multiplexer; see the I_PUNLINK operation) on success, and a value of -1 on failure.
If unsuccessful, the
errno global variable is set to one of the following values:
|ENXIO||Hangup received on the fildes field.|
|ETIME||Time out occurred before acknowledgment message was received at stream head.|
|EAGAIN||Unable to allocate storage to perform the I_PLINK operation.|
|EBADF||The arg parameter is not a valid, open file descriptor.|
|EINVAL||The fildes parameter does not support multiplexing.|
An I_PLINK operation can also be unsuccessful 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_PLINK operation is unsuccessful with the errno global variable 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.