[ntp:questions] Re: Windows Refclock Driver

Kuechenmeister none at dev.nul
Thu Oct 30 23:05:23 UTC 2003


Okay, so this is getting to the root of the problem. Although, I suspect
the loopback address showed up after a "ntpq -p" command was issued. If
you look up a few lines above those, you will find a line like
_refclock_receive: at 1 127.127.45.0 67_ That's the temporary id for the
refclock while I do my local development. If this still is incorrect, what
control do I have over it?

For now, let's say I'm going to pursue this method of reading a ISAbus
refclock, rather than use the shm clock. I'm not much of a windows
programmer anyway, and reading IO registers is about my speed with
XP/NT/2000. I understand the idea of sharing memory on a DSP, i.e. it's
all shared, but windows is a little more complex.

So, I've used the hopf pci driver as a template for my own refclock
device. I substituted reading the ISA bus for my time and made up a
different procptr->a_lastcode string. As an aside, I don't see what the
a_lastcode string does anyway, but that's probably another matter.

I made all the changes that are required in other files. The clock gets
read and the right values are placed in the procptr->day, hour, minute,
second, and nsec fields. Then I call the refclock_process and
refclock_receive functions with the updated values and return. I do the
same sort of error checking for sync to a time source and return the same
sort of errors.

The results are wildly random amounts of offset and jitter, as is shown in
the previous post.

Thanks again for any comments.
Sincerely,
Dave Kuechenmeister


In article <3a2a0492.0310301407.42adcf3d at posting.google.com>,
mayer at gis.net (Danny Mayer) wrote:
> > SetSystemTimeAdjustment( 50) + (100144)
> > refclock_transmit: at 1 127.127.45.0
> > pp: 303 15:46:22.001000 1
> >
> > peer SYNCCLOCK16(0) event 'event_reach' (0x84) status 'unreach, conf,
> > 1 event, e
> > vent_reach' (0x8014)
> > refclock_sample: n 1 offset -0.040922 disp 0.000000 jitter 0.000000
> > clock_filter: n 1 off -0.040922 del 0.000000 dsp 7.937992 jit
> > 0.000008, age 1
> > poll_update: at 1 127.127.45.0 flags 02a1 poll 6 burst 0 last 1 next
> > refclock_receive: at 1 127.127.45.0 67
> > auth_agekeys: at 1 keys 1 expired 0
> > timer: refresh ts 0
> > SetSystemTimeAdjustment( 49) + (100144)
> > SetSystemTimeAdjustment( 50) + (100144)
> > SetSystemTimeAdjustment( 49) + (100144)
> > SetSystemTimeAdjustment( 50) + (100144)
> > SetSystemTimeAdjustment( 49) + (100144)
> > SetSystemTimeAdjustment( 50) + (100144)
> > receive: at 22 127.0.0.1<-127.0.0.1 restrict 000
> > sendpkt(fd=92 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=16)
> > receive: at 22 127.0.0.1<-127.0.0.1 restrict 000
> > sendpkt(fd=92 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=476)
> > sendpkt(fd=92 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=148)
> 
> Ignoring everything else you posted, you are sending packets to the loopback
> address from the loopback address: 127.0.0.1 -> 127.0.0.1
> which is really useless. I don't know what else is wrong but this
> certainly is.
> 
> Danny



More information about the questions mailing list