summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/ntpd.h
AgeCommit message (Collapse)Author
2009-06-06Turns up the polling rate of sensors and makes ntpd calculate frequencyChris Kuethe
corrections more often. Due to physical effects crystal oscillators aren't really stable beyond 1000s or so - at least not the kind found in pc's. ok henning
2009-06-06make ntpd imsg-in-a-lib ready as well. extensive testing done, noPierre-Yves Ritschard
behavior change. ok eric@
2009-06-04After calling adjfreq to correct the clock's rate, measure and fix the clockChris Kuethe
offset. This avoids future frequency adjustments based on measurements of a clock that was being adjusted. End result: more stable clock and better frequency convergence. Also, fix a mis-ordered structure member while I'm here. ok henning
2009-05-13when using a timedelta sensor for -s, if the sensor is invalid duringKevin Steves
the first query we will never do the settime because SENSOR_QUERY_INTERVAL (30s) is greater than SETTIME_TIMEOUT (15s). so during the settime period only, be more aggressive and use SETTIME_TIMEOUT/3 for the query interval. ok henning@
2009-02-11move prototypes that are really in ntp.c; ok henning@Kevin Steves
2009-02-10log tiny frequency adjustments at debug only.Kevin Steves
ok henning@, 'I think I agree' otto@
2009-02-06rename a #define to be clearer; no binary changeKevin Steves
ok henning@
2008-09-12move dns lookups to its own (privilege revoking, not chrooting) process.Henning Brauer
reason: the parent process must never ever block, but the dns routines can. last not least this fixes ntpd -s 'hanging' for a long time. tested by a couple of people
2008-06-10According to the latest SNTPv4 spec in RFC4330, secondary serversChristian Weisgerber
return the address of the synchronization source as reference identification. Remove the obsolete special casing specified in RFC2030. ok henning@
2008-06-09rename refstr to refid since it is an int32; ok henningTheo de Raadt
2008-06-09Allow outgoing replies from sensor-driven servers to have aChris Kuethe
user-configurable reference ID, eg. "GPS" or "DCF"... ok mbalmer
2008-05-16Allow ntpd to step the time at startup, now matter how large or small theChris Kuethe
offset. The 180s limit doesn't help very much these days. ok otto@ mbalmer@
2008-01-28Reconnect a client socket after three consecutive send failures.Marco Pfatschbacher
This allows recovery after an IP address change (e.g. on dialup links). Also move the update of "nextaction" timeout below the deadline check. OK henning@
2007-12-23remove some unused #defines; ok henning@Kevin Steves
2007-12-22just call getpwnam(NTPD_USER) once; ok henning@Kevin Steves
2007-10-15Allow ntpd to report the status of peers and sensors to syslog. ThisOtto Moerbeek
happens when a SIGINFO is received, or when the majority of peers or sensors is bad. The latter with a maximum of once per 24 hour. ok henning@ ckuethe@ mbalmer@
2007-09-13Provide the -n switch like in the other imsg daemons for testingPierre-Yves Ritschard
the configuration file. "yes please, ok" henning@
2007-09-12Add a knob to compensate for a refclock that is early or late. Based on aChris Kuethe
diff from Maurice Janssen. Manpage help from jmc and Maurice, other nits from deraadt and otto. ok deraadt, otto
2007-08-04This diff makes ntpd poll for sensors more aggressively when the use ofChris Kuethe
sensors is requested, but no sensors are found. ok henning
2007-04-30aggressive spelling fix, spotted by jbgTheo de Raadt
2007-03-23Increase sensor polling interval to 30s, just like ntp polls. ThisChris Kuethe
improves sensor timekeeping significantly. Before this patch my test system's frequency adjustment would range between -350 and +250, with timedelta rarely getting close to 0. After, frequency adjustmens is on the order of +/- 0.05ppm, with time +/- a few microseconds away from 0 ok henning, mbalmer, otto
2007-03-01read buffer size must be >= max imsg size.Henning Brauer
after release we should revisit this issue, we can probably safely shrink the max imsg size. Valentin Kozamernik in PR5401
2007-01-15Although Unix compilers accept more than one definition of a globalOtto Moerbeek
symbol, follow the guidelines from K&R: only one definition of a global symbol (and possibly more declarations). Rename some vars here and there to avoid shadowing. ok henning@
2006-12-23adapt to new two-level sensor sysctl framework; by Constantine A. MureninTheo de Raadt
2006-11-20with usig the meadian offset froma number of measurements the recordingHenning Brauer
of the last sensor update time got broken, doesn't show up with gps since it updates often (more often than we read), but naddy ran into it with dcf. record time of last sensor datum seperately. ok naddy balmer
2006-10-27use clock_gettime(CLOCK_MONOTONIC, ..) to get a monotonically increasingHenning Brauer
time, and make ntpd use that to send the next uery to an ntp peer and the like. this has the advantage that changes to the clock do not interfere with the intervals. for example, when we start on machines without an RTC and the initial settime (-s) kicks in, intervals were strange. idea from amandal@entrisphere.com, this implementation by me tested ckuethe, phessler, mbalmer, ok mbalmer
2006-10-24timedelta sensors are usually updated very often, but we used to queryHenning Brauer
them only every 30 seconds. now query them every 5,and take the median value from 7 queries as sensor value. this takes outliers out of the equation and makes the overall result much better, especially for sensors with heavy jitter (like nmea for now)
2006-06-30spacesTheo de Raadt
2006-06-26increase polling intervbal, but only after we are synced and have doneOtto Moerbeek
a few frequency adjustments. ok henning@
2006-06-22Save the computed clock drift and use it on startup. ok deraadt@Otto Moerbeek
henning@
2006-06-18tsk, tsk, tsk... the rule is simple: any define consisting ofOtto Moerbeek
more than one token MUST be put in parentheses!
2006-06-17Import frequency conrrection code from dragonfly, whith some changes:Otto Moerbeek
only do frequency compensation if the clock is synced, and a slightly diffent way of computing the linear regression. You'll need a recent kernel and libc to use this. Testing by naddy@ and ckuethe@ and others, thanks! ok henning@
2006-06-07Compensate old offsets with the amount of adjustment done, avoidingOtto Moerbeek
overcompensating. From DragonFly, uses recent adjtime(2) changes, so you'll need a recent kernel. ok henning@
2006-06-04Only invalidate stored replies if an adjustment was really made.Otto Moerbeek
ok henning@
2006-05-28allow for weight to be added to sensors or servers, so that one canHenning Brauer
weight timedelta sensors higher than ntp peers, for example ok deraadt mbalmer
2006-05-28let sensor_query handle removals itselfHenning Brauer
2006-05-27stop passing the config around all time, just store one copyHenning Brauer
2006-05-27make ntpd listen on the hotplug socket and decode yadda yadda, becauseHenning Brauer
new sensors showing up will be announced that way when slacking ml comes back from food
2006-05-27scan for new timedelta sensors every five minutes for now, ok deraadtHenning Brauer
2006-05-27config file bits for timedelta sensors, so one can specify which devicesHenning Brauer
to use. "sensors *" just uses all. untested due to lack of hardware. hacked on the road somewhere between vancouver and calgary
2006-05-26add support for timedelta sensors, which pretty much means udcf(4) rightHenning Brauer
now. untested due to lack of hardware, and it wouldn't have worked in the plane anyways. work in progress, currently picks up and uses all sensors it finds, config file bits to be added soon. theo fine with this going in
2006-05-25figure out the refid to send to NTP v3 clients early and store itHenning Brauer
first bits from a way to long flight
2005-09-24Log source address for 'malformed packet' errors. ok henning@Darren Tucker
2005-08-10Propogate server's leap indicator flags to clients; ok henning@Darren Tucker
2005-07-15shrink read buffer size from 64k to 4k, this is not bgpd and we're dealingHenning Brauer
with way less data
2005-07-05Save transmit time for each peer for later use as refid for SNTPv4Darren Tucker
replies. ok henning@
2005-06-19use a #define for the time to wait on -s and clarify a log msgHenning Brauer
2005-06-19use a little state engine to keep track of delayed dns lookups and such,Henning Brauer
eases things tested by Jason Ackley <jason@ackley.net> Matthias Kilian <kili@outback.escape.de> Stephen Marley <stephen@marley.org.uk> sturm@ theo ok
2005-04-26unify shared code a bit again to make future syncs easierHenning Brauer
From: Alexander von Gernler <grunk@pestilenz.org>
2005-03-23wpos in struct buf_read and datalen in imsg_get should be size_t and notHenning Brauer
ssize_t From: Alexander von Gernler <grunk@pestilenz.org>