ntp_control.c was Re: The request side of NTS is working
James Browning
jamesb.fe80 at gmail.com
Tue Feb 19 21:16:45 UTC 2019
On 2/19/19, Eric S. Raymond via devel <devel at ntpsec.org> wrote:
> Hal Murray <hmurray at megapathdsl.net>:
>> The thing that gripes me about ntp_control is that for each of the tables
>>
>> mentioned above, there are actually 3 parallel tables and they are a long
>> way
>> apart so a pain to update. Maybe if we just interlaces the #defines with
>> the
>> text lookup tables it would be less painful to update.
>
> There's that, also I might be able to consolidate them usubfg a flags
> field.
>
>> Somebody has to decide what the order is. If you are moving things to
>> ntpq,
>> we can fix the order there to be the same.
>
> Less straightforward than I thought while writing my last reply. There
> turns
> out to be an unfortunate adhesion with the way the CTL_OP_READSTAT and
> CTL_OP_CLOCKSTAT requests work; if I'm not careful I could cause a
> comoatibily
> problem with Classic ntpq.
>
> Still pondering...
I have a branch 'control-denum' which takes a significantly wrong
approach and replaces many of the #define directives and replaces
them with a trio of enums. completely untested of course. IMO a
slightly less wrong solution might be to extend the table to have
a couple fields for a function pointer and an argument. (a quick
glimpse at the code suggest many cases are a relatively simple
print the variable with the format in the function. probably the
best route would be for me to shut up ow and let better minds chew
on it for a while.
JamesB192
More information about the devel
mailing list