SCTP Programmer's Guide
The sctp_freeladdrs() SCTP Socket API
Applications use the sctp_freeladdrs() API to free all resources allocated by the
sctp_getladdrs() socket API.
Following is the syntax for the sctp_freeladdrs() API:
void sctp_freeladdrs(struct sockaddr *addrs);
where:
addrs Specifies the array of peer addresses returned by the sctp_getladdrs()
socket API.
The sctp_sendmsg() SCTP Socket API
Applications can use sctp_sendmsg() to send an SCTP message. This API is similar
to the sendmsg() call, with the SCTP_SNDRCV option.
Following is the syntax for the sctp_sendmsg() SCTP socket API:
ssize_t sctp_sendmsg(int sd,
const void *msg,
size_t len,
const struct sockaddr *to,
socklen_t tolen,
uint32_t ppid,
uint32_t flags,
uint16_t stream_no,
uint32_t timetolive,
uint32_t context)
where:
sd
Specifies the socket descriptor.
msg
Specifies the message to be sent.
len
Specifies the length of the message.
to
Specifies the destination address of the message.
tolen
Specifies the length of the destination address.
ppid
Specifies the payload protocol identifier, which is entered in the
payload protocol identifier field of the SCTP data header.
flags
Contains flags affecting the message being sent.
stream_no
Contains the stream number of the message.
timetolive
Specifies the TTL value for a message in milliseconds.
context Specifies a 32-bit unsigned integer that is used by sendmsg(). When
an application fails to send the data and an SCTP_SEND_FAILED
notification is sent to the upper layer in the peer application, an
application returns context as part of the information.
64 SCTP Socket APIs