From FreeBSD's recv/recvfrom:
If from is non-nil, and the socket is not connection-oriented, the source
address of the message is filled in. Fromlen is a value-result parame-
ter, initialized to the size of the buffer associated with from, and mod-
ified on return to indicate the actual size of the address stored there.
.. so comm_recv() calls recv_from()
/*
- * $Id: comm.cc,v 1.341 2002/10/21 05:38:32 adrian Exp $
+ * $Id: comm.cc,v 1.342 2002/10/21 05:47:25 adrian Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
return recvfrom(fd, buf, len, flags, from, fromlen);
}
+int
+comm_recv(int fd, void *buf, size_t len, int flags)
+{
+ return comm_recvfrom(fd, buf, len, flags, NULL, 0);
+}
+
/* Older stuff */
extern void fdc_open(int fd, unsigned int type, char *desc);
extern int comm_recvfrom(int fd, void *buf, size_t len, int flags,
struct sockaddr *from, socklen_t *fromlen);
+extern int comm_recv(int fd, void *buf, size_t len, int flags);
#endif