2 .\" Copyright 2004 AT&T
3 .\" Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH CONNLD 7M "May 3, 2004"
9 connld \- line discipline for unique stream connections
13 \fB#include </sys/steam.h>\fR
18 \fBint ioctl(\fIfd\fR,I_PUSH,"connld");\fR
24 \fBconnld\fR is a STREAMS-based module that provides unique connections between
25 server and client processes. It can only be pushed (see \fBstreamio\fR(7I))
26 onto one end of a STREAMS-based pipe that may subsequently be attached to a
27 name in the file system name space with \fBfattach\fR(3C). After the pipe end
28 is attached, a new pipe is created internally when an originating process
29 attempts to \fBopen\fR(2) or \fBcreat\fR(2) the file system name. A file
30 descriptor for one end of the new pipe is packaged into a message identical to
31 that for the ioctl \fBI_SENDFD\fR (see \fBstreamio\fR(7I)) and is transmitted
32 along the stream to the server process on the other end. The originating
33 process is blocked until the server responds.
36 The server responds to the \fBI_SENDFD\fR request by accepting the file
37 descriptor through the \fBI_RECVFD\fR ioctl message. When this happens, the
38 file descriptor associated with the other end of the new pipe is transmitted to
39 the originating process as the file descriptor returned from \fBopen\fR(2) or
43 If the server does not respond to the \fBI_SENDFD\fR request, the stream that
44 the \fBconnld\fR module is pushed on becomes uni-directional because the server
45 will not be able to retrieve any data off the stream until the \fBI_RECVFD\fR
46 request is issued. If the server process exits before issuing the
47 \fBI_RECVFD\fR request, the \fBopen\fR(2) or the \fBcreat\fR(2) invocation will
48 fail and return -1 to the originating process.
51 When the \fBconnld\fR module is pushed onto a pipe, it ignores messages going
52 back and forth through the pipe.
56 On success, an open of \fBconnld\fR returns 0. On failure, \fBerrno\fR is set
57 to the following values:
64 A stream onto which \fBconnld\fR is being pushed is not a pipe or the pipe does
65 not have a write queue pointer pointing to a stream head read queue.
74 The other end of the pipe onto which \fBconnld\fR is being pushed is linked
84 \fBconnld\fR is being pushed onto a pipe end whose other end is no longer
94 An internal pipe could not be created.
103 An \fBM_HANGUP\fR message is at the stream head of the pipe onto which
104 \fBconnld\fR is being pushed.
113 Internal data structures could not be allocated.
122 A file table entry could not be allocated.
128 \fBcreat\fR(2), \fBopen\fR(2), \fBfattach\fR(3C), \fBstreamio\fR(7I)
131 \fISTREAMS Programming Guide\fR