Merge from HEAD

This commit is contained in:
bapt 2015-05-07 23:18:23 +00:00
commit fff6c6a5b7
536 changed files with 18374 additions and 12391 deletions

View File

@ -38,6 +38,31 @@
# xargs -n1 | sort | uniq -d;
# done
# 20150506
OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz
# 20150504
OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
OLD_LIBS+=usr/lib32/private/libbsdstat.so.1
OLD_LIBS+=usr/lib32/private/libheimipcs.so.11
OLD_LIBS+=usr/lib32/private/libsqlite3.so.0
OLD_LIBS+=usr/lib32/private/libunbound.so.5
OLD_LIBS+=usr/lib32/private/libatf-c.so.1
OLD_LIBS+=usr/lib32/private/libheimipcc.so.11
OLD_LIBS+=usr/lib32/private/libldns.so.5
OLD_LIBS+=usr/lib32/private/libssh.so.5
OLD_LIBS+=usr/lib32/private/libucl.so.1
OLD_DIRS+=usr/lib32/private
OLD_LIBS+=usr/lib/private/libatf-c++.so.2
OLD_LIBS+=usr/lib/private/libbsdstat.so.1
OLD_LIBS+=usr/lib/private/libheimipcs.so.11
OLD_LIBS+=usr/lib/private/libsqlite3.so.0
OLD_LIBS+=usr/lib/private/libunbound.so.5
OLD_LIBS+=usr/lib/private/libatf-c.so.1
OLD_LIBS+=usr/lib/private/libheimipcc.so.11
OLD_LIBS+=usr/lib/private/libldns.so.5
OLD_LIBS+=usr/lib/private/libssh.so.5
OLD_LIBS+=usr/lib/private/libucl.so.1
OLD_DIRS+=usr/lib/private
# 20150501
OLD_FILES+=usr/bin/soeliminate
OLD_FILES+=usr/share/man/man1/soeliminate.1.gz
@ -407,10 +432,6 @@ OLD_FILES+=usr/lib/debug/usr/lib32/i18n
OLD_FILES+=usr/lib/debug/usr/lib32/private
# 20141015: OpenSSL 1.0.1j import
OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz
.if ${MK_GCC} == "no"
# 20141009: gperf disabled by default
OLD_FILES+=usr/bin/gperf
.endif
# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz

View File

@ -90,7 +90,6 @@ volatile sig_atomic_t info;
enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
static int copy(char *[], enum op, int);
static int mastercmp(const FTSENT * const *, const FTSENT * const *);
static void siginfo(int __unused);
int
@ -274,7 +273,7 @@ copy(char *argv[], enum op type, int fts_options)
mask = ~umask(0777);
umask(~mask);
if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL)
if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL)
err(1, "fts_open");
for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) {
switch (curr->fts_info) {
@ -488,32 +487,6 @@ copy(char *argv[], enum op type, int fts_options)
return (rval);
}
/*
* mastercmp --
* The comparison function for the copy order. The order is to copy
* non-directory files before directory files. The reason for this
* is because files tend to be in the same cylinder group as their
* parent directory, whereas directories tend not to be. Copying the
* files first reduces seeking.
*/
static int
mastercmp(const FTSENT * const *a, const FTSENT * const *b)
{
int a_info, b_info;
a_info = (*a)->fts_info;
if (a_info == FTS_ERR || a_info == FTS_NS || a_info == FTS_DNR)
return (0);
b_info = (*b)->fts_info;
if (b_info == FTS_ERR || b_info == FTS_NS || b_info == FTS_DNR)
return (0);
if (a_info == FTS_D)
return (-1);
if (b_info == FTS_D)
return (1);
return (0);
}
static void
siginfo(int sig __unused)
{

View File

@ -32,7 +32,7 @@
.\" @(#)date.1 8.3 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
.Dd April 26, 2014
.Dd May 7, 2015
.Dt DATE 1
.Os
.Sh NAME
@ -41,7 +41,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl jRu
.Op Fl r Ar seconds
.Op Fl r Ar seconds | Ar filename
.Oo
.Fl v
.Sm off
@ -150,6 +150,9 @@ is the number of seconds since the Epoch
see
.Xr time 3 ) ,
and can be specified in decimal, octal, or hex.
.It Fl r Ar filename
Print the date and time of the last modification of
.Ar filename .
.It Fl t Ar minutes_west
Set the system's value for minutes west of
.Tn GMT .

View File

@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <ctype.h>
#include <err.h>
@ -85,6 +86,7 @@ main(int argc, char *argv[])
struct vary *v;
const struct vary *badv;
struct tm lt;
struct stat sb;
v = NULL;
fmt = NULL;
@ -116,8 +118,12 @@ main(int argc, char *argv[])
case 'r': /* user specified seconds */
rflag = 1;
tval = strtoq(optarg, &tmp, 0);
if (*tmp != 0)
usage();
if (*tmp != 0) {
if (stat(optarg, &sb) == 0)
tval = sb.st_mtim.tv_sec;
else
usage();
}
break;
case 't': /* minutes west of UTC */
/* error check; don't allow "PST" */

View File

@ -6794,15 +6794,31 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
out_attr[Tag_ABI_VFP_args].i = in_attr[Tag_ABI_VFP_args].i;
else if (in_attr[Tag_ABI_FP_number_model].i != 0)
{
bfd *hasbfd, *hasnotbfd;
if (in_attr[Tag_ABI_VFP_args].i)
{
hasbfd = ibfd;
hasnotbfd = obfd;
}
else
{
hasbfd = obfd;
hasnotbfd = ibfd;
}
_bfd_error_handler
(_("ERROR: %B uses VFP register arguments, %B does not"),
ibfd, obfd);
hasbfd, hasnotbfd);
return FALSE;
}
}
for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
{
if (out_attr[i].type == 0)
out_attr[i].type = in_attr[i].type;
/* Merge this attribute with existing attributes. */
switch (i)
{
@ -9359,6 +9375,16 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT
if (globals->byteswap_code)
i_ehdrp->e_flags |= EF_ARM_BE8;
}
/*
* For EABI 5, we have to tag dynamic binaries and execs as either
* soft float or hard float.
*/
if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_VER5 &&
(i_ehdrp->e_type == ET_DYN || i_ehdrp->e_type == ET_EXEC))
i_ehdrp->e_flags |=
bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, Tag_ABI_VFP_args) ?
EF_ARM_VFP_FLOAT : EF_ARM_SOFT_FLOAT;
}
static enum elf_reloc_type_class

View File

