9.5 sctp_getpaddrs Function
The getpeername function was not designed with the concept of a multihoming-aware transport protocol; when using SCTP, it only returns the primary address. When all the addresses are required, the sctp_getpaddrs function provides a mechanism for an application to retrieve all the addresses of a peer.
#include <netinet/sctp.h> |
int sctp_getpaddrs(int sockfd , sctp_assoc_t id , struct sockaddr **addrs ); |
Returns: the number of peer addresses stored in addrs , 1 on error |