# sctp_sendv

## NAME



           sctp_sendv - Send messages from a SCTP socket with an extensible
           way.
    


## SYNOPSIS



           **#include <sys/types.h>**
           **#include <sys/socket.h>**
           **#include <netinet/sctp.h>**
    
           **int sctp_sendv(int** _sd_**, const struct iovec ***_iov_**, int** _iovcnt_**,**
                          **struct sockaddr ***_addrs_**, int** _addrcnt_**, void ***_info_**,**
                          **socklen_t** _infolen_**, unsigned int** _infotype_**, int** _flags_**);**
    


## DESCRIPTION



           **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.
    
           _sd_ is the socket descriptor.  _iov_ is the gather buffer,  the data
           in the buffer is treated as a single user message.  _iovcnt_ is the
           number of elements in iov.  _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.  _addrcnt_ is the number of addresses in the addrs
           array.  _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.  _infolen_ is the length of info, in
           bytes.  _infotype_ identifies the type of the information provided
           in info ,and the current defined values are as follows:
    
           **SCTP_SENDV_NOINFO**
                  No information is provided.  The parameter info is a NULL
                  pointer, and infolen is 0.
    
           **SCTP_SENDV_SNDINFO**
                  The parameter info is pointing to a struct sctp_sndinfo.
    
           **SCTP_SENDV_PRINFO**
                  The parameter info is pointing to a struct sctp_prinfo.
    
           **SCTP_SENDV_AUTHINFO**
                  The parameter info is pointing to a struct sctp_authinfo.
    
           **SCTP_SENDV_SPA**
                  The parameter info is pointing to a struct sctp_sendv_spa.
    
           _flags_ The same flags as used by the sendmsg() call flags (e.g.,
           MSG_DONTROUTE).
    


## RETURN VALUE



           On success, **sctp_sendv** returns the number of bytes sent or -1 if
           an error occurred.
    


* * *