9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man3nsl / t_rcvconnect.3nsl
blobf6a2b96cb5c657677a63e299d418e1fcd0d92ecb
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Portions Copyright 1989 AT&T
44 .\" Copyright 1994, The X/Open Company Ltd.  All Rights Reserved.
45 .\" Portions Copyright (c) 1998, Sun Microsystems, Inc.  All Rights Reserved.
46 .\"
47 .TH T_RCVCONNECT 3NSL "May 7, 1998"
48 .SH NAME
49 t_rcvconnect \- receive the confirmation from a connection request
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <xti.h>
57 \fBint\fR \fBt_rcvconnect\fR(\fBint\fR \fIfd\fR, \fBstruct t_call *\fR\fIcall\fR);
58 .fi
60 .SH DESCRIPTION
61 .sp
62 .LP
63 This routine is part of the \fBXTI\fR interfaces which evolved from the
64 \fBTLI\fR interfaces. \fBXTI\fR represents the future evolution of these
65 interfaces. However, \fBTLI\fR interfaces are supported for compatibility. When
66 using a \fBTLI\fR routine that has the same name as an \fBXTI\fR routine, the
67 \fBtiuser.h\fR header file must be used.  Refer to the  \fBTLI\fR
68 \fBCOMPATIBILITY\fR section for a description of differences between the two
69 interfaces.
70 .sp
71 .LP
72 This function enables a calling transport user to determine the status of a
73 previously sent connection request and is used in conjunction with
74 \fBt_connect\fR(3NSL) to establish a connection in asynchronous mode, and to
75 complete a synchronous  \fBt_connect\fR(3NSL) call that was interrupted by a
76 signal. The connection will be established on successful completion of this
77 function.
78 .sp
79 .LP
80 The argument \fIfd\fR identifies the local transport endpoint where
81 communication will be established, and \fIcall\fR contains information
82 associated with the newly established connection. The argument \fIcall\fR
83 points to a \fBt_call\fR structure which contains the following members:
84 .sp
85 .in +2
86 .nf
87 \fBstruct netbuf addr;
88 struct netbuf opt;
89 struct netbuf udata;
90 int sequence;\fR
91 .fi
92 .in -2
94 .sp
95 .LP
96 In \fIcall\fR, \fIaddr\fR returns the protocol address associated with the
97 responding transport endpoint, \fIopt\fR presents any options associated with
98 the connection, \fIudata\fR points to optional user data that may be returned
99 by the destination transport user during connection establishment, and
100 \fIsequence\fR has no meaning for this function.
103 The \fImaxlen\fR field of each argument must be set before issuing this
104 function to indicate the maximum size of the buffer for each. However,
105 \fImaxlen\fR can be set to zero, in which case no information to this specific
106 argument is given to the user on the return from  \fBt_rcvconnect()\fR. If
107 \fIcall\fR is set to  \fINULL,\fR no information at all is returned. By
108 default, \fBt_rcvconnect()\fR executes in synchronous mode and waits for the
109 connection to be established before returning. On return, the \fIaddr\fR,
110 \fIopt\fR and \fIudata\fR fields reflect values associated with the connection.
113 If  \fBO_NONBLOCK\fR is set by means of \fBt_open\fR(3NSL) or \fBfcntl\fR(2),
114 \fBt_rcvconnect()\fR executes in asynchronous mode, and reduces to a poll for
115 existing connection confirmations. If none are available, \fBt_rcvconnect()\fR
116 fails and returns immediately without waiting for the connection to be
117 established. See \fBTNODATA\fR below. In this case, \fBt_rcvconnect()\fR must
118 be called again to complete the connection establishment phase and retrieve the
119 information returned in \fIcall\fR.
120 .SH RETURN VALUES
123 Upon successful completion, a value of  \fB0\fR is returned.  Otherwise, a
124 value of  -1 is returned and \fBt_errno\fR is set to indicate an error.
125 .SH VALID STATES
128 \fBT_OUTCON\fR.
129 .SH ERRORS
132 On failure, \fBt_errno\fR is set to one of the following:
134 .ne 2
136 \fB\fBTBADF\fR\fR
138 .RS 15n
139 The specified file descriptor does not refer to a transport endpoint.
143 .ne 2
145 \fB\fBTBUFOVFLW\fR\fR
147 .RS 15n
148 The number of bytes allocated for an incoming argument \fI(maxlen)\fR is
149 greater than  \fB0\fR but not sufficient to store the value of that argument,
150 and the connection information to be returned in \fIcall\fR will be discarded.
151 The provider's state, as seen by the user, will be changed to
152 \fBT_DATAXFER.\fR
156 .ne 2
158 \fB\fBTLOOK\fR\fR
160 .RS 15n
161 An asynchronous event has occurred on this transport connection and requires
162 immediate attention.
166 .ne 2
168 \fB\fBTNODATA\fR\fR
170 .RS 15n
171 \fBO_NONBLOCK\fR was set, but a connection confirmation has not yet arrived.
175 .ne 2
177 \fB\fBTNOTSUPPORT\fR\fR
179 .RS 15n
180 This function is not supported by the underlying transport provider.
184 .ne 2
186 \fB\fBTOUTSTATE\fR\fR
188 .RS 15n
189 The communications endpoint referenced by  \fIfd\fR is not in one of the states
190 in which a call to this function is valid.
194 .ne 2
196 \fB\fBTPROTO\fR\fR
198 .RS 15n
199 This error indicates that a communication problem has been detected between XTI
200 and the transport provider for which there is no other suitable XTI error
201 \fB(t_errno)\fR.
205 .ne 2
207 \fB\fBTSYSERR\fR\fR
209 .RS 15n
210 A system error has occurred during execution of this function.
213 .SH TLI COMPATIBILITY
216 The \fBXTI\fR and \fBTLI\fR interface definitions have common names but use
217 different header files. This, and other semantic differences between the two
218 interfaces are described in the subsections below.
219 .SS "Interface Header"
222 The \fBXTI\fR interfaces use the header file, \fBxti.h\fR. \fBTLI\fR interfaces
223 should \fInot\fR use this header.  They should use the header:
225 .in +2
226 #include<tiuser.h>
227 .in -2
228 .SS "Error Description Values"
231 The \fBt_errno\fR value \fBTPROTO\fR can be set by the \fBXTI\fR interface but
232 not by the \fBTLI\fR interface.
235 A \fBt_errno\fR value that this routine can return under different
236 circumstances than its \fBXTI\fR counterpart is \fBTBUFOVFLW\fR. It can be
237 returned even when the \fBmaxlen\fR field of the corresponding buffer has been
238 set to zero.
239 .SH ATTRIBUTES
242 See \fBattributes\fR(5)  for descriptions of the following attributes:
247 box;
248 c | c
249 l | l .
250 ATTRIBUTE TYPE  ATTRIBUTE VALUE
252 MT Level        Safe
255 .SH SEE ALSO
258 \fBfcntl\fR(2), \fBt_accept\fR(3NSL), \fBt_alloc\fR(3NSL), \fBt_bind\fR(3NSL),
259 \fBt_connect\fR(3NSL), \fBt_listen\fR(3NSL), \fBt_open\fR(3NSL),
260 \fBt_optmgmt\fR(3NSL), \fBattributes\fR(5)