]> The Tcpdump Group git mirrors - libpcap/commitdiff
Put in support for raw "link[N:M]" filtering for DOCSIS.
authorguy <guy>
Wed, 14 Jan 2004 01:09:03 +0000 (01:09 +0000)
committerguy <guy>
Wed, 14 Jan 2004 01:09:03 +0000 (01:09 +0000)
gencode.c

index be46cc52f1e6c86655e1a129489faeb4624fee25..4382ec5dc2a92ee0faa51c19e98a1bbd6fa4fef1 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.195 2003-12-18 20:36:11 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.196 2004-01-14 01:09:03 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -963,6 +963,15 @@ init_linktype(type)
                off_nl = -1;
                off_nl_nosnap = -1;
                return;
+
+       case DLT_DOCSIS:
+               /*
+                * Currently, only raw "link[N:M]" filtering is supported.
+                */
+               off_linktype = -1;
+               off_nl = -1;
+               off_nl_nosnap = -1;
+               return;
        }
        bpf_error("unknown data link type %d", linktype);
        /* NOTREACHED */
@@ -1712,6 +1721,9 @@ gen_linktype(proto)
 
        case DLT_LINUX_IRDA:
                bpf_error("IrDA link-layer type filtering not implemented");
+
+       case DLT_DOCSIS:
+               bpf_error("DOCSIS link-layer type filtering not implemented");
        }
 
        /*