'\" te .\" Copyright 2004 AT&T .\" Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH connld 7M "3 May 2004" "SunOS 5.11" "STREAMS Modules" .SH NAME connld \- line discipline for unique stream connections .SH SYNOPSIS .LP .nf \fB#include \fR .fi .LP .nf \fBint ioctl(\fIfd\fR,I_PUSH,"connld");\fR .fi .SH DESCRIPTION .sp .LP \fBconnld\fR is a STREAMS-based module that provides unique connections between server and client processes. It can only be pushed (see \fBstreamio\fR(7I)) onto one end of a STREAMS-based pipe that may subsequently be attached to a name in the file system name space with \fBfattach\fR(3C). After the pipe end is attached, a new pipe is created internally when an originating process attempts to \fBopen\fR(2) or \fBcreat\fR(2) the file system name. A file descriptor for one end of the new pipe is packaged into a message identical to that for the ioctl \fBI_SENDFD\fR (see \fBstreamio\fR(7I)) and is transmitted along the stream to the server process on the other end. The originating process is blocked until the server responds. .sp .LP The server responds to the \fBI_SENDFD\fR request by accepting the file descriptor through the \fBI_RECVFD\fR ioctl message. When this happens, the file descriptor associated with the other end of the new pipe is transmitted to the originating process as the file descriptor returned from \fBopen\fR(2) or \fBcreat\fR(2). .sp .LP If the server does not respond to the \fBI_SENDFD\fR request, the stream that the \fBconnld\fR module is pushed on becomes uni-directional because the server will not be able to retrieve any data off the stream until the \fBI_RECVFD\fR request is issued. If the server process exits before issuing the \fBI_RECVFD\fR request, the \fBopen\fR(2) or the \fBcreat\fR(2) invocation will fail and return -1 to the originating process. .sp .LP When the \fBconnld\fR module is pushed onto a pipe, it ignores messages going back and forth through the pipe. .SH ERRORS .sp .LP On success, an open of \fBconnld\fR returns 0. On failure, \fBerrno\fR is set to the following values: .sp .ne 2 .mk .na \fB\fBEINVAL\fR \fR .ad .RS 11n .rt A stream onto which \fBconnld\fR is being pushed is not a pipe or the pipe does not have a write queue pointer pointing to a stream head read queue. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR \fR .ad .RS 11n .rt The other end of the pipe onto which \fBconnld\fR is being pushed is linked under a multiplexor. .RE .sp .ne 2 .mk .na \fB\fBEPIPE\fR \fR .ad .RS 11n .rt \fBconnld\fR is being pushed onto a pipe end whose other end is no longer there. .RE .sp .ne 2 .mk .na \fB\fBENOMEM\fR \fR .ad .RS 11n .rt An internal pipe could not be created. .RE .sp .ne 2 .mk .na \fB\fBENXIO\fR \fR .ad .RS 11n .rt An \fBM_HANGUP\fR message is at the stream head of the pipe onto which \fBconnld\fR is being pushed. .RE .sp .ne 2 .mk .na \fB\fBEAGAIN\fR \fR .ad .RS 11n .rt Internal data structures could not be allocated. .RE .sp .ne 2 .mk .na \fB\fBENFILE\fR \fR .ad .RS 11n .rt A file table entry could not be allocated. .RE .SH SEE ALSO .sp .LP \fBcreat\fR(2), \fBopen\fR(2), \fBfattach\fR(3C), \fBstreamio\fR(7I) .sp .LP \fISTREAMS Programming Guide\fR