[ntp:questions] Any chance of getting bugs 2164 and 1577 moving?

David Malone dwmalone at walton.maths.tcd.ie
Tue Mar 20 15:26:39 UTC 2012


"David J Taylor" <david-taylor at blueyonder.co.uk.invalid> writes:

>2164 needs discussion, unless altering the number of significant digits in 
>the ntpq output wouldn't break anything.  Do we need to have this 
>discussion?  I have looked through ntpq.c, but I can't see where the 
>number of decimal digits in the output for offset is set.

It seems that the types of different variables are stored in a
table, and "offset" has type FL. Latter on, there is a block of
code like this:

                                            case FL:
                                                output(fp, name,
                                                       lfptoms(&lfp, 3));
                                                break;
                                            case FU:
                                                output(fp, name,
                                                       ulfptoms(&lfp, 3));
                                                break;
                                            case FS:
                                                output(fp, name,
                                                       lfptoms(&lfp, 3));
                                                break;

Here, the lfptoms()/ulfptoms() functions convert NTP's internal
fixed point format into a string. I think that the 3 is the number
of significant figures. You can change these, but it seems that
the control messages are such that they only have 3 significant
figures included in them.

	David.



More information about the questions mailing list