2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SCTP_SEND 3SOCKET "Mar 19, 2004"
8 sctp_send \- send message from an SCTP socket
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsocket\fR \fB -lnsl \fR \fB -lsctp \fR [ \fIlibrary\fR... ]
13 #include <sys/types.h>
14 #include <sys/socket.h>
15 #include <netinet/sctp.h>
17 \fBssize_t\fR \fBsctp_send\fR(\fBint\fR \fIs\fR, \fBconst void *\fR\fImsg\fR, \fBsize_t *\fR\fIlen\fR,
18 \fBconst struct sctp_sndrcvinfo *\fR\fIsinfo\fR, \fBint\fR \fIflags\fR);
23 The \fBsctp_send()\fR function sends messages from one-to-one and one-to-many
24 style SCTP endpoints. The following parameters can be set:
31 Socket created by \fBsocket\fR(3SOCKET)
49 Size of the message to be sent in bytes
54 The caller completes the \fIsinfo\fR parameter with values used to send a
55 message. Such values might include the stream number, payload protocol
56 identifier, time to live, and the SCTP message flag and context. For a
57 one-to-many socket, the association ID can be specified in the \fIsinfo\fR
58 parameter to send a message to the association represented in the ID.
61 Flags supported for \fBsctp_send()\fR are reserved for future use.
64 Upon successful completion, the \fBsctp_send()\fR function returns the number
65 of bytes sent. The function returns \fB-1\fR if an error occurs.
68 The \fBsctp_send()\fR function fails under the following conditions.
75 The \fIs\fR argument is an invalid file descriptor.
84 The \fIs\fR argument is not a socket.
90 \fB\fBEOPNOTSUPP\fR\fR
93 \fBMSG_ABORT\fR or \fBMSG_EOF\fR is set in the \fBsinfo_flags\fR field of
94 \fBsinfo\fR for a one-to-one style SCTP socket.
103 The socket is shutting down and no more writes are allowed.
112 The socket is non-blocking and the transmit queue is full.
121 There is no established association.
130 Control message length is incorrect.
139 Specified destination address does not belong to the association.
148 The \fBstream_no\fR is outside the number of outbound streams supported by the
155 \fB\fBEAFNOSUPPORT\fR\fR
158 Address family of the specified destination address is other than \fBAF_INET\fR
164 See \fBattributes\fR(5) for descriptions of the following attributes:
172 ATTRIBUTE TYPE ATTRIBUTE VALUE
174 Interface Stability Evolving
181 \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET),
182 \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBlisten\fR(3SOCKET),
183 \fBsctp_sendmsg\fR(3SOCKET), \fBsendmsg\fR(3SOCKET), \fBsocket\fR(3SOCKET),
184 \fBsocket.h\fR(3HEAD), \fBsctp\fR(7P)