1*8269e767SBrooks Davis.\" Copyright (c) 1983, 1990, 1991, 1993 2*8269e767SBrooks Davis.\" The Regents of the University of California. All rights reserved. 3*8269e767SBrooks Davis.\" 4*8269e767SBrooks Davis.\" Redistribution and use in source and binary forms, with or without 5*8269e767SBrooks Davis.\" modification, are permitted provided that the following conditions 6*8269e767SBrooks Davis.\" are met: 7*8269e767SBrooks Davis.\" 1. Redistributions of source code must retain the above copyright 8*8269e767SBrooks Davis.\" notice, this list of conditions and the following disclaimer. 9*8269e767SBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright 10*8269e767SBrooks Davis.\" notice, this list of conditions and the following disclaimer in the 11*8269e767SBrooks Davis.\" documentation and/or other materials provided with the distribution. 12*8269e767SBrooks Davis.\" 3. Neither the name of the University nor the names of its contributors 13*8269e767SBrooks Davis.\" may be used to endorse or promote products derived from this software 14*8269e767SBrooks Davis.\" without specific prior written permission. 15*8269e767SBrooks Davis.\" 16*8269e767SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17*8269e767SBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*8269e767SBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*8269e767SBrooks Davis.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20*8269e767SBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*8269e767SBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*8269e767SBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*8269e767SBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*8269e767SBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*8269e767SBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*8269e767SBrooks Davis.\" SUCH DAMAGE. 27*8269e767SBrooks Davis.\" 28*8269e767SBrooks Davis.Dd July 30, 2022 29*8269e767SBrooks Davis.Dt RECV 2 30*8269e767SBrooks Davis.Os 31*8269e767SBrooks Davis.Sh NAME 32*8269e767SBrooks Davis.Nm recv , 33*8269e767SBrooks Davis.Nm recvfrom , 34*8269e767SBrooks Davis.Nm recvmsg , 35*8269e767SBrooks Davis.Nm recvmmsg 36*8269e767SBrooks Davis.Nd receive message(s) from a socket 37*8269e767SBrooks Davis.Sh LIBRARY 38*8269e767SBrooks Davis.Lb libc 39*8269e767SBrooks Davis.Sh SYNOPSIS 40*8269e767SBrooks Davis.In sys/socket.h 41*8269e767SBrooks Davis.Ft ssize_t 42*8269e767SBrooks Davis.Fn recv "int s" "void *buf" "size_t len" "int flags" 43*8269e767SBrooks Davis.Ft ssize_t 44*8269e767SBrooks Davis.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" 45*8269e767SBrooks Davis.Ft ssize_t 46*8269e767SBrooks Davis.Fn recvmsg "int s" "struct msghdr *msg" "int flags" 47*8269e767SBrooks Davis.Ft ssize_t 48*8269e767SBrooks Davis.Fn recvmmsg "int s" "struct mmsghdr * restrict msgvec" "size_t vlen" "int flags" "const struct timespec * restrict timeout" 49*8269e767SBrooks Davis.Sh DESCRIPTION 50*8269e767SBrooks DavisThe 51*8269e767SBrooks Davis.Fn recvfrom , 52*8269e767SBrooks Davis.Fn recvmsg , 53*8269e767SBrooks Davisand 54*8269e767SBrooks Davis.Fn recvmmsg 55*8269e767SBrooks Davissystem calls 56*8269e767SBrooks Davisare used to receive messages from a socket, 57*8269e767SBrooks Davisand may be used to receive data on a socket whether or not 58*8269e767SBrooks Davisit is connection-oriented. 59*8269e767SBrooks Davis.Pp 60*8269e767SBrooks DavisIf 61*8269e767SBrooks Davis.Fa from 62*8269e767SBrooks Davisis not a null pointer 63*8269e767SBrooks Davisand the socket is not connection-oriented, 64*8269e767SBrooks Davisthe source address of the message is filled in. 65*8269e767SBrooks DavisThe 66*8269e767SBrooks Davis.Fa fromlen 67*8269e767SBrooks Davisargument 68*8269e767SBrooks Davisis a value-result argument, initialized to the size of 69*8269e767SBrooks Davisthe buffer associated with 70*8269e767SBrooks Davis.Fa from , 71*8269e767SBrooks Davisand modified on return to indicate the actual size of the 72*8269e767SBrooks Davisaddress stored there. 73*8269e767SBrooks Davis.Pp 74*8269e767SBrooks DavisThe 75*8269e767SBrooks Davis.Fn recv 76*8269e767SBrooks Davisfunction is normally used only on a 77*8269e767SBrooks Davis.Em connected 78*8269e767SBrooks Davissocket (see 79*8269e767SBrooks Davis.Xr connect 2 ) 80*8269e767SBrooks Davisand is identical to 81*8269e767SBrooks Davis.Fn recvfrom 82*8269e767SBrooks Daviswith a 83*8269e767SBrooks Davisnull pointer passed as its 84*8269e767SBrooks Davis.Fa from 85*8269e767SBrooks Davisargument. 86*8269e767SBrooks Davis.Pp 87*8269e767SBrooks DavisThe 88*8269e767SBrooks Davis.Fn recvmmsg 89*8269e767SBrooks Davisfunction is used to receive multiple 90*8269e767SBrooks Davismessages at a call. 91*8269e767SBrooks DavisTheir number is supplied by 92*8269e767SBrooks Davis.Fa vlen . 93*8269e767SBrooks DavisThe messages are placed in the buffers described by 94*8269e767SBrooks Davis.Fa msgvec 95*8269e767SBrooks Davisvector, after reception. 96*8269e767SBrooks DavisThe size of each received message is placed in the 97*8269e767SBrooks Davis.Fa msg_len 98*8269e767SBrooks Davisfield of each element of the vector. 99*8269e767SBrooks DavisIf 100*8269e767SBrooks Davis.Fa timeout 101*8269e767SBrooks Davisis NULL the call blocks until the data is available for each 102*8269e767SBrooks Davissupplied message buffer. 103*8269e767SBrooks DavisOtherwise it waits for data for the specified amount of time. 104*8269e767SBrooks DavisIf the timeout expired and there is no data received, 105*8269e767SBrooks Davisa value 0 is returned. 106*8269e767SBrooks DavisThe 107*8269e767SBrooks Davis.Xr ppoll 2 108*8269e767SBrooks Davissystem call is used to implement the timeout mechanism, 109*8269e767SBrooks Davisbefore first receive is performed. 110*8269e767SBrooks Davis.Pp 111*8269e767SBrooks DavisThe 112*8269e767SBrooks Davis.Fn recv , 113*8269e767SBrooks Davis.Fn recvfrom 114*8269e767SBrooks Davisand 115*8269e767SBrooks Davis.Fn recvmsg 116*8269e767SBrooks Davisreturn the length of the message on successful 117*8269e767SBrooks Daviscompletion, whereas 118*8269e767SBrooks Davis.Fn recvmmsg 119*8269e767SBrooks Davisreturns the number of received messages. 120*8269e767SBrooks DavisIf a message is too long to fit in the supplied buffer, 121*8269e767SBrooks Davisexcess bytes may be discarded depending on the type of socket 122*8269e767SBrooks Davisthe message is received from (see 123*8269e767SBrooks Davis.Xr socket 2 ) . 124*8269e767SBrooks Davis.Pp 125*8269e767SBrooks DavisIf no messages are available at the socket, the 126*8269e767SBrooks Davisreceive call waits for a message to arrive, unless 127*8269e767SBrooks Davisthe socket is non-blocking (see 128*8269e767SBrooks Davis.Xr fcntl 2 ) 129*8269e767SBrooks Davisin which case the value 130*8269e767SBrooks Davis\-1 is returned and the global variable 131*8269e767SBrooks Davis.Va errno 132*8269e767SBrooks Davisis set to 133*8269e767SBrooks Davis.Er EAGAIN . 134*8269e767SBrooks DavisThe receive calls except 135*8269e767SBrooks Davis.Fn recvmmsg 136*8269e767SBrooks Davisnormally return any data available, 137*8269e767SBrooks Davisup to the requested amount, 138*8269e767SBrooks Davisrather than waiting for receipt of the full amount requested; 139*8269e767SBrooks Davisthis behavior is affected by the socket-level options 140*8269e767SBrooks Davis.Dv SO_RCVLOWAT 141*8269e767SBrooks Davisand 142*8269e767SBrooks Davis.Dv SO_RCVTIMEO 143*8269e767SBrooks Davisdescribed in 144*8269e767SBrooks Davis.Xr getsockopt 2 . 145*8269e767SBrooks DavisThe 146*8269e767SBrooks Davis.Fn recvmmsg 147*8269e767SBrooks Davisfunction implements this behaviour for each message in the vector. 148*8269e767SBrooks Davis.Pp 149*8269e767SBrooks DavisThe 150*8269e767SBrooks Davis.Xr select 2 151*8269e767SBrooks Davissystem call may be used to determine when more data arrives. 152*8269e767SBrooks Davis.Pp 153*8269e767SBrooks DavisThe 154*8269e767SBrooks Davis.Fa flags 155*8269e767SBrooks Davisargument to a 156*8269e767SBrooks Davis.Fn recv 157*8269e767SBrooks Davisfunction is formed by 158*8269e767SBrooks Davis.Em or Ap ing 159*8269e767SBrooks Davisone or more of the values: 160*8269e767SBrooks Davis.Bl -column ".Dv MSG_CMSG_CLOEXEC" -offset indent 161*8269e767SBrooks Davis.It Dv MSG_OOB Ta process out-of-band data 162*8269e767SBrooks Davis.It Dv MSG_PEEK Ta peek at incoming message 163*8269e767SBrooks Davis.It Dv MSG_TRUNC Ta return real packet or datagram length 164*8269e767SBrooks Davis.It Dv MSG_WAITALL Ta wait for full request or error 165*8269e767SBrooks Davis.It Dv MSG_DONTWAIT Ta do not block 166*8269e767SBrooks Davis.It Dv MSG_CMSG_CLOEXEC Ta set received fds close-on-exec 167*8269e767SBrooks Davis.It Dv MSG_WAITFORONE Ta do not block after receiving the first message 168*8269e767SBrooks Davis(only for 169*8269e767SBrooks Davis.Fn recvmmsg 170*8269e767SBrooks Davis) 171*8269e767SBrooks Davis.El 172*8269e767SBrooks Davis.Pp 173*8269e767SBrooks DavisThe 174*8269e767SBrooks Davis.Dv MSG_OOB 175*8269e767SBrooks Davisflag requests receipt of out-of-band data 176*8269e767SBrooks Davisthat would not be received in the normal data stream. 177*8269e767SBrooks DavisSome protocols place expedited data at the head of the normal 178*8269e767SBrooks Davisdata queue, and thus this flag cannot be used with such protocols. 179*8269e767SBrooks DavisThe 180*8269e767SBrooks Davis.Dv MSG_PEEK 181*8269e767SBrooks Davisflag causes the receive operation to return data 182*8269e767SBrooks Davisfrom the beginning of the receive queue without removing that 183*8269e767SBrooks Davisdata from the queue. 184*8269e767SBrooks DavisThus, a subsequent receive call will return the same data. 185*8269e767SBrooks DavisThe 186*8269e767SBrooks Davis.Dv MSG_TRUNC 187*8269e767SBrooks Davisflag causes the receive operation to return the full length of the packet 188*8269e767SBrooks Davisor datagram even if larger than provided buffer. The flag is supported 189*8269e767SBrooks Davison SOCK_DGRAM sockets for 190*8269e767SBrooks Davis.Dv AF_INET 191*8269e767SBrooks Davis, 192*8269e767SBrooks Davis.Dv AF_INET6 193*8269e767SBrooks Davisand 194*8269e767SBrooks Davis.Dv AF_UNIX 195*8269e767SBrooks Davisfamilies. 196*8269e767SBrooks DavisThe 197*8269e767SBrooks Davis.Dv MSG_WAITALL 198*8269e767SBrooks Davisflag requests that the operation block until 199*8269e767SBrooks Davisthe full request is satisfied. 200*8269e767SBrooks DavisHowever, the call may still return less data than requested 201*8269e767SBrooks Davisif a signal is caught, an error or disconnect occurs, 202*8269e767SBrooks Davisor the next data to be received is of a different type than that returned. 203*8269e767SBrooks DavisThe 204*8269e767SBrooks Davis.Dv MSG_DONTWAIT 205*8269e767SBrooks Davisflag requests the call to return when it would block otherwise. 206*8269e767SBrooks DavisIf no data is available, 207*8269e767SBrooks Davis.Va errno 208*8269e767SBrooks Davisis set to 209*8269e767SBrooks Davis.Er EAGAIN . 210*8269e767SBrooks DavisThis flag is not available in 211*8269e767SBrooks Davis.St -ansiC 212*8269e767SBrooks Davisor 213*8269e767SBrooks Davis.St -isoC-99 214*8269e767SBrooks Daviscompilation mode. 215*8269e767SBrooks DavisThe 216*8269e767SBrooks Davis.Dv MSG_WAITFORONE 217*8269e767SBrooks Davisflag sets MSG_DONTWAIT after the first message has been received. 218*8269e767SBrooks DavisThis flag is only relevant for 219*8269e767SBrooks Davis.Fn recvmmsg . 220*8269e767SBrooks Davis.Pp 221*8269e767SBrooks DavisThe 222*8269e767SBrooks Davis.Fn recvmsg 223*8269e767SBrooks Davissystem call uses a 224*8269e767SBrooks Davis.Fa msghdr 225*8269e767SBrooks Davisstructure to minimize the number of directly supplied arguments. 226*8269e767SBrooks DavisThis structure has the following form, as defined in 227*8269e767SBrooks Davis.In sys/socket.h : 228*8269e767SBrooks Davis.Bd -literal 229*8269e767SBrooks Davisstruct msghdr { 230*8269e767SBrooks Davis void *msg_name; /* optional address */ 231*8269e767SBrooks Davis socklen_t msg_namelen; /* size of address */ 232*8269e767SBrooks Davis struct iovec *msg_iov; /* scatter/gather array */ 233*8269e767SBrooks Davis int msg_iovlen; /* # elements in msg_iov */ 234*8269e767SBrooks Davis void *msg_control; /* ancillary data, see below */ 235*8269e767SBrooks Davis socklen_t msg_controllen;/* ancillary data buffer len */ 236*8269e767SBrooks Davis int msg_flags; /* flags on received message */ 237*8269e767SBrooks Davis}; 238*8269e767SBrooks Davis.Ed 239*8269e767SBrooks Davis.Pp 240*8269e767SBrooks DavisHere 241*8269e767SBrooks Davis.Fa msg_name 242*8269e767SBrooks Davisand 243*8269e767SBrooks Davis.Fa msg_namelen 244*8269e767SBrooks Davisspecify the source address if the socket is unconnected; 245*8269e767SBrooks Davis.Fa msg_name 246*8269e767SBrooks Davismay be given as a null pointer if no names are desired or required. 247*8269e767SBrooks DavisThe 248*8269e767SBrooks Davis.Fa msg_iov 249*8269e767SBrooks Davisand 250*8269e767SBrooks Davis.Fa msg_iovlen 251*8269e767SBrooks Davisarguments 252*8269e767SBrooks Davisdescribe scatter gather locations, as discussed in 253*8269e767SBrooks Davis.Xr read 2 . 254*8269e767SBrooks DavisThe 255*8269e767SBrooks Davis.Fa msg_control 256*8269e767SBrooks Davisargument, 257*8269e767SBrooks Daviswhich has length 258*8269e767SBrooks Davis.Fa msg_controllen , 259*8269e767SBrooks Davispoints to a buffer for other protocol control related messages 260*8269e767SBrooks Davisor other miscellaneous ancillary data. 261*8269e767SBrooks DavisThe messages are of the form: 262*8269e767SBrooks Davis.Bd -literal 263*8269e767SBrooks Davisstruct cmsghdr { 264*8269e767SBrooks Davis socklen_t cmsg_len; /* data byte count, including hdr */ 265*8269e767SBrooks Davis int cmsg_level; /* originating protocol */ 266*8269e767SBrooks Davis int cmsg_type; /* protocol-specific type */ 267*8269e767SBrooks Davis/* followed by 268*8269e767SBrooks Davis u_char cmsg_data[]; */ 269*8269e767SBrooks Davis}; 270*8269e767SBrooks Davis.Ed 271*8269e767SBrooks Davis.Pp 272*8269e767SBrooks DavisAs an example, the SO_TIMESTAMP socket option returns a reception 273*8269e767SBrooks Davistimestamp for UDP packets. 274*8269e767SBrooks Davis.Pp 275*8269e767SBrooks DavisWith 276*8269e767SBrooks Davis.Dv AF_UNIX 277*8269e767SBrooks Davisdomain sockets, ancillary data can be used to pass file descriptors and 278*8269e767SBrooks Davisprocess credentials. 279*8269e767SBrooks DavisSee 280*8269e767SBrooks Davis.Xr unix 4 281*8269e767SBrooks Davisfor details. 282*8269e767SBrooks Davis.Pp 283*8269e767SBrooks DavisThe 284*8269e767SBrooks Davis.Fa msg_flags 285*8269e767SBrooks Davisfield is set on return according to the message received. 286*8269e767SBrooks Davis.Dv MSG_EOR 287*8269e767SBrooks Davisindicates end-of-record; 288*8269e767SBrooks Davisthe data returned completed a record (generally used with sockets of type 289*8269e767SBrooks Davis.Dv SOCK_SEQPACKET ) . 290*8269e767SBrooks Davis.Dv MSG_TRUNC 291*8269e767SBrooks Davisindicates that 292*8269e767SBrooks Davisthe trailing portion of a datagram was discarded because the datagram 293*8269e767SBrooks Daviswas larger than the buffer supplied. 294*8269e767SBrooks Davis.Dv MSG_CTRUNC 295*8269e767SBrooks Davisindicates that some 296*8269e767SBrooks Daviscontrol data were discarded due to lack of space in the buffer 297*8269e767SBrooks Davisfor ancillary data. 298*8269e767SBrooks Davis.Dv MSG_OOB 299*8269e767SBrooks Davisis returned to indicate that expedited or out-of-band data were received. 300*8269e767SBrooks Davis.Pp 301*8269e767SBrooks DavisThe 302*8269e767SBrooks Davis.Fn recvmmsg 303*8269e767SBrooks Davissystem call uses the 304*8269e767SBrooks Davis.Fa mmsghdr 305*8269e767SBrooks Davisstructure, defined as follows in the 306*8269e767SBrooks Davis.In sys/socket.h 307*8269e767SBrooks Davisheader: 308*8269e767SBrooks Davis.Bd -literal 309*8269e767SBrooks Davisstruct mmsghdr { 310*8269e767SBrooks Davis struct msghdr msg_hdr; /* message header */ 311*8269e767SBrooks Davis ssize_t msg_len; /* message length */ 312*8269e767SBrooks Davis}; 313*8269e767SBrooks Davis.Ed 314*8269e767SBrooks Davis.Pp 315*8269e767SBrooks DavisOn data reception the 316*8269e767SBrooks Davis.Fa msg_len 317*8269e767SBrooks Davisfield is updated to the length of the received message. 318*8269e767SBrooks Davis.Sh RETURN VALUES 319*8269e767SBrooks DavisThese calls except 320*8269e767SBrooks Davis.Fn recvmmsg 321*8269e767SBrooks Davisreturn the number of bytes received. 322*8269e767SBrooks Davis.Fn recvmmsg 323*8269e767SBrooks Davisreturns the number of messages received. 324*8269e767SBrooks DavisA value of -1 is returned if an error occurred. 325*8269e767SBrooks Davis.Sh ERRORS 326*8269e767SBrooks DavisThe calls fail if: 327*8269e767SBrooks Davis.Bl -tag -width Er 328*8269e767SBrooks Davis.It Bq Er EBADF 329*8269e767SBrooks DavisThe argument 330*8269e767SBrooks Davis.Fa s 331*8269e767SBrooks Davisis an invalid descriptor. 332*8269e767SBrooks Davis.It Bq Er ECONNRESET 333*8269e767SBrooks DavisThe remote socket end is forcibly closed. 334*8269e767SBrooks Davis.It Bq Er ENOTCONN 335*8269e767SBrooks DavisThe socket is associated with a connection-oriented protocol 336*8269e767SBrooks Davisand has not been connected (see 337*8269e767SBrooks Davis.Xr connect 2 338*8269e767SBrooks Davisand 339*8269e767SBrooks Davis.Xr accept 2 ) . 340*8269e767SBrooks Davis.It Bq Er ENOTSOCK 341*8269e767SBrooks DavisThe argument 342*8269e767SBrooks Davis.Fa s 343*8269e767SBrooks Davisdoes not refer to a socket. 344*8269e767SBrooks Davis.It Bq Er EMFILE 345*8269e767SBrooks DavisThe 346*8269e767SBrooks Davis.Fn recvmsg 347*8269e767SBrooks Davissystem call 348*8269e767SBrooks Daviswas used to receive rights (file descriptors) that were in flight on the 349*8269e767SBrooks Davisconnection. 350*8269e767SBrooks DavisHowever, the receiving program did not have enough free file 351*8269e767SBrooks Davisdescriptor slots to accept them. 352*8269e767SBrooks DavisIn this case the descriptors are closed, with pending data either discarded 353*8269e767SBrooks Davisin the case of the unreliable datagram protocol or preserved in the case of a 354*8269e767SBrooks Davisreliable protocol. 355*8269e767SBrooks DavisThe pending data can be retrieved with another call to 356*8269e767SBrooks Davis.Fn recvmsg . 357*8269e767SBrooks Davis.It Bq Er EMSGSIZE 358*8269e767SBrooks DavisThe 359*8269e767SBrooks Davis.Fa msg_iovlen 360*8269e767SBrooks Davismember of the 361*8269e767SBrooks Davis.Fa msghdr 362*8269e767SBrooks Davisstructure pointed to by 363*8269e767SBrooks Davis.Fa msg 364*8269e767SBrooks Davisis less than or equal to 0, or is greater than 365*8269e767SBrooks Davis.Va IOV_MAX . 366*8269e767SBrooks Davis.It Bq Er EAGAIN 367*8269e767SBrooks DavisThe socket is marked non-blocking and the receive operation 368*8269e767SBrooks Daviswould block, or 369*8269e767SBrooks Davisa receive timeout had been set 370*8269e767SBrooks Davisand the timeout expired before data were received. 371*8269e767SBrooks Davis.It Bq Er EINTR 372*8269e767SBrooks DavisThe receive was interrupted by delivery of a signal before 373*8269e767SBrooks Davisany data were available. 374*8269e767SBrooks Davis.It Bq Er EFAULT 375*8269e767SBrooks DavisThe receive buffer pointer(s) point outside the process's 376*8269e767SBrooks Davisaddress space. 377*8269e767SBrooks Davis.El 378*8269e767SBrooks Davis.Sh SEE ALSO 379*8269e767SBrooks Davis.Xr fcntl 2 , 380*8269e767SBrooks Davis.Xr getsockopt 2 , 381*8269e767SBrooks Davis.Xr read 2 , 382*8269e767SBrooks Davis.Xr select 2 , 383*8269e767SBrooks Davis.Xr socket 2 , 384*8269e767SBrooks Davis.Xr CMSG_DATA 3 , 385*8269e767SBrooks Davis.Xr unix 4 386*8269e767SBrooks Davis.Sh HISTORY 387*8269e767SBrooks DavisThe 388*8269e767SBrooks Davis.Fn recv 389*8269e767SBrooks Davisfunction appeared in 390*8269e767SBrooks Davis.Bx 4.2 . 391*8269e767SBrooks DavisThe 392*8269e767SBrooks Davis.Fn recvmmsg 393*8269e767SBrooks Davisfunction appeared in 394*8269e767SBrooks Davis.Fx 11.0 . 395