1 .\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 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_GETLADDRS 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
10 sctp_getladdrs \- Returns all locally bound addresses on a socket.
13 .B #include <sys/types.h>
14 .B #include <sys/socket.h>
15 .B #include <netinet/sctp.h>
17 .BI "int sctp_getladdrs(int " sd ", sctp_assoc_t " assoc_id ,
18 .BI " struct sockaddr **" addrs );
20 .BI "void sctp_freeladdrs(struct sockaddr *" addrs );
24 returns all locally bound addresses on a socket. On return,
26 will point to a dynamically allocated packed array of
28 structures of the appropriate type for each local address. The caller
31 to free the memory. Note that the in/out parameter
37 is an IPv4 socket, the addresses returned will be all IPv4 addresses. If
39 is an IPv6 socket, the addresses returned can be a mix of IPv4 or IPv6
42 For one-to-many style sockets,
44 specifies the association to query. For one-to-one style sockets,
50 field is set to 0, then the locally bound addresses are returned
51 without regard to any particular association.
54 frees all the resources allocated by
59 returns the number of local addresses bound to the socket. If the socket
60 is unbound, 0 is returned and the value of
62 is undefined. On error,
64 returns -1 and the value of
70 .BR sctp_connectx (3),
75 .BR sctp_getpaddrs (3),
76 .BR sctp_opt_info (3),