Deleted Added
full compact
kern_ntptime.c (225617) kern_ntptime.c (228449)
1/*-
2 ***********************************************************************
3 * *
4 * Copyright (c) David L. Mills 1993-2001 *
5 * *
6 * Permission to use, copy, modify, and distribute this software and *
7 * its documentation for any purpose and without fee is hereby *
8 * granted, provided that the above copyright notice appears in all *

--- 17 unchanged lines hidden (view full) ---

26 * in this file.
27 *
28 * Only minor changes done to interface with the timecounters over in
29 * sys/kern/kern_clock.c. Some of the comments below may be (even more)
30 * confusing and/or plain wrong in that context.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 ***********************************************************************
3 * *
4 * Copyright (c) David L. Mills 1993-2001 *
5 * *
6 * Permission to use, copy, modify, and distribute this software and *
7 * its documentation for any purpose and without fee is hereby *
8 * granted, provided that the above copyright notice appears in all *

--- 17 unchanged lines hidden (view full) ---

26 * in this file.
27 *
28 * Only minor changes done to interface with the timecounters over in
29 * sys/kern/kern_clock.c. Some of the comments below may be (even more)
30 * confusing and/or plain wrong in that context.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/kern/kern_ntptime.c 225617 2011-09-16 13:58:51Z kmacy $");
34__FBSDID("$FreeBSD: head/sys/kern/kern_ntptime.c 228449 2011-12-13 00:38:50Z eadler $");
35
36#include "opt_ntp.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/sysproto.h>
41#include <sys/eventhandler.h>
42#include <sys/kernel.h>

--- 253 unchanged lines hidden (view full) ---

296 return (sysctl_handle_opaque(oidp, &ntv, sizeof(ntv), req));
297}
298
299SYSCTL_NODE(_kern, OID_AUTO, ntp_pll, CTLFLAG_RW, 0, "");
300SYSCTL_PROC(_kern_ntp_pll, OID_AUTO, gettime, CTLTYPE_OPAQUE|CTLFLAG_RD,
301 0, sizeof(struct ntptimeval) , ntp_sysctl, "S,ntptimeval", "");
302
303#ifdef PPS_SYNC
35
36#include "opt_ntp.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/sysproto.h>
41#include <sys/eventhandler.h>
42#include <sys/kernel.h>

--- 253 unchanged lines hidden (view full) ---

296 return (sysctl_handle_opaque(oidp, &ntv, sizeof(ntv), req));
297}
298
299SYSCTL_NODE(_kern, OID_AUTO, ntp_pll, CTLFLAG_RW, 0, "");
300SYSCTL_PROC(_kern_ntp_pll, OID_AUTO, gettime, CTLTYPE_OPAQUE|CTLFLAG_RD,
301 0, sizeof(struct ntptimeval) , ntp_sysctl, "S,ntptimeval", "");
302
303#ifdef PPS_SYNC
304SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, "");
305SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, "");
304SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW,
305 &pps_shiftmax, 0, "Max interval duration (sec) (shift)");
306SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW,
307 &pps_shift, 0, "Interval duration (sec) (shift)");
306SYSCTL_LONG(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD,
308SYSCTL_LONG(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD,
307 &time_monitor, 0, "");
309 &time_monitor, 0, "Last time offset scaled (ns)");
308
310
309SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", "");
310SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", "");
311SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD,
312 &pps_freq, sizeof(pps_freq), "I", "Scaled frequency offset (ns/sec)");
313SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD,
314 &time_freq, sizeof(time_freq), "I", "Frequency offset (ns/sec)");
311#endif
312
313/*
314 * ntp_adjtime() - NTP daemon application interface
315 *
316 * See the timex.h header file for synopsis and API description. Note that
317 * the timex.constant structure member has a dual purpose to set the time
318 * constant and to set the TAI offset.

--- 726 unchanged lines hidden ---
315#endif
316
317/*
318 * ntp_adjtime() - NTP daemon application interface
319 *
320 * See the timex.h header file for synopsis and API description. Note that
321 * the timex.constant structure member has a dual purpose to set the time
322 * constant and to set the TAI offset.

--- 726 unchanged lines hidden ---