diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-03-19 19:32:37 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-03-20 08:58:43 +0000 |
commit | 14c9b175f5e62894e911a329773a1d8f388b05d6 (patch) | |
tree | 546bc774d06117db08004cdfcc7e06ff6f5ff22f /epan | |
parent | f620be556ccd4b3ca6487ffc2eb596ad304c8a43 (diff) |
DMP: Make dmp.body.data FT_BYTES
With this it's possible to fetch the body from a Lua script again.
Change-Id: Ie1502d47ca3c137aedb4197c6a345b3eb340735a
Reviewed-on: https://code.wireshark.org/review/7769
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dmp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index d3221ab6f2..74f4dc356b 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -3165,11 +3165,12 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo, if (compr_alg == ALGORITHM_ZLIB) { tf = proto_tree_add_item (message_tree, hf_message_body_compressed, tvb, offset, len, ENC_NA); + proto_item_append_text (tf, ", Length: %d", len); } else { tf = proto_tree_add_item (message_tree, hf_message_body_data, tvb, offset, len, ENC_NA); + proto_item_set_text (tf, "User data, Length: %d", len); } - proto_item_append_text (tf, ", Length: %d", len); if (dmp.body_format == STRUCTURED) { /* Structured Message ID */ @@ -3184,7 +3185,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo, add_new_data_source (pinfo, body_tvb, "Uncompressed User data"); tf = proto_tree_add_item (message_tree, hf_message_body_data, body_tvb, 0, body_len, ENC_NA); - proto_item_append_text (tf, ", Length: %d", body_len); + proto_item_set_text (tf, "User data, Length: %d", len); PROTO_ITEM_SET_GENERATED (tf); } else { proto_tree_add_expert (message_tree, pinfo, &ei_message_body_uncompress, tvb, offset, len); @@ -4606,7 +4607,7 @@ void proto_register_dmp (void) /* Message Body */ { &hf_message_body_data, - { "User data", "dmp.body.data", FT_NONE, BASE_NONE, + { "User data", "dmp.body.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_message_body_compressed, { "Compressed User data", "dmp.body.compressed", FT_NONE, BASE_NONE, |