sctp_connectx
initiate a connection on an SCTP socket using multiple destination addresses.
- Provided by: libsctp-dev (Version: 1.0.19+dfsg-2build1)
- Source: lksctp-tools
- Report a bug
initiate a connection on an SCTP socket using multiple destination addresses.
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
int sctp_connectx(int sd, struct sockaddr * addrs, int addrcnt,
sctp_assoc_t * id);
sctp_connectx initiates a connection to a set of addresses passed in the array addrs to/from the socket sd. addrcnt is the number of addresses in the array.
If sd is an IPv4 socket, the addresses passed must be IPv4 addresses. If sd is an IPv6 socket, the addresses passed can be either IPv4 or IPv6 addresses.
addrs is 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. The caller specifies the number of addresses in the array with addrcnt.
id is a pointer to the association id and, if provided, will be set to the identifier of the newly created association.
On success, 0 is returned. On failure, -1 is returned, and errno is set appropriately.
sctp(7) sctp_bindx(3), sctp_sendmsg(3), sctp_sendv(3), sctp_send(3), sctp_recvmsg(3), sctp_recvv(3), sctp_peeloff(3), sctp_getpaddrs(3), sctp_getladdrs(3), sctp_opt_info(3),