summaryrefslogtreecommitdiff
path: root/usr/src/man/man7m/connld.7m
blob: ea47583601e1b40ff275e73581c29f29879c24ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
'\" 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 "May 3, 2004"
.SH NAME
connld \- line discipline for unique stream connections
.SH SYNOPSIS
.LP
.nf
\fB#include </sys/steam.h>\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
.na
\fB\fBEINVAL\fR \fR
.ad
.RS 11n
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
.na
\fB\fBEINVAL\fR \fR
.ad
.RS 11n
The other end of the pipe onto which \fBconnld\fR is being pushed is linked
under a multiplexor.
.RE

.sp
.ne 2
.na
\fB\fBEPIPE\fR \fR
.ad
.RS 11n
\fBconnld\fR is being pushed onto a pipe end whose other end is no longer
there.
.RE

.sp
.ne 2
.na
\fB\fBENOMEM\fR \fR
.ad
.RS 11n
An internal pipe could not be created.
.RE

.sp
.ne 2
.na
\fB\fBENXIO\fR \fR
.ad
.RS 11n
An  \fBM_HANGUP\fR message is at the stream head of the pipe onto which
\fBconnld\fR is being pushed.
.RE

.sp
.ne 2
.na
\fB\fBEAGAIN\fR \fR
.ad
.RS 11n
Internal data structures could not be allocated.
.RE

.sp
.ne 2
.na
\fB\fBENFILE\fR \fR
.ad
.RS 11n
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