IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-35
recvfrom
recvfrom
The recvfrom function receives data on an unconnected IPX socket created for
waited operations.
nrcvd
is the number of bytes received. This is the return value.
If the call is not successful, -1 is returned and the external variable errno is set as
indicated below in “Errors.”
socket
specifies the socket number for the socket, as returned by the call to the socket
function.
buffer_ptr
points, on return, to the data received.
buffer_length
is the size of the buffer pointed to by buffer_ptr.
C Synopsis
#include <socket.h>
#include <nv.h>
#include <netdb.h>
nrcvd = recvfrom (socket, buffer_ptr, buffer_length, flags,
from_ptr, from_length);
int nrcvd, socket, buffer_length, *from_length,
flags;
char *buffer_ptr;
struct sockaddr_in *from_ptr;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
nrcvd := recvfrom (socket, buffer_ptr, buffer_length, flags,
from_ptr, from_length);
INT socket,
buffer_length,
.EXT from_length,
flags;
STRING .EXT buffer_ptr;
INT .EXT from_ptr(sockaddr_in);