From 38aa077ccb3bac7493c401dbd91b97037d208d54 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 11 Jul 2013 10:01:57 +0200
Subject: imudp: add ability to specify SO_RCVBUF size (rcvbufSize parameter)
---
ChangeLog | 1 +
doc/imudp.html | 37 ++++++++++++++++++++++++++-----------
plugins/imudp/imudp.c | 7 ++++++-
plugins/omudpspoof/omudpspoof.c | 2 +-
runtime/net.c | 35 ++++++++++++++++++++++++++++++++++-
runtime/net.h | 2 +-
tools/omfwd.c | 2 +-
7 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a0e50d02..10ee1019 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- imudp: add ability to specify SO_RCVBUF size (rcvbufSize parameter)
- impstats: add process resource usage counters [via getrusage()]
----------------------------------------------------------------------------
Version 7.2.7 [v7-stable] 2013-04-17
diff --git a/doc/imudp.html b/doc/imudp.html
index 105e0b2a..961bbeba 100644
--- a/doc/imudp.html
+++ b/doc/imudp.html
@@ -18,8 +18,8 @@
multiple input actions.
-Configuration Directives:
-Global Directives:
+Configuration Parameters:
+Module Parameters:
- TimeRequery <nbr-of-times>
this is a performance
@@ -37,7 +37,7 @@ processing under Linux (and thus reduce chance of packet loss).
- SchedulingPriority <number>
Scheduling priority to use.
-Action Directives:
+Action Parameters:
- Address <IP>
local IP address (or name) the UDP listens should bind to
@@ -47,6 +47,18 @@ default 514, start UDP server on this port. Either a single port can be specifie
Array of ports: Port=["514","515","10514","..."]
- Ruleset <ruleset>
Binds the listener to a specific ruleset.
+- rcvbufSize <size>
+Available since 7.5.3+
+This request a socket receive buffer of specific size from the operating system.
+It is an expert parameter, which should only be changed for a good reason. Note that
+setting this parameter disables Linux auto-tuning, which usually works pretty well.
+The default value is 0, which means "keep the OS buffer size unchanged". This is a size
+value. So in addition to pure integer values, sizes like "256k", "1m" and the like can
+be specified. Note that setting very large sizes may require root or other special
+privileges. Also note that the OS may slightly adjust the value or shrink it to a
+system-set max value if the user is not sufficiently privileged. Technically, this
+parameter will result in a setsockopt() call with SO_RCVBUF (and SO_RCVBUFFORCE if it
+is available).
Caveats/Known Bugs:
@@ -59,10 +71,17 @@ user account.
Sample:
This sets up an UPD server on port 514:
-
-Caveats/Known Bugs:
-
-Sample:
+Legacy Sample:
This sets up an UPD server on port 514:
-