diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-07-31 22:54:51 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-08-01 05:55:35 +0000 |
commit | 24e44a6ae698a5894c8a81761ff5a52599add4d0 (patch) | |
tree | d3601466c6a1e613b42144fb8347e44188faa130 | |
parent | d985188aa5df5cc5d8c29af0135a967586204242 (diff) |
Don't hide dissected data under a "Data" item.
Only put otherwise-undissectable BER data under that item.
That removes an extra layer that needs to be opened up.
Change-Id: I6b025a782ff7199c84bad46160c7c286e79b0580
Reviewed-on: https://code.wireshark.org/review/28915
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/dissectors/file-rfc7468.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/file-rfc7468.c b/epan/dissectors/file-rfc7468.c index cfdb8a1657..e719500815 100644 --- a/epan/dissectors/file-rfc7468.c +++ b/epan/dissectors/file-rfc7468.c @@ -23,7 +23,7 @@ static gint ett_rfc7468_data = -1; static gint ett_rfc7468_posteb = -1; static int hf_rfc7468_preeb_label = -1; -static int hf_rfc7468_data = -1; +static int hf_rfc7468_ber_data = -1; static int hf_rfc7468_posteb_label = -1; static dissector_handle_t ber_handle = NULL; @@ -316,21 +316,22 @@ dissect_rfc7468(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data */ if (datasize != 0) { tvbuff_t *data_tvb; - proto_tree *data_tree; data_tvb = tvb_new_child_real_data(tvb, databuf, datasize, datasize); add_new_data_source(pinfo, data_tvb, "Base64-encoded data"); - ti = proto_tree_add_item(rfc7468_tree, hf_rfc7468_data, data_tvb, 0, -1, ENC_NA); - data_tree = proto_item_add_subtree(ti, ett_rfc7468_data); /* * Try to decode it based on the label. */ if (dissector_try_string(rfc7468_label_table, label, data_tvb, pinfo, - data_tree, NULL) == 0) { + rfc7468_tree, NULL) == 0) { + proto_tree *data_tree; + /* * No known dissector; decode it as BER. */ + ti = proto_tree_add_item(rfc7468_tree, hf_rfc7468_ber_data, data_tvb, 0, -1, ENC_NA); + data_tree = proto_item_add_subtree(ti, ett_rfc7468_data); call_dissector(ber_handle, data_tvb, pinfo, data_tree); } } @@ -433,8 +434,8 @@ proto_register_rfc7468(void) { &hf_rfc7468_preeb_label, { "Pre-encapsulation boundary label", "rfc7468.preeb_label", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, - { &hf_rfc7468_data, - { "Data", "rfc7468.data", FT_NONE, BASE_NONE, + { &hf_rfc7468_ber_data, + { "BER data", "rfc7468.ber_data", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_rfc7468_posteb_label, { "Post-encapsulation boundary label", "rfc7468.posteb_label", FT_STRING, BASE_NONE, |