]> The Tcpdump Group git mirrors - libpcap/commitdiff
DLT_ value added for the Bluetooth HCI UART transport layer for Paolo
authorguy <guy>
Fri, 13 Oct 2006 08:46:23 +0000 (08:46 +0000)
committerguy <guy>
Fri, 13 Oct 2006 08:46:23 +0000 (08:46 +0000)
Abeni.

Added DLT/DLT name table mappings and linktype values and DLT/linktype
mappings for USB and for the Bluetooth NCI UART transport layer.

Fix up indentation.

gencode.c
pcap.c
pcap/bpf.h
savefile.c

index 6a7b73f1a0b338dd6ffde3ec5bb81c85ac2b90c1..200e5cdcec7675882f7bc5a237c7f5359bcf6f88 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.272 2006-10-04 18:09:22 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.273 2006-10-13 08:48:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -1251,6 +1251,15 @@ init_linktype(p)
                off_nl = -1;
                off_nl_nosnap = -1;
                return;
                off_nl = -1;
                off_nl_nosnap = -1;
                return;
+
+       case DLT_BLUETOOTH_HCI_H4:
+               /*
+                * 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 */
        }
        bpf_error("unknown data link type %d", linktype);
        /* NOTREACHED */
diff --git a/pcap.c b/pcap.c
index 83bd8b2bf187d52ca1400b408e38d122cd239890..9677dfe30e1b3ee90c8629493cec1c9e33e10e97 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -33,7 +33,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.102 2006-09-25 18:16:55 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.103 2006-10-13 08:46:23 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -383,8 +383,10 @@ static struct dlt_choice dlt_choices[] = {
        DLT_CHOICE(DLT_JUNIPER_VP, "Juniper Voice PIC"),
        DLT_CHOICE(DLT_MTP2, "SS7 MTP2"),
        DLT_CHOICE(DLT_A429, "Arinc 429"),
        DLT_CHOICE(DLT_JUNIPER_VP, "Juniper Voice PIC"),
        DLT_CHOICE(DLT_MTP2, "SS7 MTP2"),
        DLT_CHOICE(DLT_A429, "Arinc 429"),
-       DLT_CHOICE(DLT_CAN20B, "Controller Area Network (CAN) v. 2.0B"),
        DLT_CHOICE(DLT_A653_ICM, "Arinc 653 Interpartition Communication"),
        DLT_CHOICE(DLT_A653_ICM, "Arinc 653 Interpartition Communication"),
+       DLT_CHOICE(DLT_USB, "USB"),
+       DLT_CHOICE(DLT_BLUETOOTH_HCI_H4, "Bluetooth HCI UART transport layer"),
+       DLT_CHOICE(DLT_CAN20B, "Controller Area Network (CAN) v. 2.0B"),
        DLT_CHOICE_SENTINEL
 };
 
        DLT_CHOICE_SENTINEL
 };
 
index b0fb7573ff0e3a6bb6a4cc1a629948913144fe5e..bca015eff3f3675d02c2cbd052349ea61f0febbf 100644 (file)
@@ -37,7 +37,7 @@
  *
  *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
  *
  *
  *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
  *
- * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.1 2006-10-04 18:09:22 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.2 2006-10-13 08:46:23 guy Exp $ (LBL)
  */
 
 /*
  */
 
 /*
@@ -639,6 +639,12 @@ struct bpf_version {
  */
 #define DLT_USB                        186
 
  */
 #define DLT_USB                        186
 
+/*
+ * Bluetooth HCI UART transport layer (part H:4); requested by
+ * Paolo Abeni.
+ */
+#define DLT_BLUETOOTH_HCI_H4   187
+
 /*
  * Controller Area Network (CAN) v. 2.0B packets.
  * DLT_ requested by Gianluca Varenni <[email protected]>.
 /*
  * Controller Area Network (CAN) v. 2.0B packets.
  * DLT_ requested by Gianluca Varenni <[email protected]>.
index 1c705eddd0b201209e8f7538a7baddafa83b652f..232a84ad10ec58c5292c571d0e60c393c75828bf 100644 (file)
@@ -30,7 +30,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.146 2006-10-04 18:09:22 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.147 2006-10-13 08:46:23 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -459,6 +459,17 @@ static const char rcsid[] _U_ =
  */
 #define LINKTYPE_A653_ICM       185
 
  */
 #define LINKTYPE_A653_ICM       185
 
+/*
+ * USB packets; requested by Paolo Abeni <[email protected]>.
+ */
+#define LINKTYPE_USB           186
+
+/*
+ * Bluetooth HCI UART transport layer (part H:4); requested by
+ * Paolo Abeni.
+ */
+#define LINKTYPE_BLUETOOTH_HCI_H4      187
+
 /*
  * Controller Area Network (CAN) v. 2.0B packets.
  * DLT_ requested by Gianluca Varenni <[email protected]>.
 /*
  * Controller Area Network (CAN) v. 2.0B packets.
  * DLT_ requested by Gianluca Varenni <[email protected]>.
@@ -679,14 +690,20 @@ static struct linktype_map {
         /* Juniper Voice PIC */
         { DLT_JUNIPER_VP,       LINKTYPE_JUNIPER_VP },
 
         /* Juniper Voice PIC */
         { DLT_JUNIPER_VP,       LINKTYPE_JUNIPER_VP },
 
-               /* Controller Area Network (CAN) v2.0B */
-               { DLT_A429,                             LINKTYPE_A429 },
+       /* Controller Area Network (CAN) v2.0B */
+       { DLT_A429,                             LINKTYPE_A429 },
+
+       /* Arinc 653 Interpartition Communication messages */
+       { DLT_A653_ICM,         LINKTYPE_A653_ICM },
+
+       /* USB */
+       { DLT_USB,         LINKTYPE_USB },
 
 
-               /* Controller Area Network (CAN) v2.0B */
-               { DLT_CAN20B,                           LINKTYPE_CAN20B },
+       /* Bluetooth HCI UART transport layer */
+       { DLT_BLUETOOTH_HCI_H4,         LINKTYPE_BLUETOOTH_HCI_H4 },
 
 
-               /* Arinc 653 Interpartition Communication messages */
-               { DLT_A653_ICM,         LINKTYPE_A653_ICM },
+       /* Controller Area Network (CAN) v2.0B */
+       { DLT_CAN20B,                           LINKTYPE_CAN20B },
 
        { -1,                   -1 }
 };
 
        { -1,                   -1 }
 };