summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-03-28 12:58:17 +0100
committerMichal Labedzki <michal.labedzki@tieto.com>2015-04-14 05:43:20 +0000
commit6aba6754312c39f458ddd38d4853a0aa39ae35a9 (patch)
treeca766dfeaa2d2138054e3abd9ca1e3e283f4470f
parent57911165b8c7382dd16c8ba545d68f77607369f9 (diff)
downloadwireshark-6aba6754312c39f458ddd38d4853a0aa39ae35a9.tar.gz
Bluetooth: GATT/L2CAP: Add support for 6LoWPAN
6LoWPAN is used by GATT level profile called IPSP. Change-Id: Iff2e1a8d531072d9bba03e7d84b56db59110cb35 Reviewed-on: https://code.wireshark.org/review/8045 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
-rw-r--r--epan/dissectors/packet-6lowpan.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index f1ee141c8c..b507b54ad1 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -31,9 +31,11 @@
#include <epan/addr_resolv.h>
#include "packet-ipv6.h"
#include "packet-6lowpan.h"
+#include "packet-btl2cap.h"
+#include "packet-zbee.h"
+
void proto_register_6lowpan(void);
void proto_reg_handoff_6lowpan(void);
-#include "packet-zbee.h"
/* Definitions for 6lowpan packet disassembly structures and routines */
@@ -289,6 +291,7 @@ static expert_field ei_6lowpan_illegal_dest_addr_mode = EI_INIT;
static expert_field ei_6lowpan_bad_ipv6_header_length = EI_INIT;
/* Subdissector handles. */
+static dissector_handle_t handle_6lowpan;
static dissector_handle_t data_handle;
static dissector_handle_t ipv6_handle;
@@ -2790,7 +2793,7 @@ proto_register_6lowpan(void)
expert_register_field_array(expert_6lowpan, ei, array_length(ei));
/* Register the dissector with wireshark. */
- new_register_dissector("6lowpan", dissect_6lowpan, proto_6lowpan);
+ handle_6lowpan = new_register_dissector("6lowpan", dissect_6lowpan, proto_6lowpan);
/* Register the dissector init function */
register_init_routine(proto_init_6lowpan);
@@ -2894,8 +2897,10 @@ proto_reg_handoff_6lowpan(void)
ipv6_handle = find_dissector("ipv6");
/* Register the 6LoWPAN dissector with IEEE 802.15.4 */
- dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, find_dissector("6lowpan"));
+ dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, handle_6lowpan);
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN, dissect_6lowpan_heur, proto_6lowpan);
+
+ dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_LE_IPSP, handle_6lowpan);
} /* proto_reg_handoff_6lowpan */