summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/sockopt.c12
-rw-r--r--lib/sockopt.h2
3 files changed, 18 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 2ce2302f..a4ed5dd9 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-17 Paul Jakma <paul@dishone.st>
+
+ * sockopt.{c,h}: Add setsockopt_so_recvbuf, for ripd and ripngd.
+
2004-09-13 Paul Jakma <paul@dishone.st>
* command.c: Update the copyright string in the default motd.
diff --git a/lib/sockopt.c b/lib/sockopt.c
index d0b034f5..dbd5df57 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -23,6 +23,18 @@
#include "log.h"
#include "sockopt.h"
+int
+setsockopt_so_recvbuf (int sock, int size)
+{
+ int ret;
+
+ if ( (ret = setsockopt (sock, SOL_SOCKET, SO_RCVBUF, (char *)
+ &size, sizeof (int)) < 0);
+ zlog_err ("can't setsockopt SO_RCVBUF");
+
+ return ret;
+}
+
static void *
getsockopt_cmsg_data (struct msghdr *msgh, int level, int type)
{
diff --git a/lib/sockopt.h b/lib/sockopt.h
index 8d775cdc..3f4a7050 100644
--- a/lib/sockopt.h
+++ b/lib/sockopt.h
@@ -22,6 +22,8 @@
#ifndef _ZEBRA_SOCKOPT_H
#define _ZEBRA_SOCKOPT_H
+int setsockopt_so_recvbuf (int sock, int size);
+
#ifdef HAVE_IPV6
int setsockopt_ipv6_pktinfo (int, int);
int setsockopt_ipv6_checksum (int, int);