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.
However, because of the unique features of SCTP, such as multistreaming and multihoming, the existing
socket APIs either do not work on an SCTP socket, or the semantics
of the socket APIs need modification. For example, because of the
multi-homing feature supported in SCTP, the socket APIs, getsockname()() and getpeername()(),
do not work on an SCTP socket if a given association is bound to multiple
local addresses and the association has multiple peer addresses. Applications
must use the sctp_getpaddrs()() SCTP socket API
to obtain the peer addresses in an association.
Unlike the existing socket APIs, the SCTP socket APIs disclose
many features of the SCTP protocol and association status to the application,
to enable applications gain better control over the SCTP protocol.
For example, an application can specify some of the association setup
parameters, such as the number of desired outbound streams and maximum
number of inbound streams, to control an association.