1SCTP_SENDV(3)                        Linux                       SCTP_SENDV(3)
2
3
4

NAME

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

SYNOPSIS

9       #include <sys/types.h>
10       #include <sys/socket.h>
11       #include <netinet/sctp.h>
12
13       int sctp_sendv(int sd, const struct iovec * iov, int iovcnt,
14                      struct sockaddr *addrs, int addrcnt, void * info,
15                      socklen_t infolen, unsigned int infotype, int flags);
16

DESCRIPTION

18       sctp_sendv provides an extensible way for an application to communicate
19       different send attributes to the SCTP stack  when  sending  a  message.
20       There are three types of attributes that can be used to describe a mes‐
21       sage to be sent. They are struct sctp_sndinfo, struct sctp_prinfo,  and
22       struct  sctp_authinfo.  The  following  structure,  sctp_sendv_spa,  is
23       defined to be used when more than  one  of  the  above  attributes  are
24       needed to describe a message to be sent.
25
26          struct sctp_sendv_spa {
27            uint32_t sendv_flags;
28            struct sctp_sndinfo sendv_sndinfo;
29            struct sctp_prinfo sendv_prinfo;
30            struct sctp_authinfo sendv_authinfo;
31          };
32
33       The  sendv_flags  field  holds a bitwise OR of SCTP_SEND_SNDINFO_VALID,
34       SCTP_SEND_PRINFO_VALID, and SCTP_SEND_AUTHINFO_VALID indicating if  the
35       sendv_sndinfo/sendv_prinfo/sendv_authinfo fields contain valid informa‐
36       tion.
37
38       sd is the socket descriptor.  iov is the gather buffer,   the  data  in
39       the  buffer  is treated as a single user message.  iovcnt is the number
40       of elements in iov.  addrs is an array of addresses to be used  to  set
41       up  an  association or a single address to be used to send the message,
42       and  NULL is passed in if the caller neither wants to set up an associ‐
43       ation  nor wants to send the message to a specific address.  addrcnt is
44       the number of addresses in the addrs array.  info is a pointer  to  the
45       buffer containing the attribute associated with the message to be sent,
46       and the type is indicated by the info_type parameter.  infolen  is  the
47       length of info, in bytes.  infotype identifies the type of the informa‐
48       tion provided in info ,and the current defined values are as follows:
49
50       SCTP_SENDV_NOINFO
51              No information is  provided.   The  parameter  info  is  a  NULL
52              pointer, and infolen is 0.
53
54       SCTP_SENDV_SNDINFO
55              The parameter info is pointing to a struct sctp_sndinfo.
56
57       SCTP_SENDV_PRINFO
58              The parameter info is pointing to a struct sctp_prinfo.
59
60       SCTP_SENDV_AUTHINFO
61              The parameter info is pointing to a struct sctp_authinfo.
62
63       SCTP_SENDV_SPA
64              The parameter info is pointing to a struct sctp_sendv_spa.
65
66       flags  The  same  flags  as  used  by  the  sendmsg() call flags (e.g.,
67       MSG_DONTROUTE).
68

RETURN VALUE

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

SEE ALSO

74       sctp(7) sctp_bindx(3), sctp_connectx(3), sctp_send(3), sctp_recvmsg(3),
75       sctp_recvv(3), sctp_peeloff(3),  sctp_getpaddrs(3),  sctp_getladdrs(3),
76       sctp_opt_info(3),
77
78
79
80Linux 4.16                        2018-04-29                     SCTP_SENDV(3)
Impressum