1 .\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
3 .\" Permission is granted to distribute possibly modified copies
4 .\" of this manual provided the header is included verbatim,
5 .\" and in case of nontrivial modification author and date
6 .\" of the modification is added to the header.
8 .TH SCTP_SENDMSG 3 2004-10-25 "Linux 2.6" "Linux Programmer's Manual"
10 sctp_sendmsg \- Send a message from a SCTP socket.
13 .B #include <sys/types.h>
14 .B #include <sys/socket.h>
15 .B #include <netinet/sctp.h>
17 .BI "int sctp_sendmsg(int " sd ", const void * " msg ", size_t " len ,
18 .BI " struct sockaddr *" to ", socklen_t " tolen ,
19 .BI " uint32_t " ppid ", uint32_t " flags ,
20 .BI " uint16_t " stream_no ", uint32_t " timetolive ,
21 .BI " uint32_t " context );
25 is a wrapper library function that can be used to send a message from a socket
26 while using the advanced features of SCTP.
28 is the socket descriptor from which the message pointed to by
34 is the destination address of the message and
36 is the length of the destination address.
38 identifies the stream number that the application wishes to send this message to.
40 parameter is composed of a bitwise OR of the following values.
43 This flags requests the un-ordered delivery of the message.
46 This flag, in the one-to-many style, requests the SCTP stack to override the
47 primary destination address with address specified in
51 Setting this flag causes the specified association to abort by sending an ABORT
52 message to the peer(one-to-many style only). The ABORT chunk will contain an
53 error cause 'User Initiated Abort' with cause code 12. The cause specific
54 information of this error cause is provided in
58 Setting this flag invokes the SCTP graceful shutdown procedure on the specific
59 association(one-to-many style only).
62 specifies the time duration in milliseconds. The sending side will expire the
63 message if the message has not been sent to the peer within this time period.
64 A value of 0 indicates that no timeout should occur on this message.
66 is an opaque unsigned value that is passed to the remote end along with the
69 is a 32 bit opaque value that is passed back to the upper layer along with the
70 undelivered message if an error occurs on the send of the message.
74 returns the number of bytes sent or -1 if an error occurred.
78 .BR sctp_connectx (3),
82 .BR sctp_getpaddrs (3),
83 .BR sctp_getladdrs (3),
84 .BR sctp_opt_info (3),