aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorRobert Sauter <sauter@locoslab.com>2017-07-11 11:37:08 +0200
committerAnders Broman <a.broman58@gmail.com>2017-07-11 13:48:45 +0000
commit0ba78c947b4c835af391cfacf37c32ad1487c18f (patch)
treec11cbd6ba6045fe9d0ccaa34fb83b4d814d3e161 /epan
parented5e7abf4fa1546ccc76b2204744a802f9c2fc3f (diff)
Ethertype: Add 6LoWPAN Ethertype; register dissector
Change-Id: I3ba09b8ebc696b83531b998fcc3a0f521d86df41 Reviewed-on: https://code.wireshark.org/review/22581 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-6lowpan.c4
-rw-r--r--epan/dissectors/packet-ethertype.c1
-rw-r--r--epan/etypes.h4
3 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 0585380b91..b7af0cdd56 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -30,6 +30,7 @@
#include <epan/ipproto.h>
#include <epan/addr_resolv.h>
#include <epan/proto_data.h>
+#include <epan/etypes.h>
#include "packet-ipv6.h"
#include "packet-6lowpan.h"
#include "packet-btl2cap.h"
@@ -3379,6 +3380,9 @@ proto_reg_handoff_6lowpan(void)
dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, handle_6lowpan);
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN, dissect_6lowpan_heur, "6LoWPAN over IEEE 802.15.4", "6lowpan_wlan", proto_6lowpan, HEURISTIC_ENABLE);
+ /* Register Ethertype (RFC 7973) */
+ dissector_add_uint("ethertype", ETHERTYPE_6LOWPAN, handle_6lowpan);
+
dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_LE_IPSP, handle_6lowpan);
dissector_add_for_decode_as("btl2cap.cid", handle_6lowpan);
} /* proto_reg_handoff_6lowpan */
diff --git a/epan/dissectors/packet-ethertype.c b/epan/dissectors/packet-ethertype.c
index 6f5a37e2c8..feb42b4e5b 100644
--- a/epan/dissectors/packet-ethertype.c
+++ b/epan/dissectors/packet-ethertype.c
@@ -187,6 +187,7 @@ const value_string etype_vals[] = {
{ ETHERTYPE_NWP, "Neighborhood Watch Protocol" },
{ ETHERTYPE_BLUECOM, "bluecom Protocol" },
{ ETHERTYPE_QINQ_OLD, "QinQ: old non-standard 802.1ad" },
+ { ETHERTYPE_6LOWPAN, "6LoWPAN" },
{ 0, NULL }
};
diff --git a/epan/etypes.h b/epan/etypes.h
index f3d235f465..3e2ca48df0 100644
--- a/epan/etypes.h
+++ b/epan/etypes.h
@@ -585,6 +585,10 @@ extern "C" {
#define ETHERTYPE_QINQ_OLD 0x9100 /* QinQ: old non-standard 802.1ad */
#endif
+#ifndef ETHERTYPE_6LOWPAN
+#define ETHERTYPE_6LOWPAN 0xA0ED /* RFC 4944: Transmission of IPv6 Packets over IEEE 802.15.4 Networks */
+#endif
+
#ifndef ETHERTYPE_LLT
#define ETHERTYPE_LLT 0xCAFE /* Veritas Low Latency Transport (not officially registered) */
#endif