SCTP Programmer's Guide

Overview............................................................................................................................41
Socket API Versus SCTP Socket API..................................................................................41
Different Socket API Styles.................................................................................................42
One-to-One Socket APIs................................................................................................42
Basic One-to-One Call Flow Sequence..........................................................................43
The socket() Socket API............................................................................................43
The bind() Socket API..............................................................................................44
The listen() Socket API.............................................................................................45
The accept() Socket API...........................................................................................45
The connect() Socket API.........................................................................................45
The close() Socket API..............................................................................................46
The shutdown() Socket API.....................................................................................46
The sendmsg() and recvmsg() Socket APIs.............................................................47
The getpeername() Socket API.................................................................................48
One-to-Many Socket APIs.............................................................................................48
Basic One-to-Many Call Flow Sequence.......................................................................48
The socket() Socket API ......................................................................................49
The bind() Socket API..............................................................................................50
The listen() Socket API.............................................................................................51
The sendmsg() and recvmsg() Socket APIs.............................................................51
The close() Socket API..............................................................................................52
The connect() Socket API.........................................................................................52
API Options to Modify Socket Behavior............................................................................52
Common Socket Calls.........................................................................................................54
The send(), sendto(), recv(), and recvfrom() Socket Calls.............................................55
The setsocktopt() and getsockopt() Socket Calls...........................................................56
The read() and write() Socket Calls...............................................................................56
The getsockname() Socket Call......................................................................................57
SCTP Events and Notifications...........................................................................................57
SCTP Ancillary Data Structures.........................................................................................58
SCTP Initiation Structure (SCTP_INIT)........................................................................59
SCTP Header Information (SCTP_SNDRCV)...............................................................59
SCTP-Specific Socket APIs..................................................................................................61
The sctp_bindx() SCTP Socket API...............................................................................61
The sctp_peeloff() SCTP Socket API.............................................................................62
The sctp_getpaddrs() SCTP Socket API........................................................................62
The sctp_freepaddrs() SCTP Socket API.......................................................................63
The sctp_getladdrs() SCTP Socket API.........................................................................63
The sctp_freeladdrs() SCTP Socket API........................................................................64
The sctp_sendmsg() SCTP Socket API..........................................................................64
The sctp_recvmsg() SCTP Socket API...........................................................................65
The sctp_connectx() SCTP Socket API..........................................................................65
The sctp_send() SCTP Socket API.................................................................................66
The sctp_sendx() SCTP Socket API...............................................................................66
4 Table of Contents