1SCTP_SENDMSG(3)            Linux Programmer's Manual           SCTP_SENDMSG(3)
2
3
4

NAME

6       sctp_sendmsg - Send a message from a SCTP socket.
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <sys/socket.h>
11       #include <netinet/sctp.h>
12
13       int sctp_sendmsg(int sd, const void * msg, size_t len,
14                        struct sockaddr *to, socklen_t tolen,
15                        uint32_t ppid, uint32_t flags,
16                        uint16_t stream_no, uint32_t timetolive,
17                        uint32_t context);
18

DESCRIPTION

20       sctp_sendmsg  is  a wrapper library function that can be used to send a
21       message from a socket while using the advanced features of SCTP.  sd is
22       the  socket  descriptor  from  which  the  message pointed to by msg of
23       length len is sent.  to is the destination address of the  message  and
24       tolen  is  the length of the destination address.  stream_no identifies
25       the stream number that the application wishes to send this message  to.
26       flags parameter is composed of a bitwise OR of the following values.
27
28       SCTP_UNORDERED
29              This flags requests the un-ordered delivery of the message.
30
31       SCTP_ADDR_OVER
32              This  flag, in the one-to-many style, requests the SCTP stack to
33              override the primary destination address with address  specified
34              in to.
35
36       SCTP_ABORT
37              Setting  this  flag causes the specified association to abort by
38              sending an ABORT message to the  peer(one-to-many  style  only).
39              The  ABORT  chunk  will  contain  an error cause 'User Initiated
40              Abort' with cause code 12. The  cause  specific  information  of
41              this error cause is provided in msg.
42
43       SCTP_EOF
44              Setting  this  flag invokes the SCTP graceful shutdown procedure
45              on the specific association(one-to-many style only).
46
47       timetolive specifies the time duration  in  milliseconds.  The  sending
48       side  will  expire  the message if the message has not been sent to the
49       peer within this time period.  A value of 0 indicates that  no  timeout
50       should occur on this message.  ppid is an opaque unsigned value that is
51       passed to the remote end along with the message.  context is a  32  bit
52       opaque  value  that  is  passed  back to the upper layer along with the
53       undelivered message if an error occurs on the send of the message.
54

RETURN VALUE

56       On success, sctp_sendmsg returns the number of bytes sent or -1  if  an
57       error occurred.
58

SEE ALSO

60       sctp(7)  sctp_bindx(3),  sctp_connectx(3), sctp_sendv(3), sctp_send(3),
61       sctp_recvmsg(3),  sctp_recvv(3),  sctp_peeloff(3),   sctp_getpaddrs(3),
62       sctp_getladdrs(3), sctp_opt_info(3),
63
64
65
66Linux 2.6                         2004-10-25                   SCTP_SENDMSG(3)
Impressum