Implement a variable polling rate capability.
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 24 Apr 2005 23:09:32 +0000 (23:09 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 24 Apr 2005 23:09:32 +0000 (23:09 +0000)
commitfdd4337f8f2b596315a51e81f7c4805b3d02486b
treefd29cdf5761b5487e0b25fdf64d96b7930cd45ce
parent3f01aae47d7b859199fe9783fff02bc1c15a53ca
Implement a variable polling rate capability.

Implement a polling state which runs through a fast-startup to get a rough
offset correction, a medium-polled acquisition mode to get a rough
frequency correction, and a long-polled maintainance mode (assuming the
time source is good enough) to get a fine frequency correction.

startup mode: 6 five-second polls
acquisition mode: 16 five-minute polls
maintainance mode: 30 minute polls (if the correllation is good enough)

Implement a short failure mode (3 failed polls in a row) which returns
to an aquisition state on recovery, and a long failure mode (10 failed polls
in a row) which returns to a startup state on recovery.

When resetting a regression, also remove any alternate regression further
on down the alt chain (since they won't be staggered any more).
usr.sbin/dntpd/client.c
usr.sbin/dntpd/client.h
usr.sbin/dntpd/defs.h
usr.sbin/dntpd/main.c