[ntp:questions] Getting the version string programmatically ...
David J Taylor
david-taylor at blueyonder.delete-this-bit.and-this-part.co.uk.invalid
Thu Dec 17 09:28:19 UTC 2009
"Terje Mathisen" <Terje.Mathisen at tmsw.no> wrote in message
news:A5mdnVwBf93Ka7TWnZ2dnUVZ8qxi4p2d at lyse.net...
> David J Taylor wrote:
>> The command:
>> ntpq -c rv
>> returns a set of data, including the version of NTP in the format:
>> version="ntpd 4.2.6-o"
>> I would like to retrieve the same information (just the version field)
>> using a UDP interchange with the server rather than running the ntpq
>> command. Could anyone advise what the packet I send to the server
>> contain, and what I might get back? Perhaps if you could point me to
>> right Web page, please?
> "Use the Source", David!
> I.e. just grab the ntpq source code and rip out what you need.
I do have the source code, but I find C very difficult to "read". In
which of the 890 files I have would you suggest I start (yes, the ntpq
source will be my first point).
But I had rather hoped that this would be documented somewhere - but I
can't find it as yet.
More information about the questions