diff options
author | Michael Mann <mmann78@netscape.net> | 2013-10-26 02:24:04 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-10-26 02:24:04 +0000 |
commit | 3cc6957fa87021d1427a8c31fdfccaeb90188ebe (patch) | |
tree | 6a412b50715ec56b2a41c38dfe644c895e3ba5f6 /epan/dissectors/packet-btsmp.c | |
parent | 6dd42b581a599a31b8ac5ffc5c696969bfc1e2d4 (diff) |
Bluetooth: Use items for logical block objects. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
Bluetooth protocols use items, so dissect it to improve filtering and better user experience - text object cannot be filterable or comparable.
From Michal Labedzki
svn path=/trunk/; revision=52863
Diffstat (limited to 'epan/dissectors/packet-btsmp.c')
-rw-r--r-- | epan/dissectors/packet-btsmp.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btsmp.c b/epan/dissectors/packet-btsmp.c index c20cd13c6d..8f6de831a0 100644 --- a/epan/dissectors/packet-btsmp.c +++ b/epan/dissectors/packet-btsmp.c @@ -52,6 +52,9 @@ static int hf_btsmp_key_dist_enc = -1; static int hf_btsmp_key_dist_id = -1; static int hf_btsmp_key_dist_sign = -1; static int hf_btsmp_ediv = -1; +static int hf_btsmp_authreq = -1; +static int hf_btsmp_initiator_key_distribution = -1; +static int hf_btsmp_responder_key_distribution = -1; /* Initialize the subtree pointers */ static gint ett_btsmp = -1; @@ -124,7 +127,7 @@ dissect_btsmp_auth_req(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree guint8 param; param = tvb_get_guint8(tvb, offset); - ti_param = proto_tree_add_text(tree, tvb, offset, 1, "AuthReq: "); + ti_param = proto_tree_add_item(tree, hf_btsmp_authreq, tvb, offset, 1, ENC_NA); st_param = proto_item_add_subtree(ti_param, ett_btsmp_auth_req); proto_tree_add_item(st_param, hf_btsmp_bonding_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(ti_param, "%s, ", val_to_str_const(param & 0x03, bonding_flag_vals, "<unknown>")); @@ -146,11 +149,11 @@ dissect_btsmp_key_dist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree param = tvb_get_guint8(tvb, offset); if (initiator) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Initiator Key(s): "); - ti_param = proto_tree_add_text(tree, tvb, offset, 1, "Initiator Key Distribution: "); + ti_param = proto_tree_add_item(tree, hf_btsmp_initiator_key_distribution, tvb, offset, 1, ENC_NA); } else { col_append_fstr(pinfo->cinfo, COL_INFO, ", Responder Key(s): "); - ti_param = proto_tree_add_text(tree, tvb, offset, 1, "Responder Key Distribution: "); + ti_param = proto_tree_add_item(tree, hf_btsmp_responder_key_distribution, tvb, offset, 1, ENC_NA); } st_param = proto_item_add_subtree(ti_param, ett_btsmp_key_dist); @@ -362,6 +365,21 @@ proto_register_btsmp(void) {"Encrypted Diversifier (EDIV)", "btsmp.ediv", FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL} + }, + {&hf_btsmp_authreq, + {"AuthReq", "btsmp.authreq", + FT_NONE, BASE_NONE, NULL, 0x00, + NULL, HFILL} + }, + {&hf_btsmp_initiator_key_distribution, + {"Initiator Key Distribution", "btsmp.initiator_key_distribution", + FT_NONE, BASE_NONE, NULL, 0x00, + NULL, HFILL} + }, + {&hf_btsmp_responder_key_distribution, + {"Responder Key Distribution", "btsmp.responder_key_distribution", + FT_NONE, BASE_NONE, NULL, 0x00, + NULL, HFILL} } }; |