Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

sctp_bindx()

Add or remove one or more given addresses from an association

Synopsis:

#include <netinet/sctp.h>

int sctp_bindx(int sd, 
               struct sockaddr *addrs, 
               int addrcnt, 
               int flags);

Arguments:

sd
Socket descriptor. Depending on the type of sd, the type of address is determined. If sd is an IPv4 socket, the address passed is an IPv4 address. If sd is an IPv6 socket, the address passed is either an IPv4 or an IPv6 address. A single address is specified as INADDR_ANY or IN6ADDR_ANY.
addrs
A pointer to an array of one or more socket addresses. Each address is contained in its appropriate structure (i.e. struct sockaddr_in or struct sockaddr_in6). The family of the address type must be used to distinguish the address length. This representation is termed a "packed array" of addresses.
addrcnt
Number of addresses in the array.
flags
Either SCTP_BINDX_ADD_ADDR or SCTP_BINDX_REM_ADDR.

Library:

libsctp

Use the -l sctp option to qcc to link against this library.

Description:

The sctp_bindx() function adds or removes one or more addresses to or from an association:

If the endpoint supports dynamic addressing, adding or removing an address may cause an endpoint to send the appropriate message to change the peer's address lists.

Returns:

0
Success.
-1
Failure; errno is set.

Errors:

EFAULT
Passed-in flag was neither SCTP_BINDX_ADD_ADDR nor SCTP_BINDX_REM_ADDR.
EINVAL
Passed-in address has a wrong family.

Classification:

SCTP

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

SCTP, sctp_connectx(), sctp_freeladdrs(), sctp_freepaddrs(), sctp_getladdrs(), sctp_getpaddrs(), sctp_peeloff(), sctp_recvmsg(), sctp_sendmsg()