SCTP Programmer's Guide
2 SCTP Socket APIs
This chapter discusses the different SCTP socket API types, their call flow sequence,
SCTP events and notifications, socket options, command socket calls, and the SCTP
ancillary data structures.
This chapter addresses the following topics:
• “Overview” (page 41)
• “Socket API Versus SCTP Socket API” (page 41)
• “Different Socket API Styles” (page 42)
• “API Options to Modify Socket Behavior” (page 52)
• “Common Socket Calls” (page 54)
• “SCTP Events and Notifications” (page 57)
• “SCTP Ancillary Data Structures” (page 58)
• “SCTP-Specific Socket APIs” (page 61)
Overview
The socket layer in an IP stack contains socket APIs that enable the transport layer to
interface with the application layer. The socket APIs make the various protocol-specific
features available to an application.
SCTP contains the existing socket APIs and the SCTP-specific APIs. Both these APIs
enable SCTP to interface with the application layer. These APIs are also compatible
with TCP applications that can be migrated to SCTP with minimum changes.
Following are the design objectives of the SCTP socket APIs:
• Maintain consistency and ensure compatibility with the existing sockets APIs
• Define socket mapping for SCTP that is consistent with other socket API protocols,
such as UDP, TCP, IPv4, and IPv6
• Support a one-to-many style interface
• Support a one-to one style interface
The following sections discuss the differences between the socket API and the SCTP
socket APIs, the different SCTP socket API styles, data structures that enable applications
to control an association, and socket APIs to modify the socket options.
Socket API Versus SCTP Socket API
The SCTP APIs use the existing socket APIs to perform operations that are similar to
the operating behavior of the socket APIs. For example, in the existing socket APIs and
the SCTP socket APIs, an application can call the bind() API only once and an
application can specify only a single address in the bind() API.
Overview 41