This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Get all locally bound addresses on a socket
#include <netinet/sctp.h> int sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **addrs);
libsctp
Use the -l sctp option to qcc to link against this library.
The sctp_getladdrs() function gets all locally bound addresses on a socket.
On return, addrs points to a dynamically allocated packed array of sockaddr structures of the appropriate type for each address. Use sctp_freepaddrs() to free the memory. Note that the in-and-out parameter addrs must not be NULL.
On success, sctp_getladdrs() returns the number of local addresses bound to the socket. If the socket is unbound, sctp_getladdrs() returns 0, and the value of *addrs is undefined.
If an error occurs, sctp_getladdrs() returns -1, and the value of *addrs is undefined.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
SCTP, sctp_bindx(), sctp_connectx(), sctp_freeladdrs(), sctp_freepaddrs(), sctp_getpaddrs(), sctp_peeloff(), sctp_recvmsg(), sctp_sendmsg()