]> The Tcpdump Group git mirrors - libpcap/commitdiff
Add a LINKTYPE_/DLT_ value for USB with a Darwin (macOS, etc.) header.
authorGuy Harris <[email protected]>
Sat, 7 Jan 2017 19:35:57 +0000 (11:35 -0800)
committerGuy Harris <[email protected]>
Sat, 7 Jan 2017 19:35:57 +0000 (11:35 -0800)
pcap-common.c
pcap.c
pcap/dlt.h

index 84368f6cefa6867329871f6949a3ba778c87f530..d6865495de1fb03a6918f8429c946b17d0f379d9 100644 (file)
  */
 #define LINKTYPE_RDS           265
 
-#define LINKTYPE_MATCHING_MAX  265             /* highest value in the "matching" range */
+/*
+ * USB packets, beginning with a Darwin (macOS, etc.) header.
+ */
+#define LINKTYPE_USB_DARWIN    266
+
+#define LINKTYPE_MATCHING_MAX  266             /* highest value in the "matching" range */
 
 static struct linktype_map {
        int     dlt;
diff --git a/pcap.c b/pcap.c
index 77a709f8f2647a862f792a7bffcce7b2e5f12320..d93dfe360acf6ea1553c94e5e80148160fd62351 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -1271,6 +1271,7 @@ static struct dlt_choice dlt_choices[] = {
        DLT_CHOICE(WATTSTOPPER_DLM, "WattStopper Digital Lighting Management (DLM) and Legrand Nitoo Open protocol"),
        DLT_CHOICE(ISO_14443, "ISO 14443 messages"),
        DLT_CHOICE(RDS, "IEC 62106 Radio Data System groups"),
+       DLT_CHOICE(USB_DARWIN, "USB with Darwin header"),
        DLT_CHOICE_SENTINEL
 };
 
index 2d74713e8ab75f2cc8b3d209b1f469479237cf43..812907cacb02c981862f6786734652fcabcb79c3 100644 (file)
  */
 #define DLT_RDS                265
 
+/*
+ * USB packets, beginning with a Darwin (macOS, etc.) header.
+ */
+#define DLT_USB_DARWIN 266
+
 /*
  * In case the code that includes this file (directly or indirectly)
  * has also included OS files that happen to define DLT_MATCHING_MAX,
 #ifdef DLT_MATCHING_MAX
 #undef DLT_MATCHING_MAX
 #endif
-#define DLT_MATCHING_MAX       265     /* highest value in the "matching" range */
+#define DLT_MATCHING_MAX       266     /* highest value in the "matching" range */
 
 /*
  * DLT and savefile link type values are split into a class and