@ -1,4 +1,4 @@
/* $OpenBSD: netcat.c,v 1.122 2014/07/20 01:38:40 guenther Exp $ */
/* $OpenBSD: netcat.c,v 1.127 2015/02/14 22:40:22 jca Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@ -42,7 +42,6 @@
#include <sys/un.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#ifdef IPSEC
#include <netipsec/ipsec.h>
#endif
@ -73,6 +72,12 @@
#define PORT_MAX_LEN 6
#define UNIX_DG_TMP_SOCKET_SIZE 19
#define POLL_STDIN 0
#define POLL_NETOUT 1
#define POLL_NETIN 2
#define POLL_STDOUT 3
#define BUFSIZE 16384
/* Command Line Options */
int dflag; /* detached, no stdin */
int Fflag; /* fdpass sock to stdout */
@ -117,10 +122,12 @@ int udptest(int);
int unix_bind(char *);
int unix_connect(char *);
int unix_listen(char *);
void set_common_sockopts(int);
void set_common_sockopts(int, int);
int map_tos(char *, int *);
void report_connect(const struct sockaddr *, socklen_t);
void usage(int);
ssize_t drainbuf(int, unsigned char *, size_t *);
ssize_t fillbuf(int, unsigned char *, size_t *);
#ifdef IPSEC
void add_ipsec_policy(int, char *);
@ -436,7 +443,7 @@ main(int argc, char *argv[])
&len);
if (connfd == -1) {
/* For now, all errnos are fatal */
err(1, "accept");
err(1, "accept");
}
if (vflag)
report_connect((struct sockaddr *)&cliaddr, len);
@ -663,7 +670,7 @@ remote_connect(const char *host, const char *port, struct addrinfo hints)
freeaddrinfo(ares);
}
set_common_sockopts(s);
set_common_sockopts(s, res0->ai_family);
if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0)
break;
@ -767,6 +774,8 @@ local_listen(char *host, char *port, struct addrinfo hints)
err(1, "disable TCP options");
}
set_common_sockopts(s, res0->ai_family);
if (bind(s, (struct sockaddr *)res0->ai_addr,
res0->ai_addrlen) == 0)
break;
@ -790,68 +799,224 @@ local_listen(char *host, char *port, struct addrinfo hints)
* Loop that polls on the network file descriptor and stdin.
*/
void
readwrite(int nfd)
readwrite(int net_fd)
{
struct pollfd pfd[2];
unsigned char buf[16 * 1024];
int n, wfd = fileno(stdin);
int lfd = fileno(stdout);
int plen;
struct pollfd pfd[4];
int stdin_fd = STDIN_FILENO;
int stdout_fd = STDOUT_FILENO;
unsigned char netinbuf[BUFSIZE];
size_t netinbufpos = 0;
unsigned char stdinbuf[BUFSIZE];
size_t stdinbufpos = 0;
int n, num_fds;
ssize_t ret;
plen = sizeof(buf);
/* don't read from stdin if requested */
if (dflag)
stdin_fd = -1;
/* Setup Network FD */
pfd[0].fd = nfd;
pfd[0].events = POLLIN;
/* stdin */
pfd[POLL_STDIN].fd = stdin_fd;
pfd[POLL_STDIN].events = POLLIN;
/* Set up STDIN FD. */
pfd[1].fd = wfd;
pfd[1].events = POLLIN;
/* network out */
pfd[POLL_NETOUT].fd = net_fd;
pfd[POLL_NETOUT].events = 0;
while (pfd[0].fd != -1) {
/* network in */
pfd[POLL_NETIN].fd = net_fd;
pfd[POLL_NETIN].events = POLLIN;
/* stdout */
pfd[POLL_STDOUT].fd = stdout_fd;
pfd[POLL_STDOUT].events = 0;
while (1) {
/* both inputs are gone, buffers are empty, we are done */
if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1
&& stdinbufpos == 0 && netinbufpos == 0) {
close(net_fd);
return;
}
/* both outputs are gone, we can't continue */
if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) {
close(net_fd);
return;
}
/* listen and net in gone, queues empty, done */
if (lflag && pfd[POLL_NETIN].fd == -1
&& stdinbufpos == 0 && netinbufpos == 0) {
close(net_fd);
return;
}
/* help says -i is for "wait between lines sent". We read and
* write arbitrary amounts of data, and we don't want to start
* scanning for newlines, so this is as good as it gets */
if (iflag)
sleep(iflag);
if ((n = poll(pfd, 2 - dflag, timeout)) < 0) {
int saved_errno = errno;
close(nfd);
errc(1, saved_errno, "Polling Error");
/* poll */
num_fds = poll(pfd, 4, timeout);
/* treat poll errors */
if (num_fds == -1) {
close(net_fd);
err(1, "polling error");
}
if (n == 0)
/* timeout happened */
if (num_fds == 0)
return;
if (pfd[0].revents & POLLIN) {
if ((n = read(nfd, buf, plen)) < 0)
return;
else if (n == 0) {
shutdown(nfd, SHUT_RD);
pfd[0].fd = -1;
pfd[0].events = 0;
} else {
if (tflag)
atelnet(nfd, buf, n);
if (atomicio(vwrite, lfd, buf, n) != n)
return;
/* treat socket error conditions */
for (n = 0; n < 4; n++) {
if (pfd[n].revents & (POLLERR|POLLNVAL)) {
pfd[n].fd = -1;
}
}
/* reading is possible after HUP */
if (pfd[POLL_STDIN].events & POLLIN &&
pfd[POLL_STDIN].revents & POLLHUP &&
! (pfd[POLL_STDIN].revents & POLLIN))
pfd[POLL_STDIN].fd = -1;
if (pfd[POLL_NETIN].events & POLLIN &&
pfd[POLL_NETIN].revents & POLLHUP &&
! (pfd[POLL_NETIN].revents & POLLIN))
pfd[POLL_NETIN].fd = -1;
if (pfd[POLL_NETOUT].revents & POLLHUP) {
if (Nflag)
shutdown(pfd[POLL_NETOUT].fd, SHUT_WR);
pfd[POLL_NETOUT].fd = -1;
}
/* if HUP, stop watching stdout */
if (pfd[POLL_STDOUT].revents & POLLHUP)
pfd[POLL_STDOUT].fd = -1;
/* if no net out, stop watching stdin */
if (pfd[POLL_NETOUT].fd == -1)
pfd[POLL_STDIN].fd = -1;
/* if no stdout, stop watching net in */
if (pfd[POLL_STDOUT].fd == -1) {
if (pfd[POLL_NETIN].fd != -1)
shutdown(pfd[POLL_NETIN].fd, SHUT_RD);
pfd[POLL_NETIN].fd = -1;
}
if (!dflag && pfd[1].revents & POLLIN) {
if ((n = read(wfd, buf, plen)) < 0)
return;
else if (n == 0) {
if (Nflag)
shutdown(nfd, SHUT_WR);
pfd[1].fd = -1;
pfd[1].events = 0;
} else {
if (atomicio(vwrite, nfd, buf, n) != n)
return;
/* try to read from stdin */
if (pfd[POLL_STDIN].revents & POLLIN && stdinbufpos < BUFSIZE) {
ret = fillbuf(pfd[POLL_STDIN].fd, stdinbuf,
&stdinbufpos);
/* error or eof on stdin - remove from pfd */
if (ret == 0 || ret == -1)
pfd[POLL_STDIN].fd = -1;
/* read something - poll net out */
if (stdinbufpos > 0)
pfd[POLL_NETOUT].events = POLLOUT;
/* filled buffer - remove self from polling */
if (stdinbufpos == BUFSIZE)
pfd[POLL_STDIN].events = 0;
}
/* try to write to network */
if (pfd[POLL_NETOUT].revents & POLLOUT && stdinbufpos > 0) {
ret = drainbuf(pfd[POLL_NETOUT].fd, stdinbuf,
&stdinbufpos);
if (ret == -1)
pfd[POLL_NETOUT].fd = -1;
/* buffer empty - remove self from polling */
if (stdinbufpos == 0)
pfd[POLL_NETOUT].events = 0;
/* buffer no longer full - poll stdin again */
if (stdinbufpos < BUFSIZE)
pfd[POLL_STDIN].events = POLLIN;
}
/* try to read from network */
if (pfd[POLL_NETIN].revents & POLLIN && netinbufpos < BUFSIZE) {
ret = fillbuf(pfd[POLL_NETIN].fd, netinbuf,
&netinbufpos);
if (ret == -1)
pfd[POLL_NETIN].fd = -1;
/* eof on net in - remove from pfd */
if (ret == 0) {
shutdown(pfd[POLL_NETIN].fd, SHUT_RD);
pfd[POLL_NETIN].fd = -1;
}
/* read something - poll stdout */
if (netinbufpos > 0)
pfd[POLL_STDOUT].events = POLLOUT;
/* filled buffer - remove self from polling */
if (netinbufpos == BUFSIZE)
pfd[POLL_NETIN].events = 0;
/* handle telnet */
if (tflag)
atelnet(pfd[POLL_NETIN].fd, netinbuf,
netinbufpos);
}
/* try to write to stdout */
if (pfd[POLL_STDOUT].revents & POLLOUT && netinbufpos > 0) {
ret = drainbuf(pfd[POLL_STDOUT].fd, netinbuf,
&netinbufpos);
if (ret == -1)
pfd[POLL_STDOUT].fd = -1;
/* buffer empty - remove self from polling */
if (netinbufpos == 0)
pfd[POLL_STDOUT].events = 0;
/* buffer no longer full - poll net in again */
if (netinbufpos < BUFSIZE)
pfd[POLL_NETIN].events = POLLIN;
}
/* stdin gone and queue empty? */
if (pfd[POLL_STDIN].fd == -1 && stdinbufpos == 0) {
if (pfd[POLL_NETOUT].fd != -1 && Nflag)
shutdown(pfd[POLL_NETOUT].fd, SHUT_WR);
pfd[POLL_NETOUT].fd = -1;
}
/* net in gone and queue empty? */
if (pfd[POLL_NETIN].fd == -1 && netinbufpos == 0) {
pfd[POLL_STDOUT].fd = -1;
}
}
}
ssize_t
drainbuf(int fd, unsigned char *buf, size_t *bufpos)
{
ssize_t n;
ssize_t adjust;
n = write(fd, buf, *bufpos);
/* don't treat EAGAIN, EINTR as error */
if (n == -1 && (errno == EAGAIN || errno == EINTR))
n = -2;
if (n <= 0)
return n;
/* adjust buffer */
adjust = *bufpos - n;
if (adjust > 0)
memmove(buf, buf + n, adjust);
*bufpos -= n;
return n;
}
ssize_t
fillbuf(int fd, unsigned char *buf, size_t *bufpos)
{
size_t num = BUFSIZE - *bufpos;
ssize_t n;
n = read(fd, buf + *bufpos, num);
/* don't treat EAGAIN, EINTR as error */
if (n == -1 && (errno == EAGAIN || errno == EINTR))
n = -2;
if (n <= 0)
return n;
*bufpos += n;
return n;
}
/*
* fdpass()
* Pass the connected file descriptor to stdout and exit.
@ -1025,7 +1190,7 @@ udptest(int s)
}
void
set_common_sockopts(int s)
set_common_sockopts(int s, int af)
{
int x = 1;
@ -1040,8 +1205,17 @@ set_common_sockopts(int s)
err(1, NULL);
}
if (Tflag != -1) {
if (setsockopt(s, IPPROTO_IP, IP_TOS,
&Tflag, sizeof(Tflag)) == -1)
int proto, option;
if (af == AF_INET6) {
proto = IPPROTO_IPV6;
option = IPV6_TCLASS;
} else {
proto = IPPROTO_IP;
option = IP_TOS;
}
if (setsockopt(s, proto, option, &Tflag, sizeof(Tflag)) == -1)
err(1, "set IP ToS");
}
if (Iflag) {

View File

@ -1,4 +1,80 @@
---
(4.2.8p2) 2015/04/07 Released by Harlan Stenn <stenn@ntp.org>
(4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2763] Fix for different thresholds for forward and backward steps.
---
(4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c.
* [Bug 2769] New script: update-leap
* [Bug 2769] cleannup for update-leap
* [Bug 2788] New flag -G (force_step_once).
* [Bug 2794] Clean up kernel clock status reports.
* [Bug 2795] Cannot build without OpenSLL (on Win32).
Provided a Win32 specific wrapper around libevent/arc4random.c.
fixed some minor warnings.
* [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32.
* [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys
on big-endian machines.
* [Bug 2798] sntp should decode and display the leap indicator.
* Simple cleanup to html/build.html
---
(4.2.8p2-RC1) 2015/03/30 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2794] Don't let reports on normal kernel status changes
look like errors.
* [Bug 2788] New flag -G (force_step_once).
* [Bug 2592] Account for PPS sources which can provide an accurate
absolute time stamp, and status information.
Fixed indention and removed trailing whitespace.
* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
* [Bug 2346] "graceful termination" signals do not do peer cleanup.
* [Bug 2728] See if C99-style structure initialization works.
* [Bug 2747] Upgrade libevent to 2.1.5-beta.
* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
* [Bug 2751] jitter.h has stale copies of l_fp macros.
* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
* [Bug 2757] Quiet compiler warnings.
* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
* [Bug 2763] Allow different thresholds for forward and backward steps.
* [Bug 2766] ntp-keygen output files should not be world-readable.
* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
* [Bug 2771] nonvolatile value is documented in wrong units.
* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
* [Bug 2774] Unreasonably verbose printout - leap pending/warning
* [Bug 2775] ntp-keygen.c fails to compile under Windows.
* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
Removed non-ASCII characters from some copyright comments.
Removed trailing whitespace.
Updated definitions for Meinberg clocks from current Meinberg header files.
Now use C99 fixed-width types and avoid non-ASCII characters in comments.
Account for updated definitions pulled from Meinberg header files.
Updated comments on Meinberg GPS receivers which are not only called GPS16x.
Replaced some constant numbers by defines from ntp_calendar.h
Modified creation of parse-specific variables for Meinberg devices
in gps16x_message().
Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
Modified mbg_tm_str() which now expexts an additional parameter controlling
if the time status shall be printed.
* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
* [Sec 2781] Authentication doesn't protect symmetric associations against
DoS attacks.
* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
* [Bug 2789] Quiet compiler warnings from libevent.
* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
pause briefly before measuring system clock precision to yield
correct results.
* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
* Use predefined function types for parse driver functions
used to set up function pointers.
Account for changed prototype of parse_inp_fnc_t functions.
Cast parse conversion results to appropriate types to avoid
compiler warnings.
Let ioctl() for Windows accept a (void *) to avoid compiler warnings
when called with pointers to different types.
---
(4.2.8p1) 2015/02/04 Released by Harlan Stenn <stenn@ntp.org>
* Update the NEWS file.
@ -14,7 +90,7 @@
(This should work for all versions of Windows >= W2K)
* [Bug 2738] Missing buffer initialization in refclocK_parse.c::parsestate().
* [Bug 2739] Parse driver with PPS enabled occasionally evaluates
PPS timestamp with wrong sign.
PPS timestamp with wrong sign.
Removed some German umlauts.
* [Bug 2740] Removed some obsolete code from the parse driver.
* [Bug 2741] Incorrect buffer check in refclocK_parse.c::parsestatus().
@ -94,7 +170,7 @@
* [Bug 2678] nmea_control() now checks 'refclock_params()' result.
(4.2.7p481) 2014/11/22 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2314] Only enable PPS if kernel consumer binding succeeds.
* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
* Rename pps_enable to hardpps_enable.
(4.2.7p480) 2014/11/21 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2677] PATH_MAX isn't #define'd under Windows.

File diff suppressed because it is too large Load Diff

View File

@ -49,8 +49,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -79,6 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -347,6 +348,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -1,3 +1,144 @@
---
NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/xx)
Focus: Security and Bug fixes, enhancements.
Severity: MEDIUM
In addition to bug fixes and enhancements, this release fixes the
following medium-severity vulnerabilities involving private key
authentication:
* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
References: Sec 2779 / CVE-2015-1798 / VU#374268
Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
including ntp-4.2.8p2 where the installation uses symmetric keys
to authenticate remote associations.
CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
Date Resolved: Stable (4.2.8p2) 07 Apr 2015
Summary: When ntpd is configured to use a symmetric key to authenticate
a remote NTP server/peer, it checks if the NTP message
authentication code (MAC) in received packets is valid, but not if
there actually is any MAC included. Packets without a MAC are
accepted as if they had a valid MAC. This allows a MITM attacker to
send false packets that are accepted by the client/peer without
having to know the symmetric key. The attacker needs to know the
transmit timestamp of the client to match it in the forged reply
and the false reply needs to reach the client before the genuine
reply from the server. The attacker doesn't necessarily need to be
relaying the packets between the client and the server.
Authentication using autokey doesn't have this problem as there is
a check that requires the key ID to be larger than NTP_MAXKEY,
which fails for packets without a MAC.
Mitigation:
Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
or the NTP Public Services Project Download Page
Configure ntpd with enough time sources and monitor it properly.
Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
* [Sec 2781] Authentication doesn't protect symmetric associations against
DoS attacks.
References: Sec 2781 / CVE-2015-1799 / VU#374268
Affects: All NTP releases starting with at least xntp3.3wy up to but
not including ntp-4.2.8p2 where the installation uses symmetric
key authentication.
CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
Note: the CVSS base Score for this issue could be 4.3 or lower, and
it could be higher than 5.4.
Date Resolved: Stable (4.2.8p2) 07 Apr 2015
Summary: An attacker knowing that NTP hosts A and B are peering with
each other (symmetric association) can send a packet to host A
with source address of B which will set the NTP state variables
on A to the values sent by the attacker. Host A will then send
on its next poll to B a packet with originate timestamp that
doesn't match the transmit timestamp of B and the packet will
be dropped. If the attacker does this periodically for both
hosts, they won't be able to synchronize to each other. This is
a known denial-of-service attack, described at
https://www.eecis.udel.edu/~mills/onwire.html .
According to the document the NTP authentication is supposed to
protect symmetric associations against this attack, but that
doesn't seem to be the case. The state variables are updated even
when authentication fails and the peers are sending packets with
originate timestamps that don't match the transmit timestamps on
the receiving side.
This seems to be a very old problem, dating back to at least
xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
specifications, so other NTP implementations with support for
symmetric associations and authentication may be vulnerable too.
An update to the NTP RFC to correct this error is in-process.
Mitigation:
Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
or the NTP Public Services Project Download Page
Note that for users of autokey, this specific style of MITM attack
is simply a long-known potential problem.
Configure ntpd with appropriate time sources and monitor ntpd.
Alert your staff if problems are detected.
Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
* New script: update-leap
The update-leap script will verify and if necessary, update the
leap-second definition file.
It requires the following commands in order to work:
wget logger tr sed shasum
Some may choose to run this from cron. It needs more portability testing.
Bug Fixes and Improvements:
* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
* [Bug 2346] "graceful termination" signals do not do peer cleanup.
* [Bug 2728] See if C99-style structure initialization works.
* [Bug 2747] Upgrade libevent to 2.1.5-beta.
* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
* [Bug 2751] jitter.h has stale copies of l_fp macros.
* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
* [Bug 2757] Quiet compiler warnings.
* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
* [Bug 2763] Allow different thresholds for forward and backward steps.
* [Bug 2766] ntp-keygen output files should not be world-readable.
* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
* [Bug 2771] nonvolatile value is documented in wrong units.
* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
* [Bug 2774] Unreasonably verbose printout - leap pending/warning
* [Bug 2775] ntp-keygen.c fails to compile under Windows.
* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
Removed non-ASCII characters from some copyright comments.
Removed trailing whitespace.
Updated definitions for Meinberg clocks from current Meinberg header files.
Now use C99 fixed-width types and avoid non-ASCII characters in comments.
Account for updated definitions pulled from Meinberg header files.
Updated comments on Meinberg GPS receivers which are not only called GPS16x.
Replaced some constant numbers by defines from ntp_calendar.h
Modified creation of parse-specific variables for Meinberg devices
in gps16x_message().
Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
Modified mbg_tm_str() which now expexts an additional parameter controlling
if the time status shall be printed.
* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
* [Sec 2781] Authentication doesn't protect symmetric associations against
DoS attacks.
* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
* [Bug 2789] Quiet compiler warnings from libevent.
* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
pause briefly before measuring system clock precision to yield
correct results.
* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
* Use predefined function types for parse driver functions
used to set up function pointers.
Account for changed prototype of parse_inp_fnc_t functions.
Cast parse conversion results to appropriate types to avoid
compiler warnings.
Let ioctl() for Windows accept a (void *) to avoid compiler warnings
when called with pointers to different types.
---
NTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)

View File

@ -1132,8 +1132,7 @@ AC_SUBST([am__untar])
m4_include([sntp/libopts/m4/libopts.m4])
m4_include([sntp/libopts/m4/stdnoreturn.m4])
m4_include([sntp/libevent/m4/openldap-thread-check.m4])
m4_include([sntp/libevent/m4/openldap.m4])
m4_include([sntp/m4/ax_c99_struct_init.m4])
m4_include([sntp/m4/define_dir.m4])
m4_include([sntp/m4/hms_search_lib.m4])
m4_include([sntp/m4/libtool.m4])
@ -1162,5 +1161,7 @@ m4_include([sntp/m4/ntp_rlimit.m4])
m4_include([sntp/m4/ntp_sntp.m4])
m4_include([sntp/m4/ntp_ver_suffix.m4])
m4_include([sntp/m4/ntp_vpathhack.m4])
m4_include([sntp/m4/openldap-thread-check.m4])
m4_include([sntp/m4/openldap.m4])
m4_include([sntp/m4/os_cflags.m4])
m4_include([sntp/m4/snprintf.m4])

View File

@ -49,8 +49,7 @@ subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -79,6 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -329,6 +330,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -42,8 +42,7 @@ subdir = clockstuff
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -72,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -325,6 +326,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -1331,6 +1331,10 @@
/* Should we recommend a minimum value for tickadj? */
#undef MIN_REC_TICKADJ
/* Define to 1 if the compiler does not support C99's structure
initialization. */
#undef MISSING_C99_STRUCT_INIT
/* Do we need HPUX adjtime() library support? */
#undef NEED_HPUX_ADJTIME

137
contrib/ntp/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for ntp 4.2.8p1.
# Generated by GNU Autoconf 2.68 for ntp 4.2.8p2.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
PACKAGE_VERSION='4.2.8p1'
PACKAGE_STRING='ntp 4.2.8p1'
PACKAGE_VERSION='4.2.8p2'
PACKAGE_STRING='ntp 4.2.8p2'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@ -710,6 +710,13 @@ LD
FGREP
SED
LIBTOOL
INSTALL_UPDATE_LEAP_FALSE
INSTALL_UPDATE_LEAP_TRUE
UPDATE_LEAP_NI
UPDATE_LEAP_MS
UPDATE_LEAP_DS
UPDATE_LEAP_DL
UPDATE_LEAP_DB
TIMETRIM_NI
TIMETRIM_MS
TIMETRIM_DS
@ -1573,7 +1580,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ntp 4.2.8p1 to adapt to many kinds of systems.
\`configure' configures ntp 4.2.8p2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1643,7 +1650,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ntp 4.2.8p1:";;
short | recursive ) echo "Configuration of ntp 4.2.8p2:";;
esac
cat <<\_ACEOF
@ -1872,7 +1879,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ntp configure 4.2.8p1
ntp configure 4.2.8p2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -2697,7 +2704,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ntp $as_me 4.2.8p1, which was
It was created by ntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -3644,7 +3651,7 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
VERSION='4.2.8p1'
VERSION='4.2.8p2'
cat >>confdefs.h <<_ACEOF
@ -7780,6 +7787,44 @@ $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
$as_echo_n "checking whether the compiler supports C99 structure initialization... " >&6; }
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
struct foo_s {int i1; int i2;};
int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
$as_echo_n "checking to see if we need ylwrap VPATH hack... " >&6; }
@ -7941,6 +7986,19 @@ fi
if test -z "$UPDATE_LEAP_NI" ; then
INSTALL_UPDATE_LEAP_TRUE=
INSTALL_UPDATE_LEAP_FALSE='#'
else
INSTALL_UPDATE_LEAP_TRUE='#'
INSTALL_UPDATE_LEAP_FALSE=
fi
@ -31709,10 +31767,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/syscall.h>
#if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
# error
#endif
#include <sys/syscall.h>
#if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
# error
#endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@ -31748,10 +31806,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/timex.h>
#ifndef STA_FLL
# error
#endif
#include <sys/timex.h>
#ifndef STA_FLL
# error
#endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@ -35326,7 +35384,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
$as_echo_n "checking if we should enable NIST lockclock scheme... " >&6; }
# Check whether --enable-nist was given.
if test "${enable_nist+set}" = set; then :
enableval=$enable_nist; ans=$enableval
@ -35348,7 +35405,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
$as_echo_n "checking if we want support for Samba's signing daemon... " >&6; }
# Check whether --enable-ntp-signd was given.
if test "${enable_ntp_signd+set}" = set; then :
enableval=$enable_ntp_signd; ans=$enableval
@ -36444,33 +36500,35 @@ ac_config_files="$ac_config_files parseutil/Makefile"
ac_config_files="$ac_config_files scripts/Makefile"
ac_config_files="$ac_config_files scripts/lib/Makefile"
ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
ac_config_files="$ac_config_files scripts/build/Makefile"
ac_config_files="$ac_config_files scripts/build/mkver"
ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
ac_config_files="$ac_config_files scripts/lib/Makefile"
ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
ac_config_files="$ac_config_files scripts/ntpver"
ac_config_files="$ac_config_files scripts/plot_summary"
ac_config_files="$ac_config_files scripts/summary"
ac_config_files="$ac_config_files scripts/build/Makefile"
ac_config_files="$ac_config_files scripts/update-leap/Makefile"
ac_config_files="$ac_config_files tests/Makefile"
@ -36664,6 +36722,10 @@ if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; th
as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -37109,7 +37171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ntp $as_me 4.2.8p1, which was
This file was extended by ntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -37176,7 +37238,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ntp config.status 4.2.8p1
ntp config.status 4.2.8p2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@ -37703,20 +37765,21 @@ do
"ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/Makefile" ;;
"parseutil/Makefile") CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
"scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
"scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
"scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
"scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
"scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
"scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
"scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
"scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
"scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
"scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
"scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
"scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
"scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
"scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
"scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
"scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
"scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
"scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
"scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
"scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
"scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
"scripts/update-leap/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
"tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
@ -39254,8 +39317,8 @@ _LT_EOF
;;
"ntpd/complete.conf":F) sed -e '/^rlimit$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
"ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
"scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
"scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
"scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
"scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
"scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
"scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;

View File

@ -68,6 +68,7 @@ AC_PROG_CPP
AC_PROG_CXX
AC_PROG_YACC
AC_PROG_CC_C_O
AX_C99_STRUCT_INIT
NTP_VPATH_HACK dnl used only by ntpd/Makefile.am
@ -1499,12 +1500,13 @@ AC_CACHE_CHECK(
;;
*)
AC_PREPROC_IFELSE(
[
#include <sys/syscall.h>
#if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
# error
#endif
],
[AC_LANG_SOURCE(
[
#include <sys/syscall.h>
#if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
# error
#endif
])],
[ntp_cv_var_ntp_syscalls=kernel]
)
;;
@ -1526,12 +1528,13 @@ AC_CACHE_CHECK(
[if sys/timex.h has STA_FLL],
[ntp_cv_var_sta_fll],
[AC_PREPROC_IFELSE(
[
#include <sys/timex.h>
#ifndef STA_FLL
# error
#endif
],
[AC_LANG_SOURCE(
[
#include <sys/timex.h>
#ifndef STA_FLL
# error
#endif
])],
[ntp_cv_var_sta_fll=yes],
[ntp_cv_var_sta_fll=no]
)]
@ -1586,12 +1589,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
case "$ac_cv_header_termios_h" in
yes)
AC_PREPROC_IFELSE(
[
[AC_LANG_SOURCE([
#include <termios.h>
#ifndef TIOCGPPSEV
# error
#endif
],
])],
[ntp_ok=yes],
[ntp_ok=no]
)
@ -1612,12 +1615,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
case "$ac_cv_header_termios_h" in
yes)
AC_PREPROC_IFELSE(
[
[AC_LANG_SOURCE([
#include <termios.h>
#ifndef TIOCSPPS
# error
#endif
],
])],
[ntp_ok=yes],
[ntp_ok=no]
)
@ -1638,12 +1641,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
case "$ac_cv_header_sys_ppsclock_h" in
yes)
AC_PREPROC_IFELSE(
[
[AC_LANG_SOURCE([
#include <sys/ppsclock.h>
#ifndef CIOGETEV
# error
#endif
],
])],
[ntp_ok=yes],
[ntp_ok=no]
)
@ -1689,7 +1692,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
AC_PREPROC_IFELSE(
[
[AC_LANG_SOURCE([
#include <sys/time.h>
typedef int u_int;
#include <sys/ppsclock.h>
@ -1710,7 +1713,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
#ifndef CIOGETEV
# error
#endif
],
])],
[ntp_ok=yes],
[ntp_ok=no]
)
@ -4193,7 +4196,6 @@ case "$ans" in
esac
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
AC_ARG_ENABLE(
[nist],
[AS_HELP_STRING(
@ -4213,7 +4215,6 @@ case "$ans" in
esac
AC_MSG_CHECKING([if we want support for Samba's signing daemon])
AC_ARG_ENABLE(
[ntp-signd],
[AS_HELP_STRING(
@ -4266,14 +4267,14 @@ AC_CACHE_CHECK(
[for interface list sysctl],
[ntp_cv_iflist_sysctl],
[AC_PREPROC_IFELSE(
[
[AC_LANG_SOURCE([
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#ifndef NET_RT_IFLIST
# error
#endif
],
])],
[ntp_cv_iflist_sysctl=yes],
[ntp_cv_iflist_sysctl=no]
)]
@ -4333,20 +4334,21 @@ AC_CONFIG_FILES([ntpq/Makefile])
AC_CONFIG_FILES([ntpsnmpd/Makefile])
AC_CONFIG_FILES([parseutil/Makefile])
AC_CONFIG_FILES([scripts/Makefile])
AC_CONFIG_FILES([scripts/lib/Makefile])
AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
AC_CONFIG_FILES([scripts/build/Makefile])
AC_CONFIG_FILES([scripts/build/mkver], [chmod +x scripts/build/mkver])
AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
AC_CONFIG_FILES([scripts/lib/Makefile])
AC_CONFIG_FILES([scripts/ntp-wait/Makefile])
AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
AC_CONFIG_FILES([scripts/ntpsweep/Makefile])
AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
AC_CONFIG_FILES([scripts/ntptrace/Makefile])
AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver])
AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary])
AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary])
AC_CONFIG_FILES([scripts/build/Makefile])
AC_CONFIG_FILES([scripts/update-leap/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/libntp/Makefile])
AC_CONFIG_FILES([tests/ntpd/Makefile])

View File

@ -11,7 +11,7 @@
<img src="pic/beaver.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>For putting out compiler fires.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->31-Mar-2014 05:39<!-- #EndDate -->
<!-- #BeginDate format:En2m -->1-Apr-2015 02:57<!-- #EndDate -->
</p>
<br clear="left">
<h4>Related Links</h4>
@ -27,7 +27,7 @@
</ul>
<hr>
<h4 id="build">Building and Installing the Distribution</h4>
<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, <tt>make</tt> and <tt>install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, and <tt>make install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
<p>If available, the OpenSSL library from <a href="http://www.openssl.org">http://www.openssl.org</a> is used to support public key cryptography. The library must be built and installed prior to building NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library file and <tt>openssl</tt> header files are needed. If the library is not available or disabled, this step is not required.</p>
<p>The <a href="config.html">Build Options</a> page describes a number of options that determine whether debug support is included, whether and which reference clock drivers are included and the locations of the executables and library files, if not the default. By default debugging options and all reference clock drivers are included.</p>
<h4 id="unix">Building and Installing for Unix</h4>

View File

@ -10,7 +10,7 @@
<img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>We have three, now looking for more.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
<!-- #BeginDate format:En2m -->28-Feb-2015 12:01<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@ -90,7 +90,7 @@
</dl>
</dd>
<dt id="nonvolatile"><tt>nonvolatile <i>threshold</i></tt></dt>
<dd>Specify the <i><tt>threshold</tt></i> in PPM to write the frequency file, with default 0.1 PPM. The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
<dd>Specify the <i><tt>threshold</tt></i> in seconds to write the frequency file, with default of 1e-7 (0.1 PPM). The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
<dt id="phone"><tt>phone <i>dial</i> ...</tt></dt>
<dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
<dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>

View File

@ -11,7 +11,7 @@
<img src="pic/dogsnake.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>S is for snakeoil.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->7-Dec-2014 11:09<!-- #EndDate -->
<!-- #BeginDate format:En2m -->1-Apr-2015 11:05<!-- #EndDate -->
UTC</p>
<br clear="left">
<hr>
@ -20,8 +20,8 @@
<h4>Description</h4>
<p>This program is a Simple Network Time Protocol (SNTP) client that can be used to query a Network Time Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root it can correct the system clock to this offset as well. It can be run as an interactive command or from a script by a <tt>cron</tt> job. The program implements the SNTP client protocol defined in RFC 5905, including the full on-wire protocol but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP version 4 specification, also defined in RFC 5905.</p>
<p>By default, <tt>sntp</tt> writes the local date and time (i.e., not UTC) to the standard output in the format</p>
<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26</tt></p>
<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds.</p>
<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26 s3 no-leap</tt></p>
<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds. The hostname and/or the IP is displayed, as is the stratum of the server. Finally, the leap indicator status is displayed.</p>
<p>If -b <i>bcaddress</i> is not specified, the program sends a single message to each address and waits up to <i>uctimeout</i> (default 5) seconds for a unicast server response. Otherwise, it sends no message and waits up to <i>bctimeout</i> (default 68) seconds for a broadcast NTP message.</p>
<h4>Options</h4>
<p><tt>sntp</tt> recognizes the following options:</p>

View File

@ -40,8 +40,7 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -327,6 +328,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -42,11 +42,21 @@ void put_lsb_short (unsigned char **, long);
long get_lsb_long (unsigned char **);
void put_lsb_long (unsigned char **, long);
#define get_lsb_int16( _x_ ) ((int16_t) get_lsb_short( _x_ ))
#define get_lsb_uint16( _x_ ) ((uint16_t) get_lsb_short( _x_ ))
#define get_lsb_int32( _x_ ) ((int32_t) get_lsb_long( _x_ ))
#define get_lsb_uint32( _x_ ) ((uint32_t) get_lsb_long( _x_ ))
long get_msb_short (unsigned char **);
void put_msb_short (unsigned char **, long);
long get_msb_long (unsigned char **);
void put_msb_long (unsigned char **, long);
#define get_msb_int16( _x_ ) ((int16_t) get_msb_short( _x_ ))
#define get_msb_uint16( _x_ ) ((uint16_t) get_msb_short( _x_ ))
#define get_msb_int32( _x_ ) ((int32_t) get_msb_long( _x_ ))
#define get_msb_uint32( _x_ ) ((uint32_t) get_msb_long( _x_ ))
#endif
/*
* History:

View File

@ -40,8 +40,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -289,6 +290,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

File diff suppressed because it is too large Load Diff

View File

@ -435,7 +435,7 @@ struct peer {
#define STRATUM_UNSPEC ((u_char)16) /* unspecified */
/*
* Values for peer.flags
* Values for peer.flags (u_int)
*/
#define FLAG_CONFIG 0x0001 /* association was configured */
#define FLAG_PREEMPT 0x0002 /* preemptable association */
@ -453,8 +453,9 @@ struct peer {
#define FLAG_XB 0x2000 /* interleaved broadcast */
#define FLAG_XBOGUS 0x4000 /* interleaved bogus packet */
#ifdef OPENSSL
#define FLAG_ASSOC 0x8000 /* autokey request */
# define FLAG_ASSOC 0x8000 /* autokey request */
#endif /* OPENSSL */
#define FLAG_TSTAMP_PPS 0x10000 /* PPS source provides absolute timestamp */
/*
* Definitions for the clear() routine. We use memset() to clear
@ -713,17 +714,19 @@ struct pkt {
*/
#define LOOP_DRIFTINIT 1 /* iniitialize frequency */
#define LOOP_KERN_CLEAR 2 /* set initial frequency offset */
#define LOOP_MAX 3 /* set step offset */
#define LOOP_PANIC 4 /* set panic offseet */
#define LOOP_PHI 5 /* set dispersion rate */
#define LOOP_MINSTEP 6 /* set step timeout */
#define LOOP_MINPOLL 7 /* set min poll interval (log2 s) */
#define LOOP_ALLAN 8 /* set minimum Allan intercept */
#define LOOP_HUFFPUFF 9 /* set huff-n'-puff filter length */
#define LOOP_FREQ 10 /* set initial frequency */
#define LOOP_CODEC 11 /* set audio codec frequency */
#define LOOP_LEAP 12 /* insert leap after second 23:59 */
#define LOOP_TICK 13 /* sim. low precision clock */
#define LOOP_MAX 3 /* set both step offsets */
#define LOOP_MAX_BACK 4 /* set bacward-step offset */
#define LOOP_MAX_FWD 5 /* set forward-step offset */
#define LOOP_PANIC 6 /* set panic offseet */
#define LOOP_PHI 7 /* set dispersion rate */
#define LOOP_MINSTEP 8 /* set step timeout */
#define LOOP_MINPOLL 9 /* set min poll interval (log2 s) */
#define LOOP_ALLAN 10 /* set minimum Allan intercept */
#define LOOP_HUFFPUFF 11 /* set huff-n'-puff filter length */
#define LOOP_FREQ 12 /* set initial frequency */
#define LOOP_CODEC 13 /* set audio codec frequency */
#define LOOP_LEAP 14 /* insert leap after second 23:59 */
#define LOOP_TICK 15 /* sim. low precision clock */
/*
* Configuration items for the stats printer
@ -875,13 +878,13 @@ struct endpoint {
*/
#define AM_ERR -1 /* error */
#define AM_NOMATCH 0 /* no match */
#define AM_PROCPKT 1 /* server/symmetric packet */
#define AM_BCST 2 /* broadcast packet */
#define AM_PROCPKT 1 /* server/symmetric packet */
#define AM_BCST 2 /* broadcast packet */
#define AM_FXMIT 3 /* client packet */
#define AM_MANYCAST 4 /* manycast or pool */
#define AM_NEWPASS 5 /* new passive */
#define AM_NEWBCL 6 /* new broadcast */
#define AM_POSSBCL 7 /* discard broadcast */
#define AM_POSSBCL 7 /* discard broadcast */
/* NetInfo configuration locations */
#ifdef HAVE_NETINFO

View File

@ -83,13 +83,15 @@ extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
#define SECSPERMIN (60) /* seconds per minute */
#define MINSPERHR (60) /* minutes per hour */
#define HRSPERDAY (24) /* hours per day */
#define DAYSPERWEEK (7) /* days per week */
#define DAYSPERYEAR (365) /* days per year */
#define SECSPERHR (SECSPERMIN * MINSPERHR)
#define SECSPERDAY (SECSPERHR * HRSPERDAY)
#define SECSPERWEEK (DAYSPERWEEK * SECSPERDAY)
#define SECSPERYEAR (365 * SECSPERDAY) /* regular year */
#define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */
#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
/*
* Gross hacks. I have illicit knowlege that there won't be overflows
@ -113,7 +115,7 @@ extern uint32_t caltontp (const struct calendar *);
* Convert between 'time_t' and 'vint64'
*/
extern vint64 time_to_vint64(const time_t *);
extern time_t vint64_to_time(const vint64 *);
extern time_t vint64_to_time(const vint64 *);
/*
* Get the build date & time. ATTENTION: The time zone is not specified!

View File

@ -264,10 +264,13 @@ typedef u_int32 u_fp;
* headers. So far the problem has only been seen with gcc, but it
* may also affect Sun compilers, in which case the defined(__GNUC__)
* term should be removed.
* XSCALE also generates bad code for these, at least with GCC 3.3.5.
* This is unrelated to math.h, but the same solution applies.
*/
#if defined(HAVE_U_INT64) && \
!(defined(__SVR4) && defined(__sun) && \
defined(sparc) && defined(__GNUC__))
defined(sparc) && defined(__GNUC__) || \
defined(__arm__) && defined(__XSCALE__) && defined(__GNUC__))
#include <math.h> /* ldexp() */

View File

@ -24,7 +24,7 @@
typedef MD5_CTX EVP_MD_CTX;
# define EVP_get_digestbynid(t) NULL
# define EVP_md5(v) NULL
# define EVP_md5() NULL
# define EVP_MD_CTX_init(c)
# define EVP_MD_CTX_set_flags(c, f)
# define EVP_DigestInit(c, dt) (MD5Init(c), 1)

View File

@ -188,6 +188,7 @@ extern void unpeer (struct peer *);
extern void clear_all (void);
extern int score_all (struct peer *);
extern struct peer *findmanycastpeer(struct recvbuf *);
extern void peer_cleanup (void);
/* ntp_crypto.c */
#ifdef AUTOKEY
@ -385,7 +386,8 @@ extern endpt * ep_list; /* linked list */
/* ntp_loopfilter.c */
extern double drift_comp; /* clock frequency (s/s) */
extern double clock_stability; /* clock stability (s/s) */
extern double clock_max; /* max offset before step (s) */
extern double clock_max_back; /* max backward offset before step (s) */
extern double clock_max_fwd; /* max forward offset before step (s) */
extern double clock_panic; /* max offset before panic (s) */
extern double clock_phi; /* dispersion rate (s/s) */
extern double clock_minstep; /* step timeout (s) */
@ -403,8 +405,9 @@ extern int kern_enable; /* kernel support enabled */
extern int hardpps_enable; /* kernel PPS discipline enabled */
extern int ext_enable; /* external clock enabled */
extern int cal_enable; /* refclock calibrate enable */
extern int allow_panic; /* allow panic correction */
extern int mode_ntpdate; /* exit on first clock set */
extern int allow_panic; /* allow panic correction (-g) */
extern int force_step_once; /* always step time once at startup (-G) */
extern int mode_ntpdate; /* exit on first clock set (-q) */
extern int peer_ntpdate; /* count of ntpdate peers */
/*
@ -518,7 +521,7 @@ extern u_int32 conf_file_sum; /* Simple sum of characters */
/* ntp_signd.c */
#ifdef HAVE_NTP_SIGND
extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
struct pkt *);
#endif

View File

@ -4,7 +4,7 @@
* parse.h,v 4.12 2007/01/14 08:36:03 kardel RELEASE_20070114_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -104,6 +104,13 @@ extern unsigned int splclock (void);
#define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1))
#endif
/*
* some constants useful for GPS time conversion
*/
#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
#define GPSWRAP 990U /* assume week count less than this in the previous epoch */
#define GPSWEEKS 1024U /* number of weeks until the GPS epch rolls over */
/*
* state flags
*/
@ -127,7 +134,7 @@ extern unsigned int splclock (void);
/*
* optional status information
*/
#define PARSEB_ALTERNATE 0x00001000 /* alternate antenna used */
#define PARSEB_CALLBIT 0x00001000 /* "call bit" used to signalize irregularities in the control facilities */
#define PARSEB_POSITION 0x00002000 /* position available */
#define PARSEB_MESSAGE 0x00004000 /* addtitional message data */
/*
@ -145,7 +152,7 @@ extern unsigned int splclock (void);
#define PARSEB_PPS 0x20000000 /* valid PPS sample */
#define PARSE_TCINFO (PARSEB_ANNOUNCE|PARSEB_POWERUP|PARSEB_NOSYNC|PARSEB_DST|\
PARSEB_UTC|PARSEB_LEAPS|PARSEB_ALTERNATE|PARSEB_S_LEAP|\
PARSEB_UTC|PARSEB_LEAPS|PARSEB_CALLBIT|PARSEB_S_LEAP|\
PARSEB_S_LOCATION|PARSEB_TIMECODE|PARSEB_MESSAGE)
#define PARSE_POWERUP(x) ((x) & PARSEB_POWERUP)
@ -156,7 +163,7 @@ extern unsigned int splclock (void);
#define PARSE_UTC(x) ((x) & PARSEB_UTC)
#define PARSE_LEAPADD(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPADD))
#define PARSE_LEAPDEL(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPDEL))
#define PARSE_ALTERNATE(x) ((x) & PARSEB_ALTERNATE)
#define PARSE_CALLBIT(x) ((x) & PARSEB_CALLBIT)
#define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
#define PARSE_S_LEAP(x) ((x) & PARSEB_S_LEAP)
@ -229,13 +236,13 @@ typedef struct parsetime parsetime_t;
#define PARSE_IO_CSIZE 0x00000003
#define PARSE_IO_CS5 0x00000000
#define PARSE_IO_CS6 0x00000001
#define PARSE_IO_CS7 0x00000002
#define PARSE_IO_CS8 0x00000003
#define PARSE_IO_CS7 0x00000002
#define PARSE_IO_CS8 0x00000003
/*
* ioctl structure
*/
union parsectl
union parsectl
{
struct parsegettc
{
@ -258,7 +265,7 @@ union parsectl
u_long parse_cs; /* character size (needed for stripping) */
} parsesetcs;
};
typedef union parsectl parsectl_t;
/*------ for conversion routines --------*/
@ -266,7 +273,7 @@ typedef union parsectl parsectl_t;
struct parse /* parse module local data */
{
int parse_flags; /* operation and current status flags */
int parse_ioflags; /* io handling flags (5-8 Bit control currently) */
/*
@ -286,7 +293,7 @@ struct parse /* parse module local data */
char *parse_ldata; /* last data buffer */
unsigned short parse_ldsize; /* last data buffer length */
u_long parse_badformat; /* number of unparsable pakets */
timestamp_t parse_lastchar; /* last time a character was received */
parsetime_t parse_dtime; /* external data prototype */
};
@ -337,15 +344,19 @@ typedef struct clocktime clocktime_t;
#define SYNC_ZERO 0x00
#define SYNC_ONE 0x01
typedef u_long parse_inp_fnc_t(parse_t *, char, timestamp_t *);
typedef u_long parse_cvt_fnc_t(unsigned char *, int, struct format *, clocktime_t *, void *);
typedef u_long parse_pps_fnc_t(parse_t *, int, timestamp_t *);
struct clockformat
{
/* special input protocol - implies fixed format */
u_long (*input) (parse_t *, unsigned int, timestamp_t *);
parse_inp_fnc_t *input;
/* conversion routine */
u_long (*convert) (unsigned char *, int, struct format *, clocktime_t *, void *);
parse_cvt_fnc_t *convert;
/* routine for handling RS232 sync events (time stamps) */
/* PPS input routine */
u_long (*syncpps) (parse_t *, int, timestamp_t *);
parse_pps_fnc_t *syncpps;
/* time code synthesizer */
void *data; /* local parameters */
@ -361,7 +372,7 @@ typedef struct clockformat clockformat_t;
*/
extern int parse_ioinit (parse_t *);
extern void parse_ioend (parse_t *);
extern int parse_ioread (parse_t *, unsigned int, timestamp_t *);
extern int parse_ioread (parse_t *, char, timestamp_t *);
extern int parse_iopps (parse_t *, int, timestamp_t *);
extern void parse_iodone (parse_t *);
extern int parse_timecode (parsectl_t *, parse_t *);
@ -369,8 +380,8 @@ extern int parse_getfmt (parsectl_t *, parse_t *);
extern int parse_setfmt (parsectl_t *, parse_t *);
extern int parse_setcs (parsectl_t *, parse_t *);
extern unsigned int parse_restart (parse_t *, unsigned int);
extern unsigned int parse_addchar (parse_t *, unsigned int);
extern unsigned int parse_restart (parse_t *, char);
extern unsigned int parse_addchar (parse_t *, char);
extern unsigned int parse_end (parse_t *);
extern int Strok (const unsigned char *, const unsigned char *);
@ -379,9 +390,9 @@ extern int Stoi (const unsigned char *, long *, int);
extern time_t parse_to_unixtime (clocktime_t *, u_long *);
extern u_long updatetimeinfo (parse_t *, u_long);
extern void syn_simple (parse_t *, timestamp_t *, struct format *, u_long);
extern u_long pps_simple (parse_t *, int, timestamp_t *);
extern u_long pps_one (parse_t *, int, timestamp_t *);
extern u_long pps_zero (parse_t *, int, timestamp_t *);
extern parse_pps_fnc_t pps_simple;
extern parse_pps_fnc_t pps_one;
extern parse_pps_fnc_t pps_zero;
extern int parse_timedout (parse_t *, timestamp_t *, struct timeval *);
#endif

View File

@ -4,7 +4,7 @@
* parse_conf.h,v 4.7 2005/06/25 10:58:45 kardel RELEASE_20050625_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -41,13 +41,13 @@
/*
* field location structure
*/
#define O_DAY 0
#define O_DAY 0
#define O_MONTH 1
#define O_YEAR 2
#define O_HOUR 3
#define O_MIN 4
#define O_SEC 5
#define O_WDAY 6
#define O_YEAR 2
#define O_HOUR 3
#define O_MIN 4
#define O_SEC 5
#define O_WDAY 6
#define O_FLAGS 7
#define O_ZONE 8
#define O_UTCHOFFSET 9

View File

@ -38,8 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -68,6 +67,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -324,6 +325,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -40,8 +40,7 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -289,6 +290,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -4,7 +4,7 @@
* parsestreams.h,v 4.5 2005/06/25 10:52:47 kardel RELEASE_20050625_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View File

@ -135,6 +135,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
cur.base = -1;
best.len = cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)

View File

@ -1143,7 +1143,7 @@ sync_channellist(isc_logconfig_t *lcfg) {
static isc_result_t
greatest_version(isc_logchannel_t *channel, int *greatestp) {
/* XXXDCL HIGHLY NT */
char *basename, *digit_end;
char *basenam, *digit_end;
const char *dirname;
int version, greatest = -1;
unsigned int basenamelen;
@ -1160,23 +1160,23 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
* It is safe to DE_CONST the file.name because it was copied
* with isc_mem_strdup in isc_log_createchannel.
*/
basename = strrchr(FILE_NAME(channel), sep);
basenam = strrchr(FILE_NAME(channel), sep);
#ifdef _WIN32
basename2 = strrchr(FILE_NAME(channel), '\\');
if ((basename != NULL && basename2 != NULL && basename2 > basename) ||
(basename == NULL && basename2 != NULL)) {
basename = basename2;
if ((basenam != NULL && basename2 != NULL && basename2 > basenam) ||
(basenam == NULL && basename2 != NULL)) {
basenam = basename2;
sep = '\\';
}
#endif
if (basename != NULL) {
*basename++ = '\0';
if (basenam != NULL) {
*basenam++ = '\0';
dirname = FILE_NAME(channel);
} else {
DE_CONST(FILE_NAME(channel), basename);
DE_CONST(FILE_NAME(channel), basenam);
dirname = ".";
}
basenamelen = strlen(basename);
basenamelen = strlen(basenam);
isc_dir_init(&dir);
result = isc_dir_open(&dir, dirname);
@ -1184,8 +1184,8 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
/*
* Replace the file separator if it was taken out.
*/
if (basename != FILE_NAME(channel))
*(basename - 1) = sep;
if (basenam != FILE_NAME(channel))
*(basenam - 1) = sep;
/*
* Return if the directory open failed.
@ -1195,7 +1195,7 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
while (isc_dir_read(&dir) == ISC_R_SUCCESS) {
if (dir.entry.length > basenamelen &&
strncmp(dir.entry.name, basename, basenamelen) == 0 &&
strncmp(dir.entry.name, basenam, basenamelen) == 0 &&
dir.entry.name[basenamelen] == '.') {
version = strtol(&dir.entry.name[basenamelen + 1],

View File

@ -172,7 +172,7 @@ const char *
isc_result_totext(isc_result_t result) {
resulttable *table;
const char *txt, *default_text;
int index;
int idx;
initialize();
@ -183,15 +183,15 @@ isc_result_totext(isc_result_t result) {
table != NULL;
table = ISC_LIST_NEXT(table, link)) {
if (result >= table->base && result <= table->last) {
index = (int)(result - table->base);
default_text = table->text[index];
idx = (int)(result - table->base);
default_text = table->text[idx];
/*
* Note: we use 'index + 1' as the message number
* instead of index because isc_msgcat_get() requires
* Note: we use 'idx + 1' as the message number
* instead of idx because isc_msgcat_get() requires
* the message number to be > 0.
*/
txt = isc_msgcat_get(table->msgcat, table->set,
index + 1, default_text);
idx + 1, default_text);
break;
}
}

View File

@ -508,7 +508,7 @@ isc_file_safecreate(const char *filename, FILE **fp) {
}
isc_result_t
isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirnam, char **basenam)
{
char *dir, *file, *slash;
@ -537,8 +537,8 @@ isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
return (ISC_R_INVALIDFILE);
}
*dirname = dir;
*basename = file;
*dirnam = dir;
*basenam = file;
return (ISC_R_SUCCESS);
}

View File

@ -212,6 +212,9 @@ internal_current(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.broadcast, ifa->ifa_broadaddr,
ifa->ifa_name);
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
iter->current.ifindex = if_nametoindex(iter->current.name);
#endif
return (ISC_R_SUCCESS);
}

View File

@ -109,6 +109,10 @@ struct isc_interfaceiter {
#endif
#endif
/* Silence a warning when this file is #included */
int
isc_ioctl(int fildes, int req, char *arg);
int
isc_ioctl(int fildes, int req, char *arg) {
int trys;
@ -588,6 +592,9 @@ internal_current4(isc_interfaceiter_t *iter) {
}
iter->current.netmask.type.in6.s6_addr[i] = (~0 << bits) & 0xff;
}
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
iter->current.ifindex = if_nametoindex(iter->current.name);
#endif
return (ISC_R_SUCCESS);
inet:
@ -664,6 +671,9 @@ internal_current4(isc_interfaceiter_t *iter) {
}
get_addr(family, &iter->current.netmask,
(struct sockaddr *)&ifreq.ifr_addr, ifreq.ifr_name);
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
iter->current.ifindex = if_nametoindex(iter->current.name);
#endif
return (ISC_R_SUCCESS);
}
@ -704,7 +714,6 @@ internal_current6(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.address,
(struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
iter->current.ifindex = lifreq.lifr_index;
if (isc_netaddr_islinklocal(&iter->current.address))
isc_netaddr_setzone(&iter->current.address,
(isc_uint32_t)lifreq.lifr_index);
@ -844,7 +853,9 @@ internal_current6(isc_interfaceiter_t *iter) {
iter->current.netmask.type.in6.s6_addr[i / 8] =
(~0 << bits) & 0xff;
}
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
iter->current.ifindex = if_nametoindex(iter->current.name);
#endif
return (ISC_R_SUCCESS);
}
#endif
@ -867,6 +878,9 @@ internal_current6(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.netmask,
(struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
iter->current.ifindex = if_nametoindex(iter->current.name);
#endif
return (ISC_R_SUCCESS);
}
#endif

View File

@ -106,7 +106,8 @@ const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
# endif
# if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
# if defined(ISC_PLATFORM_HAVEIPV6) && \
defined(WANT_IPV6) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
# endif
#endif /* ISC_PLATFORM_HAVEIPV6 */

View File

@ -41,8 +41,7 @@ subdir = libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -71,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -444,6 +445,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -29,7 +29,7 @@ ntpcal_set_timefunc(
)
{
systime_func_ptr res;
res = systime_func;
if (NULL == nfunc)
nfunc = &time;
@ -118,7 +118,7 @@ vint64_to_time(
#endif
return res;
}
}
/*
*---------------------------------------------------------------------
@ -170,7 +170,7 @@ ntpcal_get_build_date(
#ifdef DEBUG
static int ignore = 0;
#endif
ZERO(*jd);
jd->year = 1970;
jd->month = 1;
@ -255,7 +255,7 @@ static const uint16_t real_month_table[2][13] = {
* in the proleptic Gregorian calendar. The begin of the Christian Era
* (0001-01-01) is RD(1).
*
*
*
* Some notes on the implementation:
*
* Calendar algorithms thrive on the division operation, which is one of
@ -351,7 +351,7 @@ ntpcal_periodic_extend(
char cpl = 0; /* modulo complement flag */
char neg = 0; /* sign change flag */
/* make the cycle positive and adjust the flags */
/* make the cycle positive and adjust the flags */
if (cycle < 0) {
cycle = - cycle;
neg ^= 1;
@ -407,21 +407,21 @@ ntpcal_ntp_to_time(
#ifdef HAVE_INT64
res.q_s = (pivot != NULL)
res.q_s = (pivot != NULL)
? *pivot
: now();
: now();
res.Q_s -= 0x80000000; /* unshift of half range */
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
ntp -= res.D_s.lo; /* cycle difference */
res.Q_s += (uint64_t)ntp; /* get expanded time */
#else /* no 64bit scalars */
time_t tmp;
tmp = (pivot != NULL)
tmp = (pivot != NULL)
? *pivot
: now();
: now();
res = time_to_vint64(&tmp);
M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000);
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
@ -465,9 +465,9 @@ ntpcal_ntp_to_ntp(
res.Q_s += (uint64_t)ntp; /* get expanded time */
#else /* no 64bit scalars */
time_t tmp;
tmp = (pivot)
? *pivot
: now();
@ -492,7 +492,7 @@ ntpcal_ntp_to_ntp(
*/
/*
*-------------------------------------------------------------------
*-------------------------------------------------------------------
* Split a 64bit seconds value into elapsed days in 'res.hi' and
* elapsed seconds since midnight in 'res.lo' using explicit floor
* division. This function happily accepts negative time values as
@ -532,7 +532,7 @@ ntpcal_daysplit(
isneg = M_ISNEG(op.D_s.hi);
if (isneg)
M_NEG(op.D_s.hi, op.D_s.lo);
/* save remainder of DIV 128, shift for divide */
r = op.D_s.lo & 127; /* save remainder bits */
op.D_s.lo = (op.D_s.lo >> 7) | (op.D_s.hi << 25);
@ -572,16 +572,16 @@ ntpcal_daysplit(
} else
q = ~q + 1;
}
res.hi = q;
res.lo = r;
#endif
#endif
return res;
}
/*
*-------------------------------------------------------------------
*-------------------------------------------------------------------
* Split a 32bit seconds value into h/m/s and excessive days. This
* function happily accepts negative time values as timestamps before
* midnight.
@ -632,7 +632,7 @@ ntpcal_split_eradays(
{
ntpcal_split res;
int32_t n400, n100, n004, n001, yday; /* calendar year cycles */
/*
* Split off calendar cycles, using floor division in the first
* step. After that first step, simple division does it because
@ -652,7 +652,7 @@ ntpcal_split_eradays(
yday = yday % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
n001 = yday / DAYSPERYEAR;
yday = yday % DAYSPERYEAR;
/*
* check for leap cycle overflows and calculate the leap flag
* if needed
@ -665,11 +665,11 @@ ntpcal_split_eradays(
*isleapyear = 1;
} else if (isleapyear)
*isleapyear = (n001 == 3) && ((n004 != 24) || (n100 == 3));
/* now merge the cycles to elapsed years, using horner scheme */
res.hi = ((4*n400 + n100)*25 + n004)*4 + n001;
res.lo = yday;
return res;
}
@ -724,7 +724,13 @@ ntpcal_rd_to_date(
leaps = 0;
retv = 0;
/* get day-of-week first */
/* Get day-of-week first. Since rd is signed, the remainder can
* be in the range [-6..+6], but the assignment to an unsigned
* variable maps the negative values to positive values >=7.
* This makes the sign correction look strange, but adding 7
* causes the needed wrap-around into the desired value range of
* zero to six, both inclusive.
*/
jd->weekday = rd % 7;
if (jd->weekday >= 7) /* unsigned! */
jd->weekday += 7;
@ -794,7 +800,7 @@ ntpcal_daysec_to_date(
{
int32_t days;
int ts[3];
days = priv_timesplit(ts, sec);
jd->hour = (uint8_t)ts[0];
jd->minute = (uint8_t)ts[1];
@ -817,7 +823,7 @@ ntpcal_daysec_to_tm(
{
int32_t days;
int32_t ts[3];
days = priv_timesplit(ts, sec);
utm->tm_hour = ts[0];
utm->tm_min = ts[1];
@ -946,7 +952,7 @@ ntpcal_dayjoin(
/* fix sign */
if (isneg)
M_NEG(res.D_s.hi, res.D_s.lo);
/* properly add seconds */
p2 = 0;
if (secs < 0) {
@ -957,7 +963,7 @@ ntpcal_dayjoin(
}
M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
#endif
#endif
return res;
}
@ -1279,7 +1285,7 @@ ntpcal_ntp64_to_date(
)
{
ntpcal_split ds;
ds = ntpcal_daysplit(ntp);
ds.hi += ntpcal_daysec_to_date(jd, ds.lo);
@ -1294,7 +1300,7 @@ ntpcal_ntp_to_date(
)
{
vint64 ntp64;
/*
* Unfold ntp time around current time into NTP domain. Split
* into days and seconds, shift days into CE domain and
@ -1516,12 +1522,12 @@ isocal_split_eraweeks(
res.lo += (res.lo >= 10435);
cents = res.lo / 5218;
res.lo %= 5218; /* res.lo is weeks in century now */
/* convert elapsed weeks in century to elapsed years and weeks */
res.lo = res.lo * 157 + bctab[cents];
res.hi += cents * 100 + res.lo / 8192;
res.lo = (res.lo % 8192) / 157;
res.lo = (res.lo % 8192) / 157;
return res;
}
@ -1538,7 +1544,7 @@ isocal_ntp64_to_date(
{
ntpcal_split ds;
int32_t ts[3];
/*
* Split NTP time into days and seconds, shift days into CE
* domain and process the parts.
@ -1576,7 +1582,7 @@ isocal_ntp_to_date(
)
{
vint64 ntp64;
/*
* Unfold ntp time around current time into NTP domain, then
* convert the full time stamp.

View File

@ -382,7 +382,7 @@ fork_blocking_child(
int rc;
int was_pipe;
int is_pipe;
int saved_errno;
int saved_errno = 0;
int childpid;
int keep_fd;
int fd;

View File

@ -43,8 +43,7 @@ subdir = libparse
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -73,6 +72,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -352,6 +353,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -7,15 +7,15 @@
* /src/NTP/ntp4-dev/libparse/clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
*
* Supports Diem's Computime Radio Clock
*
*
* Used the Meinberg clock as a template for Diem's Computime Radio Clock
*
* adapted by Alois Camenzind <alois.camenzind@ubs.ch>
*
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -59,22 +59,22 @@ extern int printf (const char *, ...);
/*
* The Computime receiver sends a datagram in the following format every minute
*
* Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
*
* Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
* Pos 0123456789012345678901 2 3
* 0000000000111111111122 2 2
* Parse T: : : : : : : rn
*
* T Startcharacter "T" specifies start of the timestamp
* YY Year MM Month 1-12
* MD Day of the month
* WD Day of week
* HH Hour
* MM Minute
*
* T Startcharacter "T" specifies start of the timestamp
* YY Year MM Month 1-12
* MD Day of the month
* WD Day of week
* HH Hour
* MM Minute
* SS Second
* CR Carriage return
* CR Carriage return
* LF Linefeed
*
*
*/
static struct format computime_fmt =
@ -88,10 +88,10 @@ static struct format computime_fmt =
0
};
static u_long cvt_computime (unsigned char *, int, struct format *, clocktime_t *, void *);
static unsigned long inp_computime (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_computime;
static parse_inp_fnc_t inp_computime;
clockformat_t clock_computime =
clockformat_t clock_computime =
{
inp_computime, /* Computime input handling */
cvt_computime, /* Computime conversion */
@ -99,15 +99,15 @@ clockformat_t clock_computime =
(void *)&computime_fmt, /* conversion configuration */
"Diem's Computime Radio Clock", /* Computime Radio Clock */
24, /* string buffer */
0 /* no private data (complete pakets) */
0 /* no private data (complete packets) */
};
/*
* cvt_computime
*
* parse_cvt_fnc_t cvt_computime
*
* convert simple type format
*/
static u_long
static u_long
cvt_computime(
unsigned char *buffer,
int size,
@ -117,7 +117,7 @@ cvt_computime(
)
{
if (!Strok(buffer, format->fixed_string)) {
if (!Strok(buffer, format->fixed_string)) {
return CVT_NONE;
} else {
if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
@ -131,7 +131,7 @@ cvt_computime(
Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
format->field_offsets[O_MIN].length) ||
Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
format->field_offsets[O_SEC].length)) {
format->field_offsets[O_SEC].length)) {
return CVT_FAIL | CVT_BADFMT;
} else {
@ -144,31 +144,31 @@ cvt_computime(
}
/*
* inp_computime
* parse_inp_fnc_t inp_computime
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_computime(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("inp_computime(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
case 'T':
parseprintf(DD_PARSE, ("inp_computime: START seen\n"));
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
case '\n':
parseprintf(DD_PARSE, ("inp_computime: END seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)

View File

@ -1,12 +1,12 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
*
* clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* ELV DCF7000 module
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -63,9 +63,10 @@ static struct format dcf7000_fmt =
},
(const unsigned char *)" - - - - - - - \r",
0
};
static u_long cvt_dcf7000 (unsigned char *, int, struct format *, clocktime_t *, void *);
static unsigned long inp_dcf7000 (parse_t *, unsigned int, timestamp_t *);
};
static parse_cvt_fnc_t cvt_dcf7000;
static parse_inp_fnc_t inp_dcf7000;
clockformat_t clock_dcf7000 =
{
@ -75,11 +76,11 @@ clockformat_t clock_dcf7000 =
(void *)&dcf7000_fmt, /* conversion configuration */
"ELV DCF7000", /* ELV clock */
24, /* string buffer */
0 /* no private data (complete pakets) */
0 /* no private data (complete packets) */
};
/*
* cvt_dcf7000
* parse_cvt_fnc_t cvt_dcf7000
*
* convert dcf7000 type format
*/
@ -117,7 +118,7 @@ cvt_dcf7000(
{
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
long flags;
clock_time->flags = 0;
clock_time->usecond = 0;
@ -144,21 +145,21 @@ cvt_dcf7000(
}
/*
* inp_dcf700
* parse_inp_fnc_t inp_dcf700
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_dcf7000(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
case '\r':

View File

@ -37,10 +37,10 @@
extern int printf (const char *, ...);
#endif
/*
* hopf Funkuhr 6021
/*
* hopf Funkuhr 6021
* used with 9600,8N1,
* UTC ueber serielle Schnittstelle
* UTC ueber serielle Schnittstelle
* Sekundenvorlauf ON
* ETX zum Sekundenvorlauf ON
* Datenstring 6021
@ -71,7 +71,7 @@ extern int printf (const char *, ...);
* x x 0 x - Wintertime
* x x 1 x - Summertime
* 0 0 x x - Time/Date invalid
* 0 1 x x - Internal clock used
* 0 1 x x - Internal clock used
* 1 0 x x - Radio clock
* 1 1 x x - Radio clock highprecision
*
@ -90,10 +90,10 @@ extern int printf (const char *, ...);
#define HOPF_DSTWARN 0x01 /* DST switch warning */
#define HOPF_DST 0x02 /* DST in effect */
#define HOPF_MODE 0x0C /* operation mode mask */
#define HOPF_MODE 0x0C /* operation mode mask */
#define HOPF_INVALID 0x00 /* no time code available */
#define HOPF_INTERNAL 0x04 /* internal clock */
#define HOPF_RADIO 0x08 /* radio clock */
#define HOPF_RADIO 0x08 /* radio clock */
#define HOPF_RADIOHP 0x0C /* high precision radio clock */
#define HOPF_UTC 0x08 /* time code in UTC */
@ -102,13 +102,13 @@ extern int printf (const char *, ...);
static struct format hopf6021_fmt =
{
{
{ 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
{ 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
{ 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
{ 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
{ 2, 1 }, { 1, 1}, { 0, 0}, /* Weekday, Flags, Zone */
/* ... */
},
(const unsigned char *)"\002 \n\r\003",
0
0
};
#define OFFS(x) format->field_offsets[(x)].offset
@ -118,8 +118,8 @@ static struct format hopf6021_fmt =
('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
-1)
static unsigned long cvt_hopf6021 (unsigned char *, int, struct format *, clocktime_t *, void *);
static unsigned long inp_hopf6021 (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_hopf6021;
static parse_inp_fnc_t inp_hopf6021;
clockformat_t clock_hopf6021 =
{
@ -132,7 +132,8 @@ clockformat_t clock_hopf6021 =
0 /* private data length, no private data */
};
static unsigned long
/* parse_cvt_fnc_t cvt_hopf6021 */
static u_long
cvt_hopf6021(
unsigned char *buffer,
int size,
@ -162,8 +163,8 @@ cvt_hopf6021(
clock_time->usecond = 0;
clock_time->utcoffset = 0;
status = hexval(buffer[OFFS(O_FLAGS)]);
weekday= hexval(buffer[OFFS(O_WDAY)]);
status = (u_char) hexval(buffer[OFFS(O_FLAGS)]);
weekday= (u_char) hexval(buffer[OFFS(O_WDAY)]);
if ((status == 0xFF) || (weekday == 0xFF))
{
@ -213,21 +214,21 @@ cvt_hopf6021(
}
/*
* inp_hopf6021
* parse_inp_fnc_t inp_hopf6021
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_hopf6021(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
case ETX:

View File

@ -1,12 +1,12 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A
*
*
* clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A
*
* Meinberg clock support
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -65,7 +65,7 @@
/*
* The Meinberg receiver every second sends a datagram of the following form
* (Standard Format)
*
*
* <STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
* pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
* 1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
@ -105,12 +105,14 @@
* <A> = '!' during the hour preceeding an daylight saving time
* start/end change
* <L> = 'A' LEAP second announcement
* <R> = 'R' alternate antenna
* <R> = 'R' "call bit" used to signalize irregularities in the control facilities,
* usually ' ', until 2003 indicated transmission via alternate antenna
*
* Meinberg GPS166 receiver
* Meinberg GPS receivers
*
* You must get the Uni-Erlangen firmware for the GPS receiver support
* For very old devices you must get the Uni-Erlangen firmware for the GPS receiver support
* to work to full satisfaction !
* With newer GPS receiver types the Uni Erlangen string format can be configured at the device.
*
* <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <+/-><00:00>; <U><S><F><D><A><L><R><L>; <position...><ETX>
*
@ -118,7 +120,7 @@
* 123456789012345678901234567890123456789012345678901234567890123456
* \x0209.07.93; 5; 08:48:26; +00:00; #*S!A L; 49.5736N 11.0280E 373m\x03
*
*
*
* <STX> = '\002' ASCII start of text
* <ETX> = '\003' ASCII end of text
* <dd>,<mm>,<yy> = day, month, year(2 digits!!)
@ -131,8 +133,10 @@
* <A> = '!' during the hour preceeding an daylight saving time
* start/end change
* <L> = 'A' LEAP second announcement
* <R> = 'R' alternate antenna (reminiscent of PZF535) usually ' '
* <L> = 'L' on 23:59:60
* <R> = 'R' "call bit" used to signalize irregularities in the control facilities,
* usually ' ', until 2003 indicated transmission via alternate antenna
* (reminiscent of PZF receivers)
* <L> = 'L' on 23:59:60
*
* Binary messages have a lead in for a fixed header of SOH
*/
@ -150,19 +154,20 @@
/* Ret val: the checksum */
/*+-------------------------------------------------------------*/
unsigned long
CSUM
mbg_csum(
unsigned char *p,
unsigned int n
)
{
unsigned long sum = 0;
unsigned int sum = 0;
unsigned int i;
for ( i = 0; i < n; i++ )
sum += *p++;
return( sum );
return (CSUM) sum;
} /* csum */
void
@ -171,10 +176,10 @@ get_mbg_header(
GPS_MSG_HDR *headerp
)
{
headerp->gps_cmd = get_lsb_short(bufpp);
headerp->gps_len = get_lsb_short(bufpp);
headerp->gps_data_csum = get_lsb_short(bufpp);
headerp->gps_hdr_csum = get_lsb_short(bufpp);
headerp->cmd = (GPS_CMD) get_lsb_short(bufpp);
headerp->len = get_lsb_uint16(bufpp);
headerp->data_csum = (CSUM) get_lsb_short(bufpp);
headerp->hdr_csum = (CSUM) get_lsb_short(bufpp);
}
static struct format meinberg_fmt[] =
@ -209,10 +214,10 @@ static struct format meinberg_fmt[] =
}
};
static u_long cvt_meinberg (unsigned char *, int, struct format *, clocktime_t *, void *);
static u_long cvt_mgps (unsigned char *, int, struct format *, clocktime_t *, void *);
static u_long mbg_input (parse_t *, unsigned int, timestamp_t *);
static u_long gps_input (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_meinberg;
static parse_cvt_fnc_t cvt_mgps;
static parse_inp_fnc_t mbg_input;
static parse_inp_fnc_t gps_input;
struct msg_buf
{
@ -224,7 +229,7 @@ struct msg_buf
#define MBG_HEADER 1 /* receiving header */
#define MBG_DATA 2 /* receiving data */
#define MBG_STRING 3 /* receiving standard data message */
clockformat_t clock_meinberg[] =
{
{
@ -234,7 +239,7 @@ clockformat_t clock_meinberg[] =
0, /* conversion configuration */
"Meinberg Standard", /* Meinberg simple format - beware */
32, /* string buffer */
0 /* no private data (complete pakets) */
0 /* no private data (complete packets) */
},
{
mbg_input, /* normal input handling */
@ -243,21 +248,21 @@ clockformat_t clock_meinberg[] =
0, /* conversion configuration */
"Meinberg Extended", /* Meinberg enhanced format */
32, /* string buffer */
0 /* no private data (complete pakets) */
0 /* no private data (complete packets) */
},
{
gps_input, /* no input handling */
cvt_mgps, /* Meinberg GPS166 conversion */
cvt_mgps, /* Meinberg GPS receiver conversion */
pps_one, /* easy PPS monitoring */
(void *)&meinberg_fmt[2], /* conversion configuration */
"Meinberg GPS Extended", /* Meinberg FAU GPS format */
"Meinberg GPS Extended", /* Meinberg FAU GPS format */
512, /* string buffer */
sizeof(struct msg_buf) /* no private data (complete pakets) */
sizeof(struct msg_buf) /* no private data (complete packets) */
}
};
/*
* cvt_meinberg
* parse_cvt_fnc_t cvt_meinberg
*
* convert simple type format
*/
@ -271,7 +276,7 @@ cvt_meinberg(
)
{
struct format *format;
/*
* select automagically correct data format
*/
@ -312,7 +317,7 @@ cvt_meinberg(
else
{
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
clock_time->usecond = 0;
clock_time->flags = PARSEB_S_LEAP;
@ -348,7 +353,7 @@ cvt_meinberg(
case ' ':
clock_time->utcoffset = -1*60*60; /* MET */
break;
case 'S':
clock_time->utcoffset = -2*60*60; /* MED */
break;
@ -360,27 +365,27 @@ cvt_meinberg(
clock_time->utcoffset = 0; /* UTC */
clock_time->flags |= PARSEB_UTC;
break;
default:
return CVT_FAIL|CVT_BADFMT;
}
}
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock_time->flags |= PARSEB_DST;
if (f[0] == '#')
clock_time->flags |= PARSEB_POWERUP;
if (f[1] == '*')
clock_time->flags |= PARSEB_NOSYNC;
if (f[3] == '!')
clock_time->flags |= PARSEB_ANNOUNCE;
/*
* oncoming leap second
* 'a' code not confirmed - earth is not
@ -388,27 +393,27 @@ cvt_meinberg(
*/
if (f[3] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
if (f[3] == 'a')
clock_time->flags |= PARSEB_LEAPDEL;
if (format->flags & MBG_EXTENDED)
{
clock_time->flags |= PARSEB_S_ANTENNA;
/*
* DCF77 does not encode the direction -
* so we take the current default -
* earth slowing down
*/
clock_time->flags &= ~PARSEB_LEAPDEL;
if (f[4] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
if (f[5] == 'R')
clock_time->flags |= PARSEB_ALTERNATE;
clock_time->flags |= PARSEB_CALLBIT;
}
return CVT_OK;
}
@ -416,31 +421,31 @@ cvt_meinberg(
/*
* mbg_input
* parse_inp_fnc_t mbg_input
*
* grep data from input stream
* grab data from input stream
*/
static u_long
mbg_input(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
case STX:
parseprintf(DD_PARSE, ("mbg_input: STX seen\n"));
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
case ETX:
parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
@ -455,7 +460,7 @@ mbg_input(
/*
* cvt_mgps
* parse_cvt_fnc_t cvt_mgps
*
* convert Meinberg GPS format
*/
@ -493,9 +498,9 @@ cvt_mgps(
{
long h;
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
clock_time->flags = PARSEB_S_LEAP|PARSEB_S_POSITION;
clock_time->usecond = 0;
/*
@ -522,22 +527,22 @@ cvt_mgps(
clock_time->utcoffset = -clock_time->utcoffset;
}
}
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock_time->flags |= PARSEB_DST;
if (clock_time->utcoffset == 0)
clock_time->flags |= PARSEB_UTC;
/*
* no sv's seen - no time & position
*/
if (f[0] == '#')
clock_time->flags |= PARSEB_POWERUP;
/*
* at least one sv seen - time (for last position)
*/
@ -546,13 +551,13 @@ cvt_mgps(
else
if (!(clock_time->flags & PARSEB_POWERUP))
clock_time->flags |= PARSEB_POSITION;
/*
* oncoming zone switch
*/
if (f[3] == '!')
clock_time->flags |= PARSEB_ANNOUNCE;
/*
* oncoming leap second
* 'a' code not confirmed - earth is not
@ -560,14 +565,14 @@ cvt_mgps(
*/
if (f[4] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
if (f[4] == 'a')
clock_time->flags |= PARSEB_LEAPDEL;
/*
* f[5] == ' '
*/
/*
* this is the leap second
*/
@ -580,35 +585,35 @@ cvt_mgps(
}
/*
* gps_input
* parse_inp_fnc_t gps_input
*
* grep binary data from input stream
*/
static u_long
gps_input(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
CSUM calc_csum; /* used to compare the incoming csums */
GPS_MSG_HDR header;
struct msg_buf *msg_buf;
msg_buf = (struct msg_buf *)parseio->parse_pdata;
parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
if (!msg_buf)
return PARSE_INP_SKIP;
if ( msg_buf->phase == MBG_NONE )
{ /* not receiving yet */
switch (ch)
{
case SOH:
parseprintf(DD_PARSE, ("gps_input: SOH seen\n"));
msg_buf->len = sizeof( header ); /* prepare to receive msg header */
msg_buf->phase = MBG_HEADER; /* receiving header */
break;
@ -621,7 +626,7 @@ gps_input(
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
break;
default:
return PARSE_INP_SKIP; /* keep searching */
}
@ -638,7 +643,7 @@ gps_input(
if ((msg_buf->phase == MBG_STRING) &&
(parseio->parse_index < parseio->parse_dsize))
parseio->parse_data[parseio->parse_index++] = ch;
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
if (parseio->parse_dtime.parse_msglen > sizeof(parseio->parse_dtime.parse_msg))
@ -649,7 +654,7 @@ gps_input(
parseio->parse_ldsize = parseio->parse_index;
return PARSE_INP_DATA;
}
switch (msg_buf->phase)
{
case MBG_HEADER:
@ -685,41 +690,41 @@ gps_input(
if ( msg_buf->phase == MBG_HEADER )
{ /* header complete now */
unsigned char *datap = parseio->parse_dtime.parse_msg + 1;
get_mbg_header(&datap, &header);
parseprintf(DD_PARSE, ("gps_input: header: cmd 0x%x, len %d, dcsum 0x%x, hcsum 0x%x\n",
(int)header.gps_cmd, (int)header.gps_len, (int)header.gps_data_csum,
(int)header.gps_hdr_csum));
(int)header.cmd, (int)header.len, (int)header.data_csum,
(int)header.hdr_csum));
calc_csum = mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg + 1, (unsigned short)6 );
if ( calc_csum != header.gps_hdr_csum )
if ( calc_csum != header.hdr_csum )
{
parseprintf(DD_PARSE, ("gps_input: header checksum mismatch expected 0x%x, got 0x%x\n",
(int)calc_csum, (int)mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg, (unsigned short)6 )));
msg_buf->phase = MBG_NONE; /* back to hunting mode */
return PARSE_INP_DATA; /* invalid header checksum received - pass up for detection */
}
if ((header.gps_len == 0) || /* no data to wait for */
(header.gps_len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
if ((header.len == 0) || /* no data to wait for */
(header.len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
{
msg_buf->phase = MBG_NONE; /* back to hunting mode */
return (header.gps_len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
return (header.len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
}
parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.gps_len));
msg_buf->len = header.gps_len;/* save number of bytes to wait for */
parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.len));
msg_buf->len = header.len;/* save number of bytes to wait for */
msg_buf->phase = MBG_DATA; /* flag header already complete */
return PARSE_INP_SKIP;
}
parseprintf(DD_PARSE, ("gps_input: message data complete\n"));
/* Header and data have been received. The header checksum has been */
/* checked */

View File

@ -1,12 +1,12 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A
*
*
* clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A
*
* Raw DCF77 pulse clock support
*
* Copyright (c) 1995-2006 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -75,7 +75,8 @@
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
* 15 R - alternate antenna
* 15 R - "call bit" used to signalize irregularities in the control facilities
* (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@ -101,9 +102,9 @@
* 59 - usually missing (minute indication), except for leap insertion
*/
static u_long pps_rawdcf (parse_t *, int, timestamp_t *);
static u_long cvt_rawdcf (unsigned char *, int, struct format *, clocktime_t *, void *);
static u_long inp_rawdcf (parse_t *, unsigned int, timestamp_t *);
static parse_pps_fnc_t pps_rawdcf;
static parse_cvt_fnc_t cvt_rawdcf;
static parse_inp_fnc_t inp_rawdcf;
typedef struct last_tcode {
time_t tcode; /* last converted time code */
@ -127,13 +128,13 @@ static struct dcfparam
{
const unsigned char *onebits;
const unsigned char *zerobits;
} dcfparameter =
} dcfparameter =
{
(const unsigned char *)"###############RADMLS1248124P124812P1248121241248112481248P??", /* 'ONE' representation */
(const unsigned char *)"--------------------s-------p------p----------------------p__" /* 'ZERO' representation */
};
static struct rawdcfcode
static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@ -189,7 +190,7 @@ ext_bf(
int i, first;
first = rawdcfcode[idx].offset;
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@ -238,7 +239,7 @@ convert_rawdcf(
#endif
return CVT_NONE;
}
for (i = 0; i < size; i++)
{
if ((*s != *b) && (*s != *c))
@ -307,7 +308,7 @@ convert_rawdcf(
clock_time->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
if (ext_bf(buffer, DCF_R, dcfprm->zerobits))
clock_time->flags |= PARSEB_ALTERNATE;
clock_time->flags |= PARSEB_CALLBIT;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: TIME CODE OK: %d:%d, %d.%d.%d, flags 0x%lx\n",
(int)clock_time->hour, (int)clock_time->minute, (int)clock_time->day, (int)clock_time->month,(int) clock_time->year,
@ -327,6 +328,7 @@ convert_rawdcf(
}
/*
* parse_cvt_fnc_t cvt_rawdcf
* raw dcf input routine - needs to fix up 50 baud
* characters for 1/0 decision
*/
@ -379,7 +381,7 @@ cvt_rawdcf(
ch >>= 1;
}
*s = i;
*s = (unsigned char) i;
histbuf[i]++;
cutoff += i;
lowmax++;
@ -504,12 +506,12 @@ cvt_rawdcf(
}
}
}
return rtc;
}
/*
* pps_rawdcf
* parse_pps_fnc_t pps_rawdcf
*
* currently a very stupid version - should be extended to decode
* also ones and zeros (which is easy)
@ -546,30 +548,30 @@ snt_rawdcf(
#else
parseio->parse_dtime.parse_time.fp.l_ui++;
#endif
parseprintf(DD_RAWDCF,("parse: snt_rawdcf: time stamp synthesized offset %d seconds\n", parseio->parse_index - 1));
return updatetimeinfo(parseio, parseio->parse_lstate);
}
return CVT_NONE;
}
/*
* inp_rawdcf
* parse_inp_fnc_t inp_rawdcf
*
* grab DCF77 data from input stream
*/
static u_long
inp_rawdcf(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
static struct timeval timeout = { 1, 500000 }; /* 1.5 secongs denote second #60 */
parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
if (parse_timedout(parseio, tstamp, &timeout))
@ -583,7 +585,7 @@ inp_rawdcf(
else
{
unsigned int rtc;
rtc = parse_addchar(parseio, ch);
if (rtc == PARSE_INP_SKIP)
{

View File

@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A
*
*
* clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A
*
* Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
@ -49,16 +49,16 @@ extern int printf (const char *, ...);
#define O_USEC O_WDAY
static struct format rcc8000_fmt =
{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
{ 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
{ 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
{ 9, 3 }, {28, 1}, { 0, 0}, /* uSec, Status (Valid,Reject,BST,Leapyear) */ },
(const unsigned char *)" : : . / / \r\n",
(const unsigned char *)" : : . / / \r\n",
/*"15:50:36.534 30/09/94 273 5 A\x0d\x0a" */
0
0
};
static unsigned long cvt_rcc8000 (unsigned char *, int, struct format *, clocktime_t *, void *);
static unsigned long inp_rcc8000 (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_rcc8000;
static parse_inp_fnc_t inp_rcc8000;
clockformat_t clock_rcc8000 =
{
@ -71,7 +71,8 @@ clockformat_t clock_rcc8000 =
0 /* no private data */
};
static unsigned long
/* parse_cvt_fnc_t cvt_rcc8000 */
static u_long
cvt_rcc8000(
unsigned char *buffer,
int size,
@ -121,27 +122,27 @@ cvt_rcc8000(
clock_time->flags |= PARSEB_POWERUP;
clock_time->flags |= PARSEB_UTC; /* British special - guess why 8-) */
/* other flags not used */
}
return CVT_OK;
}
/*
* inp_rcc8000
* parse_inp_fnc_t inp_rcc8000
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_rcc8000(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
case '\n':
@ -150,7 +151,7 @@ inp_rcc8000(
return parse_end(parseio);
else
return rtc;
default:
if (parseio->parse_index == 0) /* take sample at start of message */

View File

@ -1,13 +1,13 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
*
* clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Schmid clock support
* based on information and testing from Adam W. Feigin et. al (Swisstime iis.ethz.ch)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -61,7 +61,7 @@ extern int printf (const char *, ...);
* The command to Schmid's DCF77 clock is a single byte; each bit
* allows the user to select some part of the time string, as follows (the
* output for the lsb is sent first).
*
*
* Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
* Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
* Bit 2: week day, 1 byte (unused here)
@ -82,15 +82,15 @@ extern int printf (const char *, ...);
#define WS_TIME 0x01
#define WS_SIGNAL 0x02
#define WS_ALTERNATE 0x01
#define WS_CALLBIT 0x01 /* "call bit" used to signalize irregularities in the control facilities */
#define WS_ANNOUNCE 0x02
#define WS_TZ 0x0c
#define WS_MET 0x08
#define WS_MEST 0x04
#define WS_LEAP 0x10
static u_long cvt_schmid (unsigned char *, int, struct format *, clocktime_t *, void *);
static unsigned long inp_schmid (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_schmid;
static parse_inp_fnc_t inp_schmid;
clockformat_t clock_schmid =
{
@ -103,7 +103,7 @@ clockformat_t clock_schmid =
0, /* no private data (complete messages) */
};
/* parse_cvt_fnc_t */
static u_long
cvt_schmid(
unsigned char *buffer,
@ -155,7 +155,7 @@ cvt_schmid(
default:
return CVT_FAIL|CVT_BADFMT;
}
if (!(buffer[7] & WS_TIME))
{
clock_time->flags |= PARSEB_POWERUP;
@ -168,9 +168,9 @@ cvt_schmid(
if (buffer[7] & WS_SIGNAL)
{
if (buffer[8] & WS_ALTERNATE)
if (buffer[8] & WS_CALLBIT)
{
clock_time->flags |= PARSEB_ALTERNATE;
clock_time->flags |= PARSEB_CALLBIT;
}
if (buffer[8] & WS_ANNOUNCE)
@ -185,32 +185,32 @@ cvt_schmid(
}
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_ANTENNA;
return CVT_OK;
}
}
}
/*
* inp_schmid
* parse_inp_fnc_t inp_schmid
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_schmid(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
switch ((uint8_t)ch)
{
case 0xFD: /* */
parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
parseprintf(DD_PARSE, ("inp_schmid: 0xFD seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
return parse_end(parseio);
else

View File

@ -3,7 +3,7 @@
// Schweitzer Engineering Laboratories, Inc. <opensource@selinc.com>
//////////////////////////////////////////////////////////////////////////////
// Need to have _XOPEN_SOURCE defined for time.h to give the
// Need to have _XOPEN_SOURCE defined for time.h to give the
// correct strptime signature. As per feature_test_macros(7),
// define this before including any header files.
@ -51,14 +51,8 @@
// a '?'. But we are only going to call it synced when we receive a ' '
//////////////////////////////////////////////////////////////////////////////
static unsigned long inp_sel240x( parse_t *parseio,
unsigned int ch,
timestamp_t *tstamp);
static unsigned long cvt_sel240x( unsigned char *buffer,
int size,
struct format *format,
clocktime_t *clock_time,
void *local );
static parse_inp_fnc_t inp_sel240x;
static parse_cvt_fnc_t cvt_sel240x;
// Parse clock format structure describing the message above
static struct format sel240x_fmt =
@ -94,7 +88,7 @@ clockformat_t clock_sel240x =
//////////////////////////////////////////////////////////////////////////////
static unsigned long
inp_sel240x( parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
@ -139,7 +133,7 @@ cvt_sel240x( unsigned char *buffer,
{
struct tm ptime;
buffer++;
buffer = (unsigned char *) strptime(
buffer = (unsigned char *) strptime(
(const char *)buffer, "%Y:%j:%H:%M:%S", &ptime );
if( *(buffer+1) != '\x0d' )
{

View File

@ -6,7 +6,7 @@
* Trimble SV6 clock support - several collected codepieces
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -78,8 +78,8 @@ extern int printf (const char *, ...);
0
};
static unsigned long cvt_trimtaip (unsigned char *, int, struct format *, clocktime_t *, void *);
static unsigned long inp_trimtaip (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_trimtaip;
static parse_inp_fnc_t inp_trimtaip;
clockformat_t clock_trimtaip =
{
@ -92,7 +92,8 @@ clockformat_t clock_trimtaip =
0 /* no private data */
};
static unsigned long
/* parse_cvt_fnc_t cvt_trimtaip */
static u_long
cvt_trimtaip(
unsigned char *buffer,
int size,
@ -141,31 +142,31 @@ cvt_trimtaip(
}
/*
* inp_trimtaip
* parse_inp_fnc_t inp_trimtaip
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_trimtaip(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
case '>':
parseprintf(DD_PARSE, ("inp_trimptaip: START seen\n"));
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
case '<':
parseprintf(DD_PARSE, ("inp_trimtaip: END seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)

View File

@ -7,7 +7,7 @@
* Thanks to Sven Dietrich for providing test hardware
*
* Copyright (c) 1995-2009 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -116,7 +116,7 @@ struct trimble
#define STATUS_UNSAFE 1 /* not enough receivers for full precision */
#define STATUS_SYNC 2 /* enough information for good operation */
static unsigned long inp_tsip (parse_t *, unsigned int, timestamp_t *);
static unsigned long inp_tsip (parse_t *, char, timestamp_t *);
static unsigned long cvt_trimtsip (unsigned char *, int, struct format *, clocktime_t *, void *);
struct clockformat clock_trimtsip =
@ -136,7 +136,7 @@ struct clockformat clock_trimtsip =
static unsigned long
inp_tsip(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
@ -183,7 +183,7 @@ inp_tsip(
/* DLE,ETX -> end of packet */
parseio->parse_data[parseio->parse_index++] = DLE;
parseio->parse_data[parseio->parse_index] = ch;
parseio->parse_ldsize = parseio->parse_index+1;
parseio->parse_ldsize = (u_short) (parseio->parse_index + 1);
memcpy(parseio->parse_ldata, parseio->parse_data, parseio->parse_ldsize);
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = DLE;
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
@ -200,13 +200,13 @@ inp_tsip(
return PARSE_INP_SKIP;
}
static int
static short
getshort(
unsigned char *p
)
{
return get_msb_short(&p);
return (short) get_msb_short(&p);
}
/*
@ -245,7 +245,7 @@ cvt_trimtsip(
{
unsigned char *bp;
cmd = buffer[1];
switch(cmd)
{
case CMD_RCURTIME:
@ -258,15 +258,15 @@ cvt_trimtsip(
bp = &mb(0);
if (fetch_ieee754(&bp, IEEE_SINGLE, &secs, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
if ((secs.l_i <= 0) ||
(t->t_utcknown == 0))
{
clock_time->flags = PARSEB_POWERUP;
return CVT_OK;
}
if (week < 990) {
week += 1024;
if (week < GPSWRAP) {
week += GPSWEEKS;
}
/* time OK */
@ -275,7 +275,7 @@ cvt_trimtsip(
bp = &mb(6);
if (fetch_ieee754(&bp, IEEE_SINGLE, &utcoffset, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
L_SUB(&secs, &utcoffset); /* adjust GPS time to UTC time */
gpstolfp((unsigned short)week, (unsigned short)0,
@ -289,10 +289,10 @@ cvt_trimtsip(
if (t->t_leap == ADDSECOND)
clock_time->flags |= PARSEB_LEAPADD;
if (t->t_leap == DELSECOND)
clock_time->flags |= PARSEB_LEAPDEL;
switch (t->t_operable)
{
case STATUS_SYNC:
@ -307,12 +307,12 @@ cvt_trimtsip(
clock_time->flags |= PARSEB_NOSYNC|PARSEB_POWERUP;
break;
}
if (t->t_mode == 0)
clock_time->flags |= PARSEB_POSITION;
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_POSITION;
return CVT_OK;
} /* case 0x41 */
@ -346,26 +346,26 @@ cvt_trimtsip(
{
l_fp t0t;
unsigned char *lbp;
/* UTC correction data - derive a leap warning */
int tls = t->t_gpsutc = getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
int tlsf = t->t_gpsutcleap = getshort((unsigned char *)&mb(24)); /* new leap correction */
int tls = t->t_gpsutc = (u_short) getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
int tlsf = t->t_gpsutcleap = (u_short) getshort((unsigned char *)&mb(24)); /* new leap correction */
t->t_weekleap = getshort((unsigned char *)&mb(20)); /* week no of leap correction */
if (t->t_weekleap < 990)
t->t_weekleap += 1024;
t->t_weekleap = (u_short) getshort((unsigned char *)&mb(20)); /* week no of leap correction */
if (t->t_weekleap < GPSWRAP)
t->t_weekleap = (u_short)(t->t_weekleap + GPSWEEKS);
t->t_dayleap = (u_short) getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
t->t_week = (u_short) getshort((unsigned char *)&mb(18)); /* current week no */
if (t->t_week < GPSWRAP)
t->t_week = (u_short)(t->t_weekleap + GPSWEEKS);
t->t_dayleap = getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
t->t_week = getshort((unsigned char *)&mb(18)); /* current week no */
if (t->t_week < 990)
t->t_week += 1024;
lbp = (unsigned char *)&mb(14); /* last update time */
if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
t->t_utcknown = t0t.l_ui != 0;
if ((t->t_utcknown) && /* got UTC information */
(tlsf != tls) && /* something will change */
((t->t_weekleap - t->t_week) < 5)) /* and close in the future */

View File

@ -9,14 +9,14 @@
* clk_varitext.c,v 1.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Varitext code variant by A.McConnell 1997/01/19
*
*
* Supports Varitext's Radio Clock
*
*
* Used the Meinberg/Computime clock as a template for Varitext Radio Clock
*
* Codebase:
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -67,31 +67,31 @@ static const u_char VT_LAST_TELEGRAM_OK = 0x20;
/*
* The Varitext receiver sends a datagram in the following format every minute
*
* Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
*
* Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
* Pos 0123456789012345678901 2 3 4567
* 0000000000111111111122 2 2 2222
* Parse T: : : : : : : \r\n
*
* T Startcharacter "T" specifies start of the timestamp
* YY Year MM Month 1-12
* MD Day of the month
* WD Day of week
* HH Hour
* MM Minute
* SS Second
* CR Carriage return
* LF Linefeed
* Parse T: : : : : : : \r\n
*
* T Startcharacter "T" specifies start of the timestamp
* YY Year MM Month 1-12
* MD Day of the month
* WD Day of week
* HH Hour
* MM Minute
* SS Second
* CR Carriage return
* LF Linefeed
* ST Status character
* Bit 0 - Set= Initialised; Reset=Time Invalid (DO NOT USE)
* Bit 1 - Set= Synchronised; Reset= Unsynchronised
* Bit 2 - Set= Alarm state; Reset= No alarm
* Bit 3 - Set= BST; Reset= GMT
* Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
* Bit 1 - Set= Synchronised; Reset= Unsynchronised
* Bit 2 - Set= Alarm state; Reset= No alarm
* Bit 3 - Set= BST; Reset= GMT
* Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
* Bit 5 - Set= Last MSF telegram was OK; Reset= Last telegram was in error;
* Bit 6 - Always set
* Bit 6 - Always set
* Bit 7 - Unused
* XXX Checksum calculated using Fletcher's method (ignored for now).
* XXX Checksum calculated using Fletcher's method (ignored for now).
*/
static struct format varitext_fmt =
@ -105,8 +105,8 @@ static struct format varitext_fmt =
0
};
static u_long cvt_varitext (unsigned char *, int, struct format *, clocktime_t *, void *);
static u_long inp_varitext (parse_t *, unsigned int, timestamp_t *);
static parse_cvt_fnc_t cvt_varitext;
static parse_inp_fnc_t inp_varitext;
struct varitext {
unsigned char start_found;
@ -128,11 +128,11 @@ clockformat_t clock_varitext =
};
/*
* cvt_varitext
*
* parse_cvt_fnc_t cvt_varitext
*
* convert simple type format
*/
static u_long
static u_long
cvt_varitext(
unsigned char *buffer,
int size,
@ -142,7 +142,7 @@ cvt_varitext(
)
{
if (!Strok(buffer, format->fixed_string)) {
if (!Strok(buffer, format->fixed_string)) {
return CVT_NONE;
} else {
if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
@ -156,7 +156,7 @@ cvt_varitext(
Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
format->field_offsets[O_MIN].length) ||
Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
format->field_offsets[O_SEC].length)) {
format->field_offsets[O_SEC].length)) {
return CVT_FAIL | CVT_BADFMT;
} else {
u_char *f = (u_char*) &buffer[format->field_offsets[O_FLAGS].offset];
@ -170,24 +170,25 @@ cvt_varitext(
clock_time->flags |= PARSEB_DST;
}
/*
if (!((*f) & VT_INITIALISED)) Clock not initialised
if (!((*f) & VT_INITIALISED)) Clock not initialised
clock_time->flags |= PARSEB_POWERUP;
if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
clock_time->flags |= PARSEB_NOSYNC;
if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
clock_time->flags |= PARSEB_ANNOUNCE;
*/
return CVT_OK;
return CVT_OK;
}
}
}
static u_long
/* parse_inp_fnc_t inp_varitext */
static u_long
inp_varitext(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
@ -196,10 +197,10 @@ inp_varitext(
parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
if (!t)
if (!t)
return PARSE_INP_SKIP; /* local data not allocated - sigh! */
if (ch == 'T')
if (ch == 'T')
t->tstamp = *tstamp;
if ((t->previous_ch == 'T') && (ch == ':'))
@ -224,7 +225,7 @@ inp_varitext(
return rtc;
}
if (t->end_found)
if (t->end_found)
{
if (++(t->end_count) == 4) /* Finally found the end of the message */
{
@ -235,16 +236,16 @@ inp_varitext(
return parse_end(parseio);
else
return rtc;
}
}
}
if ((t->previous_ch == '\r') && (ch == '\n'))
if ((t->previous_ch == '\r') && (ch == '\n'))
{
t->end_found = 1;
}
}
t->previous_ch = ch;
return PARSE_INP_SKIP;

View File

@ -74,8 +74,11 @@ extern void printf (const char *, ...);
*
*/
static parse_cvt_fnc_t cvt_wharton_400a;
static parse_inp_fnc_t inp_wharton_400a;
/*
* cvt_wharton_400a
* parse_cvt_fnc_t cvt_wharton_400a
*
* convert simple type format
*/
@ -121,14 +124,14 @@ cvt_wharton_400a(
}
/*
* inp_wharton_400a
* parse_inp_fnc_t inp_wharton_400a
*
* grep data from input stream
* grab data from input stream
*/
static u_long
inp_wharton_400a(
parse_t *parseio,
unsigned int ch,
char ch,
timestamp_t *tstamp
)
{
@ -166,7 +169,7 @@ clockformat_t clock_wharton_400a =
0, /* conversion configuration */
"WHARTON 400A Series clock Output Format 1", /* String format name */
15, /* string buffer */
0 /* no private data (complete pakets) */
0 /* no private data (complete packets) */
};
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_WHARTON_400A) */

View File

@ -43,6 +43,7 @@
#include "ntp_types.h"
#include "ntp_stdlib.h"
#include "ntp_fp.h"
#include "ntp_calendar.h"
#include "mbg_gps166.h"
#include "binio.h"
#include "ieee754io.h"
@ -63,10 +64,10 @@ put_mbg_header(
GPS_MSG_HDR *headerp
)
{
put_lsb_short(bufpp, headerp->gps_cmd);
put_lsb_short(bufpp, headerp->gps_len);
put_lsb_short(bufpp, headerp->gps_data_csum);
put_lsb_short(bufpp, headerp->gps_hdr_csum);
put_lsb_short(bufpp, headerp->cmd);
put_lsb_short(bufpp, headerp->len);
put_lsb_short(bufpp, headerp->data_csum);
put_lsb_short(bufpp, headerp->hdr_csum);
}
void
@ -75,7 +76,7 @@ get_mbg_sw_rev(
SW_REV *sw_revp
)
{
sw_revp->code = get_lsb_short(bufpp);
sw_revp->code = get_lsb_uint16(bufpp);
memcpy(sw_revp->name, *bufpp, sizeof(sw_revp->name));
*bufpp += sizeof(sw_revp->name);
}
@ -86,8 +87,8 @@ get_mbg_ascii_msg(
ASCII_MSG *ascii_msgp
)
{
ascii_msgp->csum = get_lsb_short(bufpp);
ascii_msgp->valid = get_lsb_short(bufpp);
ascii_msgp->csum = (CSUM) get_lsb_short(bufpp);
ascii_msgp->valid = get_lsb_int16(bufpp);
memcpy(ascii_msgp->s, *bufpp, sizeof(ascii_msgp->s));
*bufpp += sizeof(ascii_msgp->s);
}
@ -98,7 +99,7 @@ get_mbg_svno(
SVNO *svnop
)
{
*svnop = get_lsb_short(bufpp);
*svnop = (SVNO) get_lsb_short(bufpp);
}
void
@ -107,7 +108,7 @@ get_mbg_health(
HEALTH *healthp
)
{
*healthp = get_lsb_short(bufpp);
*healthp = (HEALTH) get_lsb_short(bufpp);
}
void
@ -116,7 +117,7 @@ get_mbg_cfg(
CFG *cfgp
)
{
*cfgp = get_lsb_short(bufpp);
*cfgp = (CFG) get_lsb_short(bufpp);
}
void
@ -125,7 +126,7 @@ get_mbg_tgps(
T_GPS *tgpsp
)
{
tgpsp->wn = get_lsb_short(bufpp);
tgpsp->wn = get_lsb_uint16(bufpp);
tgpsp->sec = get_lsb_long(bufpp);
tgpsp->tick = get_lsb_long(bufpp);
}
@ -133,20 +134,20 @@ get_mbg_tgps(
void
get_mbg_tm(
unsigned char **buffpp,
TM *tmp
TM_GPS *tmp
)
{
tmp->year = get_lsb_short(buffpp);
tmp->year = get_lsb_int16(buffpp);
tmp->month = *(*buffpp)++;
tmp->mday = *(*buffpp)++;
tmp->yday = get_lsb_short(buffpp);
tmp->wday = *(*buffpp)++;
tmp->hour = *(*buffpp)++;
tmp->minute = *(*buffpp)++;
tmp->second = *(*buffpp)++;
tmp->frac = get_lsb_long(buffpp);
tmp->mday = *(*buffpp)++;
tmp->yday = get_lsb_int16(buffpp);
tmp->wday = *(*buffpp)++;
tmp->hour = *(*buffpp)++;
tmp->min = *(*buffpp)++;
tmp->sec = *(*buffpp)++;
tmp->frac = get_lsb_long(buffpp);
tmp->offs_from_utc = get_lsb_long(buffpp);
tmp->status= get_lsb_short(buffpp);
tmp->status = get_lsb_uint16(buffpp);
}
void
@ -155,7 +156,7 @@ get_mbg_ttm(
TTM *ttmp
)
{
ttmp->channel = get_lsb_short(buffpp);
ttmp->channel = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &ttmp->t);
get_mbg_tm(buffpp, &ttmp->tm);
}
@ -166,9 +167,9 @@ get_mbg_synth(
SYNTH *synthp
)
{
synthp->freq = get_lsb_short(buffpp);
synthp->range = get_lsb_short(buffpp);
synthp->phase = get_lsb_short(buffpp);
synthp->freq = get_lsb_int16(buffpp);
synthp->range = get_lsb_int16(buffpp);
synthp->phase = get_lsb_int16(buffpp);
}
static void
@ -201,7 +202,7 @@ get_mbg_antinfo(
ANT_INFO *antinfop
)
{
antinfop->status = get_lsb_short(buffpp);
antinfop->status = get_lsb_int16(buffpp);
get_mbg_tm(buffpp, &antinfop->tm_disconn);
get_mbg_tm(buffpp, &antinfop->tm_reconn);
antinfop->delta_t = get_lsb_long(buffpp);
@ -216,8 +217,8 @@ mbg_time_status_str(
{
static struct state
{
int flag; /* bit flag */
const char *string; /* bit name */
int flag; /* bit flag */
const char *string; /* bit name */
} states[] =
{
{ TM_UTC, "UTC CORR" },
@ -233,7 +234,7 @@ mbg_time_status_str(
{
char *start, *p;
struct state *s;
start = p = *buffpp;
for (s = states; s->flag; s++)
@ -252,25 +253,27 @@ mbg_time_status_str(
*buffpp = p;
}
}
void
mbg_tm_str(
char **buffpp,
TM *tmp,
int size
TM_GPS *tmp,
int size,
int print_status
)
{
char *s = *buffpp;
snprintf(*buffpp, size, "%04d-%02d-%02d %02d:%02d:%02d.%07ld (%c%02d%02d) ",
tmp->year, tmp->month, tmp->mday,
tmp->hour, tmp->minute, tmp->second, tmp->frac,
tmp->hour, tmp->min, tmp->sec, (long) tmp->frac,
(tmp->offs_from_utc < 0) ? '-' : '+',
abs((int)tmp->offs_from_utc) / 3600,
(abs((int)tmp->offs_from_utc) / 60) % 60);
*buffpp += strlen(*buffpp);
mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s));
if (print_status)
mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s));
}
void
@ -281,8 +284,8 @@ mbg_tgps_str(
)
{
snprintf(*buffpp, size, "week %d + %ld days + %ld.%07ld sec",
tgpsp->wn, tgpsp->sec / 86400,
tgpsp->sec % 86400, tgpsp->tick);
tgpsp->wn, (long) tgpsp->sec / SECSPERDAY,
(long) tgpsp->sec % SECSPERDAY, (long) tgpsp->tick);
*buffpp += strlen(*buffpp);
}
@ -293,19 +296,19 @@ get_mbg_cfgh(
)
{
int i;
cfghp->csum = get_lsb_short(buffpp);
cfghp->valid = get_lsb_short(buffpp);
cfghp->csum = (CSUM) get_lsb_short(buffpp);
cfghp->valid = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &cfghp->tot_51);
get_mbg_tgps(buffpp, &cfghp->tot_63);
get_mbg_tgps(buffpp, &cfghp->t0a);
for (i = MIN_SVNO; i <= MAX_SVNO; i++)
for (i = 0; i < N_SVNO_GPS; i++)
{
get_mbg_cfg(buffpp, &cfghp->cfg[i]);
}
for (i = MIN_SVNO; i <= MAX_SVNO; i++)
for (i = 0; i < N_SVNO_GPS; i++)
{
get_mbg_health(buffpp, &cfghp->health[i]);
}
@ -317,23 +320,23 @@ get_mbg_utc(
UTC *utcp
)
{
utcp->csum = get_lsb_short(buffpp);
utcp->valid = get_lsb_short(buffpp);
utcp->csum = (CSUM) get_lsb_short(buffpp);
utcp->valid = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &utcp->t0t);
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A0, mbg_double) != IEEE_OK)
{
L_CLR(&utcp->A0);
}
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A1, mbg_double) != IEEE_OK)
{
L_CLR(&utcp->A1);
}
utcp->WNlsf = get_lsb_short(buffpp);
utcp->DNt = get_lsb_short(buffpp);
utcp->WNlsf = get_lsb_uint16(buffpp);
utcp->DNt = get_lsb_int16(buffpp);
utcp->delta_tls = *(*buffpp)++;
utcp->delta_tlsf = *(*buffpp)++;
}
@ -345,7 +348,7 @@ get_mbg_lla(
)
{
int i;
for (i = LAT; i <= ALT; i++)
{
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &lla[i], mbg_double) != IEEE_OK)
@ -367,7 +370,7 @@ get_mbg_xyz(
)
{
int i;
for (i = XP; i <= ZP; i++)
{
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &xyz[i], mbg_double) != IEEE_OK)
@ -384,13 +387,13 @@ get_mbg_comparam(
)
{
size_t i;
comparamp->baud_rate = get_lsb_long(buffpp);
for (i = 0; i < sizeof(comparamp->framing); i++)
{
comparamp->framing[i] = *(*buffpp)++;
}
comparamp->handshake = get_lsb_short(buffpp);
comparamp->handshake = get_lsb_int16(buffpp);
}
void
@ -400,12 +403,12 @@ get_mbg_portparam(
)
{
int i;
for (i = 0; i < N_COM; i++)
for (i = 0; i < DEFAULT_N_COM; i++)
{
get_mbg_comparam(buffpp, &portparamp->com[i]);
}
for (i = 0; i < N_COM; i++)
for (i = 0; i < DEFAULT_N_COM; i++)
{
portparamp->mode[i] = *(*buffpp)++;
}
@ -416,20 +419,20 @@ get_mbg_portparam(
{ \
L_CLR(addr); \
}
void
get_mbg_eph(
unsigned char ** buffpp,
EPH *ephp
)
{
ephp->csum = get_lsb_short(buffpp);
ephp->valid = get_lsb_short(buffpp);
ephp->health = get_lsb_short(buffpp);
ephp->IODC = get_lsb_short(buffpp);
ephp->IODE2 = get_lsb_short(buffpp);
ephp->IODE3 = get_lsb_short(buffpp);
ephp->csum = (CSUM) get_lsb_short(buffpp);
ephp->valid = get_lsb_int16(buffpp);
ephp->health = (HEALTH) get_lsb_short(buffpp);
ephp->IODC = (IOD) get_lsb_short(buffpp);
ephp->IODE2 = (IOD) get_lsb_short(buffpp);
ephp->IODE3 = (IOD) get_lsb_short(buffpp);
get_mbg_tgps(buffpp, &ephp->tt);
get_mbg_tgps(buffpp, &ephp->t0c);
@ -456,7 +459,7 @@ get_mbg_eph(
FETCH_DOUBLE(buffpp, &ephp->af2);
FETCH_DOUBLE(buffpp, &ephp->tgd);
ephp->URA = get_lsb_short(buffpp);
ephp->URA = get_lsb_uint16(buffpp);
ephp->L2code = *(*buffpp)++;
ephp->L2flag = *(*buffpp)++;
@ -468,10 +471,10 @@ get_mbg_alm(
ALM *almp
)
{
almp->csum = get_lsb_short(buffpp);
almp->valid = get_lsb_short(buffpp);
almp->health = get_lsb_short(buffpp);
almp->csum = (CSUM) get_lsb_short(buffpp);
almp->valid = get_lsb_int16(buffpp);
almp->health = (HEALTH) get_lsb_short(buffpp);
get_mbg_tgps(buffpp, &almp->t0a);
@ -493,8 +496,8 @@ get_mbg_iono(
IONO *ionop
)
{
ionop->csum = get_lsb_short(buffpp);
ionop->valid = get_lsb_short(buffpp);
ionop->csum = (CSUM) get_lsb_short(buffpp);
ionop->valid = get_lsb_int16(buffpp);
FETCH_DOUBLE(buffpp, &ionop->alpha_0);
FETCH_DOUBLE(buffpp, &ionop->alpha_1);

View File

@ -34,10 +34,8 @@
*/
#include <config.h>
#include "ntp_fp.h"
#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
#define SECSPERWEEK (unsigned)(604800) /* seconds per week - GPS tells us about weeks */
#define GPSWRAP 990 /* assume week count less than this in the previous epoch */
#include "ntp_calendar.h"
#include "parse.h"
void
gpstolfp(
@ -49,10 +47,10 @@ gpstolfp(
{
if (weeks < GPSWRAP)
{
weeks += 1024;
weeks += GPSWEEKS;
}
lfp->l_ui = weeks * SECSPERWEEK + days * 86400 + seconds + GPSORIGIN; /* convert to NTP time */
lfp->l_ui = (uint32_t)(weeks * SECSPERWEEK + days * SECSPERDAY + seconds + GPSORIGIN); /* convert to NTP time */
lfp->l_uf = 0;
}

View File

@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A
*
*
* parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A
*
* Parser module for reference clock
@ -12,7 +12,7 @@
* when PARSEKERNEL is not defined NTP time stamps will be used.
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -106,7 +106,7 @@ Strcmp(
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
return c;
}
@ -154,10 +154,10 @@ parse_ioinit(
)
{
parseprintf(DD_PARSE, ("parse_iostart\n"));
parseio->parse_plen = 0;
parseio->parse_pdata = (void *)0;
parseio->parse_data = 0;
parseio->parse_ldata = 0;
parseio->parse_dsize = 0;
@ -166,7 +166,7 @@ parse_ioinit(
parseio->parse_ioflags = PARSE_IO_CS7; /* usual unix default */
parseio->parse_index = 0;
parseio->parse_ldsize = 0;
return 1;
}
@ -188,15 +188,15 @@ parse_ioend(
unsigned int
parse_restart(
parse_t *parseio,
unsigned int ch
char ch
)
{
unsigned int updated = PARSE_INP_SKIP;
/*
* re-start packet - timeout - overflow - start symbol
*/
if (parseio->parse_index)
{
/*
@ -208,17 +208,17 @@ parse_restart(
parseio->parse_ldsize = parseio->parse_index;
updated = PARSE_INP_TIME;
}
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseprintf(DD_PARSE, ("parse: parse_restart: buffer start (updated = %x)\n", updated));
return updated;
}
unsigned int
parse_addchar(
parse_t *parseio,
unsigned int ch
char ch
)
{
/*
@ -239,7 +239,7 @@ parse_addchar(
*/
return parse_restart(parseio, ch);
}
unsigned int
parse_end(
parse_t *parseio
@ -260,11 +260,11 @@ parse_end(
int
parse_ioread(
register parse_t *parseio,
register unsigned int ch,
register char ch,
register timestamp_t *tstamp
)
{
register unsigned updated = CVT_NONE;
register u_int updated = CVT_NONE;
/*
* within STREAMS CSx (x < 8) chars still have the upper bits set
* so we normalize the characters by masking unecessary bits off.
@ -282,9 +282,9 @@ parse_ioread(
case PARSE_IO_CS7:
ch &= 0x7F;
break;
case PARSE_IO_CS8:
ch &= 0xFF;
ch &= (char) 0xFFU;
break;
}
@ -306,18 +306,18 @@ parse_ioread(
{
updated = CVT_OK;
}
if (input_status & PARSE_INP_TIME) /* time sample is available */
{
updated = timepacket(parseio);
updated = (u_int) timepacket(parseio);
}
if (input_status & PARSE_INP_DATA) /* got additional data */
{
updated |= CVT_ADDITIONAL;
}
}
/*
* remember last character time
@ -353,7 +353,7 @@ parse_iopps(
register timestamp_t *ptime
)
{
register unsigned updated = CVT_NONE;
register u_int updated = CVT_NONE;
/*
* PPS pulse information will only be delivered to ONE clock format
@ -364,7 +364,7 @@ parse_iopps(
if (clockformats[parseio->parse_lformat]->syncpps)
{
updated = clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
updated = (u_int) clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
parseprintf(DD_PARSE, ("parse_iopps: updated = 0x%x\n", updated));
}
@ -403,13 +403,13 @@ parse_to_unixtime(
)
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
static int days_of_month[] =
static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
if (clock_time->utctime)
return clock_time->utctime; /* if the conversion routine gets it right away - why not */
@ -423,12 +423,12 @@ parse_to_unixtime(
SETRTC(CVT_FAIL|CVT_BADDATE);
return -1;
}
/*
* sorry, slow section here - but it's not time critical anyway
*/
t = julian0(clock_time->year) - julian0(1970); /* Y2kFixes */
/* month */
/* month */
if (clock_time->month <= 0 || clock_time->month > 12)
{
SETRTC(CVT_FAIL|CVT_BADDATE);
@ -466,7 +466,7 @@ parse_to_unixtime(
t = TIMES24(t) + clock_time->hour;
/* min */
/* min */
if (clock_time->minute < 0 || clock_time->minute > 59)
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@ -475,7 +475,7 @@ parse_to_unixtime(
t = TIMES60(t) + clock_time->minute;
/* sec */
if (clock_time->second < 0 || clock_time->second > 60) /* allow for LEAPs */
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@ -510,7 +510,7 @@ Stoi(
while(*s == ' ')
s++;
if (*s == '-')
{
s++;
@ -519,7 +519,7 @@ Stoi(
else
if (*s == '+')
s++;
for(;;)
{
c = *s++;
@ -573,16 +573,16 @@ updatetimeinfo(
{
int s = splhigh();
#endif
parseio->parse_lstate = parseio->parse_dtime.parse_state | flags | PARSEB_TIMECODE;
parseio->parse_dtime.parse_state = parseio->parse_lstate;
#ifdef PARSEKERNEL
(void)splx((unsigned int)s);
}
#endif
#ifdef PARSEKERNEL
parseprintf(DD_PARSE, ("updatetimeinfo status=0x%x, time=%x\n", parseio->parse_dtime.parse_state,
@ -591,7 +591,7 @@ updatetimeinfo(
parseprintf(DD_PARSE, ("updatetimeinfo status=0x%lx, time=%x\n", (long)parseio->parse_dtime.parse_state,
parseio->parse_dtime.parse_time.fp.l_ui));
#endif
return CVT_OK; /* everything fine and dandy... */
}
@ -614,7 +614,7 @@ syn_simple(
}
/*
* pps_simple
* parse_pps_fnc_t pps_simple
*
* handle a pps time stamp
*/
@ -628,12 +628,12 @@ pps_simple(
{
parseio->parse_dtime.parse_ptime = *ptime;
parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
return CVT_NONE;
}
/*
* pps_one
* parse_pps_fnc_t pps_one
*
* handle a pps time stamp in ONE edge
*/
@ -647,12 +647,12 @@ pps_one(
{
if (status)
return pps_simple(parseio, status, ptime);
return CVT_NONE;
}
/*
* pps_zero
* parse_pps_fnc_t pps_zero
*
* handle a pps time stamp in ZERO edge
*/
@ -666,7 +666,7 @@ pps_zero(
{
if (!status)
return pps_simple(parseio, status, ptime);
return CVT_NONE;
}
@ -684,13 +684,13 @@ timepacket(
register time_t t;
u_long cvtrtc; /* current conversion result */
clocktime_t clock_time;
memset((char *)&clock_time, 0, sizeof clock_time);
format = parseio->parse_lformat;
if (format == (unsigned short)~0)
return CVT_NONE;
switch ((cvtrtc = clockformats[format]->convert ?
clockformats[format]->convert((unsigned char *)parseio->parse_ldata, parseio->parse_ldsize, (struct format *)(clockformats[format]->data), &clock_time, parseio->parse_pdata) :
CVT_NONE) & CVT_MASK)
@ -698,17 +698,17 @@ timepacket(
case CVT_FAIL:
parseio->parse_badformat++;
break;
case CVT_NONE:
/*
* too bad - pretend bad format
*/
parseio->parse_badformat++;
break;
case CVT_OK:
break;
case CVT_SKIP:
return CVT_NONE;
@ -716,7 +716,7 @@ timepacket(
/* shouldn't happen */
#ifndef PARSEKERNEL
msyslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"", clockformats[format]->name);
#endif
#endif
return CVT_FAIL|cvtrtc;
}
@ -724,7 +724,7 @@ timepacket(
{
return CVT_FAIL|cvtrtc;
}
/*
* time stamp
*/
@ -732,7 +732,7 @@ timepacket(
parseio->parse_dtime.parse_time.tv.tv_sec = t;
parseio->parse_dtime.parse_time.tv.tv_usec = clock_time.usecond;
#else
parseio->parse_dtime.parse_time.fp.l_ui = t + JAN_1970;
parseio->parse_dtime.parse_time.fp.l_ui = (uint32_t) (t + JAN_1970);
TVUTOTSF(clock_time.usecond, parseio->parse_dtime.parse_time.fp.l_uf);
#endif
@ -758,7 +758,7 @@ parse_timecode(
*/
dct->parsegettc.parse_badformat = parse->parse_badformat;
parse->parse_badformat = 0;
if (parse->parse_ldsize <= PARSE_TCMAX)
{
dct->parsegettc.parse_count = parse->parse_ldsize;
@ -771,7 +771,7 @@ parse_timecode(
}
}
/*ARGSUSED*/
int
parse_setfmt(
@ -792,7 +792,7 @@ parse_setfmt(
if (parse->parse_pdata)
FREE(parse->parse_pdata, parse->parse_plen);
parse->parse_pdata = 0;
parse->parse_plen = clockformats[i]->plen;
if (parse->parse_plen)
@ -809,9 +809,9 @@ parse_setfmt(
if (parse->parse_data)
FREE(parse->parse_data, (unsigned)(parse->parse_dsize * 2 + 2));
parse->parse_ldata = parse->parse_data = 0;
parse->parse_dsize = clockformats[i]->length;
if (parse->parse_dsize)
{
parse->parse_data = (char*)MALLOC((unsigned)(parse->parse_dsize * 2 + 2));
@ -820,20 +820,20 @@ parse_setfmt(
if (parse->parse_pdata)
FREE(parse->parse_pdata, parse->parse_plen);
parse->parse_pdata = 0;
parseprintf(DD_PARSE, ("init failed: malloc for data area failed\n"));
return 0;
}
}
/*
* leave room for '\0'
*/
parse->parse_ldata = parse->parse_data + parse->parse_dsize + 1;
parse->parse_lformat = i;
return 1;
}
}
@ -852,7 +852,7 @@ parse_getfmt(
if (dct->parseformat.parse_format < nformats &&
Strlen(clockformats[dct->parseformat.parse_format]->name) <= PARSE_TCMAX)
{
dct->parseformat.parse_count = Strlen(clockformats[dct->parseformat.parse_format]->name)+1;
dct->parseformat.parse_count = (unsigned short) (Strlen(clockformats[dct->parseformat.parse_format]->name) + 1);
memcpy(dct->parseformat.parse_buffer, clockformats[dct->parseformat.parse_format]->name, dct->parseformat.parse_count);
return 1;
}
@ -870,7 +870,7 @@ parse_setcs(
)
{
parse->parse_ioflags &= ~PARSE_IO_CSIZE;
parse->parse_ioflags |= dct->parsesetcs.parse_cs & PARSE_IO_CSIZE;
parse->parse_ioflags |= (int) (dct->parsesetcs.parse_cs & PARSE_IO_CSIZE);
return 1;
}

View File

@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
*
* parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Parser configuration module for reference clocks
@ -12,7 +12,7 @@
* when STREAM is not defined NTP time stamps will be used.
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View File

@ -1,12 +1,12 @@
/*
* /src/NTP/ntp4-dev/libparse/parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
*
* parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* STREAMS module for reference clocks
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -74,7 +74,7 @@ static struct fmodsw fmod_templ =
extern struct mod_ops mod_strmodops;
static struct modlstrmod modlstrmod =
static struct modlstrmod modlstrmod =
{
&mod_strmodops, /* a STREAMS module */
"PARSE - NTP reference", /* name this baby - keep room for revision number */
@ -100,13 +100,13 @@ _init(
)
{
static char revision[] = "4.6";
char *s, *S;
char *s, *S;
char *t;
#ifndef lint
t = rcsid;
#endif
/*
* copy RCS revision into Drv_name
*
@ -125,20 +125,20 @@ _init(
}
if (*s == ' ') s++;
}
t = modlstrmod.strmod_linkinfo;
t = modlstrmod.strmod_linkinfo;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
if (*s && *t && (S > s))
{
if (strlen(t) >= (S - s))
@ -308,7 +308,7 @@ setup_stream(
}
else
{
pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
return 0;
}
}
@ -325,18 +325,18 @@ parseopen(
{
register parsestream_t *parse;
static int notice = 0;
pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
if (sflag != MODOPEN)
{ /* open only for modules */
pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
return EIO;
}
if (q->q_ptr != (caddr_t)NULL)
{
pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
return EBUSY;
}
@ -346,10 +346,10 @@ parseopen(
return ENOMEM;
}
pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
WR(q)->q_ptr = q->q_ptr;
pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
parse = (parsestream_t *) q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@ -360,7 +360,7 @@ parseopen(
qprocson(q);
pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
if (!parse_ioinit(&parse->parse_io))
{
@ -374,12 +374,12 @@ parseopen(
return EIO;
}
pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
if (setup_stream(q, M_PARSE))
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
/*
* I know that you know the delete key, but you didn't write this
@ -412,19 +412,19 @@ parseclose(
{
register parsestream_t *parse = (parsestream_t *)q->q_ptr;
register unsigned long s;
pprintf(DD_CLOSE, "parse: CLOSE\n");
qprocsoff(q);
s = splhigh();
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@ -444,7 +444,7 @@ parsersvc(
)
{
mblk_t *mp;
while ((mp = getq(q)))
{
if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
@ -477,15 +477,15 @@ parsewput(
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)q->q_ptr;
pprintf(DD_WPUT, "parse: parsewput\n");
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
case M_IOCTL:
iocp = (void *)mp->b_rptr;
switch (iocp->ioc_cmd)
@ -519,7 +519,7 @@ parsewput(
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@ -537,7 +537,7 @@ parsewput(
}
qreply(q, mp);
break;
}
}
case PARSEIOC_TIMECODE:
case PARSEIOC_SETFMT:
@ -553,7 +553,7 @@ parsewput(
pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_TIMECODE\n");
ok = parse_timecode(dct, &parse->parse_io);
break;
case PARSEIOC_SETFMT:
pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETFMT\n");
ok = parse_setfmt(dct, &parse->parse_io);
@ -600,7 +600,7 @@ rdchar(
else
{
register mblk_t *mmp = *mp;
*mp = (*mp)->b_cont;
freeb(mmp);
}
@ -619,7 +619,7 @@ parserput(
{
register unsigned char type;
mblk_t *mp = imp;
switch (type = mp->b_datap->db_type)
{
default:
@ -636,7 +636,7 @@ parserput(
else
putq(q, mp);
break;
case M_BREAK:
case M_DATA:
{
@ -691,7 +691,7 @@ parserput(
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
}
}
}
else
{
@ -733,7 +733,7 @@ parserput(
gethrestime(&hres_time);
c_time.tv.tv_sec = hres_time.tv_sec;
c_time.tv.tv_usec = hres_time.tv_nsec / 1000;
pprintf(DD_RPUT, "parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN");
if ((parse->parse_status & PARSE_ENABLE) &&
@ -758,7 +758,7 @@ parserput(
}
else
putq(q, mp);
if (status)
{
parse->parse_ppsclockev.tv = c_time.tv;
@ -780,7 +780,7 @@ init_linemon(
)
{
register queue_t *dq;
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@ -916,14 +916,14 @@ init_zs_linemon(
szs->zsops.zsop_xsint = (void (*) (struct zscom *))zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
zs->zs_ops = &szs->zsops; /* hook it up */
/*
* XXX: this is usually done via zsopinit()
* XXX: this is usually done via zsopinit()
* - have yet to find a way to call that routine
*/
zs->zs_xsint = (void (*) (struct zscom *))zs_xsisr;
mutex_exit(zs->zs_excl);
pprintf(DD_INSTALL, "init_zs_linemon: CD monitor installed\n");
@ -934,7 +934,7 @@ init_zs_linemon(
}
/*
* unregister our ISR routine - must call under splhigh() (or
* unregister our ISR routine - must call under splhigh() (or
* whatever block ZS status interrupts)
*/
static void
@ -970,7 +970,7 @@ close_zs_linemon(
mutex_exit(zs->zs_excl);
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
pprintf(DD_INSTALL, "close_zs_linemon: CD monitor deleted\n");
return;
}
@ -1005,7 +1005,7 @@ zs_xsisr(
{
timestamp_t cdevent;
register int status;
/*
* time stamp
*/
@ -1024,7 +1024,7 @@ zs_xsisr(
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@ -1052,7 +1052,7 @@ zs_xsisr(
*/
parse_iodone(&((parsestream_t *)q->q_ptr)->parse_io);
}
if (status)
{
((parsestream_t *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@ -1091,9 +1091,9 @@ zs_xsisr(
SCC_WRITE0(ZSWR0_RESET_STATUS); /* might kill other conditions here */
return;
}
}
}
pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
(za->za_rr0 ^ zsstatus) & ~ZSRR0_CD,dname);
/*
* we are now gathered here to process some unusual external status
@ -1108,7 +1108,7 @@ zs_xsisr(
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
/*
* the real thing for everything else ...
*/
@ -1120,7 +1120,7 @@ zs_xsisr(
if (!strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register void (*zsisr) (struct zscom *);
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@ -1129,7 +1129,7 @@ zs_xsisr(
zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
pprintf(DD_ISR, "zs_xsisr: non CD event was processed for \"%s\"\n", dname);
/*
* now back to our program ...
@ -1151,7 +1151,7 @@ zs_xsisr(
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else

View File

@ -1,13 +1,13 @@
/*
* /src/NTP/ntp4-dev/libparse/parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
*
* parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* STREAMS module for reference clocks
* (SunOS4.x)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ static char mnam[] = "PARSEPPS "; /* name this baby - keep room for revision
#else
static char mnam[] = "PARSE "; /* name this baby - keep room for revision number */
#endif
struct vdldrv parsesync_vd =
struct vdldrv parsesync_vd =
{
VDMAGIC_PSEUDO, /* nothing like a real driver - a STREAMS module */
mnam,
@ -166,7 +166,7 @@ Strcmp(
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
return c;
}
@ -186,10 +186,10 @@ Strncmp(
while (n-- && !(c = *s++ - *t++) && *s && *t)
/* empty loop */;
return c;
}
void
ntp_memset(
char *a,
@ -217,12 +217,12 @@ xxxinit(
{
extern struct fmodsw fmodsw[];
extern int fmodcnt;
struct fmodsw *fm = fmodsw;
struct fmodsw *fmend = &fmodsw[fmodcnt];
struct fmodsw *ifm = (struct fmodsw *)0;
char *mname = parseinfo.st_rdinit->qi_minfo->mi_idname;
switch (fc)
{
case VDLOAD:
@ -233,13 +233,13 @@ xxxinit(
*/
while (fm <= fmend)
{
if (!Strncmp(fm->f_name, mname, FMNAMESZ))
if (!Strncmp(fm->f_name, mname, FMNAMESZ))
{
printf("vddrinit[%s]: STREAMS module already loaded.\n", mname);
return(EBUSY);
}
else
if ((ifm == (struct fmodsw *)0) &&
if ((ifm == (struct fmodsw *)0) &&
(fm->f_name[0] == '\0') &&
(fm->f_str == (struct streamtab *)0))
{
@ -261,7 +261,7 @@ xxxinit(
{
static char revision[] = "4.7";
char *s, *S, *t;
s = rcsid; /* NOOP - keep compilers happy */
Strncpy(ifm->f_name, mname, FMNAMESZ);
@ -285,20 +285,20 @@ xxxinit(
}
if (*s == ' ') s++;
}
t = parsesync_vd.Drv_name;
t = parsesync_vd.Drv_name;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
if (*s && *t && (S > s))
{
if (Strlen(t) >= (S - s))
@ -307,9 +307,9 @@ xxxinit(
}
}
return (0);
}
}
break;
case VDUNLOAD:
if (parsebusy > 0)
{
@ -328,7 +328,7 @@ xxxinit(
fm->f_name[0] = '\0';
fm->f_str = (struct streamtab *)0;
fm++;
break;
}
fm++;
@ -341,14 +341,14 @@ xxxinit(
else
return (0);
}
case VDSTAT:
return (0);
default:
return (EIO);
}
return EIO;
}
@ -460,7 +460,7 @@ setup_stream(
}
else
{
parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
return 0;
}
}
@ -476,37 +476,37 @@ parseopen(
{
register parsestream_t *parse;
static int notice = 0;
parseprintf(DD_OPEN,("parse: OPEN\n"));
parseprintf(DD_OPEN,("parse: OPEN\n"));
if (sflag != MODOPEN)
{ /* open only for modules */
parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
return OPENFAIL;
}
if (q->q_ptr != (caddr_t)NULL)
{
u.u_error = EBUSY;
parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
return OPENFAIL;
}
#ifdef VDDRV
parsebusy++;
#endif
q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t));
if (q->q_ptr == (caddr_t)0)
{
parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
#ifdef VDDRV
parsebusy--;
#endif
return OPENFAIL;
}
WR(q)->q_ptr = q->q_ptr;
parse = (parsestream_t *)(void *)q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@ -531,7 +531,7 @@ parseopen(
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
/*
* I know that you know the delete key, but you didn't write this
@ -569,17 +569,17 @@ parseclose(
{
register parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
register unsigned long s;
parseprintf(DD_CLOSE,("parse: CLOSE\n"));
s = splhigh();
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@ -602,7 +602,7 @@ parsersvc(
)
{
mblk_t *mp;
while ((mp = getq(q)))
{
if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
@ -635,15 +635,15 @@ parsewput(
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
parseprintf(DD_WPUT,("parse: parsewput\n"));
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
case M_IOCTL:
iocp = (struct iocblk *)(void *)mp->b_rptr;
switch (iocp->ioc_cmd)
@ -676,7 +676,7 @@ parsewput(
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@ -694,7 +694,7 @@ parsewput(
}
qreply(q, mp);
break;
}
}
case PARSEIOC_TIMECODE:
case PARSEIOC_SETFMT:
@ -710,7 +710,7 @@ parsewput(
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_TIMECODE\n"));
ok = parse_timecode(dct, &parse->parse_io);
break;
case PARSEIOC_SETFMT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETFMT\n"));
ok = parse_setfmt(dct, &parse->parse_io);
@ -757,7 +757,7 @@ rdchar(
else
{
register mblk_t *mmp = *mp;
*mp = (*mp)->b_cont;
freeb(mmp);
}
@ -775,7 +775,7 @@ parserput(
)
{
unsigned char type;
switch (type = mp->b_datap->db_type)
{
default:
@ -791,7 +791,7 @@ parserput(
else
putq(q, mp);
break;
case M_BREAK:
case M_DATA:
{
@ -844,7 +844,7 @@ parserput(
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
}
}
}
else
{
@ -883,7 +883,7 @@ parserput(
register int status = cd_invert ^ (type == M_UNHANGUP);
uniqtime(&ctime.tv);
parseprintf(DD_RPUT,("parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN"));
if ((parse->parse_status & PARSE_ENABLE) &&
@ -908,7 +908,7 @@ parserput(
}
else
putq(q, mp);
if (status)
{
parse->parse_ppsclockev.tv = ctime.tv;
@ -930,7 +930,7 @@ init_linemon(
)
{
register queue_t *dq;
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@ -1038,7 +1038,7 @@ init_zs_linemon(
else
{
unsigned long s;
/*
* we do a direct replacement, in case others fiddle also
* if somebody else grabs our hook and we disconnect
@ -1064,9 +1064,9 @@ init_zs_linemon(
szs->zsops.zsop_xsint = zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
zsopinit(zs, &szs->zsops); /* hook it up */
(void) splx(s);
parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor installed\n"));
@ -1099,11 +1099,11 @@ close_zs_linemon(
else
{
register struct savedzsops *szs = (struct savedzsops *)parsestream->parse_data;
zsopinit(zs, szs->oldzsops); /* reset to previous handler functions */
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
parseprintf(DD_INSTALL, ("close_zs_linemon: CD monitor deleted\n"));
return;
}
@ -1148,7 +1148,7 @@ zs_xsisr(
{
timestamp_t cdevent;
register int status;
za->za_rr0 = (za->za_rr0 & ~(cdmask)) | (zsstatus & (cdmask));
#ifdef PPS_SYNC
@ -1163,7 +1163,7 @@ zs_xsisr(
* time stamp
*/
uniqtime(&cdevent.tv);
#ifdef PPS_SYNC
(void)splx(s);
#endif
@ -1190,7 +1190,7 @@ zs_xsisr(
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@ -1218,7 +1218,7 @@ zs_xsisr(
*/
parse_iodone(&((parsestream_t *)(void *)q->q_ptr)->parse_io);
}
if (status)
{
((parsestream_t *)(void *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@ -1251,13 +1251,13 @@ zs_xsisr(
zsaddr->zscc_control = ZSWR0_RESET_STATUS; /* might kill other conditions here */
return 0;
}
}
}
if (zsstatus & cdmask) /* fake CARRIER status */
za->za_flags |= ZAS_CARR_ON;
else
za->za_flags &= ~ZAS_CARR_ON;
/*
* we are now gathered here to process some unusual external status
* interrupts.
@ -1271,7 +1271,7 @@ zs_xsisr(
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
/*
* the real thing for everything else ...
*/
@ -1283,7 +1283,7 @@ zs_xsisr(
if (!Strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register int (*zsisr) (struct zscom *);
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@ -1292,7 +1292,7 @@ zs_xsisr(
return zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
parseprintf(DD_ISR, ("zs_xsisr: non CD event was processed for \"%s\"\n", dname));
/*
* now back to our program ...
@ -1314,7 +1314,7 @@ zs_xsisr(
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else

View File

@ -6,7 +6,7 @@
* $Created: Sun Aug 2 20:20:34 1998 $
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-rnberg, Germany
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View File

@ -52,8 +52,7 @@ subdir = ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@ -82,6 +81,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@ -431,6 +432,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@

View File

@ -76,6 +76,9 @@ getCmdOpts(
if (HAVE_OPT( PANICGATE ))
allow_panic = TRUE;
if (HAVE_OPT( FORCE_STEP_ONCE ))
force_step_once = TRUE;
#ifdef HAVE_DROPROOT
if (HAVE_OPT( JAILDIR )) {
droproot = 1;
@ -175,14 +178,14 @@ getCmdOpts(
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
if (val >= 0)
interface_interval = val;
else {
fprintf(stderr,
fprintf(stderr,
"command line interface update interval %ld must not be negative\n",
val);
msyslog(LOG_ERR,
msyslog(LOG_ERR,
"command line interface update interval %ld must not be negative",
val);
errflg++;

View File

@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
# It has been AutoGen-ed February 4, 2015 at 02:41:59 AM by AutoGen 5.18.5pre4
# It has been AutoGen-ed April 7, 2015 at 04:25:50 AM by AutoGen 5.18.5pre4
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@ -2482,7 +2482,7 @@ holds
the names of all peer variables and the
@code{clock_var_list}
holds the names of the reference clock variables.
@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{srep} | @code{stepout} @kbd{stepout}]}
@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@ -2539,6 +2539,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
@item @code{stepback} @kbd{stepback}
The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
@item @code{stepfwd} @kbd{stepfwd}
As for stepback, but for the forward direction.
@item @code{stepout} @kbd{stepout}
The argument is the stepout timeout, which by default is 900 s.
It can

View File

@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
# It has been AutoGen-ed February 4, 2015 at 02:42:02 AM by AutoGen 5.18.5pre4
# It has been AutoGen-ed April 7, 2015 at 04:25:52 AM by AutoGen 5.18.5pre4
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore

View File

@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
# It has been AutoGen-ed February 4, 2015 at 02:42:04 AM by AutoGen 5.18.5pre4
# It has been AutoGen-ed April 7, 2015 at 04:25:54 AM by AutoGen 5.18.5pre4
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@ -95,6 +95,7 @@ This software is released under the NTP license, <http://ntp.org/license>.
* ntpd configfile:: configfile option (-c)
* ntpd driftfile:: driftfile option (-f)
* ntpd panicgate:: panicgate option (-g)
* ntpd force-step-once:: force-step-once option (-G)
* ntpd jaildir:: jaildir option (-i)
* ntpd interface:: interface option (-I)
* ntpd keyfile:: keyfile option (-k)
@ -141,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
ntpd - NTP daemon program - Ver. 4.2.8p1
ntpd - NTP daemon program - Ver. 4.2.8p2
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
@ -162,6 +163,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
-G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@ -298,7 +300,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
configuration specification in the
configuration specification in the
@file{/etc/ntp.conf}
file.
@node ntpd panicgate
@ -326,6 +328,21 @@ options.
See the
@code{tinker}
configuration file directive for other options.
@node ntpd force-step-once
@subsection force-step-once option (-G)
@cindex ntpd-force-step-once
This is the ``step any initial offset correction.'' option.
Normally,
@code{ntpd}
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the @code{tinker} configuration file directive for other options.
@node ntpd jaildir
@subsection jaildir option (-i)
@cindex ntpd-jaildir
@ -370,7 +387,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
@code{interface} command, which is more versatile.
@code{interface} command, which is more versatile.
@node ntpd keyfile
@subsection keyfile option (-k)
@cindex ntpd-keyfile

View File

@ -1 +1 @@
* Generated 2015-01-03 23:51:10 UTC diff_ignore_line
* Generated 2015-03-16 09:05:44 UTC diff_ignore_line

View File

@ -206,6 +206,8 @@ struct key_tok ntp_keywords[] = {
{ "filenum", T_Filenum, FOLLBY_TOKEN },
/* tinker_option */
{ "step", T_Step, FOLLBY_TOKEN },
{ "stepback", T_Stepback, FOLLBY_TOKEN },
{ "stepfwd", T_Stepfwd, FOLLBY_TOKEN },
{ "panic", T_Panic, FOLLBY_TOKEN },
{ "dispersion", T_Dispersion, FOLLBY_TOKEN },
{ "stepout", T_Stepout, FOLLBY_TOKEN },

View File

@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntp.conf 5man "04 Feb 2015" "4.2.8p1" "File Formats"
.TH ntp.conf 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-sPaOCn/ag-RPaGBn)
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:41:46 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@ -2786,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@ -2852,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
.TP 7
.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
As for stepback, but for the forward direction.
.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can

View File

@ -1,9 +1,9 @@
.Dd February 4 2015
.Dd April 7 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@ -2618,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
.Cm step Ar srep |
.Cm step Ar step |
.Cm stepback Ar stepback |
.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@ -2678,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.It Cm stepback Ar stepback
The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
.It Cm stepfwd Ar stepfwd
As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can

View File

@ -2620,7 +2620,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
.Cm step Ar srep |
.Cm step Ar step |
.Cm stepback Ar stepback |
.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@ -2680,6 +2682,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.It Cm stepback Ar stepback
The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
.It Cm stepfwd Ar stepfwd
As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can

View File

@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
<p>This document applies to version 4.2.8p1 of <code>ntp.conf</code>.
<p>This document applies to version 4.2.8p2 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@ -2463,7 +2463,7 @@ holds
the names of all peer variables and the
<code>clock_var_list</code>
holds the names of the reference clock variables.
<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>srep</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>step</kbd><code> | stepback </code><kbd>stepback</kbd><code> | stepfwd </code><kbd>stepfwd</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
configuration file before any other configuration options.
@ -2513,6 +2513,17 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
<br><dt><code>stepback</code> <kbd>stepback</kbd><dd>The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
<br><dt><code>stepfwd</code> <kbd>stepfwd</kbd><dd>As for stepback, but for the forward direction.
<br><dt><code>stepout</code> <kbd>stepout</kbd><dd>The argument is the stepout timeout, which by default is 900 s.
It can
be set to any positive number in seconds.

View File

@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntp.conf 5 "04 Feb 2015" "4.2.8p1" "File Formats"
.TH ntp.conf 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-sPaOCn/ag-RPaGBn)
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:41:46 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@ -2786,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@ -2852,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
.TP 7
.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
As for stepback, but for the forward direction.
.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can

View File

@ -1,9 +1,9 @@
.Dd February 4 2015
.Dd April 7 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@ -2618,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
.Cm step Ar srep |
.Cm step Ar step |
.Cm stepback Ar stepback |
.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@ -2678,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.It Cm stepback Ar stepback
The argument is the step threshold for the backward direction,
which by default is 0.128 s.
It can
be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
set to zero or greater than .5 second.
.It Cm stepfwd Ar stepfwd
As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can

View File

@ -1,8 +1,8 @@
.TH ntp.keys 5man "04 Feb 2015" "4.2.8p1" "File Formats"
.TH ntp.keys 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:41:51 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME

View File

@ -1,9 +1,9 @@
.Dd February 4 2015
.Dd April 7 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME

View File

@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program.
<p>This document applies to version 4.2.8p1 of <code>ntp.keys</code>.
<p>This document applies to version 4.2.8p2 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>

View File

@ -1,8 +1,8 @@
.TH ntp.keys 5 "04 Feb 2015" "4.2.8p1" "File Formats"
.TH ntp.keys 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:41:51 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME

View File

@ -1,9 +1,9 @@
.Dd February 4 2015
.Dd April 7 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME

View File

@ -2705,6 +2705,14 @@ config_tinker(
item = LOOP_MAX;
break;
case T_Stepback:
item = LOOP_MAX_BACK;
break;
case T_Stepfwd:
item = LOOP_MAX_FWD;
break;
case T_Stepout:
item = LOOP_MINSTEP;
break;

View File

@ -228,7 +228,8 @@ static const struct ctl_proc control_codes[] = {
#define CS_TIMER_OVERRUNS 86
#define CS_TIMER_XMTS 87
#define CS_FUZZ 88
#define CS_MAX_NOAUTOKEY CS_FUZZ
#define CS_WANDER_THRESH 89
#define CS_MAX_NOAUTOKEY CS_WANDER_THRESH
#ifdef AUTOKEY
#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
#define CS_HOST (2 + CS_MAX_NOAUTOKEY)
@ -423,6 +424,7 @@ static const struct ctl_var sys_var[] = {
{ CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */
{ CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
{ CS_FUZZ, RO, "fuzz" }, /* 88 */
{ CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
{ CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
@ -485,7 +487,7 @@ static const struct ctl_var peer_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CP_CONFIG, RO, "config" }, /* 1 */
{ CP_AUTHENABLE, RO, "authenable" }, /* 2 */
{ CP_AUTHENTIC, RO, "authentic" }, /* 3 */
{ CP_AUTHENTIC, RO, "authentic" }, /* 3 */
{ CP_SRCADR, RO, "srcadr" }, /* 4 */
{ CP_SRCPORT, RO, "srcport" }, /* 5 */
{ CP_DSTADR, RO, "dstadr" }, /* 6 */
@ -537,7 +539,7 @@ static const struct ctl_var peer_var[] = {
{ CP_FLAGS, RO, "flags" }, /* 1 + CP_MAX_NOAUTOKEY */
{ CP_HOST, RO, "host" }, /* 2 + CP_MAX_NOAUTOKEY */
{ CP_VALID, RO, "valid" }, /* 3 + CP_MAX_NOAUTOKEY */
{ CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
{ CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
{ CP_INITKEY, RO, "initkey" }, /* 5 + CP_MAX_NOAUTOKEY */
{ CP_INITTSP, RO, "timestamp" }, /* 6 + CP_MAX_NOAUTOKEY */
{ CP_SIGNATURE, RO, "signature" }, /* 7 + CP_MAX_NOAUTOKEY */
@ -690,37 +692,37 @@ int num_ctl_traps;
*/
#ifdef REFCLOCK
static const u_char clocktypes[] = {
CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
CTL_SST_TS_LOCAL, /* REFCLK_LOCALCLOCK (1) */
CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
CTL_SST_TS_HF, /* REFCLK_WWV_PST (3) */
CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM (4) */
CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
CTL_SST_TS_HF, /* REFCLK_CHU (7) */
CTL_SST_TS_LF, /* REFCLOCK_PARSE (default) (8) */
CTL_SST_TS_LF, /* REFCLK_GPS_MX4200 (9) */
CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_LEITCH (13) */
CTL_SST_TS_LF, /* deprecated REFCLK_MSF_EES (14) */
CTL_SST_TS_NTP, /* not used (15) */
CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
CTL_SST_TS_NTP, /* not used (15) */
CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
CTL_SST_TS_TELEPHONE, /* REFCLK_NIST_ACTS (18) */
CTL_SST_TS_HF, /* REFCLK_WWV_HEATH (19) */
CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_PPS (22) */
CTL_SST_TS_NTP, /* not used (23) */
CTL_SST_TS_NTP, /* not used (24) */
CTL_SST_TS_NTP, /* not used (25) */
CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
CTL_SST_TS_NTP, /* not used (25) */
CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
CTL_SST_TS_LF, /* REFCLK_ARCRON_MSF (27) */
CTL_SST_TS_UHF, /* REFCLK_SHM (28) */
CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
CTL_SST_TS_UHF, /* REFCLK_JUPITER (31) */
CTL_SST_TS_LF, /* REFCLK_CHRONOLOG (32) */
CTL_SST_TS_LF, /* REFCLK_DUMBCLOCK (33) */
@ -728,7 +730,7 @@ static const u_char clocktypes[] = {
CTL_SST_TS_LF, /* REFCLK_PCF (35) */
CTL_SST_TS_HF, /* REFCLK_WWV (36) */
CTL_SST_TS_LF, /* REFCLK_FG (37) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_PCI (39) */
CTL_SST_TS_LF, /* REFCLK_JJY (40) */
CTL_SST_TS_UHF, /* REFCLK_TT560 (41) */
@ -759,17 +761,17 @@ static u_char ctl_sys_num_events;
u_long ctltimereset; /* time stats reset */
u_long numctlreq; /* number of requests we've received */
u_long numctlbadpkts; /* number of bad control packets */
u_long numctlresponses; /* number of resp packets sent with data */
u_long numctlfrags; /* number of fragments sent */
u_long numctlresponses; /* number of resp packets sent with data */
u_long numctlfrags; /* number of fragments sent */
u_long numctlerrors; /* number of error responses sent */
u_long numctltooshort; /* number of too short input packets */
u_long numctlinputresp; /* number of responses on input */
u_long numctlinputfrag; /* number of fragments on input */
u_long numctlinputresp; /* number of responses on input */
u_long numctlinputfrag; /* number of fragments on input */
u_long numctlinputerr; /* number of input pkts with err bit set */
u_long numctlbadoffset; /* number of input pkts with nonzero offset */
u_long numctlbadoffset; /* number of input pkts with nonzero offset */
u_long numctlbadversion; /* number of input pkts with unknown version */
u_long numctldatatooshort; /* data too short for count */
u_long numctlbadop; /* bad op code found in packet */
u_long numctlbadop; /* bad op code found in packet */
u_long numasyncmsgs; /* number of async messages we've sent */
/*
@ -788,7 +790,7 @@ static int res_offset; /* offset of payload in response */
static u_char * datapt;
static u_char * dataend;
static int datalinelen;
static int datasent; /* flag to avoid initial ", " */
static int datasent; /* flag to avoid initial ", " */
static int datanotbinflag;
static sockaddr_u *rmt_addr;
static struct interface *lcl_inter;
@ -852,7 +854,7 @@ ctl_error(
* Fill in the fields. We assume rpkt.sequence and rpkt.associd
* have already been filled in.
*/
rpkt.r_m_e_op = (u_char)CTL_RESPONSE | CTL_ERROR |
rpkt.r_m_e_op = (u_char)CTL_RESPONSE | CTL_ERROR |
(res_opcode & CTL_OP_MASK);
rpkt.status = htons((u_short)(errcode << 8) & 0xff00);
rpkt.count = 0;
@ -870,7 +872,7 @@ ctl_error(
CTL_HEADER_LEN);
}
/*
/*
* save_config - Implements ntpq -c "saveconfig <filename>"
* Writes current configuration including any runtime
* changes by ntpq's :config or config-from-file
@ -934,7 +936,7 @@ save_config(
if (0 == strftime(filename, sizeof(filename), filespec,
localtime(&now)))
strlcpy(filename, filespec, sizeof(filename));
/*
* Conceptually we should be searching for DIRSEP in filename,
* however Windows actually recognizes both forward and
@ -1324,7 +1326,7 @@ static void
ctl_putdata(
const char *dp,
unsigned int dlen,
int bin /* set to 1 when data is binary */
int bin /* set to 1 when data is binary */
)
{
int overhead;
@ -1694,7 +1696,7 @@ ctl_putrefid(
return;
iptr = (char *)&refid;
iplim = iptr + sizeof(refid);
for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
iptr++, optr++)
if (isprint((int)*iptr))
*optr = *iptr;
@ -1762,7 +1764,7 @@ ctl_putsys(
static const double to_ms =
# ifdef STA_NANO
1.0e-6; /* nsec to msec */
1.0e-6; /* nsec to msec */
# else
1.0e-3; /* usec to msec */
# endif
@ -1954,12 +1956,12 @@ ctl_putsys(
ctl_putdata(buf, (unsigned)( buffp - buf ), 0);
break;
}
case CS_TAI:
if (sys_tai > 0)
ctl_putuint(sys_var[CS_TAI].text, sys_tai);
break;
case CS_LEAPTAB:
{
leap_signature_t lsig;
@ -1968,7 +1970,7 @@ ctl_putsys(
ctl_putfs(sys_var[CS_LEAPTAB].text, lsig.ttime);
break;
}
case CS_LEAPEND:
{
leap_signature_t lsig;
@ -2113,7 +2115,7 @@ ctl_putsys(
break;
case CS_AUTHRESET:
ctl_putuint(sys_var[varid].text,
ctl_putuint(sys_var[varid].text,
current_time - auth_timereset);
break;
@ -2147,7 +2149,7 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
ctl_putdblf,
ctl_putdblf,
(sys_var[varid].text, 0, -1, to_ms * ntx.offset)
);
break;
@ -2327,6 +2329,9 @@ ctl_putsys(
case CS_FUZZ:
ctl_putdbl(sys_var[varid].text, sys_fuzz * 1e3);
break;
case CS_WANDER_THRESH:
ctl_putdbl(sys_var[varid].text, wander_threshold * 1e6);
break;
#ifdef AUTOKEY
case CS_FLAGS:
if (crypto_flags)
@ -2633,7 +2638,7 @@ ctl_putpeer(
memcpy(s, k->text, i);
s += i;
}
if (s + 2 < be) {
if (s + 2 < be) {
*s++ = '"';
*s = '\0';
ctl_putdata(buf, (u_int)(s - buf), 0);
@ -2712,7 +2717,7 @@ ctl_putpeer(
strlen(p->ident));
break;
#endif /* AUTOKEY */
}
}
@ -2821,7 +2826,7 @@ ctl_putclock(
sizeof(buf))
break; /* really long var name */
snprintf(s, sizeof(buf), "%s=\"",
snprintf(s, sizeof(buf), "%s=\"",
clock_var[CC_VARLIST].text);
s += strlen(s);
t = s;
@ -3309,7 +3314,7 @@ static void configure(
snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"runtime configuration prohibited by restrict ... nomodify");
ctl_putdata(remote_config.err_msg,
ctl_putdata(remote_config.err_msg,
strlen(remote_config.err_msg), 0);
ctl_flushpkt(0);
NLOG(NLOG_SYSINFO)
@ -3365,7 +3370,7 @@ static void configure(
config_remotely(&rbufp->recv_srcadr);
/*
/*
* Check if errors were reported. If not, output 'Config
* Succeeded'. Else output the error count. It would be nice
* to output any parser error messages.
@ -3374,10 +3379,10 @@ static void configure(
retval = snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"Config Succeeded");
if (retval > 0)
if (retval > 0)
remote_config.err_pos += retval;
}
ctl_putdata(remote_config.err_msg, remote_config.err_pos, 0);
ctl_flushpkt(0);
@ -3790,7 +3795,7 @@ static void read_mru_list(
while (NULL != (v = ctl_getitem(in_parms, &val)) &&
!(EOV & v->flags)) {
int si;
int si;
if (!strcmp(nonce_text, v->text)) {
if (NULL != pnonce)
@ -3887,7 +3892,7 @@ static void read_mru_list(
pch = sptoa(&mon->rmtadr);
ctl_putunqstr("addr.older", pch, strlen(pch));
/*
/*
* Move on to the first entry the client doesn't have,
* except in the special case of a limit of one. In
* that case return the starting point entry.
@ -3897,7 +3902,7 @@ static void read_mru_list(
} else { /* start with the oldest */
mon = TAIL_DLIST(mon_mru_list, mru);
}
/*
* send up to limit= entries in up to frags= datagrams
*/
@ -4656,7 +4661,7 @@ ctlfindtrap(
for (n = 0; n < COUNTOF(ctl_traps); n++)
if ((ctl_traps[n].tr_flags & TRAP_INUSE)
&& ADDR_PORT_EQ(raddr, &ctl_traps[n].tr_addr)
&& (linter == ctl_traps[n].tr_localaddr))
&& (linter == ctl_traps[n].tr_localaddr))
return &ctl_traps[n];
return NULL;
@ -4713,7 +4718,7 @@ report_event(
const char * src;
u_char errlast;
errlast = (u_char)err & ~PEER_EVENT;
errlast = (u_char)err & ~PEER_EVENT;
if (peer->last_event == errlast)
peer->num_events = 0;
if (peer->num_events >= CTL_PEER_MAXEVENTS)
@ -4985,7 +4990,7 @@ get_ext_sys_var(const char *tag)
}
}
}
return val;
}

View File

@ -1731,7 +1731,7 @@ crypto_args(
tstamp_t tstamp; /* NTP timestamp */
struct exten *ep; /* extension field pointer */
u_int len; /* extension field length */
size_t slen;
size_t slen = 0;
tstamp = crypto_time();
len = sizeof(struct exten);

File diff suppressed because it is too large Load Diff

View File

@ -787,7 +787,7 @@ leapsec_add(
const vint64 * now64 ,
int insert)
{
vint64 ttime, stime;
vint64 ttime, starttime;
struct calendar fts;
leap_info_t li;
@ -815,12 +815,12 @@ leapsec_add(
fts.hour = 0;
fts.minute = 0;
fts.second = 0;
stime = ntpcal_date_to_ntp64(&fts);
starttime = ntpcal_date_to_ntp64(&fts);
fts.month++;
ttime = ntpcal_date_to_ntp64(&fts);
li.ttime = ttime;
li.stime = ttime.D_s.lo - stime.D_s.lo;
li.stime = ttime.D_s.lo - starttime.D_s.lo;
li.taiof = (pt->head.size ? pt->info[0].taiof : pt->head.base_tai)
+ (insert ? 1 : -1);
li.dynls = 1;
@ -839,7 +839,7 @@ leapsec_raw(
int taiof,
int dynls)
{
vint64 stime;
vint64 starttime;
struct calendar fts;
leap_info_t li;
@ -856,9 +856,9 @@ leapsec_raw(
return FALSE;
}
fts.month--; /* was in range 1..12, no overflow here! */
stime = ntpcal_date_to_ntp64(&fts);
starttime = ntpcal_date_to_ntp64(&fts);
li.ttime = *ttime;
li.stime = ttime->D_s.lo - stime.D_s.lo;
li.stime = ttime->D_s.lo - starttime.D_s.lo;
li.taiof = (int16_t)taiof;
li.dynls = (dynls != 0);
return add_range(pt, &li);

View File

@ -46,7 +46,7 @@
#define CLOCK_LIMIT 30 /* poll-adjust threshold */
#define CLOCK_PGATE 4. /* poll-adjust gate */
#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
#define DTOFREQ(x) ((int32)((x) * 65536e6)) /* double to NTP */
/*
@ -106,7 +106,8 @@
/*
* Program variables that can be tinkered.
*/
double clock_max = CLOCK_MAX; /* step threshold */
double clock_max_back = CLOCK_MAX; /* step threshold */
double clock_max_fwd = CLOCK_MAX; /* step threshold */
double clock_minstep = CLOCK_MINSTEP; /* stepout threshold */
double clock_panic = CLOCK_PANIC; /* panic threshold */
double clock_phi = CLOCK_PHI; /* dispersion rate (s/s) */
@ -152,8 +153,10 @@ int kern_enable = TRUE; /* kernel support enabled */
int hardpps_enable; /* kernel PPS discipline enabled */
int ext_enable; /* external clock enabled */
int pps_stratum; /* pps stratum */
int allow_panic = FALSE; /* allow panic correction */
int mode_ntpdate = FALSE; /* exit on first clock set */
int kernel_status; /* from ntp_adjtime */
int allow_panic = FALSE; /* allow panic correction (-g) */
int force_step_once = FALSE; /* always step time once at startup (-G) */
int mode_ntpdate = FALSE; /* exit on first clock set (-q) */
int freq_cnt; /* initial frequency clamp */
int freq_set; /* initial set frequency switch */
@ -279,47 +282,69 @@ ntp_adjtime_error_handler(
}
break;
#ifdef TIME_OK
case TIME_OK: /* 0 no leap second warning */
/* OK means OK */
case TIME_OK: /* 0: synchronized, no leap second warning */
/* msyslog(LOG_INFO, "kernel reports time is synchronized normally"); */
break;
#else
# warning TIME_OK is not defined
#endif
#ifdef TIME_INS
case TIME_INS: /* 1 positive leap second warning */
msyslog(LOG_INFO, "%s: %s line %d: kernel reports positive leap second warning state",
caller, file_name(), line
);
case TIME_INS: /* 1: positive leap second warning */
msyslog(LOG_INFO, "kernel reports leap second insertion scheduled");
break;
#else
# warning TIME_INS is not defined
#endif
#ifdef TIME_DEL
case TIME_DEL: /* 2 negative leap second warning */
msyslog(LOG_INFO, "%s: %s line %d: kernel reports negative leap second warning state",
caller, file_name(), line
);
case TIME_DEL: /* 2: negative leap second warning */
msyslog(LOG_INFO, "kernel reports leap second deletion scheduled");
break;
#else
# warning TIME_DEL is not defined
#endif
#ifdef TIME_OOP
case TIME_OOP: /* 3 leap second in progress */
msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second in progress",
caller, file_name(), line
);
case TIME_OOP: /* 3: leap second in progress */
msyslog(LOG_INFO, "kernel reports leap second in progress");
break;
#else
# warning TIME_OOP is not defined
#endif
#ifdef TIME_WAIT
case TIME_WAIT: /* 4 leap second has occured */
msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second has occured",
caller, file_name(), line
);
case TIME_WAIT: /* 4: leap second has occured */
msyslog(LOG_INFO, "kernel reports leap second has occurred");
break;
#else
# warning TIME_WAIT is not defined
#endif
#ifdef TIME_ERROR
case TIME_ERROR: /* loss of synchronization */
case TIME_ERROR: /* 5: unsynchronized, or loss of synchronization */
/* error (see status word) */
if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
"PPS no signal");
errno = saved_errno;
DPRINTF(1, ("kernel loop status (%s) %d %m\n",
k_st_flags(ptimex->status), errno));
/*
* This code may be returned when ntp_adjtime() has just
* been called for the first time, quite a while after
* startup, when ntpd just starts to discipline the kernel
* time. In this case the occurrence of this message
* can be pretty confusing.
*
* HMS: How about a message when we begin kernel processing:
* Determining kernel clock state...
* so an initial TIME_ERROR message is less confising,
* or skipping the first message (ugh),
* or ???
* msyslog(LOG_INFO, "kernel reports time synchronization lost");
*/
errno = saved_errno; /* may not be needed */
msyslog(LOG_INFO, "kernel reports TIME_ERROR: %#x: %s %m",
ptimex->status, k_st_flags(ptimex->status));
break;
#else
# warning TIME_ERROR is not defined
#endif
default:
msyslog(LOG_NOTICE, "%s: %s line %d: unhandled return value %d from ntp_adjtime in %s at line %d",
@ -403,7 +428,8 @@ local_clock(
* directly to the terminal.
*/
if (mode_ntpdate) {
if (fabs(fp_offset) > clock_max && clock_max > 0) {
if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
|| (-fp_offset > clock_max_back && clock_max_back > 0)) {
step_systime(fp_offset);
msyslog(LOG_NOTICE, "ntpd: time set %+.6f s",
fp_offset);
@ -452,10 +478,10 @@ local_clock(
* threshold (128 ms) and when it does not. Under certain
* conditions updates are suspended until the stepout theshold
* (900 s) is exceeded. See the documentation on how these
* thresholds interact with commands and command line options.
* thresholds interact with commands and command line options.
*
* Note the kernel is disabled if step is disabled or greater
* than 0.5 s or in ntpdate mode.
* than 0.5 s or in ntpdate mode.
*/
osys_poll = sys_poll;
if (sys_poll < peer->minpoll)
@ -465,7 +491,14 @@ local_clock(
mu = current_time - clock_epoch;
clock_frequency = drift_comp;
rval = 1;
if (fabs(fp_offset) > clock_max && clock_max > 0) {
if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
|| (-fp_offset > clock_max_back && clock_max_back > 0)
|| force_step_once ) {
if (force_step_once) {
force_step_once = FALSE; /* we want this only once after startup */
msyslog(LOG_NOTICE, "Doing intital time step" );
}
switch (state) {
/*
@ -525,7 +558,7 @@ local_clock(
* threshold. Note that a single spike greater than the
* step threshold is always suppressed, even with a
* long time constant.
*/
*/
default:
snprintf(tbuf, sizeof(tbuf), "%+.6f s",
fp_offset);
@ -543,7 +576,6 @@ local_clock(
}
rstclock(EVNT_SYNC, 0);
} else {
/*
* The offset is less than the step threshold. Calculate
* the jitter as the exponentially weighted offset
@ -605,9 +637,9 @@ local_clock(
/*
* The PLL frequency gain (numerator) depends on
* the minimum of the update interval and Allan
* intercept. This reduces the PLL gain when the
* intercept. This reduces the PLL gain when the
* FLL becomes effective.
*/
*/
etemp = min(ULOGTOD(allan_xpt), mu);
dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
clock_frequency += fp_offset * etemp / (dtemp *
@ -706,8 +738,13 @@ local_clock(
* the pps. In any case, fetch the kernel offset,
* frequency and jitter.
*/
if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
ntp_adj_ret = ntp_adjtime(&ntv);
/*
* A squeal is a return status < 0, or a state change.
*/
if ((0 > ntp_adj_ret) || (ntp_adj_ret != kernel_status)) {
kernel_status = ntp_adj_ret;
ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
}
pll_status = ntv.status;
#ifdef STA_NANO
@ -888,7 +925,7 @@ adj_host_clock(
clock_offset -= offset_adj;
/*
* Windows port adj_systime() must be called each second,
* even if the argument is zero, to ease emulation of
* even if the argument is zero, to ease emulation of
* adjtime() using Windows' slew API which controls the rate
* but does not automatically stop slewing when an offset
* has decayed to zero.
@ -917,7 +954,7 @@ rstclock(
report_event(trans, NULL, NULL);
state = trans;
last_offset = clock_offset = offset;
clock_epoch = current_time;
clock_epoch = current_time;
}
@ -1190,12 +1227,12 @@ loop_config(
case LOOP_CODEC: /* audio codec frequency (codec) */
clock_codec = freq / 1e6;
break;
case LOOP_PHI: /* dispersion threshold (dispersion) */
clock_phi = freq / 1e6;
break;
case LOOP_FREQ: /* initial frequency (freq) */
case LOOP_FREQ: /* initial frequency (freq) */
init_drift_comp = freq;
freq_set++;
break;
@ -1216,8 +1253,27 @@ loop_config(
break;
case LOOP_MAX: /* step threshold (step) */
clock_max = freq;
if (clock_max == 0 || clock_max > 0.5)
clock_max_fwd = clock_max_back = freq;
if (freq == 0 || freq > 0.5)
select_loop(FALSE);
break;
case LOOP_MAX_BACK: /* step threshold (step) */
clock_max_back = freq;
/*
* Leave using the kernel discipline code unless both
* limits are massive. This assumes the reason to stop
* using it is that it's pointless, not that it goes wrong.
*/
if ( (clock_max_back == 0 || clock_max_back > 0.5)
|| (clock_max_fwd == 0 || clock_max_fwd > 0.5))
select_loop(FALSE);
break;
case LOOP_MAX_FWD: /* step threshold (step) */
clock_max_fwd = freq;
if ( (clock_max_back == 0 || clock_max_back > 0.5)
|| (clock_max_fwd == 0 || clock_max_fwd > 0.5))
select_loop(FALSE);
break;
@ -1225,7 +1281,7 @@ loop_config(
if (freq < CLOCK_MINSTEP)
clock_minstep = CLOCK_MINSTEP;
else
clock_minstep = freq;
clock_minstep = freq;
break;
case LOOP_TICK: /* tick increment (tick) */

File diff suppressed because it is too large Load Diff

View File

@ -194,44 +194,46 @@ extern int yydebug;
T_Stats = 404,
T_Statsdir = 405,
T_Step = 406,
T_Stepout = 407,
T_Stratum = 408,
T_String = 409,
T_Sys = 410,
T_Sysstats = 411,
T_Tick = 412,
T_Time1 = 413,
T_Time2 = 414,
T_Timer = 415,
T_Timingstats = 416,
T_Tinker = 417,
T_Tos = 418,
T_Trap = 419,
T_True = 420,
T_Trustedkey = 421,
T_Ttl = 422,
T_Type = 423,
T_U_int = 424,
T_Unconfig = 425,
T_Unpeer = 426,
T_Version = 427,
T_WanderThreshold = 428,
T_Week = 429,
T_Wildcard = 430,
T_Xleave = 431,
T_Year = 432,
T_Flag = 433,
T_EOC = 434,
T_Simulate = 435,
T_Beep_Delay = 436,
T_Sim_Duration = 437,
T_Server_Offset = 438,
T_Duration = 439,
T_Freq_Offset = 440,
T_Wander = 441,
T_Jitter = 442,
T_Prop_Delay = 443,
T_Proc_Delay = 444
T_Stepback = 407,
T_Stepfwd = 408,
T_Stepout = 409,
T_Stratum = 410,
T_String = 411,
T_Sys = 412,
T_Sysstats = 413,
T_Tick = 414,
T_Time1 = 415,
T_Time2 = 416,
T_Timer = 417,
T_Timingstats = 418,
T_Tinker = 419,
T_Tos = 420,
T_Trap = 421,
T_True = 422,
T_Trustedkey = 423,
T_Ttl = 424,
T_Type = 425,
T_U_int = 426,
T_Unconfig = 427,
T_Unpeer = 428,
T_Version = 429,
T_WanderThreshold = 430,
T_Week = 431,
T_Wildcard = 432,
T_Xleave = 433,
T_Year = 434,
T_Flag = 435,
T_EOC = 436,
T_Simulate = 437,
T_Beep_Delay = 438,
T_Sim_Duration = 439,
T_Server_Offset = 440,
T_Duration = 441,
T_Freq_Offset = 442,
T_Wander = 443,
T_Jitter = 444,
T_Prop_Delay = 445,
T_Proc_Delay = 446
};
#endif
/* Tokens. */
@ -384,44 +386,46 @@ extern int yydebug;
#define T_Stats 404
#define T_Statsdir 405
#define T_Step 406
#define T_Stepout 407
#define T_Stratum 408
#define T_String 409
#define T_Sys 410
#define T_Sysstats 411
#define T_Tick 412
#define T_Time1 413
#define T_Time2 414
#define T_Timer 415
#define T_Timingstats 416
#define T_Tinker 417
#define T_Tos 418
#define T_Trap 419
#define T_True 420
#define T_Trustedkey 421
#define T_Ttl 422
#define T_Type 423
#define T_U_int 424
#define T_Unconfig 425
#define T_Unpeer 426
#define T_Version 427
#define T_WanderThreshold 428
#define T_Week 429
#define T_Wildcard 430
#define T_Xleave 431
#define T_Year 432
#define T_Flag 433
#define T_EOC 434
#define T_Simulate 435
#define T_Beep_Delay 436
#define T_Sim_Duration 437
#define T_Server_Offset 438
#define T_Duration 439
#define T_Freq_Offset 440
#define T_Wander 441
#define T_Jitter 442
#define T_Prop_Delay 443
#define T_Proc_Delay 444
#define T_Stepback 407
#define T_Stepfwd 408
#define T_Stepout 409
#define T_Stratum 410
#define T_String 411
#define T_Sys 412
#define T_Sysstats 413
#define T_Tick 414
#define T_Time1 415
#define T_Time2 416
#define T_Timer 417
#define T_Timingstats 418
#define T_Tinker 419
#define T_Tos 420
#define T_Trap 421
#define T_True 422
#define T_Trustedkey 423
#define T_Ttl 424
#define T_Type 425
#define T_U_int 426
#define T_Unconfig 427
#define T_Unpeer 428
#define T_Version 429
#define T_WanderThreshold 430
#define T_Week 431
#define T_Wildcard 432
#define T_Xleave 433
#define T_Year 434
#define T_Flag 435
#define T_EOC 436
#define T_Simulate 437
#define T_Beep_Delay 438
#define T_Sim_Duration 439
#define T_Server_Offset 440
#define T_Duration 441
#define T_Freq_Offset 442
#define T_Wander 443
#define T_Jitter 444
#define T_Prop_Delay 445
#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@ -447,7 +451,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
#line 451 "ntp_parser.h" /* yacc.c:1909 */
#line 455 "ntp_parser.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1

View File

@ -92,6 +92,7 @@ int peer_free_count; /* count of free structures */
* value every time an association is mobilized.
*/
static associd_t current_association_ID; /* association ID */
static associd_t initial_association_ID; /* association ID */
/*
* Memory allocation watermarks.
@ -147,6 +148,7 @@ init_peer(void)
do
current_association_ID = ntp_random() & ASSOCID_MAX;
while (!current_association_ID);
initial_association_ID = current_association_ID;
}
@ -1036,3 +1038,21 @@ findmanycastpeer(
return peer;
}
/* peer_cleanup - clean peer list prior to shutdown */
void peer_cleanup(void)
{
struct peer *peer;
associd_t assoc;
for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) {
if (assoc != 0U) {
peer = findpeerbyassoc(assoc);
if (peer != NULL)
unpeer(peer);
}
}
peer = findpeerbyassoc(current_association_ID);
if (peer != NULL)
unpeer(peer);
}

View File

@ -245,7 +245,7 @@ transmit(
/*
* Update the reachability status. If not heard for
* three consecutive polls, stuff infinity in the clock
* filter.
* filter.
*/
oreach = peer->reach;
peer->outdate = current_time;
@ -290,7 +290,7 @@ transmit(
* If preemptible and we have more peers than maxclock,
* and this peer has the minimum score of preemptibles,
* demobilize.
*/
*/
if (peer->unreach >= NTP_UNREACH) {
hpoll++;
/* ephemeral: no FLAG_CONFIG nor FLAG_PREEMPT */
@ -335,7 +335,7 @@ transmit(
peer->retry--;
/*
* Do not transmit if in broadcast client mode.
* Do not transmit if in broadcast client mode.
*/
if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer);
@ -442,7 +442,7 @@ receive(
return; /* no flakeway */
}
}
/*
* Version check must be after the query packets, since they
* intentionally use an early version.
@ -659,7 +659,7 @@ receive(
* If the signature is 20 bytes long, the last 16 of
* which are zero, then this is a Microsoft client
* wanting AD-style authentication of the server's
* reply.
* reply.
*
* This is described in Microsoft's WSPP docs, in MS-SNTP:
* http://msdn.microsoft.com/en-us/library/cc212930.aspx
@ -680,7 +680,7 @@ receive(
* broadcast or unicast address as appropriate.
*/
if (crypto_flags && skeyid > NTP_MAXKEY) {
/*
* More on the autokey dance (AKD). A cookie is
* constructed from public and private values.
@ -874,7 +874,7 @@ receive(
* curious and could be an intruder attempting to clog, so we
* just ignore it.
*
* If the packet is authentic and the manycastclient or pool
* If the packet is authentic and the manycastclient or pool
* association is found, we mobilize a client association and
* copy pertinent variables from the manycastclient or pool
* association to the new client association. If not, just
@ -1255,16 +1255,6 @@ receive(
peer->flash |= TEST2; /* bogus */
}
/*
* Update the state variables.
*/
if (peer->flip == 0) {
if (hismode != MODE_BROADCAST)
peer->rec = p_xmt;
peer->dst = rbufp->recv_time;
}
peer->xmt = p_xmt;
/*
* If this is a crypto_NAK, the server cannot authenticate a
* client packet. The server might have just changed keys. Clear
@ -1284,19 +1274,21 @@ receive(
#endif /* AUTOKEY */
return;
/*
* If the digest fails, the client cannot authenticate a server
/*
* If the digest fails or it's missing for authenticated
* associations, the client cannot authenticate a server
* reply to a client packet previously sent. The loopback check
* is designed to avoid a bait-and-switch attack, which was
* possible in past versions. If symmetric modes, return a
* crypto-NAK. The peer should restart the protocol.
*/
} else if (!AUTH(has_mac || (restrict_mask & RES_DONTTRUST),
is_authentic)) {
} else if (!AUTH(peer->keyid || has_mac ||
(restrict_mask & RES_DONTTRUST), is_authentic)) {
report_event(PEVNT_AUTH, peer, "digest");
peer->flash |= TEST5; /* bad auth */
peer->badauth++;
if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)
if (has_mac &&
(hismode == MODE_ACTIVE || hismode == MODE_PASSIVE))
fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
if (peer->flags & FLAG_PREEMPT) {
unpeer(peer);
@ -1309,6 +1301,16 @@ receive(
return;
}
/*
* Update the state variables.
*/
if (peer->flip == 0) {
if (hismode != MODE_BROADCAST)
peer->rec = p_xmt;
peer->dst = rbufp->recv_time;
}
peer->xmt = p_xmt;
/*
* Set the peer ppoll to the maximum of the packet ppoll and the
* peer minpoll. If a kiss-o'-death, set the peer minpoll to
@ -1577,7 +1579,7 @@ process_packet(
/*
* If the peer was previously unreachable, raise a trap. In any
* case, mark it reachable.
*/
*/
if (!peer->reach) {
report_event(PEVNT_REACH, peer, NULL);
peer->timereachable = current_time;
@ -1644,8 +1646,8 @@ process_packet(
* Interleaved broadcast mode. Use interleaved timestamps.
* t1 = peer->borg, t2 = p_org, t3 = p_org, t4 = aorg
*/
if (peer->flags & FLAG_XB) {
ci = p_org; /* delay */
if (peer->flags & FLAG_XB) {
ci = p_org; /* delay */
L_SUB(&ci, &peer->aorg);
LFPTOD(&ci, t34);
ci = p_org; /* t2 - t1 */
@ -1774,7 +1776,7 @@ process_packet(
p_del, peer->r21 / 1e3, peer->r34 / 1e3,
td);
#endif
}
}
#endif /* ASSYM */
/*
@ -2240,7 +2242,7 @@ clock_filter(
for (i = NTP_SHIFT - 1; i >= 0; i--) {
if (i != 0)
peer->filter_disp[j] += dtemp;
if (peer->filter_disp[j] >= MAXDISPERSE) {
if (peer->filter_disp[j] >= MAXDISPERSE) {
peer->filter_disp[j] = MAXDISPERSE;
dst[i] = MAXDISPERSE;
} else if (peer->update - peer->filter_epoch[j] >
@ -2255,7 +2257,7 @@ clock_filter(
}
/*
* If the clock has stabilized, sort the samples by distance.
* If the clock has stabilized, sort the samples by distance.
*/
if (freq_cnt == 0) {
for (i = 1; i < NTP_SHIFT; i++) {
@ -2289,7 +2291,7 @@ clock_filter(
continue;
m++;
}
/*
* Compute the dispersion and jitter. The dispersion is weighted
* exponentially by NTP_FWEIGHT (0.5) so it is normalized close
@ -2493,9 +2495,9 @@ clock_select(void)
/*
* If this peer could have the orphan parent
* as a synchronization ancestor, exclude it
* from selection to avoid forming a
* from selection to avoid forming a
* synchronization loop within the orphan mesh,
* triggering stratum climb to infinity
* triggering stratum climb to infinity
* instability. Peers at stratum higher than
* the orphan stratum could have the orphan
* parent in ancestry so are excluded.
@ -2603,7 +2605,7 @@ clock_select(void)
for (allow = 0; 2 * allow < nlist; allow++) {
/*
* Bound the interval (low, high) as the smallest
* Bound the interval (low, high) as the smallest
* interval containing points from the most sources.
*/
n = 0;
@ -2639,7 +2641,7 @@ clock_select(void)
* We assert the correct time is contained in the interval, but
* the best offset estimate for the interval might not be
* contained in the interval. For this purpose, a truechimer is
* defined as the midpoint of an interval that overlaps the
* defined as the midpoint of an interval that overlaps the
* intersection interval.
*/
j = 0;
@ -2659,9 +2661,10 @@ clock_select(void)
* include any of them in the cluster population.
*/
if (peer->flags & FLAG_PPS) {
if (typepps == NULL)
if (typepps == NULL)
typepps = peer;
continue;
if (!(peer->flags & FLAG_TSTAMP_PPS))
continue;
}
#endif /* REFCLOCK */
@ -2672,7 +2675,7 @@ clock_select(void)
nlist = j;
/*
* If no survivors remain at this point, check if the modem
* If no survivors remain at this point, check if the modem
* driver, local driver or orphan parent in that order. If so,
* nominate the first one found as the only survivor.
* Otherwise, give up and leave the island to the rats.
@ -2709,7 +2712,7 @@ clock_select(void)
* by root distance. Continue voting as long as there are more
* than sys_minclock survivors and the select jitter of the peer
* with the worst metric is greater than the minimum peer
* jitter. Stop if we are about to discard a TRUE or PREFER
* jitter. Stop if we are about to discard a TRUE or PREFER
* peer, who of course have the immunity idol.
*/
while (1) {
@ -2815,7 +2818,7 @@ clock_select(void)
typesystem = peers[speer].peer;
if (osys_peer == NULL || osys_peer == typesystem) {
sys_clockhop = 0;
sys_clockhop = 0;
} else if ((x = fabs(typesystem->offset -
osys_peer->offset)) < sys_mindisp) {
if (sys_clockhop == 0)
@ -3113,7 +3116,7 @@ peer_xmit(
* the session key is generated.
*/
while (1) {
/*
* Allocate and initialize a keylist if not
* already done. Then, use the list in inverse
@ -3165,7 +3168,7 @@ peer_xmit(
break;
/*
* In symmetric modes the parameter, certificate,
* In symmetric modes the parameter, certificate,
* identity, cookie and autokey exchanges are
* required. The leapsecond exchange is optional. But, a
* peer will not believe the other peer until the other
@ -3324,7 +3327,7 @@ peer_xmit(
session_key(&peer->dstadr->sin, &peer->srcadr,
xkeyid, 0, 2);
}
}
}
#endif /* AUTOKEY */
/*
@ -3619,7 +3622,7 @@ pool_xmit(
return; /* out of addresses, re-query DNS next poll */
restrict_mask = restrictions(rmtadr);
if (RES_FLAGS & restrict_mask)
restrict_source(rmtadr, 0,
restrict_source(rmtadr, 0,
current_time + POOL_SOLICIT_WINDOW + 1);
lcladr = findinterface(rmtadr);
memset(&xpkt, 0, sizeof(xpkt));

View File

@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
* It has been AutoGen-ed February 4, 2015 at 02:39:17 AM by AutoGen 5.18.5pre4
* It has been AutoGen-ed April 7, 2015 at 04:23:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@ -74,8 +74,8 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
static char const ntpd_opt_strs[3061] =
/* 0 */ "ntpd 4.2.8p1\n"
static char const ntpd_opt_strs[3129] =
/* 0 */ "ntpd 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@ -122,92 +122,95 @@ static char const ntpd_opt_strs[3061] =
/* 1460 */ "Allow the first adjustment to be Big\0"
/* 1497 */ "PANICGATE\0"
/* 1507 */ "panicgate\0"
/* 1517 */ "Jail directory\0"
/* 1532 */ "JAILDIR\0"
/* 1540 */ "jaildir\0"
/* 1548 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
/* 1627 */ "Listen on an interface name or address\0"
/* 1666 */ "INTERFACE\0"
/* 1676 */ "interface\0"
/* 1686 */ "path to symmetric keys\0"
/* 1709 */ "KEYFILE\0"
/* 1717 */ "keyfile\0"
/* 1725 */ "path to the log file\0"
/* 1746 */ "LOGFILE\0"
/* 1754 */ "logfile\0"
/* 1762 */ "Do not listen to virtual interfaces\0"
/* 1798 */ "NOVIRTUALIPS\0"
/* 1811 */ "novirtualips\0"
/* 1824 */ "Modify Multimedia Timer (Windows only)\0"
/* 1863 */ "MODIFYMMTIMER\0"
/* 1877 */ "modifymmtimer\0"
/* 1891 */ "Do not fork\0"
/* 1903 */ "NOFORK\0"
/* 1910 */ "nofork\0"
/* 1917 */ "Run at high priority\0"
/* 1938 */ "NICE\0"
/* 1943 */ "nice\0"
/* 1948 */ "path to the PID file\0"
/* 1969 */ "PIDFILE\0"
/* 1977 */ "pidfile\0"
/* 1985 */ "Process priority\0"
/* 2002 */ "PRIORITY\0"
/* 2011 */ "priority\0"
/* 2020 */ "Set the time and quit\0"
/* 2042 */ "QUIT\0"
/* 2047 */ "quit\0"
/* 2052 */ "Broadcast/propagation delay\0"
/* 2080 */ "PROPAGATIONDELAY\0"
/* 2097 */ "propagationdelay\0"
/* 2114 */ "Save parsed configuration and quit\0"
/* 2149 */ "SAVECONFIGQUIT\0"
/* 2164 */ "saveconfigquit\0"
/* 2179 */ "Statistics file location\0"
/* 2204 */ "STATSDIR\0"
/* 2213 */ "statsdir\0"
/* 2222 */ "Trusted key number\0"
/* 2241 */ "TRUSTEDKEY\0"
/* 2252 */ "trustedkey\0"
/* 2263 */ "Run as userid (or userid:groupid)\0"
/* 2297 */ "USER\0"
/* 2302 */ "user\0"
/* 2307 */ "interval in seconds between scans for new or dropped interfaces\0"
/* 2371 */ "UPDATEINTERVAL\0"
/* 2386 */ "updateinterval\0"
/* 2401 */ "make ARG an ntp variable (RW)\0"
/* 2431 */ "VAR\0"
/* 2435 */ "var\0"
/* 2439 */ "make ARG an ntp variable (RW|DEF)\0"
/* 2473 */ "DVAR\0"
/* 2478 */ "dvar\0"
/* 2483 */ "Seconds to wait for first clock sync\0"
/* 2520 */ "WAIT_SYNC\0"
/* 2530 */ "wait-sync\0"
/* 2540 */ "Slew up to 600 seconds\0"
/* 2563 */ "SLEW\0"
/* 2568 */ "slew\0"
/* 2573 */ "Use CPU cycle counter (Windows only)\0"
/* 2610 */ "USEPCC\0"
/* 2617 */ "usepcc\0"
/* 2624 */ "Force CPU cycle counter use (Windows only)\0"
/* 2667 */ "PCCFREQ\0"
/* 2675 */ "pccfreq\0"
/* 2683 */ "Register with mDNS as a NTP server\0"
/* 2718 */ "MDNS\0"
/* 2723 */ "mdns\0"
/* 2728 */ "display extended usage information and exit\0"
/* 2772 */ "help\0"
/* 2777 */ "extended usage information passed thru pager\0"
/* 2822 */ "more-help\0"
/* 2832 */ "output version information and exit\0"
/* 2868 */ "version\0"
/* 2876 */ "NTPD\0"
/* 2881 */ "ntpd - NTP daemon program - Ver. 4.2.8p1\n"
/* 1517 */ "Step any initial offset correction.\0"
/* 1553 */ "FORCE_STEP_ONCE\0"
/* 1569 */ "force-step-once\0"
/* 1585 */ "Jail directory\0"
/* 1600 */ "JAILDIR\0"
/* 1608 */ "jaildir\0"
/* 1616 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
/* 1695 */ "Listen on an interface name or address\0"
/* 1734 */ "INTERFACE\0"
/* 1744 */ "interface\0"
/* 1754 */ "path to symmetric keys\0"
/* 1777 */ "KEYFILE\0"
/* 1785 */ "keyfile\0"
/* 1793 */ "path to the log file\0"
/* 1814 */ "LOGFILE\0"
/* 1822 */ "logfile\0"
/* 1830 */ "Do not listen to virtual interfaces\0"
/* 1866 */ "NOVIRTUALIPS\0"
/* 1879 */ "novirtualips\0"
/* 1892 */ "Modify Multimedia Timer (Windows only)\0"
/* 1931 */ "MODIFYMMTIMER\0"
/* 1945 */ "modifymmtimer\0"
/* 1959 */ "Do not fork\0"
/* 1971 */ "NOFORK\0"
/* 1978 */ "nofork\0"
/* 1985 */ "Run at high priority\0"
/* 2006 */ "NICE\0"
/* 2011 */ "nice\0"
/* 2016 */ "path to the PID file\0"
/* 2037 */ "PIDFILE\0"
/* 2045 */ "pidfile\0"
/* 2053 */ "Process priority\0"
/* 2070 */ "PRIORITY\0"
/* 2079 */ "priority\0"
/* 2088 */ "Set the time and quit\0"
/* 2110 */ "QUIT\0"
/* 2115 */ "quit\0"
/* 2120 */ "Broadcast/propagation delay\0"
/* 2148 */ "PROPAGATIONDELAY\0"
/* 2165 */ "propagationdelay\0"
/* 2182 */ "Save parsed configuration and quit\0"
/* 2217 */ "SAVECONFIGQUIT\0"
/* 2232 */ "saveconfigquit\0"
/* 2247 */ "Statistics file location\0"
/* 2272 */ "STATSDIR\0"
/* 2281 */ "statsdir\0"
/* 2290 */ "Trusted key number\0"
/* 2309 */ "TRUSTEDKEY\0"
/* 2320 */ "trustedkey\0"
/* 2331 */ "Run as userid (or userid:groupid)\0"
/* 2365 */ "USER\0"
/* 2370 */ "user\0"
/* 2375 */ "interval in seconds between scans for new or dropped interfaces\0"
/* 2439 */ "UPDATEINTERVAL\0"
/* 2454 */ "updateinterval\0"
/* 2469 */ "make ARG an ntp variable (RW)\0"
/* 2499 */ "VAR\0"
/* 2503 */ "var\0"
/* 2507 */ "make ARG an ntp variable (RW|DEF)\0"
/* 2541 */ "DVAR\0"
/* 2546 */ "dvar\0"
/* 2551 */ "Seconds to wait for first clock sync\0"
/* 2588 */ "WAIT_SYNC\0"
/* 2598 */ "wait-sync\0"
/* 2608 */ "Slew up to 600 seconds\0"
/* 2631 */ "SLEW\0"
/* 2636 */ "slew\0"
/* 2641 */ "Use CPU cycle counter (Windows only)\0"
/* 2678 */ "USEPCC\0"
/* 2685 */ "usepcc\0"
/* 2692 */ "Force CPU cycle counter use (Windows only)\0"
/* 2735 */ "PCCFREQ\0"
/* 2743 */ "pccfreq\0"
/* 2751 */ "Register with mDNS as a NTP server\0"
/* 2786 */ "MDNS\0"
/* 2791 */ "mdns\0"
/* 2796 */ "display extended usage information and exit\0"
/* 2840 */ "help\0"
/* 2845 */ "extended usage information passed thru pager\0"
/* 2890 */ "more-help\0"
/* 2900 */ "output version information and exit\0"
/* 2936 */ "version\0"
/* 2944 */ "NTPD\0"
/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
/* 3012 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 3046 */ "\n\0"
/* 3048 */ "ntpd 4.2.8p1";
/* 3080 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 3114 */ "\n\0"
/* 3116 */ "ntpd 4.2.8p2";
/**
* ipv4 option description with
@ -348,16 +351,28 @@ static int const aAuthnoreqCantList[] = {
/** Compiled in flag settings for the panicgate option */
#define PANICGATE_FLAGS (OPTST_DISABLED)
/**
* force_step_once option description:
*/
/** Descriptive text for the force_step_once option */
#define FORCE_STEP_ONCE_DESC (ntpd_opt_strs+1517)
/** Upper-cased name for the force_step_once option */
#define FORCE_STEP_ONCE_NAME (ntpd_opt_strs+1553)
/** Name string for the force_step_once option */
#define FORCE_STEP_ONCE_name (ntpd_opt_strs+1569)
/** Compiled in flag settings for the force_step_once option */
#define FORCE_STEP_ONCE_FLAGS (OPTST_DISABLED)
/**
* jaildir option description:
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the jaildir option */
#define JAILDIR_DESC (ntpd_opt_strs+1517)
#define JAILDIR_DESC (ntpd_opt_strs+1585)
/** Upper-cased name for the jaildir option */
#define JAILDIR_NAME (ntpd_opt_strs+1532)
#define JAILDIR_NAME (ntpd_opt_strs+1600)
/** Name string for the jaildir option */
#define JAILDIR_name (ntpd_opt_strs+1540)
#define JAILDIR_name (ntpd_opt_strs+1608)
/** Compiled in flag settings for the jaildir option */
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -366,19 +381,19 @@ static int const aAuthnoreqCantList[] = {
#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define JAILDIR_NAME NULL
/** Descriptive text for the jaildir option */
#define JAILDIR_DESC (ntpd_opt_strs+1548)
#define JAILDIR_name (ntpd_opt_strs+1540)
#define JAILDIR_DESC (ntpd_opt_strs+1616)
#define JAILDIR_name (ntpd_opt_strs+1608)
#endif /* HAVE_DROPROOT */
/**
* interface option description:
*/
/** Descriptive text for the interface option */
#define INTERFACE_DESC (ntpd_opt_strs+1627)
#define INTERFACE_DESC (ntpd_opt_strs+1695)
/** Upper-cased name for the interface option */
#define INTERFACE_NAME (ntpd_opt_strs+1666)
#define INTERFACE_NAME (ntpd_opt_strs+1734)
/** Name string for the interface option */
#define INTERFACE_name (ntpd_opt_strs+1676)
#define INTERFACE_name (ntpd_opt_strs+1744)
/** Compiled in flag settings for the interface option */
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -387,11 +402,11 @@ static int const aAuthnoreqCantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
#define KEYFILE_DESC (ntpd_opt_strs+1686)
#define KEYFILE_DESC (ntpd_opt_strs+1754)
/** Upper-cased name for the keyfile option */
#define KEYFILE_NAME (ntpd_opt_strs+1709)
#define KEYFILE_NAME (ntpd_opt_strs+1777)
/** Name string for the keyfile option */
#define KEYFILE_name (ntpd_opt_strs+1717)
#define KEYFILE_name (ntpd_opt_strs+1785)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -400,11 +415,11 @@ static int const aAuthnoreqCantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
#define LOGFILE_DESC (ntpd_opt_strs+1725)
#define LOGFILE_DESC (ntpd_opt_strs+1793)
/** Upper-cased name for the logfile option */
#define LOGFILE_NAME (ntpd_opt_strs+1746)
#define LOGFILE_NAME (ntpd_opt_strs+1814)
/** Name string for the logfile option */
#define LOGFILE_name (ntpd_opt_strs+1754)
#define LOGFILE_name (ntpd_opt_strs+1822)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -413,11 +428,11 @@ static int const aAuthnoreqCantList[] = {
* novirtualips option description:
*/
/** Descriptive text for the novirtualips option */
#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1762)
#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1830)
/** Upper-cased name for the novirtualips option */
#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1798)
#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1866)
/** Name string for the novirtualips option */
#define NOVIRTUALIPS_name (ntpd_opt_strs+1811)
#define NOVIRTUALIPS_name (ntpd_opt_strs+1879)
/** Compiled in flag settings for the novirtualips option */
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
@ -426,11 +441,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the modifymmtimer option */
#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1824)
#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1892)
/** Upper-cased name for the modifymmtimer option */
#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1863)
#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1931)
/** Name string for the modifymmtimer option */
#define MODIFYMMTIMER_name (ntpd_opt_strs+1877)
#define MODIFYMMTIMER_name (ntpd_opt_strs+1945)
/** Compiled in flag settings for the modifymmtimer option */
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
@ -446,11 +461,11 @@ static int const aAuthnoreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the nofork option */
#define NOFORK_DESC (ntpd_opt_strs+1891)
#define NOFORK_DESC (ntpd_opt_strs+1959)
/** Upper-cased name for the nofork option */
#define NOFORK_NAME (ntpd_opt_strs+1903)
#define NOFORK_NAME (ntpd_opt_strs+1971)
/** Name string for the nofork option */
#define NOFORK_name (ntpd_opt_strs+1910)
#define NOFORK_name (ntpd_opt_strs+1978)
/** Other options that appear in conjunction with the nofork option */
static int const aNoforkCantList[] = {
INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
@ -461,11 +476,11 @@ static int const aNoforkCantList[] = {
* nice option description:
*/
/** Descriptive text for the nice option */
#define NICE_DESC (ntpd_opt_strs+1917)
#define NICE_DESC (ntpd_opt_strs+1985)
/** Upper-cased name for the nice option */
#define NICE_NAME (ntpd_opt_strs+1938)
#define NICE_NAME (ntpd_opt_strs+2006)
/** Name string for the nice option */
#define NICE_name (ntpd_opt_strs+1943)
#define NICE_name (ntpd_opt_strs+2011)
/** Compiled in flag settings for the nice option */
#define NICE_FLAGS (OPTST_DISABLED)
@ -473,11 +488,11 @@ static int const aNoforkCantList[] = {
* pidfile option description:
*/
/** Descriptive text for the pidfile option */
#define PIDFILE_DESC (ntpd_opt_strs+1948)
#define PIDFILE_DESC (ntpd_opt_strs+2016)
/** Upper-cased name for the pidfile option */
#define PIDFILE_NAME (ntpd_opt_strs+1969)
#define PIDFILE_NAME (ntpd_opt_strs+2037)
/** Name string for the pidfile option */
#define PIDFILE_name (ntpd_opt_strs+1977)
#define PIDFILE_name (ntpd_opt_strs+2045)
/** Compiled in flag settings for the pidfile option */
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -486,11 +501,11 @@ static int const aNoforkCantList[] = {
* priority option description:
*/
/** Descriptive text for the priority option */
#define PRIORITY_DESC (ntpd_opt_strs+1985)
#define PRIORITY_DESC (ntpd_opt_strs+2053)
/** Upper-cased name for the priority option */
#define PRIORITY_NAME (ntpd_opt_strs+2002)
#define PRIORITY_NAME (ntpd_opt_strs+2070)
/** Name string for the priority option */
#define PRIORITY_name (ntpd_opt_strs+2011)
#define PRIORITY_name (ntpd_opt_strs+2079)
/** Compiled in flag settings for the priority option */
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@ -500,11 +515,11 @@ static int const aNoforkCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the quit option */
#define QUIT_DESC (ntpd_opt_strs+2020)
#define QUIT_DESC (ntpd_opt_strs+2088)
/** Upper-cased name for the quit option */
#define QUIT_NAME (ntpd_opt_strs+2042)
#define QUIT_NAME (ntpd_opt_strs+2110)
/** Name string for the quit option */
#define QUIT_name (ntpd_opt_strs+2047)
#define QUIT_name (ntpd_opt_strs+2115)
/** Other options that appear in conjunction with the quit option */
static int const aQuitCantList[] = {
INDEX_OPT_SAVECONFIGQUIT,
@ -516,11 +531,11 @@ static int const aQuitCantList[] = {
* propagationdelay option description:
*/
/** Descriptive text for the propagationdelay option */
#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2052)
#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2120)
/** Upper-cased name for the propagationdelay option */
#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2080)
#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2148)
/** Name string for the propagationdelay option */
#define PROPAGATIONDELAY_name (ntpd_opt_strs+2097)
#define PROPAGATIONDELAY_name (ntpd_opt_strs+2165)
/** Compiled in flag settings for the propagationdelay option */
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -531,11 +546,11 @@ static int const aQuitCantList[] = {
*/
#ifdef SAVECONFIG
/** Descriptive text for the saveconfigquit option */
#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2114)
#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2182)
/** Upper-cased name for the saveconfigquit option */
#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2149)
#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2217)
/** Name string for the saveconfigquit option */
#define SAVECONFIGQUIT_name (ntpd_opt_strs+2164)
#define SAVECONFIGQUIT_name (ntpd_opt_strs+2232)
/** Other options that appear in conjunction with the saveconfigquit option */
static int const aSaveconfigquitCantList[] = {
INDEX_OPT_QUIT,
@ -556,11 +571,11 @@ static int const aSaveconfigquitCantList[] = {
* statsdir option description:
*/
/** Descriptive text for the statsdir option */
#define STATSDIR_DESC (ntpd_opt_strs+2179)
#define STATSDIR_DESC (ntpd_opt_strs+2247)
/** Upper-cased name for the statsdir option */
#define STATSDIR_NAME (ntpd_opt_strs+2204)
#define STATSDIR_NAME (ntpd_opt_strs+2272)
/** Name string for the statsdir option */
#define STATSDIR_name (ntpd_opt_strs+2213)
#define STATSDIR_name (ntpd_opt_strs+2281)
/** Compiled in flag settings for the statsdir option */
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -569,11 +584,11 @@ static int const aSaveconfigquitCantList[] = {
* trustedkey option description:
*/
/** Descriptive text for the trustedkey option */
#define TRUSTEDKEY_DESC (ntpd_opt_strs+2222)
#define TRUSTEDKEY_DESC (ntpd_opt_strs+2290)
/** Upper-cased name for the trustedkey option */
#define TRUSTEDKEY_NAME (ntpd_opt_strs+2241)
#define TRUSTEDKEY_NAME (ntpd_opt_strs+2309)
/** Name string for the trustedkey option */
#define TRUSTEDKEY_name (ntpd_opt_strs+2252)
#define TRUSTEDKEY_name (ntpd_opt_strs+2320)
/** Compiled in flag settings for the trustedkey option */
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -583,11 +598,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the user option */
#define USER_DESC (ntpd_opt_strs+2263)
#define USER_DESC (ntpd_opt_strs+2331)
/** Upper-cased name for the user option */
#define USER_NAME (ntpd_opt_strs+2297)
#define USER_NAME (ntpd_opt_strs+2365)
/** Name string for the user option */
#define USER_name (ntpd_opt_strs+2302)
#define USER_name (ntpd_opt_strs+2370)
/** Compiled in flag settings for the user option */
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -596,19 +611,19 @@ static int const aSaveconfigquitCantList[] = {
#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define USER_NAME NULL
/** Descriptive text for the user option */
#define USER_DESC (ntpd_opt_strs+1548)
#define USER_name (ntpd_opt_strs+2302)
#define USER_DESC (ntpd_opt_strs+1616)
#define USER_name (ntpd_opt_strs+2370)
#endif /* HAVE_DROPROOT */
/**
* updateinterval option description:
*/
/** Descriptive text for the updateinterval option */
#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2307)
#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2375)
/** Upper-cased name for the updateinterval option */
#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2371)
#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2439)
/** Name string for the updateinterval option */
#define UPDATEINTERVAL_name (ntpd_opt_strs+2386)
#define UPDATEINTERVAL_name (ntpd_opt_strs+2454)
/** Compiled in flag settings for the updateinterval option */
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@ -617,11 +632,11 @@ static int const aSaveconfigquitCantList[] = {
* var option description:
*/
/** Descriptive text for the var option */
#define VAR_DESC (ntpd_opt_strs+2401)
#define VAR_DESC (ntpd_opt_strs+2469)
/** Upper-cased name for the var option */
#define VAR_NAME (ntpd_opt_strs+2431)
#define VAR_NAME (ntpd_opt_strs+2499)
/** Name string for the var option */
#define VAR_name (ntpd_opt_strs+2435)
#define VAR_name (ntpd_opt_strs+2503)
/** Compiled in flag settings for the var option */
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -630,11 +645,11 @@ static int const aSaveconfigquitCantList[] = {
* dvar option description:
*/
/** Descriptive text for the dvar option */
#define DVAR_DESC (ntpd_opt_strs+2439)
#define DVAR_DESC (ntpd_opt_strs+2507)
/** Upper-cased name for the dvar option */
#define DVAR_NAME (ntpd_opt_strs+2473)
#define DVAR_NAME (ntpd_opt_strs+2541)
/** Name string for the dvar option */
#define DVAR_name (ntpd_opt_strs+2478)
#define DVAR_name (ntpd_opt_strs+2546)
/** Compiled in flag settings for the dvar option */
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -645,11 +660,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_WORKING_FORK
/** Descriptive text for the wait-sync option */
#define WAIT_SYNC_DESC (ntpd_opt_strs+2483)
#define WAIT_SYNC_DESC (ntpd_opt_strs+2551)
/** Upper-cased name for the wait-sync option */
#define WAIT_SYNC_NAME (ntpd_opt_strs+2520)
#define WAIT_SYNC_NAME (ntpd_opt_strs+2588)
/** Name string for the wait-sync option */
#define WAIT_SYNC_name (ntpd_opt_strs+2530)
#define WAIT_SYNC_name (ntpd_opt_strs+2598)
/** Other options that appear in conjunction with the wait-sync option */
static int const aWait_SyncCantList[] = {
INDEX_OPT_NOFORK,
@ -671,11 +686,11 @@ static int const aWait_SyncCantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
#define SLEW_DESC (ntpd_opt_strs+2540)
#define SLEW_DESC (ntpd_opt_strs+2608)
/** Upper-cased name for the slew option */
#define SLEW_NAME (ntpd_opt_strs+2563)
#define SLEW_NAME (ntpd_opt_strs+2631)
/** Name string for the slew option */
#define SLEW_name (ntpd_opt_strs+2568)
#define SLEW_name (ntpd_opt_strs+2636)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@ -684,11 +699,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the usepcc option */
#define USEPCC_DESC (ntpd_opt_strs+2573)
#define USEPCC_DESC (ntpd_opt_strs+2641)
/** Upper-cased name for the usepcc option */
#define USEPCC_NAME (ntpd_opt_strs+2610)
#define USEPCC_NAME (ntpd_opt_strs+2678)
/** Name string for the usepcc option */
#define USEPCC_name (ntpd_opt_strs+2617)
#define USEPCC_name (ntpd_opt_strs+2685)
/** Compiled in flag settings for the usepcc option */
#define USEPCC_FLAGS (OPTST_DISABLED)
@ -704,11 +719,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the pccfreq option */
#define PCCFREQ_DESC (ntpd_opt_strs+2624)
#define PCCFREQ_DESC (ntpd_opt_strs+2692)
/** Upper-cased name for the pccfreq option */
#define PCCFREQ_NAME (ntpd_opt_strs+2667)
#define PCCFREQ_NAME (ntpd_opt_strs+2735)
/** Name string for the pccfreq option */
#define PCCFREQ_name (ntpd_opt_strs+2675)
#define PCCFREQ_name (ntpd_opt_strs+2743)
/** Compiled in flag settings for the pccfreq option */
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@ -725,11 +740,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef HAVE_DNSREGISTRATION
/** Descriptive text for the mdns option */
#define MDNS_DESC (ntpd_opt_strs+2683)
#define MDNS_DESC (ntpd_opt_strs+2751)
/** Upper-cased name for the mdns option */
#define MDNS_NAME (ntpd_opt_strs+2718)
#define MDNS_NAME (ntpd_opt_strs+2786)
/** Name string for the mdns option */
#define MDNS_name (ntpd_opt_strs+2723)
#define MDNS_name (ntpd_opt_strs+2791)
/** Compiled in flag settings for the mdns option */
#define MDNS_FLAGS (OPTST_DISABLED)
@ -743,11 +758,11 @@ static int const aWait_SyncCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
#define HELP_DESC (ntpd_opt_strs+2728)
#define HELP_name (ntpd_opt_strs+2772)
#define HELP_DESC (ntpd_opt_strs+2796)
#define HELP_name (ntpd_opt_strs+2840)
#ifdef HAVE_WORKING_FORK
#define MORE_HELP_DESC (ntpd_opt_strs+2777)
#define MORE_HELP_name (ntpd_opt_strs+2822)
#define MORE_HELP_DESC (ntpd_opt_strs+2845)
#define MORE_HELP_name (ntpd_opt_strs+2890)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@ -760,8 +775,8 @@ static int const aWait_SyncCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
#define VER_DESC (ntpd_opt_strs+2832)
#define VER_name (ntpd_opt_strs+2868)
#define VER_DESC (ntpd_opt_strs+2900)
#define VER_name (ntpd_opt_strs+2936)
/**
* Declare option callback procedures
*/
@ -901,8 +916,20 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 10, VALUE_OPT_JAILDIR,
/* equiv idx, value */ 10, VALUE_OPT_JAILDIR,
{ /* entry idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
/* equiv idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ FORCE_STEP_ONCE_FLAGS, 0,
/* last opt argumnt */ { NULL }, /* --force_step_once */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
/* desc, NAME, name */ FORCE_STEP_ONCE_DESC, FORCE_STEP_ONCE_NAME, FORCE_STEP_ONCE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 11, VALUE_OPT_JAILDIR,
/* equiv idx, value */ 11, VALUE_OPT_JAILDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ JAILDIR_FLAGS, 0,
@ -913,8 +940,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 11, VALUE_OPT_INTERFACE,
/* equiv idx, value */ 11, VALUE_OPT_INTERFACE,
{ /* entry idx, value */ 12, VALUE_OPT_INTERFACE,
/* equiv idx, value */ 12, VALUE_OPT_INTERFACE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ INTERFACE_FLAGS, 0,
@ -925,8 +952,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
/* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
{ /* entry idx, value */ 13, VALUE_OPT_KEYFILE,
/* equiv idx, value */ 13, VALUE_OPT_KEYFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
@ -937,8 +964,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 13, VALUE_OPT_LOGFILE,
/* equiv idx, value */ 13, VALUE_OPT_LOGFILE,
{ /* entry idx, value */ 14, VALUE_OPT_LOGFILE,
/* equiv idx, value */ 14, VALUE_OPT_LOGFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOGFILE_FLAGS, 0,
@ -949,8 +976,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
/* equiv idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
{ /* entry idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
/* equiv idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOVIRTUALIPS_FLAGS, 0,
@ -961,8 +988,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
/* equiv idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
{ /* entry idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
/* equiv idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MODIFYMMTIMER_FLAGS, 0,
@ -973,8 +1000,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 16, VALUE_OPT_NOFORK,
/* equiv idx, value */ 16, VALUE_OPT_NOFORK,
{ /* entry idx, value */ 17, VALUE_OPT_NOFORK,
/* equiv idx, value */ 17, VALUE_OPT_NOFORK,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOFORK_FLAGS, 0,
@ -985,8 +1012,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 17, VALUE_OPT_NICE,
/* equiv idx, value */ 17, VALUE_OPT_NICE,
{ /* entry idx, value */ 18, VALUE_OPT_NICE,
/* equiv idx, value */ 18, VALUE_OPT_NICE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NICE_FLAGS, 0,
@ -997,8 +1024,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 18, VALUE_OPT_PIDFILE,
/* equiv idx, value */ 18, VALUE_OPT_PIDFILE,
{ /* entry idx, value */ 19, VALUE_OPT_PIDFILE,
/* equiv idx, value */ 19, VALUE_OPT_PIDFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PIDFILE_FLAGS, 0,
@ -1009,8 +1036,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 19, VALUE_OPT_PRIORITY,
/* equiv idx, value */ 19, VALUE_OPT_PRIORITY,
{ /* entry idx, value */ 20, VALUE_OPT_PRIORITY,
/* equiv idx, value */ 20, VALUE_OPT_PRIORITY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PRIORITY_FLAGS, 0,
@ -1021,8 +1048,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 20, VALUE_OPT_QUIT,
/* equiv idx, value */ 20, VALUE_OPT_QUIT,
{ /* entry idx, value */ 21, VALUE_OPT_QUIT,
/* equiv idx, value */ 21, VALUE_OPT_QUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ QUIT_FLAGS, 0,
@ -1033,8 +1060,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
/* equiv idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
{ /* entry idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
/* equiv idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PROPAGATIONDELAY_FLAGS, 0,
@ -1045,8 +1072,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
/* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
{ /* entry idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
/* equiv idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SAVECONFIGQUIT_FLAGS, 0,
@ -1057,8 +1084,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
/* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
{ /* entry idx, value */ 24, VALUE_OPT_STATSDIR,
/* equiv idx, value */ 24, VALUE_OPT_STATSDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ STATSDIR_FLAGS, 0,
@ -1069,8 +1096,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
/* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
{ /* entry idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
/* equiv idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ TRUSTEDKEY_FLAGS, 0,
@ -1081,8 +1108,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 25, VALUE_OPT_USER,
/* equiv idx, value */ 25, VALUE_OPT_USER,
{ /* entry idx, value */ 26, VALUE_OPT_USER,
/* equiv idx, value */ 26, VALUE_OPT_USER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USER_FLAGS, 0,
@ -1093,8 +1120,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
/* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
{ /* entry idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
/* equiv idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
@ -1105,8 +1132,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 27, VALUE_OPT_VAR,
/* equiv idx, value */ 27, VALUE_OPT_VAR,
{ /* entry idx, value */ 28, VALUE_OPT_VAR,
/* equiv idx, value */ 28, VALUE_OPT_VAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ VAR_FLAGS, 0,
@ -1117,8 +1144,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 28, VALUE_OPT_DVAR,
/* equiv idx, value */ 28, VALUE_OPT_DVAR,
{ /* entry idx, value */ 29, VALUE_OPT_DVAR,
/* equiv idx, value */ 29, VALUE_OPT_DVAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DVAR_FLAGS, 0,
@ -1129,8 +1156,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC,
/* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC,
{ /* entry idx, value */ 30, VALUE_OPT_WAIT_SYNC,
/* equiv idx, value */ 30, VALUE_OPT_WAIT_SYNC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ WAIT_SYNC_FLAGS, 0,
@ -1141,8 +1168,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 30, VALUE_OPT_SLEW,
/* equiv idx, value */ 30, VALUE_OPT_SLEW,
{ /* entry idx, value */ 31, VALUE_OPT_SLEW,
/* equiv idx, value */ 31, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SLEW_FLAGS, 0,
@ -1153,8 +1180,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 31, VALUE_OPT_USEPCC,
/* equiv idx, value */ 31, VALUE_OPT_USEPCC,
{ /* entry idx, value */ 32, VALUE_OPT_USEPCC,
/* equiv idx, value */ 32, VALUE_OPT_USEPCC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USEPCC_FLAGS, 0,
@ -1165,8 +1192,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 32, VALUE_OPT_PCCFREQ,
/* equiv idx, value */ 32, VALUE_OPT_PCCFREQ,
{ /* entry idx, value */ 33, VALUE_OPT_PCCFREQ,
/* equiv idx, value */ 33, VALUE_OPT_PCCFREQ,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PCCFREQ_FLAGS, 0,
@ -1177,8 +1204,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 33, VALUE_OPT_MDNS,
/* equiv idx, value */ 33, VALUE_OPT_MDNS,
{ /* entry idx, value */ 34, VALUE_OPT_MDNS,
/* equiv idx, value */ 34, VALUE_OPT_MDNS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MDNS_FLAGS, 0,
@ -1231,21 +1258,21 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpd. */
#define zPROGNAME (ntpd_opt_strs+2876)
#define zPROGNAME (ntpd_opt_strs+2944)
/** Reference to the title line for ntpd usage. */
#define zUsageTitle (ntpd_opt_strs+2881)
#define zUsageTitle (ntpd_opt_strs+2949)
/** There is no ntpd configuration file. */
#define zRcName NULL
/** There are no directories to search for ntpd config files. */
#define apzHomeList NULL
/** The ntpd program bug email address. */
#define zBugsAddr (ntpd_opt_strs+3012)
#define zBugsAddr (ntpd_opt_strs+3080)
/** Clarification/explanation of what ntpd does. */
#define zExplain (ntpd_opt_strs+3046)
#define zExplain (ntpd_opt_strs+3114)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
#define zFullVersion (ntpd_opt_strs+3048)
#define zFullVersion (ntpd_opt_strs+3116)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@ -1367,7 +1394,7 @@ tOptions ntpdOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
37 /* full option count */, 34 /* user option count */,
38 /* full option count */, 35 /* user option count */,
ntpd_full_usage, ntpd_short_usage,
NULL, NULL,
PKGDATADIR, ntpd_packager_info
@ -1502,7 +1529,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
puts(_("ntpd 4.2.8p1\n\
puts(_("ntpd 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@ -1552,6 +1579,9 @@ implied warranty.\n"));
/* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Allow the first adjustment to be Big"));
/* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Step any initial offset correction."));
/* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Jail directory"));
@ -1640,7 +1670,7 @@ implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
puts(_("ntpd - NTP daemon program - Ver. 4.2.8p1\n\
puts(_("ntpd - NTP daemon program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@ -1648,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
puts(_("ntpd 4.2.8p1"));
puts(_("ntpd 4.2.8p2"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));

View File

@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
* It has been AutoGen-ed February 4, 2015 at 02:39:16 AM by AutoGen 5.18.5pre4
* It has been AutoGen-ed April 7, 2015 at 04:23:13 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@ -74,40 +74,41 @@ typedef enum {
INDEX_OPT_SET_DEBUG_LEVEL = 7,
INDEX_OPT_DRIFTFILE = 8,
INDEX_OPT_PANICGATE = 9,
INDEX_OPT_JAILDIR = 10,
INDEX_OPT_INTERFACE = 11,
INDEX_OPT_KEYFILE = 12,
INDEX_OPT_LOGFILE = 13,
INDEX_OPT_NOVIRTUALIPS = 14,
INDEX_OPT_MODIFYMMTIMER = 15,
INDEX_OPT_NOFORK = 16,
INDEX_OPT_NICE = 17,
INDEX_OPT_PIDFILE = 18,
INDEX_OPT_PRIORITY = 19,
INDEX_OPT_QUIT = 20,
INDEX_OPT_PROPAGATIONDELAY = 21,
INDEX_OPT_SAVECONFIGQUIT = 22,
INDEX_OPT_STATSDIR = 23,
INDEX_OPT_TRUSTEDKEY = 24,
INDEX_OPT_USER = 25,
INDEX_OPT_UPDATEINTERVAL = 26,
INDEX_OPT_VAR = 27,
INDEX_OPT_DVAR = 28,
INDEX_OPT_WAIT_SYNC = 29,
INDEX_OPT_SLEW = 30,
INDEX_OPT_USEPCC = 31,
INDEX_OPT_PCCFREQ = 32,
INDEX_OPT_MDNS = 33,
INDEX_OPT_VERSION = 34,
INDEX_OPT_HELP = 35,
INDEX_OPT_MORE_HELP = 36
INDEX_OPT_FORCE_STEP_ONCE = 10,
INDEX_OPT_JAILDIR = 11,
INDEX_OPT_INTERFACE = 12,
INDEX_OPT_KEYFILE = 13,
INDEX_OPT_LOGFILE = 14,
INDEX_OPT_NOVIRTUALIPS = 15,
INDEX_OPT_MODIFYMMTIMER = 16,
INDEX_OPT_NOFORK = 17,
INDEX_OPT_NICE = 18,
INDEX_OPT_PIDFILE = 19,
INDEX_OPT_PRIORITY = 20,
INDEX_OPT_QUIT = 21,
INDEX_OPT_PROPAGATIONDELAY = 22,
INDEX_OPT_SAVECONFIGQUIT = 23,
INDEX_OPT_STATSDIR = 24,
INDEX_OPT_TRUSTEDKEY = 25,
INDEX_OPT_USER = 26,
INDEX_OPT_UPDATEINTERVAL = 27,
INDEX_OPT_VAR = 28,
INDEX_OPT_DVAR = 29,
INDEX_OPT_WAIT_SYNC = 30,
INDEX_OPT_SLEW = 31,
INDEX_OPT_USEPCC = 32,
INDEX_OPT_PCCFREQ = 33,
INDEX_OPT_MDNS = 34,
INDEX_OPT_VERSION = 35,
INDEX_OPT_HELP = 36,
INDEX_OPT_MORE_HELP = 37
} teOptIndex;
/** count of all options for ntpd */
#define OPTION_CT 37
#define OPTION_CT 38
/** ntpd version */
#define NTPD_VERSION "4.2.8p1"
#define NTPD_VERSION "4.2.8p2"
/** Full ntpd version text */
#define NTPD_FULL_VERSION "ntpd 4.2.8p1"
#define NTPD_FULL_VERSION "ntpd 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@ -199,6 +200,10 @@ typedef enum {
# warning undefining PANICGATE due to option name conflict
# undef PANICGATE
# endif
# ifdef FORCE_STEP_ONCE
# warning undefining FORCE_STEP_ONCE due to option name conflict
# undef FORCE_STEP_ONCE
# endif
# ifdef JAILDIR
# warning undefining JAILDIR due to option name conflict
# undef JAILDIR
@ -306,6 +311,7 @@ typedef enum {
# undef SET_DEBUG_LEVEL
# undef DRIFTFILE
# undef PANICGATE
# undef FORCE_STEP_ONCE
# undef JAILDIR
# undef INTERFACE
# undef KEYFILE
@ -348,6 +354,7 @@ typedef enum {
#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_DRIFTFILE 'f'
#define VALUE_OPT_PANICGATE 'g'
#define VALUE_OPT_FORCE_STEP_ONCE 'G'
#define VALUE_OPT_JAILDIR 'i'
#define VALUE_OPT_INTERFACE 'I'
#define VALUE_OPT_KEYFILE 'k'

View File

@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntpd 1ntpdman "04 Feb 2015" "4.2.8p1" "User Commands"
.TH ntpd 1ntpdman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-YYaqWo/ag-.YaiVo)
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:41:54 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
configuration specification in the
configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
Step any initial offset correction..
.sp
Normally,
\fBntpd\fP
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the \fBtinker\fP configuration file directive for other options.
.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
\fBinterface\fP command, which is more versatile.
\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.

View File

@ -1,9 +1,9 @@
.Dd February 4 2015
.Dd April 7 2015
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
configuration specification in the
configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
.It Fl G , Fl \-force\-step\-once
Step any initial offset correction..
.sp
Normally,
\fBntpd\fP
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
\fBinterface\fP command, which is more versatile.
\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp

View File

@ -1262,6 +1262,7 @@ finish(
if (mdns != NULL)
DNSServiceRefDeallocate(mdns);
# endif
peer_cleanup();
exit(0);
}
#endif /* !SIM && SIGDIE1 */

View File

@ -39,7 +39,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
<p>This document applies to version 4.2.8p1 of <code>ntpd</code>.
<p>This document applies to version 4.2.8p2 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@ -169,7 +169,8 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c)
<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f)
<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g)
<li><a accesskey="9" href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
<li><a accesskey="9" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>: force-step-once option (-G)
<li><a href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I)
<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k)
<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l)
@ -219,7 +220,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p1-RC2
<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p2-RC3
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
@ -240,6 +241,7 @@ Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
-G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@ -413,7 +415,7 @@ configuration specification in the
file.
<div class="node">
<p><hr>
<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
@ -443,15 +445,37 @@ See the
configuration file directive for other options.
<div class="node">
<p><hr>
<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
<a name="ntpd-force_002dstep_002donce"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
</div>
<h4 class="subsection">force-step-once option (-G)</h4>
<p><a name="index-ntpd_002dforce_002dstep_002donce-11"></a>
This is the &ldquo;step any initial offset correction.&rdquo; option.
Normally,
<code>ntpd</code>
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the <code>tinker</code> configuration file directive for other options.
<div class="node">
<p><hr>
<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
</div>
<h4 class="subsection">jaildir option (-i)</h4>
<p><a name="index-ntpd_002djaildir-11"></a>
<p><a name="index-ntpd_002djaildir-12"></a>
This is the &ldquo;jail directory&rdquo; option.
This option takes a string argument.
@ -482,7 +506,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">interface option (-I)</h4>
<p><a name="index-ntpd_002dinterface-12"></a>
<p><a name="index-ntpd_002dinterface-13"></a>
This is the &ldquo;listen on an interface name or address&rdquo; option.
This option takes a string argument <span class="file">iface</span>.
@ -506,7 +530,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">keyfile option (-k)</h4>
<p><a name="index-ntpd_002dkeyfile-13"></a>
<p><a name="index-ntpd_002dkeyfile-14"></a>
This is the &ldquo;path to symmetric keys&rdquo; option.
This option takes a string argument.
Specify the name and path of the symmetric key file.
@ -525,7 +549,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">logfile option (-l)</h4>
<p><a name="index-ntpd_002dlogfile-14"></a>
<p><a name="index-ntpd_002dlogfile-15"></a>
This is the &ldquo;path to the log file&rdquo; option.
This option takes a string argument.
Specify the name and path of the log file.
@ -543,7 +567,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">novirtualips option (-L)</h4>
<p><a name="index-ntpd_002dnovirtualips-15"></a>
<p><a name="index-ntpd_002dnovirtualips-16"></a>
This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
Do not listen to virtual interfaces, defined as those with
names containing a colon. This option is deprecated. Please
@ -559,7 +583,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">modifymmtimer option (-M)</h4>
<p><a name="index-ntpd_002dmodifymmtimer-16"></a>
<p><a name="index-ntpd_002dmodifymmtimer-17"></a>
This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@ -580,7 +604,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">nice option (-N)</h4>
<p><a name="index-ntpd_002dnice-17"></a>
<p><a name="index-ntpd_002dnice-18"></a>
This is the &ldquo;run at high priority&rdquo; option.
To the extent permitted by the operating system, run
<code>ntpd</code>
@ -595,7 +619,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pidfile option (-p)</h4>
<p><a name="index-ntpd_002dpidfile-18"></a>
<p><a name="index-ntpd_002dpidfile-19"></a>
This is the &ldquo;path to the pid file&rdquo; option.
This option takes a string argument.
Specify the name and path of the file used to record
@ -614,7 +638,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">priority option (-P)</h4>
<p><a name="index-ntpd_002dpriority-19"></a>
<p><a name="index-ntpd_002dpriority-20"></a>
This is the &ldquo;process priority&rdquo; option.
This option takes a number argument.
To the extent permitted by the operating system, run
@ -632,7 +656,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">quit option (-q)</h4>
<p><a name="index-ntpd_002dquit-20"></a>
<p><a name="index-ntpd_002dquit-21"></a>
This is the &ldquo;set the time and quit&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@ -662,7 +686,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">propagationdelay option (-r)</h4>
<p><a name="index-ntpd_002dpropagationdelay-21"></a>
<p><a name="index-ntpd_002dpropagationdelay-22"></a>
This is the &ldquo;broadcast/propagation delay&rdquo; option.
This option takes a string argument.
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
@ -676,7 +700,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">saveconfigquit option</h4>
<p><a name="index-ntpd_002dsaveconfigquit-22"></a>
<p><a name="index-ntpd_002dsaveconfigquit-23"></a>
This is the &ldquo;save parsed configuration and quit&rdquo; option.
This option takes a string argument.
@ -700,7 +724,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">statsdir option (-s)</h4>
<p><a name="index-ntpd_002dstatsdir-23"></a>
<p><a name="index-ntpd_002dstatsdir-24"></a>
This is the &ldquo;statistics file location&rdquo; option.
This option takes a string argument.
Specify the directory path for files created by the statistics facility.
@ -717,7 +741,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">trustedkey option (-t)</h4>
<p><a name="index-ntpd_002dtrustedkey-24"></a>
<p><a name="index-ntpd_002dtrustedkey-25"></a>
This is the &ldquo;trusted key number&rdquo; option.
This option takes a string argument <span class="file">tkey</span>.
@ -737,7 +761,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">user option (-u)</h4>
<p><a name="index-ntpd_002duser-25"></a>
<p><a name="index-ntpd_002duser-26"></a>
This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
This option takes a string argument.
@ -762,7 +786,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">updateinterval option (-U)</h4>
<p><a name="index-ntpd_002dupdateinterval-26"></a>
<p><a name="index-ntpd_002dupdateinterval-27"></a>
This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
This option takes a number argument.
Give the time in seconds between two scans for new or dropped interfaces.
@ -779,7 +803,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">wait-sync option (-w)</h4>
<p><a name="index-ntpd_002dwait_002dsync-27"></a>
<p><a name="index-ntpd_002dwait_002dsync-28"></a>
This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
This option takes a number argument.
@ -808,7 +832,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">slew option (-x)</h4>
<p><a name="index-ntpd_002dslew-28"></a>
<p><a name="index-ntpd_002dslew-29"></a>
This is the &ldquo;slew up to 600 seconds&rdquo; option.
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
@ -833,7 +857,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">usepcc option</h4>
<p><a name="index-ntpd_002dusepcc-29"></a>
<p><a name="index-ntpd_002dusepcc-30"></a>
This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@ -855,7 +879,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pccfreq option</h4>
<p><a name="index-ntpd_002dpccfreq-30"></a>
<p><a name="index-ntpd_002dpccfreq-31"></a>
This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
This option takes a string argument.
@ -877,7 +901,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">mdns option (-m)</h4>
<p><a name="index-ntpd_002dmdns-31"></a>
<p><a name="index-ntpd_002dmdns-32"></a>
This is the &ldquo;register with mdns as a ntp server&rdquo; option.
<p class="noindent">This option has some usage constraints. It:

View File

@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntpd @NTPD_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
.TH ntpd @NTPD_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-YYaqWo/ag-.YaiVo)
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:41:54 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
configuration specification in the
configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
Step any initial offset correction..
.sp
Normally,
\fBntpd\fP
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the \fBtinker\fP configuration file directive for other options.
.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
\fBinterface\fP command, which is more versatile.
\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.

View File

@ -1,9 +1,9 @@
.Dd February 4 2015
.Dd April 7 2015
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
configuration specification in the
configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
.It Fl G , Fl \-force\-step\-once
Step any initial offset correction..
.sp
Normally,
\fBntpd\fP
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
\fBinterface\fP command, which is more versatile.
\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp

View File

@ -87,7 +87,7 @@ flag = {
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
configuration specification in the
configuration specification in the
@file{/etc/ntp.conf}
file.
_EndOfDoc_;
@ -114,6 +114,24 @@ flag = {
_EndOfDoc_;
};
flag = {
name = force_step_once;
value = G;
descrip = "Step any initial offset correction.";
doc = <<- _EndOfDoc_
Normally,
@code{ntpd}
steps the time if the time offset exceeds the step threshold,
which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
applications requiring monotonic time are running.
See the @code{tinker} configuration file directive for other options.
_EndOfDoc_;
};
flag = {
ifdef = HAVE_DROPROOT;
name = jaildir;
@ -150,7 +168,7 @@ flag = {
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
@code{interface} command, which is more versatile.
@code{interface} command, which is more versatile.
_EndOfDoc_;
};

Some files were not shown because too many files have changed in this diff Show More