[ntp:hackers] Cool new stuff

todd glassey tglassey at earthlink.net
Fri Jul 21 22:44:13 UTC 2006


Question for the group - lets if you want create a "NTP Practice and Report"
and I will help with the Audit Practice for it. This will give the NTP.ORG
entity or this entity something that we could get qualified by commercial
audits and roll forward.

Todd

----- Original Message ----- 
From: "Frank Kardel" <kardel at ntp.org>
To: <kamboj at cis.udel.edu>
Cc: <hackers at lists.ntp.isc.org>; "David L. Mills" <mills at udel.edu>
Sent: Friday, July 21, 2006 3:41 PM
Subject: Re: [ntp:hackers] Cool new stuff


> Hal Murray wrote:
>
> >>1. peerstats, loopstats, cryptostats, sysstats, clockstats and
> >>rawstats are now reserved words and may not be used as filenames in
> >>the configuration file. Hence, a configuration command such as:
> >>
> >>
> >
> >
> >
> >>filegen peerstats file peerstats enable
> >>
> >>
> >
> >
> >
> >>won't work and will give a syntax error. Instead, use something like:
> >>
> >>
> >
> >
> >
> sorry, but here is room for improvement :-)
>
> >>filegen peerstats file peer_stats enable
> >>
> >>
> >
> >That seems pretty ugly to me.  A lot of scripts have those filenames
wired in.
> >
> >How hard is it to add something like quotes around the filename to get
past
> >the keyword checking?
> >
> >
> >
> >
> Usually this is handled in the syntax to expect a string token. The
> tokenizer
> (flex) could pick up the string (including spaces and escape syntax
> handling).
> and the parser just fetches that value. There are countless examples how
to
> pick up a string token in a flex/bison or lex/yacc environment. That
> should solve
> your problem here.
>
> I expect the syntax to have more string valued tokens in the future (e.g.
> device pathnames, init strings). So this basic functionality should be
> there.
>
> Also for the stats keyword I would rather see a lexical token from the
> stats class
> which is dynamically configured at daemon startup time. This avoids to
> pre-define
> all stats classes fixed in the syntax.  This way  the dynamic
> registration of stats
> collectors is still possible without affecting the syntax. Think of it
> as a pre-registered
> list of allowed words at the place after the filegen keyword.
> (e. g. FILEGEN COLLECTOR FILE STRING ACTION, COLLECTOR being one of the
> register collector names, STRING being a quoted string holding the file
> name, ACTION
> being one of the action keywords, the rest are constant tokens)
>
> I would need to look at your grammar to give you more tips there.
>
> Frank
> _______________________________________________
> hackers mailing list
> hackers at support.ntp.org
> https://support.ntp.org/mailman/listinfo/hackers



More information about the hackers mailing list