diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-05 08:48:37 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-09-06 07:44:46 +0000 |
commit | ceef7eba755cbecf670653360f72d864949dac49 (patch) | |
tree | 2cc48ebd17a4e7dc714f1b00af21f4f92546c948 /epan/dissectors/packet-ptp.c | |
parent | f1ad9eb212a6f4c5e1b6b1963bccf5f3a4900293 (diff) |
Eliminate proto_tree_add_text from some of the dissectors.
Other minor cleanups while in the area.
Change-Id: I8ea59205cfe6fab643d8fe01b75ce91532004fd9
Reviewed-on: https://code.wireshark.org/review/4004
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ptp.c')
-rw-r--r-- | epan/dissectors/packet-ptp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index 2c0d9d4bb9..a1c79558dd 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -1533,6 +1533,7 @@ static int hf_ptp_v2_mm_displayName_length = -1; static int hf_ptp_v2_mm_maxKey = -1; static int hf_ptp_v2_mm_currentOffset = -1; static int hf_ptp_v2_mm_jumpSeconds = -1; +static int hf_ptp_v2_mm_nextjumpSeconds = -1; static int hf_ptp_v2_mm_logAlternateMulticastSyncInterval = -1; static int hf_ptp_v2_mm_numberOfAlternateMasters = -1; static int hf_ptp_v2_mm_transmitAlternateMulticastSync = -1; @@ -3812,8 +3813,8 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) timeStamp = timeStamp << 16; timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4); - proto_tree_add_text(ptp_managementData_tree, tvb, Offset, 6, - "Time of next jump (seconds): %" G_GINT64_MODIFIER "u", timeStamp); + proto_tree_add_uint64(ptp_managementData_tree, hf_ptp_v2_mm_nextjumpSeconds, tvb, + Offset, 6, timeStamp); Offset +=6; proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb, @@ -5883,6 +5884,11 @@ proto_register_ptp(void) FT_INT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, + { &hf_ptp_v2_mm_nextjumpSeconds, + { "Time of next jump (seconds)", "ptp.v2.mm.nextjumpSeconds", + FT_UINT64, BASE_DEC, NULL, 0x00, + NULL, HFILL } + }, { &hf_ptp_v2_mm_numberOfAlternateMasters, { "Number of alternate masters", "ptp.v2.mm.numberOfAlternateMasters", FT_UINT8, BASE_DEC, NULL, 0x00, |