7139 Sync mDNS with mDNSResponder-625.41.2
[unleashed.git] / usr / src / man / man3nsl / t_sndvudata.3nsl
blobb7ba91e1e6a0b1e29b934b6a066494f8e2fef01f
1 '\" te
2 .\" Copyright 1994, The X/Open Company Ltd.  All Rights Reserved
3 .\" Portions Copyright 1989 AT&T
4 .\" Portions Copyright (c) 1998, Sun Microsystems, Inc.  All Rights Reserved
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
6 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
8 .\"  This notice shall appear on any product containing this material.
9 .\" 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.
10 .\" 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.
11 .\" 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]
12 .TH T_SNDVUDATA 3NSL "Aug 23, 2001"
13 .SH NAME
14 t_sndvudata \- send a data unit from one or more noncontiguous buffers
15 .SH SYNOPSIS
16 .LP
17 .nf
18 #include <xti.h>
23 \fBint\fR \fBt_sndvudata\fR(\fBint\fR \fIfd\fR, \fBstruct t_unitdata *\fR\fIunitdata\fR, \fBstruct t_iovec  *\fR\fIiov\fR,
24      \fBunsigned int\fR \fIiovcount\fR);
25 .fi
27 .SH DESCRIPTION
28 .sp
29 .LP
30 This function is used in connectionless mode to send a data unit to another
31 transport user.  The argument  \fIfd\fR identifies the local transport endpoint
32 through which data will be sent,  \fIiovcount\fR contains the number of
33 non-contiguous  \fIudata\fR buffers and is limited to an implementation-defined
34 value given by  \fBT_IOV_MAX\fR which is at least 16, and  \fIunitdata\fR
35 points to a  \fBt_unitdata\fR structure containing the following members:
36 .sp
37 .in +2
38 .nf
39 struct netbuf addr;
40 struct netbuf opt;
41 struct netbuf udata;
42 .fi
43 .in -2
45 .sp
46 .LP
47 If the limit on  \fIiovcount\fR is exceeded, the function fails with
48 \fBTBADDATA\fR.
49 .sp
50 .LP
51 In  \fBunitdata\fR, \fIaddr\fR specifies the protocol address of the
52 destination user, and  \fIopt\fR identifies options that the user wants
53 associated with this request. The  \fIudata\fR field is not used.  The user may
54 choose not to specify what protocol options are associated with the transfer by
55 setting the  \fIlen\fR field of  \fIopt\fR to zero.  In this case, the provider
56 may use default options.
57 .sp
58 .LP
59 The data to be sent is identified by  \fIiov\fR\fB[0]\fR\fI\fR through \fIiov
60 [iovcount-1]\fR\fB\&.\fR
61 .sp
62 .LP
63 Note that the limit on the total number of bytes available in all buffers
64 passed:
65 .sp
66 .in +2
67 .nf
68 \fIiov(0).iov_len + . . + iov(iovcount-1).iov_len \fR
69 .fi
70 .in -2
72 .sp
73 .LP
74 may be constrained by implementation limits. If no other constraint applies, it
75 will be limited by \fBINT_MAX\fR. In practice, the availability of memory to an
76 application is likely to impose a lower limit on the amount of data that can be
77 sent or received using scatter/gather functions.
78 .sp
79 .LP
80 By default,  \fBt_sndvudata()\fR operates in synchronous mode and may wait if
81 flow control restrictions prevent the data from being accepted by the local
82 transport provider at the time the call is made.  However, if  \fBO_NONBLOCK\fR
83 is set by means of  \fBt_open\fR(3NSL) or  \fBfcntl\fR(2), \fBt_sndvudata()\fR
84 executes in asynchronous mode and will fail under such conditions.  The process
85 can arrange to be notified of the clearance of a flow control restriction by
86 means of either  \fBt_look\fR(3NSL) or the EM interface.
87 .sp
88 .LP
89 If the amount of data specified in  \fIiov\fR\fB0\fR\fI\fR through \fIiov
90 [iovcount-1]\fR exceeds the TSDU size as returned in the  \fItsdu\fR field of
91 the  \fIinfo\fR argument of \fBt_open\fR(3NSL) or  \fBt_getinfo\fR(3NSL), or is
92 zero and sending of zero octets is not supported by the underlying transport
93 service, a \fBTBADDATA\fR error is generated.  If  \fBt_sndvudata()\fR is
94 called before the destination user has activated its transport endpoint (see
95 \fBt_bind\fR(3NSL)\|), the data unit may be discarded.
96 .sp
97 .LP
98 If it is not possible for the transport provider to immediately detect the
99 conditions that cause the errors \fBTBADDADDR\fR and \fBTBADOPT\fR, these
100 errors will alternatively be returned by  \fBt_rcvuderr\fR(3NSL). An
101 application must therefore be prepared to receive these errors in both of these
102 ways.
103 .SH RETURN VALUES
106 Upon successful completion, a value of  \fB0\fR is returned. Otherwise, a value
107 of  -1 is returned and  \fBt_errno\fR is set to indicate an error.
108 .SH VALID STATES
111 \fBT_IDLE\fR.
112 .SH ERRORS
115 On failure,  \fBt_errno\fR is set to one of the following:
117 .ne 2
119 \fB\fBTBADADDR\fR\fR
121 .RS 15n
122 The specified protocol address was in an incorrect format or contained illegal
123 information.
127 .ne 2
129 \fB\fBTBADDATA\fR\fR
131 .RS 15n
132 Illegal amount of data.
133 .RS +4
135 .ie t \(bu
136 .el o
137 A single send was attempted specifying a TSDU greater than that specified in
138 the \fIinfo\fR argument, or a send of a zero byte TSDU is not supported by the
139 provider.
141 .RS +4
143 .ie t \(bu
144 .el o
145 \fIiovcount\fR is greater than  \fBT_IOV_MAX.\fR
150 .ne 2
152 \fB\fBTBADF\fR\fR
154 .RS 15n
155 The specified file descriptor does not refer to a transport endpoint.
159 .ne 2
161 \fB\fBTBADOPT\fR\fR
163 .RS 15n
164 The specified options were in an incorrect  format or contained illegal
165 information.
169 .ne 2
171 \fB\fBTFLOW\fR\fR
173 .RS 15n
174 \fBO_NONBLOCK\fR \fBi\fR was set, but the flow control mechanism prevented the
175 transport provider from accepting any data at this time.
179 .ne 2
181 \fB\fBTLOOK\fR\fR
183 .RS 15n
184 An asynchronous event has occurred on this transport endpoint.
188 .ne 2
190 \fB\fBTNOTSUPPORT\fR\fR
192 .RS 15n
193 This function is not supported by the underlying transport provider.
197 .ne 2
199 \fB\fBTOUTSTATE\fR\fR
201 .RS 15n
202 The communications endpoint referenced by \fIfd\fR is not in one of the states
203 in which a call to this function is valid.
207 .ne 2
209 \fB\fBTPROTO\fR\fR
211 .RS 15n
212 This error indicates that a communication problem has been detected between XTI
213 and the transport provider for which there is no other suitable XTI error
214 \fB(t_errno)\fR.
218 .ne 2
220 \fB\fBTSYSERR\fR\fR
222 .RS 15n
223 A system error has occurred during execution of this function.
226 .SH TLI COMPATIBILITY
229 In the \fBTLI\fR interface definition, no counterpart of this routine was
230 defined.
231 .SH ATTRIBUTES
234 See \fBattributes\fR(5)  for descriptions of the following attributes:
239 box;
240 c | c
241 l | l .
242 ATTRIBUTE TYPE  ATTRIBUTE VALUE
244 MT Level        Safe
247 .SH SEE ALSO
250 \fBfcntl\fR(2), \fBt_alloc\fR(3NSL), \fBt_open\fR(3NSL),
251 \fBt_rcvudata\fR(3NSL), \fBt_rcvvudata\fR(3NSL) \fBt_rcvuderr\fR(3NSL),
252 \fBt_sndudata\fR(3NSL), \fBattributes\fR(5)