[ntp:questions] Getting the time from NTP (was: Re: help with setting up NTP on windows with a USB GPS)

David J Taylor david-taylor at blueyonder.not-this-bit.nor-this-part.co.uk.invalid
Sun Dec 6 09:14:38 UTC 2009


"Dave Hart" <> wrote in message 
news:b51e46f7-4b0d-4d40-a6b2-574d459ba7bd at s21g2000prm.googlegroups.com...
[]
> If we wanted to define a new Windows-only service provided by ntpd,
> sure, there could be some combination of shared memory and IPC objects
> like named events used to expose a way for another program to ask ntpd
> to go down its timestamping path and provide the result.  There's no
> need on non-Windows systems where the system clock is high precision
> and typically interpolated.  Such a mechanism would be a potential
> local DoS avenue again unique to Windows, which while popular in
> general, isn't the center of the NTP universe.
>
> The reason I suggested you are in a better position than me to provide
> that capability is you've already written code that runs on Windows
> and retrives the time via a NTP request/reply pair of packets.  Wire
> it to [::1]:123 and/or 127.0.0.1:123 and there's your ntpGetTime().
>
> Cheers,
> Dave Hart

Thanks, Dave.  I suppose I was hoping that with a simple compile switch 
you might be able to provide ntpd.dll as well as nptd.exe, with the DLL 
exposing just one function.  I don't believe that using shared memory is 
complex on Windows (i.e. between the DLL and the EXE) but it's something 
I've never done.

If someone needs the network version and they ask nicely, I could look at 
that.

I wonder how the overheads would compare if the SNMP interface could 
expose a current time function?  Mind you, I have seen SNMP problems with 
more than 32-bit numbers!

Cheers,
David 




More information about the questions mailing list