Package: dnstop Version: 20060517-1 Severity: wishlist Tags: patch, upstream
Hello,
with the attached patch, dnstop works with linux ppp interfaces. Please
consider it or inclusion and upstream forwarding.
Bye,
Joerg
--- dnstop.c.orig 2007-03-03 16:19:41.000000000 +0100
+++ dnstop.c 2007-03-03 16:29:17.000000000 +0100
@@ -49,6 +49,10 @@
#define ETHERTYPE_8021Q 0x8100
#endif
+#ifndef SLL_HDR_LEN
+#define SLL_HDR_LEN 16
+#endif
+
#if USE_PPP
#include <net/if_ppp.h>
#define PPP_ADDRESS_VAL 0xff /* The address byte value */
@@ -605,6 +609,14 @@
#endif
+#ifdef DLT_LINUX_SLL
+int
+handle_sll(const u_char * pkt, int len)
+{
+ return handle_ip((struct ip *) (pkt + SLL_HDR_LEN), len - SLL_HDR_LEN);
+}
+#endif
+
int
handle_ether(const u_char * pkt, int len)
{
@@ -1268,6 +1280,11 @@
handle_datalink = handle_raw;
break;
#endif
+#ifdef DLT_LINUX_SLL
+ case DLT_LINUX_SLL:
+ handle_datalink = handle_sll;
+ break;
+#endif
case DLT_NULL:
handle_datalink = handle_null;
break;
signature.asc
Description: Digital signature

