1SCTP_GETPADDRS(3) Linux Programmer's Manual SCTP_GETPADDRS(3)
2
3
4
6 sctp_getpaddrs - Returns all peer addresses in an association.
7
9 #include <sys/types.h>
10 #include <sys/socket.h>
11 #include <netinet/sctp.h>
12
13 int sctp_getpaddrs(int sd, sctp_assoc_t assoc_id,
14 struct sockaddr **addrs);
15
16 void sctp_freepaddrs(struct sockaddr *addrs);
17
19 sctp_getpaddrs returns all peer addresses in an association. On return,
20 addrs will point to a dynamically allocated packed array of sockaddr
21 structures of the appropriate type for each address. The caller should
22 use sctp_freepaddrs to free the memory. Note that the in/out parameter
23 addrs must not be NULL.
24
25 If sd is an IPv4 socket, the addresses returned will be all IPv4
26 addresses. If sd is an IPv6 socket, the addresses returned can be a mix
27 of IPv4 or IPv6 addresses.
28
29 For one-to-many style sockets, id specifies the association to query.
30 For one-to-one style sockets, id is ignored.
31
32 sctp_freepaddrs frees all the resources allocated by sctp_getpaddrs.
33
35 On success, sctp_getpaddrs returns the number of peer addresses in the
36 association. If there is no association on this socket, 0 is returned
37 and the value of *addrs is undefined. On error, sctp_getpaddrs returns
38 -1 and the value of *addrs is undefined.
39
41 sctp(7) sctp_bindx(3), sctp_connectx(3), sctp_sendmsg(3), sctp_send(3),
42 sctp_recvmsg(3), sctp_peeloff(3), sctp_getladdrs(3), sctp_opt_info(3),
43
44
45
46Linux 2.6 2005-10-25 SCTP_GETPADDRS(3)