Debian Codegraph @

man/sctp_sendv.3

raw
1 .\" (C) Copyright Xin Long REDHAT Corp. 2018.
2 .\"
3 .\" Permission is granted to distribute possibly modified copies
4 .\" of this manual provided the header is included verbatim,
5 .\" and in case of nontrivial modification author and date
6 .\" of the modification is added to the header.
7 .\"
8 .TH SCTP_SENDV 3 2018-04-29 "Linux 4.16 "Linux Programmer's Manual"
9 .SH NAME
10 sctp_sendv \- Send messages from a SCTP socket with an extensible way.
11 .SH SYNOPSIS
12 .nf
13 .B #include <sys/types.h>
14 .B #include <sys/socket.h>
15 .B #include <netinet/sctp.h>
16 .sp
17 .BI "int sctp_sendv(int " sd ", const struct iovec * " iov ", int " iovcnt ,
18 .BI " struct sockaddr *" addrs ", int " addrcnt ", void * " info ,
19 .BI " socklen_t " infolen ", unsigned int " infotype ", int " flags );
20 .fi
21 .SH DESCRIPTION
22 .BR sctp_sendv
23 provides an extensible way for an application to communicate different send
24 attributes to the SCTP stack when sending a message. There are three types
25 of attributes that can be used to describe a message to be sent. They are
26 struct sctp_sndinfo, struct sctp_prinfo, and struct sctp_authinfo. The
27 following structure, sctp_sendv_spa, is defined to be used when more than
28 one of the above attributes are needed to describe a message to be sent.
29
30 struct sctp_sendv_spa {
31 uint32_t sendv_flags;
32 struct sctp_sndinfo sendv_sndinfo;
33 struct sctp_prinfo sendv_prinfo;
34 struct sctp_authinfo sendv_authinfo;
35 };
36
37 The sendv_flags field holds a bitwise OR of SCTP_SEND_SNDINFO_VALID,
38 SCTP_SEND_PRINFO_VALID, and SCTP_SEND_AUTHINFO_VALID indicating if
39 the sendv_sndinfo/sendv_prinfo/sendv_authinfo fields contain valid
40 information.
41
42 .I sd
43 is the socket descriptor.
44 .I iov
45 is the gather buffer, the data in the buffer is treated as a single
46 user message.
47 .I iovcnt
48 is the number of elements in iov.
49 .I addrs
50 is an array of addresses to be used to set up an association or
51 a single address to be used to send the message, and NULL is passed
52 in if the caller neither wants to set up an association nor wants
53 to send the message to a specific address.
54 .I addrcnt
55 is the number of addresses in the addrs array.
56 .I info
57 is a pointer to the buffer containing the attribute associated with the
58 message to be sent, and the type is indicated by the info_type parameter.
59 .I infolen
60 is the length of info, in bytes.
61 .I infotype
62 identifies the type of the information provided in info ,and the current
63 defined values are as follows:
64 .TP
65 .B SCTP_SENDV_NOINFO
66 No information is provided. The parameter info is a NULL pointer, and
67 infolen is 0.
68 .TP
69 .B SCTP_SENDV_SNDINFO
70 The parameter info is pointing to a struct sctp_sndinfo.
71 .TP
72 .B SCTP_SENDV_PRINFO
73 The parameter info is pointing to a struct sctp_prinfo.
74 .TP
75 .B SCTP_SENDV_AUTHINFO
76 The parameter info is pointing to a struct sctp_authinfo.
77 .TP
78 .B SCTP_SENDV_SPA
79 The parameter info is pointing to a struct sctp_sendv_spa.
80 .PP
81 .I flags
82 The same flags as used by the sendmsg() call flags (e.g., MSG_DONTROUTE).
83 .SH "RETURN VALUE"
84 On success,
85 .BR sctp_sendv
86 returns the number of bytes sent or -1 if an error occurred.
87 .SH "SEE ALSO"
88 .BR sctp (7)
89 .BR sctp_bindx (3),
90 .BR sctp_connectx (3),
91 .BR sctp_send (3),
92 .BR sctp_recvmsg (3),
93 .BR sctp_recvv (3),
94 .BR sctp_peeloff (3),
95 .BR sctp_getpaddrs (3),
96 .BR sctp_getladdrs (3),
97 .BR sctp_opt_info (3),