Index: ngrep.c
--- ngrep.c.orig
+++ ngrep.c
@@ -21,8 +21,14 @@
 #include <arpa/inet.h>
 #include <sys/tty.h>
 #include <pwd.h>
+#include <stdint.h>
 #endif
 
+#if defined(__OpenBSD__)
+#include <net/if_pflog.h>
+#include <net/if_enc.h>
+#endif
+
 #if defined(OSF1)
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -574,6 +580,16 @@ int setup_pcap_source(char *dev) {
             link_offset = PPPHDR_SIZE;
             break;
 
+#if defined(__OpenBSD__)
+        case DLT_PPP_ETHER:
+            link_offset = 8;
+            break;
+
+	case DLT_ENC:
+            link_offset = ENC_HDRLEN;
+            break;
+#endif
+
 #if HAVE_DLT_LOOP
         case DLT_LOOP:
 #endif
@@ -607,7 +623,7 @@ int setup_pcap_source(char *dev) {
 
 #if HAVE_DLT_PFLOG
         case DLT_PFLOG:
-            link_offset = PFLOGHDR_SIZE;
+            link_offset = PFLOG_HDRLEN;
             break;
 #endif
 
