diff options
author | Michael Mann <mmann78@netscape.net> | 2014-08-09 13:43:44 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-08-10 21:39:20 +0000 |
commit | 3635d7bed70aaf14e8172654f2b40be318e7dbfe (patch) | |
tree | 4b0fce1dba327df9a24b4ddc267a83375c817683 /epan/dissectors/packet-hdcp2.c | |
parent | 18346c84778019fe6eee6906758daa120f84d5d0 (diff) |
Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the neighborhood.
Change-Id: Ib76f4a9f89b5933425760af0a980c6a549031b8f
Reviewed-on: https://code.wireshark.org/review/3537
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-hdcp2.c')
-rw-r--r-- | epan/dissectors/packet-hdcp2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/dissectors/packet-hdcp2.c b/epan/dissectors/packet-hdcp2.c index 82ddbb185d..a1ea2d6c1f 100644 --- a/epan/dissectors/packet-hdcp2.c +++ b/epan/dissectors/packet-hdcp2.c @@ -63,6 +63,7 @@ static int hf_hdcp2_r_n = -1; static int hf_hdcp2_l_prime = -1; static int hf_hdcp2_e_dkey_ks = -1; static int hf_hdcp2_r_iv = -1; +static int hf_hdcp2_reserved = -1; static expert_field ei_hdcp2_reserved_0 = EI_INIT; @@ -171,8 +172,8 @@ dissect_hdcp2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U ptvcursor_add(cursor, hf_hdcp2_cert_n, N_LEN, ENC_NA); ptvcursor_add(cursor, hf_hdcp2_cert_e, E_LEN, ENC_BIG_ENDIAN); reserved = tvb_get_ntohs(tvb, ptvcursor_current_offset(cursor)); - pi = proto_tree_add_text(cert_tree, tvb, - ptvcursor_current_offset(cursor), 2, "reserved bytes"); + pi = proto_tree_add_item(cert_tree, hf_hdcp2_reserved, tvb, + ptvcursor_current_offset(cursor), 2, ENC_BIG_ENDIAN); if (reserved != 0) { expert_add_info(pinfo, pi, &ei_hdcp2_reserved_0); } @@ -269,7 +270,11 @@ proto_register_hdcp2(void) NULL, 0, NULL, HFILL } }, { &hf_hdcp2_r_iv, { "r_iv", "hdcp2.r_iv", FT_UINT64, BASE_HEX, + NULL, 0, NULL, HFILL } }, + { &hf_hdcp2_reserved, + { "Reserved", "hdcp2.reserved", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } } + }; static gint *ett[] = { |