Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (r) recvfrom64_(2)
NAME
recvfrom64_ - Receives a message from a socket
LIBRARY
H-series and J-series OSS processes: implicit libraries
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/yputdll
SYNOPSIS
#define _XOPEN_SOURCE_EXTENDED 1
#include <sys/socket.h>
long long recvfrom64_(
int socket,
void _ptr64 *buffer,
unsigned long long length,
int flags,
struct sockaddr _ptr64 *address,
socklen_t _ptr64 *address_len);
PARAMETERS
socket Specifies the file descriptor of the socket.
buffer Points to the buffer where the message should be written.
length Specifies the length in bytes of the buffer pointed to by the buffer parameter.
flags Is a value that controls message reception. The value of the flags parameter is
formed by bitwise ORing zero or more of the following values:
MSG_OOB Requests out-of-band data.
MSG_PEEK Peeks at an incoming message. The data is treated as unread and
the next call to the recvfrom64_() function (or similar function)
will still return this data.
address Specifies either a null pointer or a pointer to a sockaddr structure in which the
sending address is to be stored. The length and format of the address depend on
the address family of the socket.
For AF_INET sockets, a pointer to the address structure sockaddr_in must be
cast as a struct sockaddr.ForAF_INET6 sockets, a pointer to the address
structure sockaddr_in6 must be cast as a struct sockaddr.ForAF_UNIX sock-
ets, a pointer to the address structure sockaddr_un must be cast as a struct
sockaddr.
address_len Points to a long long data item, which, on input, specifies the length of the
sockaddr structure that is pointed to by the address parameter, and, on return,
specifies the length of the address stored.
DESCRIPTION
The recvfrom64_() function receives messages from a connection-oriented or connectionless
socket. recvfrom64_() is normally used with connectionless sockets because it includes param-
eters that permit a calling program to retrieve the source address of received data.
For message-based sockets (sockets of type SOCK_DGRAM), the entire message must be read
in one call. If a message is too long to fit in the supplied buffer and MSG_PEEK is not set in the
527186-023 Hewlett-Packard Company 6−31