[ntp:questions] Issues with ACCORD Reference Clock Driver

Hal Murray hal-usenet at ip-64-139-1-69.sjc.megapath.net
Tue Dec 4 17:27:02 UTC 2007


>Perhaps the best way is to add a completely new command "refclock" and
>load it up with all kinds of options, including those now done by the
>fudge command. The command would not need the dotted quad, which could
>be replaced by the driver name already in a table. The syntax could in
>principle be different for each name, as determined by the parser. That
>could be a nice summer project.

I like the idea of a refclock command.

Here is a possibly crazy way to implement something like that...

In addition to the procedures that are currently supplied
in the linkage block from each refclock to the system,
add a string that is the tokens that this driver knows
about.

The parser handles the merge of all possible options,
collecting the info in a struct that gets passed to open.
It also complains about options that this driver doesn't
support.  Open copies what it wants out of that struct,
ignoring the fields it doesn't support.

You might need a way to distinguish between 0 and unspecified.
-1 for unspecified probably works.  Use 0 and 1 for booleans.
The open code would have to check for the unspecified
case rather than just checking for non-zero.

It might be possible to use the same mechanism for ntpdc.
I don't know if the same set of options makes sense.  If
not, it just takes a second string to specify what is OK
for ntpdc.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.




More information about the questions mailing list