[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2


I_PUNLINK streamio Operation

Purpose

Disconnects the two specified streams.

Description

The I_PUNLINK operation is used for disconnecting Multiplexed STREAMS configurations connected by a permanent link.

The I_PUNLINK operation disconnects the two streams specified by the fildes parameter and the arg parameter that are connected with a permanent link. The fildes parameter is the file descriptor of the stream connected to the multiplexing driver. The arg parameter is the multiplexer ID number that was returned by the I_PLINK operation. If the value of the arg parameter is MUXID_ALL, then all streams which are permanently linked to the stream specified by the fildes parameter are disconnected. As in the I_PLINK operation, this operation requires the multiplexing driver to acknowledge the unlink.

Error Codes

If unsuccessful, the errno global variable is set to one of the following values:

ENXIO Hangup received on the fildes parameter.
ETIME Time out occurred before acknowledgment message was received at stream head.
EINVAL The arg parameter is an invalid multiplexer ID number.

OR

The fildes parameter is the file descriptor of a pipe or FIFO.

An I_PUNLINK 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_PUNLINK operation is unsuccessful and the errno global variable is set to the value in the message.

Implementation Specifics

This operation is part of STREAMS Kernel Extensions.

Related Information

The streamio operations.

The I_PLINK streamio operation, I_UNLINK streamio operation.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]