1 .\" (C) Copyright Frank Filz IBM Corp. 2005.
3 .\" Permission is granted to distribute possibly modified copies
4 .\" of this manual provided the header is included verbatim,
5 .\" and in case of nontrivial modification author and date
6 .\" of the modification is added to the header.
8 .TH SCTP_CONNECTX 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
10 sctp_connectx \- initiate a connection on an SCTP socket using multiple
11 destination addresses.
14 .B #include <sys/types.h>
15 .B #include <sys/socket.h>
16 .B #include <netinet/sctp.h>
18 .BI "int sctp_connectx(int " sd ", struct sockaddr * " addrs ", int " addrcnt,
19 .BI " sctp_assoc_t * "id );
23 initiates a connection to a set of addresses passed in the array
28 is the number of addresses in the array.
32 is an IPv4 socket, the addresses passed must be IPv4 addresses. If
34 is an IPv6 socket, the addresses passed can be either IPv4 or IPv6
38 is a pointer to an array of one or more socket addresses. Each address is
39 contained in its appropriate structure(i.e. struct sockaddr_in or struct
40 sockaddr_in6). The family of the address type must be used to distinguish
41 the address length. The caller specifies the number of addresses in the
46 is a pointer to the association id and, if provided, will be set to the
47 identifier of the newly created association.
49 On success, 0 is returned. On failure, \-1 is returned, and
56 is not a valid descriptor.
60 is a descriptor for a file, not a socket.
63 Error while copying in or out from the user address space.
66 Invalid port or address.
69 The address is protected, and the user is not the super-user.
72 The socket is already connected.
75 No one listening on the remote address.
78 Timeout while attempting connection. The server may be too
79 busy to accept new connections. Note that for IP sockets the timeout may
80 be very long when syncookies are enabled on the server.
83 Network is unreachable.
86 Local address is already in use.
89 The socket is non-blocking and the connection cannot be completed
90 immediately. It is possible to
94 for completion by selecting the socket for writing. After
96 indicates writability, use
104 completed successfully
106 is zero) or unsuccessfully
108 is one of the usual error codes listed here,
109 explaining the reason for the failure).
112 The socket is non-blocking and a previous connection attempt has not yet
116 No more free local ports or insufficient entries in the routing cache. For
119 .B net.ipv4.ip_local_port_range
122 on how to increase the number of local ports.
125 The passed address didn't have the correct address family in its
130 The user tried to connect to a broadcast address without having the socket
131 broadcast flag enabled or the connection request failed because of a local
136 .BR sctp_sendmsg (3),
138 .BR sctp_recvmsg (3),
139 .BR sctp_peeloff (3),
140 .BR sctp_getpaddrs (3),
141 .BR sctp_getladdrs (3),
142 .BR sctp_opt_info (3),