diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-06 08:44:23 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-09-09 01:25:36 +0000 |
commit | 80407a46df538011c1dcea96714c401a4078a697 (patch) | |
tree | f62b063004ba6a8946c552c6a3180cb8f417cd83 /epan/dissectors/packet-sgsap.c | |
parent | 124923b02f3113a1f2aeae205417a18828671850 (diff) |
Eliminate proto_tree_add_text from some of the dissectors.
Other minor cleanups while in the area.
Change-Id: I99096ade9c69a4c148962d45bb6b0bd775040ba1
Reviewed-on: https://code.wireshark.org/review/4020
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-sgsap.c')
-rw-r--r-- | epan/dissectors/packet-sgsap.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c index 0a3df2d6c0..80d3cf5e89 100644 --- a/epan/dissectors/packet-sgsap.c +++ b/epan/dissectors/packet-sgsap.c @@ -68,6 +68,8 @@ static int hf_sgsap_lcs_indic = -1; static int hf_sgsap_mme_name = -1; static int hf_sgsap_vlr_name = -1; static int hf_sgsap_imeisv = -1; +static int hf_sgsap_unknown_msg = -1; +static int hf_sgsap_message_elements = -1; static int ett_sgsap = -1; @@ -1415,7 +1417,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (msg_str) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s", msg_str); }else{ - proto_tree_add_text(tree, tvb, offset, 1, "Unknown message 0x%x", oct); + proto_tree_add_item(tree, hf_sgsap_unknown_msg, tvb, offset, 1, ENC_NA); return; } @@ -1431,8 +1433,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ if (msg_fcn_p == NULL) { - proto_tree_add_text(sgsap_tree, tvb, offset, len - offset, - "Message Elements"); + proto_tree_add_item(sgsap_tree, hf_sgsap_message_elements, tvb, offset, len - offset, ENC_NA); } else { @@ -1521,6 +1522,16 @@ void proto_register_sgsap(void) { FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL} }, + { &hf_sgsap_unknown_msg, + { "Unknown message", "sgsap.unknown_msg", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_sgsap_message_elements, + {"Message Elements", "sgsap.message_elements", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL} + }, }; /* Setup protocol subtree array */ |