1SCTP_BINDX(3)              Linux Programmer's Manual             SCTP_BINDX(3)
2
3
4

NAME

6       sctp_bindx - Add or remove bind addresses on a socket.
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <sys/socket.h>
11       #include <netinet/sctp.h>
12
13       int sctp_bindx(int sd, struct sockaddr * addrs, int addrcnt,
14                      int flags);
15

DESCRIPTION

17       sctp_bindx  adds or removes a set of bind addresses passed in the array
18       addrs to/from the socket sd.  addrcnt is the number of addresses in the
19       array  and  the  flags  paramater indicates if the addresses need to be
20       added or removed.
21
22       If sd is an IPv4 socket, the addresses passed must be  IPv4  addresses.
23       If  sd  is  an  IPv6 socket, the addresses passed can be either IPv4 or
24       IPv6 addresses.
25
26       addrs is a pointer to an array of one or more  socket  addresses.  Each
27       address  is  contained  in  its appropriate structure(i.e. struct sock‐
28       addr_in or struct sockaddr_in6). The family of the address type must be
29       used to distinguish the address length. The caller specifies the number
30       of addresses in the array with addrcnt.
31
32       The   flags   parameter   can   be   either   SCTP_BINDX_ADD_ADDR    or
33       SCTP_BINDX_REM_ADDR.  An application can use SCTP_BINDX_ADD_ADDR to as‐
34       sociate additional addresses with an endpoint  after  calling  bind(2).
35       SCTP_BINDX_REM_ADDR directs SCTP to remove the given addresses from the
36       association.  A caller may not remove all addresses  from  an  associa‐
37       tion. It will fail with EINVAL.
38

RETURN VALUE

40       On success, 0 is returned. On failure, -1 is returned, and errno is set
41       appropriately.
42

ERRORS

44       EBADF  sd is not a valid descriptor.
45
46       ENOTSOCK
47              sd is a descriptor for a file, not a socket.
48
49       EFAULT Error while copying in or out from the user address space.
50
51       EINVAL Invalid port or address or trying to remove all  addresses  from
52              an association.
53
54       EACCES The address is protected, and the user is not the super-user.
55

SEE ALSO

57       sctp(7)       sctp_sendmsg(3),      sctp_send(3),      sctp_recvmsg(3),
58       sctp_peeloff(3),         sctp_getpaddrs(3),          sctp_getladdrs(3),
59       sctp_opt_info(3), sctp_connectx(3)
60
61
62
63Linux 2.6                         2005-10-25                     SCTP_BINDX(3)
Impressum