Squashed 'third_party/lksctp-tools/' content from commit 200eca7f1

Change-Id: I8f7575513f114b205178cac5c6b3706f3d725cb5
git-subtree-dir: third_party/lksctp-tools
git-subtree-split: 200eca7f1419b1ae53958b51e8551f7e7f6cd467
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..eabfe6f
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,12 @@
+# -*- Makefile -*-
+#
+include $(top_srcdir)/Makefile.vars
+include $(top_srcdir)/Makefile.rules
+
+man7_MANS = sctp.7
+
+man3_MANS = sctp_bindx.3 sctp_getladdrs.3 sctp_getpaddrs.3 sctp_opt_info.3 \
+	sctp_peeloff.3 sctp_recvmsg.3 sctp_sendmsg.3 sctp_connectx.3 \
+	sctp_send.3 sctp_sendv.3 sctp_recvv.3
+
+EXTRA_DIST += $(man3_MANS) $(man7_MANS)
diff --git a/man/sctp.7 b/man/sctp.7
new file mode 100644
index 0000000..2238a7f
--- /dev/null
+++ b/man/sctp.7
@@ -0,0 +1,352 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP  7 2005-10-25 "Linux Man Page" "Linux Programmer's Manual" 
+.SH NAME
+sctp \- SCTP protocol.
+.SH SYNOPSIS
+.nf
+.B #include <sys/socket.h>
+.B #include <netinet/in.h>
+.B #include <netinet/sctp.h>
+.sp
+.B sctp_socket = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP); 
+.B sctp_socket = socket(PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
+.fi
+.SH DESCRIPTION
+This is an implementation of the SCTP protocol as defined in RFC2960 and
+RFC3309. It is a message oriented, reliable transport protocol with direct
+support for multihoming that runs on top of 
+.BR ip (7),
+and supports both v4 and v6 versions.
+.PP
+Like TCP, SCTP provides reliable, connection oriented data delivery with 
+congestion control. Unlike TCP, SCTP also provides message boundary 
+preservation, ordered and unordered message delivery, multi-streaming and
+multi-homing. Detection of data corruption, loss of data and duplication of
+data is achieved by using checksums and sequence numbers. A selective 
+retransmission mechanism is applied to correct loss or corruption of data.
+.PP
+This implementation supports a mapping of SCTP into sockets API as defined
+in the draft-ietf-tsvwg-sctpsocket-10.txt(Sockets API extensions for SCTP).
+Two styles of interfaces are supported.
+.PP
+A 
+.B one-to-many
+style interface with 1 to MANY relationship between socket and associations 
+where the outbound association setup is implicit. The syntax of a one-to-many
+style socket() call is
+.PP
+.B     sd = socket(PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP); 
+.PP
+A typical server in this style uses the following socket calls in sequence
+to prepare an endpoint for servicing requests.
+.PP
+     1. socket()
+     2. bind()
+     3. listen()
+     4. recvmsg()
+     5. sendmsg()
+     6. close()
+.PP
+A typical client uses the following calls in sequence to setup an association
+with a server to request services.
+.PP
+     1. socket()
+     2. sendmsg()
+     3. recvmsg()
+     4. close()
+.PP
+A
+.B one-to-one style
+interface with a 1 to 1 relationship between socket and
+association which enables existing TCP applications to be ported to SCTP with
+very little effort. The syntax of a one-to-one style socket() call is
+.PP
+.B     sd = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP); 
+.PP
+A typical server in one-to-one style uses the following
+system call sequence to prepare an SCTP endpoint for servicing requests:
+.PP
+     1. socket()
+     2. bind()
+     3. listen()
+     4. accept()
+.PP
+The accept() call blocks until a new association is set up. It returns with a
+new socket descriptor. The server then uses the new socket descriptor to
+communicate with the client, using recv() and send() calls to get requests and
+send back responses. Then it calls
+.PP
+     5. close()
+.PP
+to terminate the association. A typical client uses the following system call
+sequence to setup an association with a server to request services:
+.PP
+     1. socket()
+     2. connect()
+.PP
+After returning from connect(), the client uses send() and recv() calls to
+send out requests and receive responses from the server. The client calls
+.PP
+     3. close()
+.PP
+to terminate this association when done.
+.SH "ADDRESS FORMATS"
+SCTP is built on top of IP (see 
+.BR ip (7)).
+The address formats defined by
+.BR ip (7)
+apply to SCTP.  SCTP only supports point-to-point communication; broadcasting
+and multicasting are not supported.
+.SH SYSCTLS
+These variables can be accessed by the 
+.B /proc/sys/net/sctp/* 
+files or with the 
+.BR sysctl (2)
+interface.  In addition, most IP sysctls also apply to SCTP. See
+.BR ip (7). 
+.TP
+Please check kernel documentation for this, at Documentation/networking/ip-sysctl.txt.
+.SH "STATISTICS"
+These variables can be accessed by the 
+.B /proc/net/sctp/* 
+files. 
+.TP
+.B assocs
+Displays the following information about the active associations.
+assoc ptr, sock ptr, socket style, sock state, association state, hash bucket,
+association id, bytes in transmit queue, bytes in receive queue, user id, 
+inode, local port, remote port, local addresses and remote addresses.
+.TP
+.B eps
+Displays the following information about the active endpoints.
+endpoint ptr, sock ptr, socket style, sock state, hash bucket, local port,
+user id, inode and local addresses.  
+.TP
+.B snmp
+Displays the following statistics related to SCTP states, packets and chunks. 
+.TP
+.TP
+.B SctpCurrEstab
+The number of associations for which the current state is either ESTABLISHED,
+SHUTDOWN-RECEIVED or SHUTDOWN-PENDING.
+.TP
+.B SctpActiveEstabs
+The number of times that associations have made a direct transition to the
+ESTABLISHED state from the COOKIE-ECHOED state. The upper layer initiated the
+association attempt.
+.TP
+.B SctpPassiveEstabs
+The number of times that associations have made a direct transition to the
+ESTABLISHED state from the CLOSED state. The remote endpoint initiated the
+association attempt.
+.TP
+.B SctpAborteds
+The number of times that associations have made a direct transition to the
+CLOSED state from any state using the primitive 'ABORT'. Ungraceful
+termination of the association.
+.TP
+.B SctpShutdowns
+The number of times that associations have made a direct transition to the
+CLOSED state from either the SHUTDOWN-SENT state or the SHUTDOWN-ACK-SENT
+state. Graceful termination of the association.
+.TP
+.B SctpOutOfBlues
+The number of out of the blue packets received by the host. An out of the blue
+packet is an SCTP packet correctly formed, including the proper checksum, but
+for which the receiver was unable to identify an appropriate association.
+.TP
+.B SctpChecksumErrors
+The number of SCTP packets received with an invalid checksum.
+.TP
+.B SctpOutCtrlChunks
+The number of SCTP control chunks sent (retransmissions are not included).
+Control chunks are those chunks different from DATA.
+.TP
+.B SctpOutOrderChunks
+The number of SCTP ordered data chunks sent (retransmissions are not included).
+.TP
+.B SctpOutUnorderChunks
+The number of SCTP unordered chunks(data chunks in which the U bit is set
+to 1) sent (retransmissions are not included).
+.TP
+.B SctpInCtrlChunks
+The number of SCTP control chunks received (no duplicate chunks included).
+.TP
+.B SctpInOrderChunks
+The number of SCTP ordered data chunks received (no duplicate chunks included).
+.TP
+.B SctpInUnorderChunks
+The number of SCTP unordered chunks(data chunks in which the U bit is set
+to 1) received (no duplicate chunks included).
+.TP
+.B SctpFragUsrMsgs
+The number of user messages that have to be fragmented because of the MTU.
+.TP
+.B SctpReasmUsrMsgs
+The number of user messages reassembled, after conversion into DATA chunks.
+.TP
+.B SctpOutSCTPPacks
+The number of SCTP packets sent. Retransmitted DATA chunks are included.
+.TP
+.B SctpInSCTPPacks
+The number of SCTP packets received. Duplicates are included.
+.SH "SOCKET OPTIONS"
+To set or get a SCTP socket option, call
+.BR getsockopt (2)
+to read or
+.BR setsockopt (2)
+to write the option with the option level argument set to 
+.BR SOL_SCTP.
+.TP
+.BR SCTP_RTOINFO.
+This option is used to get or set the protocol parameters used to
+initialize and bound retransmission timout(RTO). The structure sctp_rtoinfo
+defined in /usr/include/netinet/sctp.h is used to access and modify these
+parameters.
+.TP
+.B SCTP_ASSOCINFO
+This option is used to both examine and set various association and endpoint
+parameters. The sturcture sctp_assocparams defined in
+/usr/include/netinet/sctp.h is used to access and modify these parameters.
+.TP
+.B SCTP_INITMSG
+This option is used to get or set the protocol parameters for the default
+association initialization. The structure sctp_initmsg defined in
+/usr/include/netinet/sctp.h is used to access and modify these parameters. 
+
+Setting initialization parameters is effective only on an unconnected
+socket (for one-to-many style sockets only future associations are
+effected by the change). With one-to-one style sockets, this option
+is inherited by sockets derived from a listener socket.
+.TP
+.B SCTP_NODELAY
+Turn on/off any Nagle-like algorithm. This means that packets are generally
+sent as soon as possible and no unnecessary delays are introduced, at the cost 
+of more packets in the network.  Expects an integer boolean flag.
+.TP
+.B SCTP_AUTOCLOSE
+This socket option is applicable to the one-to-many style socket
+only. When set it will cause associations that are idle for more than
+the specified number of seconds to automatically close. An
+association being idle is defined an association that has NOT sent or
+received user data. The special value of 0 indicates that no
+automatic close of any associations should be performed. The option
+expects an integer defining the number of seconds of idle time before
+an association is closed.
+.TP
+.B SCTP_SET_PEER_PRIMARY_ADDR
+Requests that the peer mark the enclosed address as the association
+primary. The enclosed address must be one of the association's
+locally bound addresses. The structure sctp_setpeerprim defined in
+/usr/include/netinet/sctp.h is used to make a set peer primary request.
+.TP
+.B SCTP_PRIMARY_ADDR
+Requests that the local SCTP stack use the enclosed peer address as
+the association primary. The enclosed address must be one of the
+association peer's addresses. The structure sctp_prim defined in
+/usr/include/netinet/sctp.h is used to make a get/set primary request.
+.TP
+.B SCTP_DISABLE_FRAGMENTS
+This option is a on/off flag and is passed an integer where a non-zero is on 
+and a zero is off. If enabled no SCTP message fragmentation will be performed.
+Instead if a message being sent exceeds the current PMTU size, the message will 
+NOT be sent and an error will be indicated to the user.
+.TP
+.B SCTP_PEER_ADDR_PARAMS
+Using this option, applications can enable or disable heartbeats for any peer
+address of an association, modify an address's heartbeat interval, force a
+heartbeat to be sent immediately, and adjust the address's maximum number of
+retransmissions sent before an address is considered unreachable. The structure 
+sctp_paddrparams defined in /usr/include/netinet/sctp.h is used to
+access and modify an address's parameters.
+.TP
+.B SCTP_DEFAULT_SEND_PARAM
+Applications that wish to use the sendto() system call may wish to specify
+a default set of parameters that would normally be supplied through the
+inclusion of ancillary data. This socket option allows such an application to
+set the default sctp_sndrcvinfo structure. The application that wishes to use
+this socket option simply passes in to this call the sctp_sndrcvinfo structure
+defined in /usr/include/netinet/sctp.h. The input parameters accepted by this
+call include sinfo_stream, sinfo_flags, sinfo_ppid, sinfo_context,
+sinfo_timetolive. The user must set the sinfo_assoc_id field to identify the
+ association to affect if the caller is using the one-to-many style.
+.TP
+.B SCTP_EVENTS
+This socket option is used to specify various notifications and ancillary data
+the user wishes to receive. The structure sctp_event_subscribe defined in
+/usr/include/netinet/sctp.h is used to access or modify the events of interest
+to the user.
+.TP
+.B SCTP_I_WANT_MAPPED_V4_ADDR
+This socket option is a boolean flag which turns on or off mapped V4
+addresses. If this option is turned on and the socket is type PF_INET6,
+then IPv4 addresses will be mapped to V6 representation. If this option is
+turned off, then no mapping will be done of V4 addresses and a user will
+receive both PF_INET6 and PF_INET type addresses on the socket.
+
+By default this option is turned on and expects an integer to be passed where
+non-zero turns on the option and zero turns off the option.
+.TP
+.B SCTP_MAXSEG
+This socket option specifies the maximum size to put in any outgoing
+SCTP DATA chunk. If a message is larger than this size it will be
+fragmented by SCTP into the specified size. Note that the underlying
+SCTP implementation may fragment into smaller sized chunks when the
+PMTU of the underlying association is smaller than the value set by
+the user. The option expects an integer.
+
+The default value for this option is 0 which indicates the user is
+NOT limiting fragmentation and only the PMTU will effect SCTP's
+choice of DATA chunk size.
+.TP
+.B SCTP_STATUS
+Applications can retrieve current status information about an association,
+including association state, peer receiver window size, number of unacked
+data chunks, and number of data chunks pending receipt.  This information is
+read-only.  The structure sctp_status defined in /usr/include/netinet/sctp.h
+is used to access this information.
+.TP
+.B SCTP_GET_PEER_ADDR_INFO
+Applications can retrieve information about a specific peer address
+of an association, including its reachability state, congestion window,
+and retransmission timer values.  This information is read-only. The structure
+sctp_paddr_info defined in /usr/include/netinet/sctp.h is used to access this
+information.
+.TP
+.B SCTP_GET_ASSOC_STATS
+Applications can retrieve current statistics about an association, including
+SACKs sent and received, SCTP packets sent and received. The complete list can
+be found in /usr/include/netinet/sctp.h in struct sctp_assoc_stats.
+.SH AUTHORS
+Sridhar Samudrala <sri@us.ibm.com>
+.SH "SEE ALSO"
+.BR socket (7),
+.BR socket (2),
+.BR ip (7),
+.BR bind (2), 
+.BR listen (2),
+.BR accept (2),
+.BR connect (2),
+.BR sendmsg (2),
+.BR recvmsg (2),
+.BR sysctl (2),
+.BR getsockopt (2),
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getladdrs (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_opt_info (3).
+.sp
+RFC2960, RFC3309 for the SCTP specification.
diff --git a/man/sctp_bindx.3 b/man/sctp_bindx.3
new file mode 100644
index 0000000..e1b151b
--- /dev/null
+++ b/man/sctp_bindx.3
@@ -0,0 +1,94 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_BINDX 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_bindx \- Add or remove bind addresses on a socket.
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_bindx(int " sd ", struct sockaddr * " addrs ", int " addrcnt ,
+.BI "               int " flags );
+.fi
+.SH DESCRIPTION
+.BR sctp_bindx
+adds or removes a set of bind addresses passed in the array
+.I addrs
+to/from the socket
+.I sd.
+.I addrcnt
+is the number of addresses in the array and the
+.I flags
+paramater indicates if the addresses need to be added or removed.
+.PP
+If
+.I sd
+is an IPv4 socket, the addresses passed must be IPv4 addresses. If
+.I sd
+is an IPv6 socket, the addresses passed can be either IPv4 or IPv6
+addresses.
+.PP
+.I addrs
+is a pointer to an array of one or more socket addresses. Each address is
+contained in its appropriate structure(i.e. struct sockaddr_in or struct
+sockaddr_in6). The family of the address type must be used to distinguish
+the address length. The caller specifies the number of addresses in the
+array with
+.I addrcnt. 
+.PP
+The
+.I flags
+parameter can be either
+.B SCTP_BINDX_ADD_ADDR
+or
+.B SCTP_BINDX_REM_ADDR.
+An application can use
+.B SCTP_BINDX_ADD_ADDR
+to associate additional addresses with an endpoint after calling
+.BR bind(2). 
+.B SCTP_BINDX_REM_ADDR
+directs SCTP to remove the given addresses from the association.
+A caller may not remove all addresses from an association. It will
+fail with
+.B EINVAL.
+.SH "RETURN VALUE"
+On success, 0 is returned. On failure, \-1 is returned, and
+.I errno
+is set appropriately.
+.SH ERRORS
+.TP
+.B EBADF
+.I sd
+is not a valid descriptor.
+.TP
+.B ENOTSOCK
+.I sd
+is a descriptor for a file, not a socket.
+.TP
+.B EFAULT
+Error while copying in or out from the user address space.
+.TP
+.B EINVAL
+Invalid port or address or trying to remove all addresses from an association.
+.TP
+.B EACCES
+The address is protected, and the user is not the super-user.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),
+.BR sctp_connectx (3)
diff --git a/man/sctp_connectx.3 b/man/sctp_connectx.3
new file mode 100644
index 0000000..c75454c
--- /dev/null
+++ b/man/sctp_connectx.3
@@ -0,0 +1,144 @@
+.\" (C) Copyright Frank Filz IBM Corp. 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_CONNECTX 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_connectx \- initiate a connection on an SCTP socket using multiple
+destination addresses.
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_connectx(int " sd ", struct sockaddr * " addrs ", int " addrcnt,
+.BI "                  sctp_assoc_t  * "id );
+.fi
+.SH DESCRIPTION
+.BR sctp_connectx
+initiates a connection to a set of addresses passed in the array
+.I addrs
+to/from the socket
+.I sd.
+.I addrcnt
+is the number of addresses in the array.
+.PP
+If
+.I sd
+is an IPv4 socket, the addresses passed must be IPv4 addresses. If
+.I sd
+is an IPv6 socket, the addresses passed can be either IPv4 or IPv6
+addresses.
+.PP
+.I addrs
+is a pointer to an array of one or more socket addresses. Each address is
+contained in its appropriate structure(i.e. struct sockaddr_in or struct
+sockaddr_in6). The family of the address type must be used to distinguish
+the address length. The caller specifies the number of addresses in the
+array with
+.I addrcnt. 
+.PP
+.I id
+is a pointer to the association id and, if provided, will be set to the
+identifier of the newly created association.
+.SH "RETURN VALUE"
+On success, 0 is returned. On failure, \-1 is returned, and
+.I errno
+is set appropriately.
+.SH ERRORS
+.TP
+.B EBADF
+.I sd
+is not a valid descriptor.
+.TP
+.B ENOTSOCK
+.I sd
+is a descriptor for a file, not a socket.
+.TP
+.B EFAULT
+Error while copying in or out from the user address space.
+.TP
+.B EINVAL
+Invalid port or address.
+.TP
+.B EACCES
+The address is protected, and the user is not the super-user.
+.TP
+.B EISCONN
+The socket is already connected.
+.TP
+.B ECONNREFUSED
+No one listening on the remote address.
+.TP
+.B ETIMEDOUT
+Timeout while attempting connection. The server may be too 
+busy to accept new connections. Note that for IP sockets the timeout may
+be very long when syncookies are enabled on the server.
+.TP
+.B ENETUNREACH
+Network is unreachable.
+.TP
+.B EADDRINUSE
+Local address is already in use.
+.TP
+.B EINPROGRESS
+The socket is non-blocking and the connection cannot be completed
+immediately.  It is possible to
+.BR select (2)
+or 
+.BR poll (2) 
+for completion by selecting the socket for writing. After 
+.B select
+indicates writability, use
+.BR getsockopt (2)
+to read the 
+.B SO_ERROR
+option at level 
+.B SOL_SOCKET
+to determine whether 
+.B connect
+completed successfully 
+.RB ( SO_ERROR
+is zero) or unsuccessfully 
+.RB ( SO_ERROR
+is one of the usual error codes listed here, 
+explaining the reason for the failure).
+.TP
+.B EALREADY
+The socket is non-blocking and a previous connection attempt has not yet
+been completed.
+.TP
+.B EAGAIN
+No more free local ports or insufficient entries in the routing cache. For
+.B PF_INET
+see the 
+.B net.ipv4.ip_local_port_range
+sysctl in 
+.BR ip (7) 
+on how to increase the number of local ports.
+.TP
+.B EAFNOSUPPORT
+The passed address didn't have the correct address family in its 
+.I sa_family
+field.
+.TP
+.B EACCES, EPERM
+The user tried to connect to a broadcast address without having the socket 
+broadcast flag enabled or the connection request failed because of a local
+firewall rule.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),
diff --git a/man/sctp_getladdrs.3 b/man/sctp_getladdrs.3
new file mode 100644
index 0000000..c5aad14
--- /dev/null
+++ b/man/sctp_getladdrs.3
@@ -0,0 +1,78 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_GETLADDRS 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_getladdrs \- Returns all locally bound addresses on a socket. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_getladdrs(int " sd ", sctp_assoc_t " assoc_id ,
+.BI "                   struct sockaddr **" addrs );
+.sp
+.BI "void sctp_freeladdrs(struct sockaddr *" addrs );
+.fi
+.SH DESCRIPTION
+.BR sctp_getladdrs
+returns all locally bound addresses on a socket. On return,
+.I addrs
+will point to a dynamically allocated packed array of
+.B sockaddr
+structures of the appropriate type for each local address. The caller
+should use 
+.BR sctp_freeladdrs
+to free the memory. Note that the in/out parameter
+.I addrs
+must not be NULL.
+.PP
+If
+.I sd
+is an IPv4 socket, the addresses returned will be all IPv4 addresses. If
+.I sd
+is an IPv6 socket, the addresses returned can be a mix of IPv4 or IPv6
+addresses.
+.PP
+For one-to-many style sockets,
+.I id
+specifies the association to query. For one-to-one style sockets,
+.I id
+is ignored.
+.PP
+If the
+.I id
+field is set to 0, then the locally bound addresses are returned 
+without regard to any particular association. 
+.PP
+.BR sctp_freeladdrs
+frees all the resources allocated by
+.BR sctp_getladdrs
+.SH "RETURN VALUE"
+On success,
+.BR sctp_getladdrs
+returns the number of local addresses bound to the socket. If the socket
+is unbound, 0 is returned and the value of 
+.I *addrs
+is undefined. On error,
+.BR sctp_getladdrs
+returns -1 and the value of
+.I *addrs
+is undefined.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_opt_info (3),
diff --git a/man/sctp_getpaddrs.3 b/man/sctp_getpaddrs.3
new file mode 100644
index 0000000..9167dfc
--- /dev/null
+++ b/man/sctp_getpaddrs.3
@@ -0,0 +1,72 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_GETPADDRS 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_getpaddrs \- Returns all peer addresses in an association. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_getpaddrs(int " sd ", sctp_assoc_t " assoc_id ,
+.BI "                   struct sockaddr **" addrs );
+.sp
+.BI "void sctp_freepaddrs(struct sockaddr *" addrs );
+.fi
+.SH DESCRIPTION
+.BR sctp_getpaddrs
+returns all peer addresses in an association. On return,
+.I addrs
+will point to a dynamically allocated packed array of
+.B sockaddr
+structures of the appropriate type for each address. The caller should use 
+.BR sctp_freepaddrs
+to free the memory. Note that the in/out parameter
+.I addrs
+must not be NULL.
+.PP
+If
+.I sd
+is an IPv4 socket, the addresses returned will be all IPv4 addresses. If
+.I sd
+is an IPv6 socket, the addresses returned can be a mix of IPv4 or IPv6
+addresses.
+.PP
+For one-to-many style sockets,
+.I id
+specifies the association to query. For one-to-one style sockets,
+.I id
+is ignored.
+.PP
+.BR sctp_freepaddrs
+frees all the resources allocated by
+.BR sctp_getpaddrs. 
+.SH "RETURN VALUE"
+On success,
+.BR sctp_getpaddrs
+returns the number of peer addresses in the association. If there is no
+association on this socket, 0 is returned and the value of 
+.I *addrs
+is undefined. On error,
+.BR sctp_getpaddrs
+returns -1 and the value of
+.I *addrs
+is undefined.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),
diff --git a/man/sctp_opt_info.3 b/man/sctp_opt_info.3
new file mode 100644
index 0000000..9d63c9c
--- /dev/null
+++ b/man/sctp_opt_info.3
@@ -0,0 +1,56 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_OPT_INFO 3 2004-01-30 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_optinfo \- Get options on a SCTP socket. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_opt_info(int " sd ", sctp_assoc_t " id ", int " opt ,
+.BI "                  void * " arg ", socklen_t * " size);
+.fi
+.SH DESCRIPTION
+.BR sctp_opt_info
+is a wrapper library function that can be used to get SCTP level options on
+a socket.
+.I sd
+is the socket descriptor for which the option is requested. For one-to-many
+style sockets,
+.I id
+specifies the association to query. For one-to-one style sockets,
+.I id
+is ignored.
+.I opt
+specifes the SCTP socket option to get.
+.I arg
+is an option-specific structure buffer provided by the caller. 
+.I size
+is a value-result parameter, initially containing the size of the buffer
+pointed to by
+.I arg
+and modifed on return to indicate the actual size of the value returned.
+.SH "RETURN VALUE"
+On success,
+.BR sctp_opt_info
+returns 0 and on failure -1 is returned with errno set to the appropriate
+error code.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
diff --git a/man/sctp_peeloff.3 b/man/sctp_peeloff.3
new file mode 100644
index 0000000..7e66317
--- /dev/null
+++ b/man/sctp_peeloff.3
@@ -0,0 +1,74 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_PEELOFF 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_peeloff \- Branch off an association into a separate socket. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_peeloff(int " sd ", sctp_assoc_t " assoc_id );
+.BI "int sctp_peeloff_flags(int " sd ", sctp_assoc_t " assoc_id ", unsigned " flags );
+.fi
+.SH DESCRIPTION
+.B sctp_peeloff
+branches off an existing association
+.I assoc_id
+on a one-to-many style socket
+.I sd
+into a separate socket. The new socket is a one-to-one style socket.
+.PP
+This is particularly desirable when, for instance, the application wishes to
+have a number of sporadic message senders/receivers remain under the original
+one-to-many style socket, but branch off those assocations carrying high volume
+data traffic into their own separate socket descriptors.
+
+.B sctp_peeloff_flags
+is a variant of sctp_peeloff, in which flags describing the behavior of
+the newly peeled off socket can be specified.  Currently the supported flags
+are:
+.TP
+.B SOCK_NONBLOCK
+Specifies that the new socket should not block on io operations.
+.TP
+.B SOCK_CLOEXEC
+Specifies that the new socket should be closed when the owning process calls
+exec.
+.SH "RETURN VALUE"
+On success, the new socket descriptor representing the branched-off asociation is returned.
+On error, \-1 is returned, and
+.I errno
+is set appropriately.
+.SH ERRORS
+.TP
+.B EBADF
+.I sd
+is not a valid descriptor.
+.TP
+.B EINVAL
+The assoc id passed is invalid or if the socket is a one-to-one style socket.
+.TP
+.B ENOTSOCK
+Argument is a descriptor for a file, not a socket.
+.SH NOTES
+.TP
+sctp_peeloff_flags is a linux specific variant of sctp_peeloff.  While it will compile on other systems, its use will result in an error return.  Portable code should use sctp_peeloff.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),
diff --git a/man/sctp_recvmsg.3 b/man/sctp_recvmsg.3
new file mode 100644
index 0000000..7854aec
--- /dev/null
+++ b/man/sctp_recvmsg.3
@@ -0,0 +1,71 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_RECVMSG 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_recvmsg \- Receive a message from a SCTP socket. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_recvmsg(int " sd ", void * " msg ", size_t " len ,
+.BI "                 struct sockaddr * " from ", socklen_t * " fromlen , 
+.BI "                 struct sctp_sndrcvinfo * " sinfo ", int * " msg_flags);
+.fi
+.SH DESCRIPTION
+.BR sctp_recvmsg
+is a wrapper library function that can be used to receive a message from
+a socket while using the advanced features of SCTP. 
+.I sd
+is the socket descriptor on which the message pointed to by
+.I msg
+of length
+.I len
+is received.
+.PP
+If
+.I from
+is not NULL, the source address of the message is filled in. The argument
+.I fromlen
+is a value-result parameter. initialized to the size of the buffer associated
+with 
+.I from ,
+and modified on return to indicate the actual size of the address stored.
+.PP
+.I sinfo
+is a pointer to a sctp_sndrcvinfo structure to be filled upon receipt of the
+message.
+.I msg_flags
+is a pointer to a integer that is filled with any message flags like
+.B MSG_NOTIFICATION or
+.B MSG_EOR. 
+The value of 
+.I msg_flags 
+pointer should be initialized to 0 to avoid unexpected behavior;
+.I msg_flags
+is also used as an input 
+.I flags 
+argument to 
+.I recvmsg
+function.
+.SH "RETURN VALUE"
+On success,
+.BR sctp_recvmsg
+returns the number of bytes received or -1 if an error occurred.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3)
diff --git a/man/sctp_recvv.3 b/man/sctp_recvv.3
new file mode 100644
index 0000000..a41cb33
--- /dev/null
+++ b/man/sctp_recvv.3
@@ -0,0 +1,99 @@
+.\" (C) Copyright Xin Long REDHAT Corp. 2018.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_RECVV 3 2018-04-29 "Linux 4.16 "Linux Programmer's Manual"
+.SH NAME
+sctp_recvv \- Receive a message from a SCTP socket with an extensible way.
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_recvv(int " sd ", const struct iovec * " iov ", int " iovlen ,
+.BI "               struct sockaddr * " from ", socklen_t * " fromlen ", void * " info ,
+.BI "               socklen_t * " infolen ", unsigned int * " infotype ", int * " flags );
+.fi
+.SH DESCRIPTION
+.BR sctp_recvv
+provides an extensible way for the SCTP stack to pass up different SCTP
+attributes associated with a received message to an application.
+There are two types of attributes that can be returned by this call: the
+attribute of the received message and the attribute of the next message
+in the receive buffer.  The caller enables the SCTP_RECVRCVINFO and
+SCTP_RECVNXTINFO socket options, respectively, to receive these attributes.
+Attributes of the received message are returned in struct sctp_rcvinfo,
+and attributes of the next message are returned in struct sctp_nxtinfo.
+If both options are enabled, both attributes are returned using the
+following structure.
+
+   struct sctp_recvv_rn {
+     struct sctp_rcvinfo recvv_rcvinfo;
+     struct sctp_nxtinfo recvv_nxtinfo;
+   };
+
+.I sd
+is the socket descriptor.
+.I iov
+is the scatter buffer, and only one user message is returned in this buffer.
+.I iovlen
+is the number of elements in iov.
+.I from
+is a pointer to a buffer to be filled with the sender of the received message's
+address.
+.I fromlen
+is an in/out parameter describing the from length.
+.I info
+is a pointer to the buffer to hold the attributes of the received message, the
+structure type of info is determined by the info_type parameter.
+.I infolen
+is an in/out parameter describing the size of the info buffer.
+On return,
+.I infotype
+is set to the type of the info buffer, and the current defined
+values are as follows:
+.TP
+.B SCTP_RECVV_NOINFO
+If neither SCTP_RECVRCVINFO nor SCTP_RECVNXTINFO options are enabled, no
+attribute will be returned.  If only the SCTP_RECVNXTINFO option is enabled
+but there is no next message in the buffer, no attribute will be returned.
+In these cases, *info_type will be set to SCTP_RECVV_NOINFO.
+.TP
+.B SCTP_RECVV_RCVINFO
+The type of info is struct sctp_rcvinfo, and the attribute relates to the
+received message.
+.TP
+.B SCTP_RECVV_NXTINFO
+The type of info is struct sctp_nxtinfo, and the attribute relates to the
+next message in the receive buffer.  This is the case when only the
+SCTP_RECVNXTINFO option is enabled and there is a next message in the buffer.
+.TP
+.B SCTP_RECVV_RN
+The type of info is struct sctp_recvv_rn.  The recvv_rcvinfo field is the
+attribute of the received message, and the recvv_nxtinfo field is the attribute
+of the next message in the buffer.  This is the case when both SCTP_RECVRCVINFO
+and SCTP_RECVNXTINFO options are enabled and there is a next message in the
+receive buffer.
+.PP
+.I flags
+is pointer to an integer to be filled with any message flags (e.g.,
+MSG_NOTIFICATION).
+.SH "RETURN VALUE"
+On success,
+.BR sctp_recvv
+returns the number of bytes received or -1 if an error occurred.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3)
diff --git a/man/sctp_send.3 b/man/sctp_send.3
new file mode 100644
index 0000000..ba66ecd
--- /dev/null
+++ b/man/sctp_send.3
@@ -0,0 +1,50 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_SEND 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_send \- Send a message from a SCTP socket. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_send(int " sd ", const void * " msg ", size_t " len ,
+.BI "                 const struct sctp_sndrcvinfo *" sinfo ",
+.BI "                 uint32_t " flags );
+.fi
+.SH DESCRIPTION
+.BR sctp_send
+is a wrapper library function that can be used to send a message from a socket
+without the use of the CMSG header structures.
+.I sd
+is the socket descriptor from which the message pointed to by
+.I msg
+of length
+.I len
+is sent.
+.I sinfo
+is a pointer to a sctp_sndrcvinfo structure.  
+.I flags
+parameter is composed of a bitwise OR of the flags that can be be passed as
+the 3rd argument of a standard sendmsg() call.
+.SH "RETURN VALUE"
+On success,
+.BR sctp_sendmsg
+returns the number of bytes sent or -1 if an error occurred.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),
+.BR sctp_sendmsg (3),
+.BR sctp_sendv (3)
diff --git a/man/sctp_sendmsg.3 b/man/sctp_sendmsg.3
new file mode 100644
index 0000000..51828fb
--- /dev/null
+++ b/man/sctp_sendmsg.3
@@ -0,0 +1,86 @@
+.\" (C) Copyright Sridhar Samudrala IBM Corp. 2004, 2005.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_SENDMSG 3 2004-10-25 "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+sctp_sendmsg \- Send a message from a SCTP socket. 
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_sendmsg(int " sd ", const void * " msg ", size_t " len ,
+.BI "                 struct sockaddr *" to ", socklen_t " tolen , 
+.BI "                 uint32_t " ppid ", uint32_t " flags ,
+.BI "                 uint16_t " stream_no ", uint32_t " timetolive ,
+.BI "                 uint32_t " context );
+.fi
+.SH DESCRIPTION
+.BR sctp_sendmsg
+is a wrapper library function that can be used to send a message from a socket
+while using the advanced features of SCTP. 
+.I sd
+is the socket descriptor from which the message pointed to by
+.I msg
+of length
+.I len
+is sent.
+.I to
+is the destination address of the message and
+.I tolen
+is the length of the destination address.
+.I stream_no
+identifies the stream number that the application wishes to send this message to.
+.I flags
+parameter is composed of a bitwise OR of the following values.
+.TP
+.B SCTP_UNORDERED
+This flags requests the un-ordered delivery of the message.
+.TP
+.B SCTP_ADDR_OVER
+This flag, in the one-to-many style, requests the SCTP stack to override the
+primary destination address with address specified in
+.I to.
+.TP
+.B SCTP_ABORT
+Setting this flag causes the specified association to abort by sending an ABORT
+message to the peer(one-to-many style only). The ABORT chunk will contain an
+error cause 'User Initiated Abort' with cause code 12. The cause specific
+information of this error cause is provided in
+.I msg.
+.TP
+.B SCTP_EOF
+Setting this flag invokes the SCTP graceful shutdown procedure on the specific
+association(one-to-many style only).
+.PP
+.I timetolive
+specifies the time duration in milliseconds. The sending side will expire the
+message if the message has not been sent to the peer within this time period.
+A value of 0 indicates that no timeout should occur on this message. 
+.I ppid
+is an opaque unsigned value that is passed to the remote end along with the
+message.
+.I context
+is a 32 bit opaque value that is passed back to the upper layer along with the
+undelivered message if an error occurs on the send of the message.
+.SH "RETURN VALUE"
+On success,
+.BR sctp_sendmsg
+returns the number of bytes sent or -1 if an error occurred.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_sendv (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),
diff --git a/man/sctp_sendv.3 b/man/sctp_sendv.3
new file mode 100644
index 0000000..03a2e44
--- /dev/null
+++ b/man/sctp_sendv.3
@@ -0,0 +1,97 @@
+.\" (C) Copyright Xin Long REDHAT Corp. 2018.
+.\"
+.\" Permission is granted to distribute possibly modified copies
+.\" of this manual provided the header is included verbatim,
+.\" and in case of nontrivial modification author and date
+.\" of the modification is added to the header.
+.\"
+.TH SCTP_SENDV 3 2018-04-29 "Linux 4.16 "Linux Programmer's Manual"
+.SH NAME
+sctp_sendv \- Send messages from a SCTP socket with an extensible way.
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/socket.h>
+.B #include <netinet/sctp.h>
+.sp
+.BI "int sctp_sendv(int " sd ", const struct iovec * " iov ", int " iovcnt ,
+.BI "               struct sockaddr *" addrs ", int " addrcnt ", void * " info ,
+.BI "               socklen_t " infolen ", unsigned int " infotype ", int " flags );
+.fi
+.SH DESCRIPTION
+.BR sctp_sendv
+provides an extensible way for an application to communicate different send
+attributes to the SCTP stack when sending a message. There are three types
+of attributes that can be used to describe a message to be sent. They are
+struct sctp_sndinfo, struct sctp_prinfo, and struct sctp_authinfo. The
+following structure, sctp_sendv_spa, is defined to be used when more than
+one of the above attributes are needed to describe a message to be sent.
+
+   struct sctp_sendv_spa {
+     uint32_t sendv_flags;
+     struct sctp_sndinfo sendv_sndinfo;
+     struct sctp_prinfo sendv_prinfo;
+     struct sctp_authinfo sendv_authinfo;
+   };
+
+The sendv_flags field holds a bitwise OR of SCTP_SEND_SNDINFO_VALID,
+SCTP_SEND_PRINFO_VALID, and SCTP_SEND_AUTHINFO_VALID indicating if
+the sendv_sndinfo/sendv_prinfo/sendv_authinfo fields contain valid
+information.
+
+.I sd
+is the socket descriptor.
+.I iov
+is the gather buffer,  the data in the buffer is treated as a single
+user message.
+.I iovcnt
+is the number of elements in iov.
+.I addrs
+is an array of addresses to be used to set up an association or
+a single address to be used to send the message, and  NULL is passed
+in if the caller neither wants to set up an association nor wants
+to send the message to a specific address.
+.I addrcnt
+is the number of addresses in the addrs array.
+.I info
+is a pointer to the buffer containing the attribute associated with the
+message to be sent,  and the type is indicated by the info_type parameter.
+.I infolen
+is the length of info, in bytes.
+.I infotype
+identifies the type of the information provided in info ,and the current
+defined values are as follows:
+.TP
+.B SCTP_SENDV_NOINFO
+No information is provided.  The parameter info is a NULL pointer, and
+infolen is 0.
+.TP
+.B SCTP_SENDV_SNDINFO
+The parameter info is pointing to a struct sctp_sndinfo.
+.TP
+.B SCTP_SENDV_PRINFO
+The parameter info is pointing to a struct sctp_prinfo.
+.TP
+.B SCTP_SENDV_AUTHINFO
+The parameter info is pointing to a struct sctp_authinfo.
+.TP
+.B SCTP_SENDV_SPA
+The parameter info is pointing to a struct sctp_sendv_spa.
+.PP
+.I flags
+The same flags as used by the sendmsg() call flags (e.g., MSG_DONTROUTE).
+.SH "RETURN VALUE"
+On success,
+.BR sctp_sendv
+returns the number of bytes sent or -1 if an error occurred.
+.SH "SEE ALSO"
+.BR sctp (7)
+.BR sctp_bindx (3),
+.BR sctp_connectx (3),
+.BR sctp_send (3),
+.BR sctp_recvmsg (3),
+.BR sctp_recvv (3),
+.BR sctp_peeloff (3),
+.BR sctp_getpaddrs (3),
+.BR sctp_getladdrs (3),
+.BR sctp_opt_info (3),