Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
recvfrom64_(2) OSS System Calls Reference Manual
flags parameter, the excess bytes are discarded.
For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored.
For such sockets, data is returned as soon as it becomes available; no data is discarded.
If no messages are available at the socket and the socket’s file descriptor is blocking
(O_NONBLOCK is not set), the recvfrom64_() function blocks until a message arrives. If no
messages are available at the socket and the socket’s file descriptor is marked nonblocking
(O_NONBLOCK is set), the recvfrom64_() function fails and sets errno to [EWOULD-
BLOCK].
If the address parameter is not a null pointer, the source address of the received message is stored
in the sockaddr structure pointed to by the address parameter, and the length of this address is
stored in the object pointed to by the address_len parameter.
If the actual length of the address is greater than the length of the supplied sockaddr structure,
the address is truncated when stored.
To pass a 32-bit pointer from a 32-bit Guardian or OSS client, recvfrom() or recvfrom64_()
may be called.
To pass a 64-bit pointer from a 32-bit Guardian or OSS client, recvfrom64_() must be called.
32-bit Guardian and 64-bit OSS clients can pass 32-bit pointers and 64-bit pointers to
recvfrom64_().
NOTES
This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified
when you compile the module.
When data is available, a call to the select() function indicates that the file descriptor for the
socket is ready for reading.
When the file to which a sending datagram socket is bound is unlinked or renamed, and one of
the send set of functions is called, the receiving client’s call to recvfrom64_() returns a null
address (all fields in the address are zero).
When the file to which a sending datagram socket is bound is unlinked or renamed, and one of
the send set of functions is called, the receiving client’s call to recvfrom64_() returns the fully-
qualified form of the address to which the sending socket was originally bound.
For detailed information about writing multi-threaded and 64-bit applications for the Open Sys-
tem Services environment, see the Open System Services Programmer’s Guide.
RETURN VALUES
Upon successful completion, the recvfrom64_() function returns the length of the received mes-
sage in bytes. If no data is available and the peer socket has performed an orderly shutdown,
then 0 (zero) is returned.
If the recvfrom64_() function call fails, the value -1 is returned and errno is set to indicate the
error.
ERRORS
If any of the following conditions occurs, the recvfrom64_() function sets errno to the
corresponding value:
[EBADF] The socket parameter is not a valid file descriptor.
[ECONNRESET]
One of the following conditions occurred:
• The transport-provider process for this socket is no longer available.
6−32 Hewlett-Packard Company 527186-023