SCTP Programmer's Guide

The sctp_send() SCTP Socket API
Applications can use the sctp_send() SCTP socket API to send data without using
the cmsg header structures. This API is similar to the sendmsg() API, with the
SCTP_SNDRCV option.
Following is the syntax for the sctp_send() SCTP socket API:
int sctp_send(int sd,
const void *msg,
size_t len,
const struct sctp_sndrcvinfo *sinfo,
int flags);
where:
sd
Specifies the socket descriptor.
msg
Specifies the message to be sent.
len
Specifies the length of the message.
sinfo Specifies a pointer to a sctp_sndrcvinfo structure that is used for a
sendmsg() call.
flags
Contains flags similar to the flags passed to the sendmsg() call.
Applications can also use this API to terminate an association using an association ID,
by setting the sinfo.sinfo_flags to MSG_EOF, and the sinfo.sinf_associd to
the association that must be terminated. In this case, the length of the message is 0
(zero).
The sctp_sendx() SCTP Socket API
Applications can use the sctp_sendx() SCTP socket API to send data, without using
the cmsg header structures that provide a list of addresses.
Following is the syntax for the sctp_sendx() SCTP socket API:
int sctp_sendx(int sd,
const void *msg,
size_t len,
struct sockaddr *addrs,
int addrcnt,
struct sctp_sndrcvinfo *sinfo,
int flags);
where:
sd
Specifies the socket descriptor.
msg
Specifies the message to be sent.
len
Specifies the length of the message.
addrs
Specifies an array of addresses.
addrcnt
Specifies the number of addresses in the array.
66 SCTP Socket APIs