CINXE.COM

sctp_recvv

<html> <head> <title>sctp_recvv</title> <META NAME="KEYWORDS" CONTENT="sctp_recvv"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>sctp_recvv</b></h1></center> <PRE> <STRONG><A HREF="/man3/SCTP_RECVV">SCTP_RECVV(3)</A></STRONG> Linux <STRONG><A HREF="/man3/SCTP_RECVV">SCTP_RECVV(3)</A></STRONG> NAME sctp_recvv - Receive a message from a SCTP socket with an extensible way. SYNOPSIS #include &lt;sys/types.h&gt; #include &lt;sys/socket.h&gt; #include &lt;netinet/sctp.h&gt; int sctp_recvv(int sd, const struct iovec * iov, int iovlen, struct sockaddr * from, socklen_t * fromlen, void * info, socklen_t * infolen, unsigned int * infotype, int * flags); DESCRIPTION sctp_recvv provides an extensible way for the SCTP stack to pass up different SCTP attributes associated with a received message to an ap- plication. There are two types of attributes that can be returned by this call: the attribute of the received message and the attribute of the next message in the receive buffer. The caller enables the SCTP_RECVRCVINFO and SCTP_RECVNXTINFO socket options, respectively, to receive these attributes. Attributes of the received message are re- turned in struct sctp_rcvinfo, and attributes of the next message are returned in struct sctp_nxtinfo. If both options are enabled, both at- tributes are returned using the following structure. struct sctp_recvv_rn { struct sctp_rcvinfo recvv_rcvinfo; struct sctp_nxtinfo recvv_nxtinfo; }; sd is the socket descriptor. iov is the scatter buffer, and only one user message is returned in this buffer. iovlen is the number of ele- ments in iov. from is a pointer to a buffer to be filled with the sender of the received message's address. fromlen is an in/out parame- ter describing the from length. info is a pointer to the buffer to hold the attributes of the received message, the structure type of info is determined by the info_type parameter. infolen is an in/out parame- ter describing the size of the info buffer. On return, infotype is set to the type of the info buffer, and the current defined values are as follows: SCTP_RECVV_NOINFO If neither SCTP_RECVRCVINFO nor SCTP_RECVNXTINFO options are en- abled, no attribute will be returned. If only the SCTP_RECVNX- TINFO option is enabled but there is no next message in the buf- fer, no attribute will be returned. In these cases, *info_type will be set to SCTP_RECVV_NOINFO. SCTP_RECVV_RCVINFO The type of info is struct sctp_rcvinfo, and the attribute re- lates to the received message. SCTP_RECVV_NXTINFO The type of info is struct sctp_nxtinfo, and the attribute re- lates to the next message in the receive buffer. This is the case when only the SCTP_RECVNXTINFO option is enabled and there is a next message in the buffer. SCTP_RECVV_RN The type of info is struct sctp_recvv_rn. The recvv_rcvinfo field is the attribute of the received message, and the recvv_nxtinfo field is the attribute of the next message in the buffer. This is the case when both SCTP_RECVRCVINFO and SCTP_RECVNXTINFO options are enabled and there is a next message in the receive buffer. flags is pointer to an integer to be filled with any message flags (e.g., MSG_NOTIFICATION). RETURN VALUE On success, sctp_recvv returns the number of bytes received or -1 if an error occurred. SEE ALSO <STRONG><A HREF="/man7/sctp">sctp(7)</A></STRONG> <STRONG><A HREF="/man3/sctp_bindx">sctp_bindx(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_connectx">sctp_connectx(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_sendmsg">sctp_sendmsg(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_sendv">sctp_sendv(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_send">sctp_send(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_peeloff">sctp_peeloff(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_getpaddrs">sctp_getpaddrs(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_getladdrs">sctp_getladdrs(3)</A></STRONG>, <STRONG><A HREF="/man3/sctp_opt_info">sctp_opt_info(3)</A></STRONG> Linux 4.16 2018-04-29 <STRONG><A HREF="/man3/SCTP_RECVV">SCTP_RECVV(3)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10