189c77e882
http://freefr.dl.sourceforge.net/project/libnids/libnids/1.24/libnids-1.24.releasenotes.txt - Bump dsniff as it statically links to libnids, suggested by sthen@ ok sthen@
76 lines
1.5 KiB
Plaintext
76 lines
1.5 KiB
Plaintext
$OpenBSD: patch-src_libnids_c,v 1.6 2010/04/09 09:48:18 jasper Exp $
|
|
--- src/libnids.c.orig Mon Mar 1 22:13:25 2010
|
|
+++ src/libnids.c Fri Apr 9 10:00:43 2010
|
|
@@ -14,7 +14,9 @@
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <syslog.h>
|
|
+#ifndef __OpenBSD__
|
|
#include <alloca.h>
|
|
+#endif
|
|
#include <pcap.h>
|
|
#include <errno.h>
|
|
#include <config.h>
|
|
@@ -32,6 +34,12 @@
|
|
#include <glib.h>
|
|
#endif
|
|
|
|
+#ifdef DLT_PFLOG
|
|
+#include <sys/socket.h>
|
|
+#include <net/if.h>
|
|
+#include <net/if_pflog.h>
|
|
+#endif
|
|
+
|
|
#ifdef __linux__
|
|
extern int set_all_promisc();
|
|
#endif
|
|
@@ -619,22 +627,46 @@ int nids_init()
|
|
case DLT_NULL:
|
|
nids_linkoffset = 4;
|
|
break;
|
|
-#endif
|
|
+#endif
|
|
+#ifdef DLT_LOOP
|
|
+ case DLT_LOOP:
|
|
+ nids_linkoffset = 4;
|
|
+ break;
|
|
+#endif
|
|
case DLT_EN10MB:
|
|
nids_linkoffset = 14;
|
|
break;
|
|
case DLT_PPP:
|
|
nids_linkoffset = 4;
|
|
break;
|
|
+#ifdef DLT_PPP_ETHER
|
|
+ case DLT_PPP_ETHER:
|
|
+ nids_linkoffset = 8;
|
|
+ break;
|
|
+#endif
|
|
/* Token Ring Support by vacuum@technotronic.com, thanks dugsong! */
|
|
case DLT_IEEE802:
|
|
nids_linkoffset = 22;
|
|
break;
|
|
-
|
|
case DLT_RAW:
|
|
case DLT_SLIP:
|
|
nids_linkoffset = 0;
|
|
break;
|
|
+#ifdef DLT_OLD_PFLOG
|
|
+ case DLT_OLD_PFLOG:
|
|
+ nids_linkoffset = 28;
|
|
+ break;
|
|
+#endif
|
|
+#ifdef DLT_PFLOG
|
|
+ case DLT_PFLOG:
|
|
+ nids_linkoffset = PFLOG_HDRLEN;
|
|
+ break;
|
|
+#endif
|
|
+#ifdef DLT_PFSYNC
|
|
+ case DLT_PFSYNC:
|
|
+ nids_linkoffset = 4;
|
|
+ break;
|
|
+#endif
|
|
#define DLT_LINUX_SLL 113
|
|
case DLT_LINUX_SLL:
|
|
nids_linkoffset = 16;
|