Connects two specified streams.
The I_LINK operation is used for connecting multiplexed STREAMS configurations.
The I_LINK 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 below the multiplexing driver. The I_LINK operation requires the multiplexing driver to send an acknowledgment message to the stream head regarding the linking operation. This call returns a multiplexer ID number (an identifier used to disconnect the multiplexer; see the I_UNLINK operation) on success, and a value of -1 on failure.
If unsuccessful, the
errno global variable is set to one of the following values:
An I_LINK 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_LINK operation fails 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_UNLINK streamio operation, I_PLINK streamio operation.