$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 #include #include +#ifndef __OpenBSD__ #include +#endif #include #include #include @@ -32,6 +34,12 @@ #include #endif +#ifdef DLT_PFLOG +#include +#include +#include +#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;