SCTP Programmer's Guide

union sctp_notification {
struct {
uint16_t sn_type; /* Notification type. */
uint16_t sn_flags;
uint32_t sn_length;
} sn_header;
struct sctp_assoc_change sn_assoc_change;
struct sctp_paddr_change sn_paddr_change;
struct sctp_remote_error sn_remote_error;
struct sctp_send_failed sn_send_failed;
struct sctp_shutdown_event sn_shutdown_event;
struct sctp_adaption_event sn_adaption_event;
struct sctp_pdapi_event sn_pdapi_event;
};
For more information on the SCTP notification structure, see
draft-ietf-tsvwg-sctpsocket-10.txt
SCTP Ancillary Data Structures
The SCTP socket APIs can use the ancillary data structures to enable applications to
control an association. These structures also enable SCTP to notify applications about
association events.
The ancillary data mechanism uses the definition of struct msghdr, which is available
to an SCTP application when it uses the X/Open socket.
NOTE: An application that uses BSD43 socket cannot use the features related to
ancillary data.
SCTP processes each ancillary data using the cmsghdr structure, which defines the
function and purpose of the data. Following is the structure for the cmsghdr structure:
struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
};
Where:
cms_len
Specifies the number of bytes, including the header.
cmsg_level
Specifies the originating protocol.
cmsg_type
Specifies the type of the protocol followed by an unsigned character,
cmsg_data.
For the structure definition of the msghdr structure, see “The sendmsg() and recvmsg()
Socket APIs” (page 47).
58 SCTP Socket APIs