summaryrefslogtreecommitdiff
path: root/sbin/pflogd/pflogd.h
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2004-01-15 20:15:15 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2004-01-15 20:15:15 +0000
commit893ea122b2c8043e18c59ee9f1bcb1ec5cb6e71a (patch)
tree340ba2412e303ac61af2cee0573c8d9befca2b90 /sbin/pflogd/pflogd.h
parent925241ffb71a8c50f24fb0b27f8283fd918ece56 (diff)
Try to preserve the integrity of the log file in case of errors/unexpected
shutdowns etc. Also check logfile integrity on startup and suspend logging if an inconsistency is detected. ok dhartmei@
Diffstat (limited to 'sbin/pflogd/pflogd.h')
-rw-r--r--sbin/pflogd/pflogd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/pflogd/pflogd.h b/sbin/pflogd/pflogd.h
index 765adb9a791..3baecb66fe6 100644
--- a/sbin/pflogd/pflogd.h
+++ b/sbin/pflogd/pflogd.h
@@ -1,3 +1,5 @@
+/* $OpenBSD: pflogd.h,v 1.2 2004/01/15 20:15:14 canacar Exp $ */
+
/*
* Copyright (c) 2003 Can Erkin Acar
*
@@ -14,17 +16,21 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/limits.h>
#include <pcap.h>
#define DEF_SNAPLEN 116 /* default plus allow for larger header of pflog */
#define PCAP_TO_MS 500 /* pcap read timeout (ms) */
#define PCAP_NUM_PKTS 1000 /* max number of packets to process at each loop */
-#define PCAP_OPT_FIL 0 /* filter optimization */
+#define PCAP_OPT_FIL 1 /* filter optimization */
#define FLUSH_DELAY 60 /* flush delay */
#define PFLOGD_LOG_FILE "/var/log/pflog"
#define PFLOGD_DEFAULT_IF "pflog0"
+#define PFLOGD_MAXSNAPLEN INT_MAX
+#define PFLOGD_BUFSIZE 65536 /* buffer size for incoming packets */
+
void logmsg(int priority, const char *message, ...);
/* Privilege separation */