UDP, TCP and TCPipv6 sockets can set these sockopts
but the unix domain sockets can't. I'd recommend the
following patch:
==========================
RCS file: /cvsroot/net-snmp/net-
snmp/snmplib/snmpUnixDomain.c,v
retrieving revision 5.17
diff -u -r5.17 snmpUnixDomain.c
--- snmpUnixDomain.c 22 Jun 2005 23:31:49 -0000
5.17
+++ snmpUnixDomain.c 28 Sep 2005 22:40:42 -0000
@@ -31,7 +31,9 @@
#include <net-snmp output\_api.h="">
#include <net-snmp config\_api.h="">
+/* snmpUDPDomain.h required for
netsnmp_sock_buffer_set */
#include <net-snmp library="" snmp\_transport.h="">
+#include <net-snmp library="" snmpUDPDomain.h="">
#include <net-snmp library="" snmpUnixDomain.h="">
@@ -242,6 +244,8 @@
farend, farendlen));
t->data = farend;
t->data_length = sizeof(struct sockaddr_un);
+ netsnmp_sock_buffer_set(newsock,
SO_SNDBUF, 1, 0);
+ netsnmp_sock_buffer_set(newsock,
SO_RCVBUF, 1, 0);
return newsock;
} else {
free(farend);
@@ -381,6 +385,8 @@
sup->server.sun_family = AF_UNIX;
strcpy(sup->server.sun_path, addr->sun_path);
sup->local = 0;
+ netsnmp_sock_buffer_set(t->sock, SO_SNDBUF,
local, 0);
+ netsnmp_sock_buffer_set(t->sock, SO_RCVBUF,
local, 0);
}
/\*
Logged In: YES
user_id=76242
Robert applied this today. In the future, can you attach the patch
instead of pasting it? THanks.