.\" Copyright (c) 1983, 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
.\"
.\" $Id: recv.2,v 1.3 1999/05/13 11:33:38 freitag Exp $
.\"
.\" Modified 1998,1999 by Andi Kleen
.\" 2001-06-19 corrected SO_EE_OFFENDER, bug report by James Hawtin
.\"
-.TH RECV 2 2011-09-16 "Linux" "Linux Programmer's Manual"
+.TH RECV 2 2012-12-21 "Linux" "Linux Programmer's Manual"
.SH NAME
recv, recvfrom, recvmsg \- receive a message from a socket
.SH SYNOPSIS
For raw
.RB ( AF_PACKET ),
Internet datagram (since Linux 2.4.27/2.6.8),
-and netlink (since Linux 2.6.22) sockets:
+netlink (since Linux 2.6.22) and UNIX datagram (since Linux 3.4) sockets:
return the real length of the packet or datagram,
even when it was longer than the passed buffer.
Not implemented for UNIX domain
.B MSG_ERRQUEUE
indicates that no data was received but an extended error from the socket
error queue.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
These calls return the number of bytes received, or \-1
if an error occurred.
The return value will be 0 when the
The argument
.I sockfd
does not refer to a socket.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
4.4BSD (these function calls first appeared in 4.2BSD),
POSIX.1-2001.
.LP
.\" across architectures, but socklen_t is always 32 bits.
See
-.BR recvmmsg(2)
+.BR recvmmsg (2)
for information about a Linux-specific system call
that can be used to receive multiple datagrams in a single call.
.SH EXAMPLE
.BR recvfrom ()
is shown in
.BR getaddrinfo (3).
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR fcntl (2),
.BR getsockopt (2),
.BR read (2),