-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/nettrans.c,v 6.36 2003-12-09 15:20:53 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/nettrans.c,v 6.37 2004-01-06 10:08:36 hadaq Exp $";
#define _GNU_SOURCE
if (-1 == my->fd) {
retVal = -1;
} else {
+ int rcvBufLenReq = 1 * (1 << 20);
+ int rcvBufLenRet;
+ int rcvBufLenLen = sizeof(rcvBufLenReq);
+
+ if (setsockopt(my->fd, SOL_SOCKET, SO_RCVBUF, &rcvBufLenReq, rcvBufLenLen) == -1) {
+ syslog(LOG_WARNING, "setsockopt(..., SO_RCVBUF, ...): %s", strerror(errno));
+ }
+
+ if (getsockopt(my->fd, SOL_SOCKET, SO_RCVBUF, &rcvBufLenRet, &rcvBufLenLen) == -1) {
+ syslog(LOG_WARNING, "getsockopt(..., SO_RCVBUF, ...): %s", strerror(errno));
+ }
+ if (rcvBufLenRet < rcvBufLenReq) {
+ syslog(LOG_WARNING, "UDP receive buffer length (%d) smaller than requested buffer length (%d)", rcvBufLenRet,
+ rcvBufLenReq);
+ }
+
my->spec.sa.sin_family = AF_INET;
my->spec.sa.sin_port = port;
my->spec.sa.sin_addr.s_addr = htonl(INADDR_ANY);