#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);
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:
flags The same flags as used by the sendmsg() call flags (e.g., MSG_DONTROUTE).