]> The Tcpdump Group git mirrors - libpcap/commitdiff
Add DLT_/LINKTYPE_ values for IEEE802_15_4_TAP 803/head
authorJames Ko <[email protected]>
Mon, 18 Feb 2019 01:21:16 +0000 (17:21 -0800)
committerJames Ko <[email protected]>
Mon, 18 Feb 2019 01:21:16 +0000 (17:21 -0800)
gencode.c
pcap-common.c
pcap/dlt.h

index 0841fb86aa4da8d923c7a42ee5360b9032dc209d..96344962d4f821da12d7c349a1da8b2850a206fc 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -3580,6 +3580,7 @@ gen_linktype(compiler_state_t *cstate, bpf_u_int32 ll_proto)
        case DLT_IEEE802_15_4_LINUX:
        case DLT_IEEE802_15_4_NONASK_PHY:
        case DLT_IEEE802_15_4_NOFCS:
+       case DLT_IEEE802_15_4_TAP:
                bpf_error(cstate, "IEEE 802.15.4 link-layer type filtering not implemented");
 
        case DLT_IEEE802_16_MAC_CPS_RADIO:
index 5b45f58d5e9ae5857a54f4e93f6bacee2f4fd940..0ed341142c0ab7169def3c56e40c9170b4d027e7 100644 (file)
 #define LINKTYPE_DSA_TAG_BRCM  281
 #define LINKTYPE_DSA_TAG_BRCM_PREPEND  282
 
-#define LINKTYPE_MATCHING_MAX  282             /* highest value in the "matching" range */
+/*
+ * IEEE 802.15.4 with pseudo-header and optional meta-data TLVs, PHY payload
+ * exactly as it appears in the spec (no padding, no nothing), and FCS if
+ * specified by FCS Type TLV;  requested by James Ko <[email protected]>.
+ * Specification at https://github.com/jkcko/ieee802.15.4-tap
+ */
+#define LINKTYPE_IEEE802_15_4_TAP       283
+
+#define LINKTYPE_MATCHING_MAX  283             /* highest value in the "matching" range */
 
 /*
  * The DLT_ and LINKTYPE_ values in the "matching" range should be the
index de01888f9e0f1fa634f3846b67ecf6db94c548d8..4c8b1178b704daa197928728ddf97e5c9f82d2c4 100644 (file)
 #define DLT_DSA_TAG_BRCM       281
 #define DLT_DSA_TAG_BRCM_PREPEND       282
 
+/*
+ * IEEE 802.15.4 with pseudo-header and optional meta-data TLVs, PHY payload
+ * exactly as it appears in the spec (no padding, no nothing), and FCS if
+ * specified by FCS Type TLV;  requested by James Ko <[email protected]>.
+ * Specification at https://github.com/jkcko/ieee802.15.4-tap
+ */
+#define DLT_IEEE802_15_4_TAP    283
+
 /*
  * 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       282     /* highest value in the "matching" range */
+#define DLT_MATCHING_MAX       283     /* highest value in the "matching" range */
 
 /*
  * DLT and savefile link type values are split into a class and