Wireshark mailing list archives

Re: Display more digits for NTP packet's root dispersion


From: Guy Harris <guy () alum mit edu>
Date: Mon, 6 Aug 2018 21:23:52 -0700

On Aug 6, 2018, at 2:19 PM, Guy Harris <guy () alum mit edu> wrote:

On Aug 6, 2018, at 4:20 AM, Martin Burnicki <martin.burnicki () meinberg de> wrote:

As far as I have seen, proto_tree_add_double() seems to add a double
value to the output tree,

*All* doubles use the same format string.  The part of the format string for the number is

      "%." G_STRINGIFY(DBL_DIG) "g"

DBL_DIG is 15 with macOS/Xcode, so that should be %.15g, which should show more than 4 digits.

At least on macOS, a root delay the octets of which are 0x00 0x00 0x00 0x01 displays, in the dissected NTP packet, as

        Root Delay: 1.52587890625e-05 seconds

Does it not do that on your machine?

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: