diff options
author | dsrsupport <eugene.exarevsky@dsr-company.com> | 2016-07-12 12:21:23 +0300 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-07-12 15:19:09 +0000 |
commit | 45679d2ae282718f44069b529ad8125ce6744a4c (patch) | |
tree | 652446a2e973dcdaff24e7c320d157353528a059 /epan/dissectors/packet-zbee-aps.c | |
parent | 479caf15e7f57da098fd94b5f947ac45a6496663 (diff) |
ZigBee Test Profile #2 enchancement.
If profile id is ZigBee Test Profile #2, do not try to parse packet contents as other protocol above APS: ZCL or whatever else.
Change-Id: I0f1446aea9b270c226c7c472fe794e29240defc9
Reviewed-on: https://code.wireshark.org/review/16387
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-zbee-aps.c')
-rw-r--r-- | epan/dissectors/packet-zbee-aps.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c index 72af736da6..d46aa4427a 100644 --- a/epan/dissectors/packet-zbee-aps.c +++ b/epan/dissectors/packet-zbee-aps.c @@ -893,6 +893,8 @@ dissect_zbee_aps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data break; case ZBEE_PROFILE_T2: proto_tree_add_item(aps_tree, hf_zbee_aps_t2_cluster, tvb, offset, 2, ENC_LITTLE_ENDIAN); + col_set_str(pinfo->cinfo, COL_INFO, + val_to_str_const(nwk->cluster_id, zbee_aps_t2_cid_names, "Unknown T2 cluster")); break; default: proto_tree_add_item(aps_tree, hf_zbee_aps_cluster, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1059,9 +1061,16 @@ dissect_zbee_aps_no_endpt: profile_handle = zbee_apf_handle; } else if (profile_handle == NULL) { - /* Could not locate a profile dissector, but there may - be profile-wide commands so try to dissect them */ - zcl_handle = find_dissector(ZBEE_PROTOABBREV_ZCL); + if (payload_tvb && (packet.profile == ZBEE_PROFILE_T2)) { + /* Move T2 dissect here: don't want to show T2 contents as + * ZCL mess, broken packets etc */ + payload_tvb = tvb_new_subset_remaining(payload_tvb, dissect_zbee_t2(payload_tvb, aps_tree, nwk->cluster_id)); + } + else { + /* Could not locate a profile dissector, but there may + be profile-wide commands so try to dissect them */ + zcl_handle = find_dissector(ZBEE_PROTOABBREV_ZCL); + } if (zcl_handle) { call_dissector_with_data(zcl_handle, payload_tvb, pinfo, tree, nwk); } @@ -1092,10 +1101,6 @@ dissect_zbee_aps_no_endpt: * dissector to display the leftover bytes, if any. */ - if (payload_tvb && (packet.profile == ZBEE_PROFILE_T2)) { - payload_tvb = tvb_new_subset_remaining(payload_tvb, dissect_zbee_t2(payload_tvb, aps_tree, nwk->cluster_id)); - } - if (payload_tvb) { call_data_dissector(payload_tvb, pinfo, tree); } |