![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Get all peer addresses in an association
#include <netinet/sctp.h> int sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **addrs);
libsctp
Use the -l sctp option to qcc to link against this library.
The sctp_getpaddrs() function gets all peer addresses in an association.
On return, addrs points to a dynamically 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_getpaddrs() returns the number of peer addresses in the association. If there is no association, this function returns 0 and the value of *addrs is undefined.
If an error occurs, sctp_getpaddrs() 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_getladdrs(), sctp_peeloff(), sctp_recvmsg(), sctp_sendmsg()
![]() |
![]() |
![]() |
![]() |