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.
Copy some stuff for DLT_JUNIPER_VP and DLT_USB from the top of the main
branch.
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.43 2006-09-13 07:36:19 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.44 2006-10-13 08:56:07 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
off_nl_nosnap = -1; /* no 802.2 LLC */
return;
+ case DLT_JUNIPER_VP:
+ off_linktype = 18;
+ off_nl = -1;
+ off_nl_nosnap = -1;
+ return;
+
case DLT_MTP2:
off_sio = 3;
off_opc = 4;
off_nl = -1;
off_nl_nosnap = -1;
return;
+
+ case DLT_USB:
+ /*
+ * Currently, only raw "link[N:M]" filtering is supported.
+ */
+ off_linktype = -1;
+ 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 */
case DLT_JUNIPER_PPP:
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
+ case DLT_JUNIPER_VP:
/* just lets verify the magic number for now -
* on ATM we may have up to 6 different encapsulations on the wire
* and need a lot of heuristics to figure out that the payload
case DLT_JUNIPER_PPP:
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
+ case DLT_JUNIPER_VP:
/* juniper flags (including direction) are stored
* the byte after the 3-byte magic number */
if (dir) {
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.34.2.12 2006-10-03 00:12:57 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.34.2.13 2006-10-13 08:56:08 guy Exp $ (LBL)
*/
/*
*/
#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.
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.88.2.14 2006-09-25 18:17:26 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.88.2.15 2006-10-13 08:56:08 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
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_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
};
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.126.2.17 2006-07-27 21:06:18 gianluca Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.126.2.18 2006-10-13 08:56:08 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
*/
#define LINKTYPE_A653_ICM 185
+/*
+ */
+#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.
/* 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 }
};