SCTP Programmer's Guide

sctp_bindx() returns an array of type sockaddr_in6. For an IPv4
socket, sctp_bindx() returns an array of type sockaddr_in.
addrcnt Specifies the number of addresses in the array (sockaddr_in6 or
sockaddr_in). You cannot use wildcard addresses with sctp_bindx().
flags
Contains flags affecting the message that is being sent. The flags parameter
is formed from the bitwise OR of zero or more of the following flags:
SCTP_BINDX_ADD_ADDR
SCTP_BINDX_REM_ADDR
SCTP_BINDX_ADD_ADDR directs SCTP to add the given addresses to the
association, and SCTP_BINDX_REM_ADDR directs SCTP to remove the
given addresses from the association. These flags are mutually exclusive.
On success, sctp_bindx() returns 0. On failure, sctp_bindx() returns -1, and sets
errno to the appropriate error code.
The sctp_peeloff() SCTP Socket API
Applications can use the sctp_peeloff() socket API to branch off an association
into a separate socket. This API is a one-to-one style socket API.
Following is the syntax for the sctp_peeloff() socket API:
sctp_peeloff(int sd, sctp_assoc_t assoc_id)
where:
sd
Specifies the socket descriptor representing the branched-off association.
assoc_id
Specifies the identifier of the association that must be branched off to a
separate file descriptor.
The sctp_getpaddrs() SCTP Socket API
Applications can use the sctp_getpaddrs() socket API to return all peer addresses
in an association.
Following is the syntax for the sctp_getpaddrs() socket API:
int sctp_getpaddrs(int sd, sctp_assoc_t id,
struct sockaddr **addrs);
where:
sd Specifies the socket descriptor. If sd is an IPv4 socket, the addresses returned
will be IPv4 addresses. If sd is an IPv6 socket, the addresses returned can be
either an IPv4 or an IPv6 addresses.
id
Specifies the association ID. For one-to-many style sockets, ID specifies the
association to query. An application ignores id for one-to-one style sockets.
addrs Points to the dynamically allocated array of sockaddr structures of the
appropriate socket type. An application must use the sctp_freepaddrs()
call to free the memory.
62 SCTP Socket APIs