summaryrefslogtreecommitdiffstats
path: root/ulogd/ulogd.c
diff options
context:
space:
mode:
authorlaforge <laforge>2001-01-29 11:45:22 +0000
committerlaforge <laforge>2001-01-29 11:45:22 +0000
commit23bc5d1e0d831d540b0b5cc74544da32aa77b6a8 (patch)
tree848364573be174a8f819d9a2c7a00ea4f4905bc2 /ulogd/ulogd.c
parentb51961514f99b417780493cdb82425c757e762d4 (diff)
added support for multipart netlink messages. Updated docs
Diffstat (limited to 'ulogd/ulogd.c')
-rw-r--r--ulogd/ulogd.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/ulogd/ulogd.c b/ulogd/ulogd.c
index 55ed931..faced73 100644
--- a/ulogd/ulogd.c
+++ b/ulogd/ulogd.c
@@ -1,4 +1,4 @@
-/* ulogd, Version $Revision: 1.12 $
+/* ulogd, Version $Revision: 1.13 $
*
* userspace logging daemon for the netfilter ULOG target
* of the linux 2.4 netfilter subsystem.
@@ -7,7 +7,7 @@
*
* this code is released under the terms of GNU GPL
*
- * $Id: ulogd.c,v 1.12 2000/11/16 21:15:30 laforge Exp $
+ * $Id: ulogd.c,v 1.13 2000/11/20 11:43:22 laforge Exp $
*/
#include <stdio.h>
@@ -22,8 +22,10 @@
#include "conffile.h"
#include "ulogd.h"
-/* Size of the netlink receive buffer */
-#define MYBUFSIZ 2048
+/* Size of the netlink receive buffer. If you have _big_ in-kernel
+ * queues, you may have to increase this number.
+ * ( --qthreshold 100 * 1500 bytes/packet = 150kB */
+#define MYBUFSIZ 65535
#ifdef DEBUG
#define DEBUGP(format, args...) fprintf(stderr, format, ## args)
@@ -530,9 +532,10 @@ int main(int argc, char* argv[])
* handle_packet */
while(1) {
len = ipulog_read(h, buf, MYBUFSIZ, 1);
- upkt = ipulog_get_packet(buf);
- DEBUGP("==> packet received\n");
- handle_packet(upkt);
+ while(upkt = ipulog_get_packet(h, buf, len)) {
+ DEBUGP("==> packet received\n");
+ handle_packet(upkt);
+ }
}
/* just to give it a cleaner look */