SCTP Programmer's Guide
Following is the data structure for the sctp_sndrcvinfo structure:
struct sctp_sndrcvinfo {
uint16_t sinfo_stream;
uint16_t sinfo_ssn;
uint16_t sinfo_flags;
uint32_t sinfo_ppid;
uint32_t sinfo_context;
uint32_t sinfo_timetolive;
uint32_t sinfo_tsn;
uint32_t sinfo_cumtsn;
sctp_assoc_t sinfo_assoc_id;
};
The msghdr structure in the recvmsg() and sendmsg() APIs uses the
sctp_sndrcvinfo structure to set and get various control information from the SCTP
endpoint.
Table 2-1 lists the elements in the sctp_sndrcvinfo structure for the recvmsg()
and sendmsg() calls.
Table 2-1 Data Structures in the recvmsg() and sendmsg() Calls
sendmsg()recvmsg()Variable
Specifies the stream number to which the
application wants to send the message.
Specifies the stream number of the
message.
sinfo_stream
Not applicableContains the stream sequence number
in the DATA chunk.
sinfo_ssn
Specifies an opaque unsigned value that
is passed to the remote endpoint in each
user message.
Specifies the information that is passed
by the upper layer in the peer
application.
sinfo_ppid
Specifies an opaque context data that is
passed back to the application while
reporting an error on the concerned
sendmsg() call.
Not applicable
sinfo_context
Specifies the flag that controls the send
behavior of the data chunk, or the
association itself. For example,
sendmsg() contains the MSG_UNORDRED
flag to indicate unordered send of data,
and MSG_EOF to close a given
association.
Specifies the flag (MSG_UNORDRED) to
inform the application that the message
received was unordered. The
recvmsg() API contains only one flag
(MSG_UNORDRED), whereas the
sendmsg() API contains multiple flags.
sinfo_flags
Specifies the time-to-live (TTL) for a
given message. If an application does not
send a message within the specified TTL
value, the message expires and a
notification is sent to the application, if
notification is enabled.
Not applicable
sinfo_timetolive
60 SCTP Socket APIs