aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2016-10-27 13:51:05 +0200
committerMichael Mann <mmann78@netscape.net>2016-12-06 21:14:56 +0000
commit263fea9723ea3487c0d98b0720ab2d656f780fe1 (patch)
tree9f16df2d6ea1b42911f3db20b7db2aebcab78842
parentebe948bf983c5ff5b0805f16647ffa974d7f1bd6 (diff)
Bluetooth: SMP: Dissect remaining Key Distribution bits
Add "Linkkey" and "Reserved" fields. Change-Id: I21a23824348500bbcf8366c947fe2d6599b015d4 Reviewed-on: https://code.wireshark.org/review/19081 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: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-btsmp.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btsmp.c b/epan/dissectors/packet-btsmp.c
index d17b87982b..a006140206 100644
--- a/epan/dissectors/packet-btsmp.c
+++ b/epan/dissectors/packet-btsmp.c
@@ -53,6 +53,8 @@ static int hf_btsmp_max_enc_key_size = -1;
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_key_dist_linkkey = -1;
+static int hf_btsmp_key_dist_reserved = -1;
static int hf_btsmp_ediv = -1;
static int hf_btsmp_authreq = -1;
static int hf_btsmp_initiator_key_distribution = -1;
@@ -208,6 +210,9 @@ dissect_btsmp_key_dist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
proto_tree_add_item(st_param, hf_btsmp_key_dist_enc, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(st_param, hf_btsmp_key_dist_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(st_param, hf_btsmp_key_dist_sign, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(st_param, hf_btsmp_key_dist_linkkey, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(st_param, hf_btsmp_key_dist_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(ti_param, ": ");
if (param & 0x01) {
proto_item_append_text(ti_param, "LTK ");
col_append_str(pinfo->cinfo, COL_INFO, "LTK ");
@@ -220,6 +225,14 @@ dissect_btsmp_key_dist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
proto_item_append_text(ti_param, "CSRK ");
col_append_str(pinfo->cinfo, COL_INFO, "CSRK ");
}
+ if (param & 0x08) {
+ proto_item_append_text(ti_param, "Linkkey ");
+ col_append_str(pinfo->cinfo, COL_INFO, "Linkkey ");
+ }
+ if (param & 0xF0) {
+ proto_item_append_text(ti_param, "Reserved ");
+ col_append_str(pinfo->cinfo, COL_INFO, "Reserved ");
+ }
return offset + 1;
}
@@ -452,17 +465,27 @@ proto_register_btsmp(void)
},
{&hf_btsmp_key_dist_enc,
{"Encryption Key (LTK)", "btsmp.key_dist_enc",
- FT_UINT8, BASE_DEC, NULL, 0x01,
+ FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL}
},
{&hf_btsmp_key_dist_id,
{"Id Key (IRK)", "btsmp.key_dist_id",
- FT_UINT8, BASE_DEC, NULL, 0x02,
+ FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL}
},
{&hf_btsmp_key_dist_sign,
{"Signature Key (CSRK)", "btsmp.key_dist_sign",
- FT_UINT8, BASE_DEC, NULL, 0x04,
+ FT_BOOLEAN, 8, NULL, 0x04,
+ NULL, HFILL}
+ },
+ {&hf_btsmp_key_dist_linkkey,
+ {"Link Key", "btsmp.key_dist_linkkey",
+ FT_BOOLEAN, 8, NULL, 0x08,
+ NULL, HFILL}
+ },
+ {&hf_btsmp_key_dist_reserved,
+ {"Reserved", "btsmp.key_dist_reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xF0,
NULL, HFILL}
},
{&hf_btsmp_ediv,