---
name: "sctp_sendv"
section: "3"
platform: "linux"
package: "lksctp-tools"
version: "1.0.21-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/sctp_sendv"
---

# sctp\_sendv(3)

Send messages from a SCTP socket with an extensible way.

## 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.

## SEE ALSO

[**sctp**(7)](/sctp/7.md) [**sctp\_bindx**(3)](/sctp_bindx/3.md), [**sctp\_connectx**(3)](/sctp_connectx/3.md), [**sctp\_send**(3)](/sctp_send/3.md), [**sctp\_recvmsg**(3)](/sctp_recvmsg/3.md), [**sctp\_recvv**(3)](/sctp_recvv/3.md), [**sctp\_peeloff**(3)](/sctp_peeloff/3.md), [**sctp\_getpaddrs**(3)](/sctp_getpaddrs/3.md), [**sctp\_getladdrs**(3)](/sctp_getladdrs/3.md), [**sctp\_opt\_info**(3)](/sctp_opt_info/3.md),
