9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man3nsl / t_getprotaddr.3nsl
blobad3b51eae34c434a1c5d3610c6b39ce7e4cc441f
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_GETPROTADDR 3NSL "May 7, 1998"
48 .SH NAME
49 t_getprotaddr \- get the protocol addresses
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <xti.h>
55 \fBint\fR \fBt_getprotaddr\fR(\fBint\fR \fIfd\fR, \fBstruct t_bind *\fR\fIboundaddr\fR,
56      \fBstruct t_bind *\fR\fIpeeraddr\fR);
57 .fi
59 .SH DESCRIPTION
60 .sp
61 .LP
62 This routine is part of the \fBXTI\fR interfaces which evolved from the
63 \fBTLI\fR interfaces. \fBXTI\fR represents the future evolution of these
64 interfaces. However, \fBTLI\fR interfaces are supported for compatibility. When
65 using a \fBTLI\fR routine that has the same name as an \fBXTI\fR routine, the
66 \fBtiuser.h\fR header file must be used.  Refer to the  \fBTLI\fR
67 \fBCOMPATIBILITY\fR section for a description of differences between the two
68 interfaces.
69 .sp
70 .LP
71 The \fBt_getprotaddr()\fR function returns local and remote protocol addresses
72 currently associated with the transport endpoint specified by \fIfd\fR. In
73 \fIboundaddr\fR and \fIpeeraddr\fR the user specifies \fImaxlen\fR, which is
74 the maximum size (in bytes) of the address buffer, and \fIbuf\fR which points
75 to the buffer where the address is to be placed. On return, the \fIbuf\fR field
76 of \fIboundaddr\fR points to the address, if any, currently bound to \fIfd\fR,
77 and the \fIlen\fR field specifies the length of the address. If the transport
78 endpoint is in the \fBT_UNBND\fR state, zero is returned in the \fIlen\fR field
79 of \fIboundaddr\fR. The \fIbuf\fR field of \fIpeeraddr\fR points to the
80 address, if any, currently connected to \fIfd\fR, and the \fIlen\fR field
81 specifies the length of the address. If the transport endpoint is not in the
82 \fBT_DATAXFER,\fR \fBT_INREL,\fR \fBT_OUTCON\fR or  \fBT_OUTREL\fR states, zero
83 is returned in the \fIlen\fR field of \fIpeeraddr\fR. If the  \fImaxlen\fR
84 field of  \fIboundaddr\fR or \fIpeeraddr\fR is set to zero, no address is
85 returned.
86 .SH RETURN VALUES
87 .sp
88 .LP
89 Upon successful completion, a value of  \fB0\fR is returned.  Otherwise, a
90 value of  -1 is returned and \fBt_errno\fR is set to indicate the error.
91 .SH VALID STATES
92 .sp
93 .LP
94 ALL - apart from \fBT_UNINIT\fR.
95 .SH ERRORS
96 .sp
97 .LP
98 On failure, \fBt_errno\fR is set to one of the following:
99 .sp
100 .ne 2
102 \fB\fBTBADF\fR\fR
104 .RS 13n
105 The specified file descriptor does not refer to a transport endpoint.
109 .ne 2
111 \fB\fBTBUFOVFLW\fR\fR
113 .RS 13n
114 The number of bytes allocated for an incoming argument (\fImaxlen)\fR is
115 greater than  \fB0\fR but not sufficient to store the value of that argument.
119 .ne 2
121 \fB\fBTPROTO\fR\fR
123 .RS 13n
124 This error indicates that a communication problem has been detected between XTI
125 and the transport provider for which there is no other suitable XTI error
126 \fB(t_errno)\fR.
130 .ne 2
132 \fB\fBTSYSERR\fR\fR
134 .RS 13n
135 A system error has occurred during execution of this function.
138 .SH TLI COMPATIBILITY
141 In the \fBTLI\fR interface definition, no counterpart of this routine was
142 defined.
143 .SH ATTRIBUTES
146 See \fBattributes\fR(5)  for descriptions of the following attributes:
151 box;
152 c | c
153 l | l .
154 ATTRIBUTE TYPE  ATTRIBUTE VALUE
156 MT Level        Safe
159 .SH SEE ALSO
162 \fBt_bind\fR(3NSL), \fBattributes\fR(5)