1d8b5fd91SRandall Stewart.\" Copyright (c) 1983, 1991, 1993 2d8b5fd91SRandall Stewart.\" The Regents of the University of California. All rights reserved. 3d8b5fd91SRandall Stewart.\" 4d8b5fd91SRandall Stewart.\" Redistribution and use in source and binary forms, with or without 5d8b5fd91SRandall Stewart.\" modification, are permitted provided that the following conditions 6d8b5fd91SRandall Stewart.\" are met: 7d8b5fd91SRandall Stewart.\" 1. Redistributions of source code must retain the above copyright 8d8b5fd91SRandall Stewart.\" notice, this list of conditions and the following disclaimer. 9d8b5fd91SRandall Stewart.\" 2. Redistributions in binary form must reproduce the above copyright 10d8b5fd91SRandall Stewart.\" notice, this list of conditions and the following disclaimer in the 11d8b5fd91SRandall Stewart.\" documentation and/or other materials provided with the distribution. 12921ca2fdSEd Maste.\" 3. Neither the name of the University nor the names of its contributors 13d8b5fd91SRandall Stewart.\" may be used to endorse or promote products derived from this software 14d8b5fd91SRandall Stewart.\" without specific prior written permission. 15d8b5fd91SRandall Stewart.\" 16d8b5fd91SRandall Stewart.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17d8b5fd91SRandall Stewart.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18d8b5fd91SRandall Stewart.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19d8b5fd91SRandall Stewart.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20d8b5fd91SRandall Stewart.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21d8b5fd91SRandall Stewart.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22d8b5fd91SRandall Stewart.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23d8b5fd91SRandall Stewart.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24d8b5fd91SRandall Stewart.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25d8b5fd91SRandall Stewart.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26d8b5fd91SRandall Stewart.\" SUCH DAMAGE. 27d8b5fd91SRandall Stewart.\" 28*5590bacaSLexi Winter.Dd February 2, 2024 29a47698f8SChristian Brueffer.Dt SCTP_GETPADDRS 3 30d8b5fd91SRandall Stewart.Os 31d8b5fd91SRandall Stewart.Sh NAME 3216c90ceeSChristian Brueffer.Nm sctp_getpaddrs , 33d8b5fd91SRandall Stewart.Nm sctp_getladdrs 3416c90ceeSChristian Brueffer.Nd return a list of addresses to the caller 35d8b5fd91SRandall Stewart.Sh LIBRARY 36d8b5fd91SRandall Stewart.Lb libc 37d8b5fd91SRandall Stewart.Sh SYNOPSIS 38d8b5fd91SRandall Stewart.In sys/types.h 39d8b5fd91SRandall Stewart.In sys/socket.h 407c376800SRandall Stewart.In netinet/sctp.h 41d8b5fd91SRandall Stewart.Ft int 42d8b5fd91SRandall Stewart.Fn sctp_getpaddrs "int s" "sctp_assoc_t asocid" "struct sockaddr **addrs" 43d8b5fd91SRandall Stewart.Ft int 44d8b5fd91SRandall Stewart.Fn sctp_getladdrs "int s" "sctp_assoc_t asocid" "struct sockaddr **addrs" 45d8b5fd91SRandall Stewart.Sh DESCRIPTION 46d8b5fd91SRandall StewartThe 47d8b5fd91SRandall Stewart.Fn sctp_getpaddrs 48d8b5fd91SRandall Stewartfunction is used to get the list of the peers addresses. 49d8b5fd91SRandall StewartThe 50d8b5fd91SRandall Stewart.Fn sctp_getladdrs 51d8b5fd91SRandall Stewartfunction is used to get the list of the local addresses. 52d8b5fd91SRandall StewartThe association of interest is identified by the 53d8b5fd91SRandall Stewart.Fa asocid 5416c90ceeSChristian Bruefferargument. 5516c90ceeSChristian BruefferThe addresses are returned in a newly allocated 56d8b5fd91SRandall Stewartarray of socket addresses returned in the argument 57d8b5fd91SRandall Stewart.Fa addrs 58d8b5fd91SRandall Stewartupon success. 59d8b5fd91SRandall Stewart.Pp 60a47698f8SChristian BruefferAfter the caller is finished, the function 61d8b5fd91SRandall Stewart.Fn sctp_freepaddrs 62d8b5fd91SRandall Stewartor 63d8b5fd91SRandall Stewart.Fn sctp_freeladdrs 64d8b5fd91SRandall Stewartshould be used to release the memory allocated by these 65d8b5fd91SRandall Stewartcalls. 66d8b5fd91SRandall Stewart.Sh RETURN VALUES 67d8b5fd91SRandall StewartThe call returns -1 upon failure and a count of 68d8b5fd91SRandall Stewartthe number of addresses returned in 69d8b5fd91SRandall Stewart.Fa addrs 70d8b5fd91SRandall Stewartupon success. 71d8b5fd91SRandall Stewart.Sh ERRORS 72a47698f8SChristian BruefferThe functions can return the following errors: 73d8b5fd91SRandall Stewart.Bl -tag -width Er 74d8b5fd91SRandall Stewart.It Bq Er EINVAL 75d8b5fd91SRandall StewartAn address listed has an invalid family or no 76d8b5fd91SRandall Stewartaddresses were provided. 77d8b5fd91SRandall Stewart.It Bq Er ENOMEM 78d8b5fd91SRandall StewartThe call cannot allocate memory to hold the 79d8b5fd91SRandall Stewartsocket addresses. 80d8b5fd91SRandall Stewart.It Bq Er EBADF 81d8b5fd91SRandall StewartThe argument 82d8b5fd91SRandall Stewart.Fa s 83d8b5fd91SRandall Stewartis not a valid descriptor. 84d8b5fd91SRandall Stewart.It Bq Er ENOTSOCK 85d8b5fd91SRandall StewartThe argument 86d8b5fd91SRandall Stewart.Fa s 87d8b5fd91SRandall Stewartis not a socket. 88d8b5fd91SRandall Stewart.El 89d8b5fd91SRandall Stewart.Sh SEE ALSO 90d8b5fd91SRandall Stewart.Xr getsockopt 2 , 9116c90ceeSChristian Brueffer.Xr sctp_freeladdrs 3 , 9216c90ceeSChristian Brueffer.Xr sctp_freepaddrs 3 , 9316c90ceeSChristian Brueffer.Xr sctp 4 94*5590bacaSLexi Winter.Rs 95*5590bacaSLexi Winter.%A R. Stewart 96*5590bacaSLexi Winter.%A M. Tuexen 97*5590bacaSLexi Winter.%A K. Poon 98*5590bacaSLexi Winter.%A P. Lei 99*5590bacaSLexi Winter.%A V. Yasevich 100*5590bacaSLexi Winter.%T Sockets API Extensions for the Stream Control Transmission Protocol (SCTP) 101*5590bacaSLexi Winter.%R RFC 6458 102*5590bacaSLexi Winter.%D December 2011 103*5590bacaSLexi Winter.Re 104*5590bacaSLexi Winter.Sh STANDARDS 105*5590bacaSLexi WinterThe 106*5590bacaSLexi Winter.Fn sctp_getpaddrs 107*5590bacaSLexi Winterand 108*5590bacaSLexi Winter.Fn sctp_getladdrs 109*5590bacaSLexi Winterfunctions conform to RFC 6458. 110