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 29d8b5fd91SRandall Stewart.Dt SCTP_BINDX 3 30d8b5fd91SRandall Stewart.Os 31d8b5fd91SRandall Stewart.Sh NAME 32d8b5fd91SRandall Stewart.Nm sctp_bindx 33a9a393b3SEdward Tomasz Napierala.Nd bind or unbind an SCTP socket to a list of addresses 34d8b5fd91SRandall Stewart.Sh LIBRARY 35d8b5fd91SRandall Stewart.Lb libc 36d8b5fd91SRandall Stewart.Sh SYNOPSIS 37d8b5fd91SRandall Stewart.In sys/types.h 38d8b5fd91SRandall Stewart.In sys/socket.h 397c376800SRandall Stewart.In netinet/sctp.h 40d8b5fd91SRandall Stewart.Ft int 41d8b5fd91SRandall Stewart.Fn sctp_bindx "int s" "struct sockaddr *addrs" "int num" "int type" 42d8b5fd91SRandall Stewart.Sh DESCRIPTION 43d8b5fd91SRandall StewartThe 44d8b5fd91SRandall Stewart.Fn sctp_bindx 45d8b5fd91SRandall Stewartcall binds or unbinds a address or a list of addresses to an 4616c90ceeSChristian BruefferSCTP endpoint. 4716c90ceeSChristian BruefferThis allows a user to bind a subset of 4816c90ceeSChristian Bruefferaddresses. 4916c90ceeSChristian BruefferThe 50d8b5fd91SRandall Stewart.Fn sctp_bindx 51d8b5fd91SRandall Stewartcall operates similarly to 52d8b5fd91SRandall Stewart.Fn bind 53d8b5fd91SRandall Stewartbut allows a list of addresses and also allows a bind or an 5416c90ceeSChristian Bruefferunbind. 5516c90ceeSChristian BruefferThe argument 56d8b5fd91SRandall Stewart.Fa s 5716c90ceeSChristian Brueffermust be a valid SCTP socket descriptor. 5816c90ceeSChristian BruefferThe argument 59d8b5fd91SRandall Stewart.Fa addrs 60d8b5fd91SRandall Stewartis a list of addresses (where the list may be only 1 in 61d8b5fd91SRandall Stewartlength) that the user wishes to bind or unbind to the 6216c90ceeSChristian Brueffersocket. 6316c90ceeSChristian BruefferThe argument 64d8b5fd91SRandall Stewart.Fa type 65d8b5fd91SRandall Stewartmust be one of the following values. 66d8b5fd91SRandall Stewart.Pp 67d8b5fd91SRandall Stewart.Dv SCTP_BINDX_ADD_ADDR 68d8b5fd91SRandall StewartThis value indicates that the listed address(es) need to 69d8b5fd91SRandall Stewartbe added to the endpoint. 70d8b5fd91SRandall Stewart.Pp 71b96e9390SMichael Tuexen.Dv SCTP_BINDX_REM_ADDR 72d8b5fd91SRandall StewartThis value indicates that the listed address(es) need to 73d8b5fd91SRandall Stewartbe removed from the endpoint. 74d8b5fd91SRandall Stewart.Pp 75d8b5fd91SRandall StewartNote that when a user adds or deletes an address to an 7616c90ceeSChristian Bruefferassociation if the dynamic address flag 7716c90ceeSChristian Brueffer.Va net.inet.sctp.auto_asconf 78d8b5fd91SRandall Stewartis enabled any associations in the endpoint will attempt to 79d8b5fd91SRandall Stewarthave the address(es) added dynamically to the existing 80d8b5fd91SRandall Stewartassociation. 81d8b5fd91SRandall Stewart.Sh RETURN VALUES 82d8b5fd91SRandall StewartThe call returns 0 on success and -1 upon failure. 83d8b5fd91SRandall Stewart.Sh ERRORS 84d8b5fd91SRandall StewartThe 85d8b5fd91SRandall Stewart.Fn sctp_bindx 86a47698f8SChristian Bruefferfunction can return the following errors: 87d8b5fd91SRandall Stewart.Bl -tag -width Er 88d8b5fd91SRandall Stewart.It Bq Er EINVAL 89d8b5fd91SRandall StewartThis value is returned if the 90d8b5fd91SRandall Stewart.Fa type 91d8b5fd91SRandall Stewartfield is not one of the allowed values (see above). 92d8b5fd91SRandall Stewart.It Bq Er ENOMEM 93d8b5fd91SRandall StewartThis value is returned if the number of addresses 94d8b5fd91SRandall Stewartbeing added causes a memory allocation failure in 95d8b5fd91SRandall Stewartthe call. 96d8b5fd91SRandall Stewart.It Bq Er EBADF 97d8b5fd91SRandall StewartThe argument 98d8b5fd91SRandall Stewart.Fa s 99d8b5fd91SRandall Stewartis not a valid descriptor. 100d8b5fd91SRandall Stewart.It Bq Er ENOTSOCK 101d8b5fd91SRandall StewartThe argument 102d8b5fd91SRandall Stewart.Fa s 103d8b5fd91SRandall Stewartis not a socket. 104d8b5fd91SRandall Stewart.El 105d8b5fd91SRandall Stewart.Sh SEE ALSO 106d8b5fd91SRandall Stewart.Xr bind 2 , 10716c90ceeSChristian Brueffer.Xr sctp 4 108*5590bacaSLexi Winter.Rs 109*5590bacaSLexi Winter.%A R. Stewart 110*5590bacaSLexi Winter.%A M. Tuexen 111*5590bacaSLexi Winter.%A K. Poon 112*5590bacaSLexi Winter.%A P. Lei 113*5590bacaSLexi Winter.%A V. Yasevich 114*5590bacaSLexi Winter.%T Sockets API Extensions for the Stream Control Transmission Protocol (SCTP) 115*5590bacaSLexi Winter.%R RFC 6458 116*5590bacaSLexi Winter.%D December 2011 117*5590bacaSLexi Winter.Re 118*5590bacaSLexi Winter.Sh STANDARDS 119*5590bacaSLexi WinterThe 120*5590bacaSLexi Winter.Fn sctp_bindx 121*5590bacaSLexi Winterfunction conforms to RFC 6458. 122