* [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain
- applied patch (with mods) by Miroslav Lichvar <perlinger@ntp.org>
* [Bug 3435] anchor NTP era alignment <perlinger@ntp.org>
+* [Bug 3433] sntp crashes when run with -a. <stenn@ntp.org>
* [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2"
- fixed several issues with hash algos in ntpd, sntp, ntpq,
ntpdc and the test suites <perlinger@ntp.org>
char kbuf[200];
char keystring[129];
+ /* HMS: Is it OK to do this later, after we know we have a key file? */
INIT_SSL();
if (keyf == NULL) {
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed March 21, 2017 at 10:36:49 AM by AutoGen 5.18.5
+# It has been AutoGen-ed November 18, 2017 at 01:54:06 AM by AutoGen 5.18.5
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
*/
kod_init_kod_db(OPT_ARG(KOD), FALSE);
- // HMS: Should we use arg-defalt for this too?
- if (HAVE_OPT(KEYFILE))
- auth_init(OPT_ARG(KEYFILE), &keys);
+ /* HMS: Check and see what happens if KEYFILE doesn't exist */
+ auth_init(OPT_ARG(KEYFILE), &keys);
/*
** Considering employing a variable that prevents functions of doing
ctx->name = name_copy; // point to it...
ctx->flags = flags;
ctx->timeout = response_tv;
+ ctx->key = NULL;
/* The following should arguably be passed in... */
- if (ENABLED_OPT(AUTHENTICATION) &&
- atoint(OPT_ARG(AUTHENTICATION), &l)) {
- ctx->key_id = l;
+ if (ENABLED_OPT(AUTHENTICATION)) {
+ ctx->key_id = OPT_VALUE_AUTHENTICATION;
get_key(ctx->key_id, &ctx->key);
+ if (NULL == ctx->key) {
+ fprintf(stderr, "%s: Authentication with keyID %d requested, but no matching keyID found in <%s>!",
+ progname, ctx->key_id, OPT_ARG(KEYFILE));
+ exit(1);
+ }
} else {
ctx->key_id = -1;
- ctx->key = NULL;
}
++n_pending_dns;
x_pkt->ppoll = 8;
/* FIXME! Modus broadcast + adr. check -> bdr. pkt */
set_li_vn_mode(x_pkt, LEAP_NOTINSYNC, ntpver, 3);
+ if (debug > 0) {
+ printf("generate_pkt: key_id %d, key pointer %p\n", key_id, pkt_key);
+ }
if (pkt_key != NULL) {
x_pkt->exten[0] = htonl(key_id);
mac_size = make_mac(x_pkt, pkt_len, MAX_MDG_LEN,
pkt_key, (char *)&x_pkt->exten[1]);
if (mac_size > 0)
pkt_len += mac_size + KEY_MAC_LEN;
+#ifdef DEBUG
+ if (debug > 0) {
+ printf("generate_pkt: mac_size is %d\n", mac_size);
+ }
+#endif
+
}
return pkt_len;
}
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed March 21, 2017 at 10:36:29 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed November 18, 2017 at 01:44:19 AM by AutoGen 5.18.5
* From the definitions sntp-opts.def
* and the template file options
*
/**
* static const strings for sntp options
*/
-static char const sntp_opt_strs[2552] =
+static char const sntp_opt_strs[2566] =
/* 0 */ "sntp 4.2.8p10\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
/* 1537 */ "Look in this file for the key specified with -a\0"
/* 1585 */ "KEYFILE\0"
/* 1593 */ "keyfile\0"
-/* 1601 */ "Log to specified logfile\0"
-/* 1626 */ "LOGFILE\0"
-/* 1634 */ "logfile\0"
-/* 1642 */ "Adjustments less than steplimit msec will be slewed\0"
-/* 1694 */ "STEPLIMIT\0"
-/* 1704 */ "steplimit\0"
-/* 1714 */ "Send int as our NTP protocol version\0"
-/* 1751 */ "NTPVERSION\0"
-/* 1762 */ "ntpversion\0"
-/* 1773 */ "Use the NTP Reserved Port (port 123)\0"
-/* 1810 */ "USERESERVEDPORT\0"
-/* 1826 */ "usereservedport\0"
-/* 1842 */ "OK to 'step' the time with settimeofday(2)\0"
-/* 1885 */ "STEP\0"
-/* 1890 */ "step\0"
-/* 1895 */ "OK to 'slew' the time with adjtime(2)\0"
-/* 1933 */ "SLEW\0"
-/* 1938 */ "slew\0"
-/* 1943 */ "The number of seconds to wait for responses\0"
-/* 1987 */ "TIMEOUT\0"
-/* 1995 */ "timeout\0"
-/* 2003 */ "Wait for pending replies (if not setting the time)\0"
-/* 2054 */ "WAIT\0"
-/* 2059 */ "no-wait\0"
-/* 2067 */ "no\0"
-/* 2070 */ "display extended usage information and exit\0"
-/* 2114 */ "help\0"
-/* 2119 */ "extended usage information passed thru pager\0"
-/* 2164 */ "more-help\0"
-/* 2174 */ "output version information and exit\0"
-/* 2210 */ "version\0"
-/* 2218 */ "save the option state to a config file\0"
-/* 2257 */ "save-opts\0"
-/* 2267 */ "load options from a config file\0"
-/* 2299 */ "LOAD_OPTS\0"
-/* 2309 */ "no-load-opts\0"
-/* 2322 */ "SNTP\0"
-/* 2327 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p10\n"
+/* 1601 */ "/etc/ntp.keys\0"
+/* 1615 */ "Log to specified logfile\0"
+/* 1640 */ "LOGFILE\0"
+/* 1648 */ "logfile\0"
+/* 1656 */ "Adjustments less than steplimit msec will be slewed\0"
+/* 1708 */ "STEPLIMIT\0"
+/* 1718 */ "steplimit\0"
+/* 1728 */ "Send int as our NTP protocol version\0"
+/* 1765 */ "NTPVERSION\0"
+/* 1776 */ "ntpversion\0"
+/* 1787 */ "Use the NTP Reserved Port (port 123)\0"
+/* 1824 */ "USERESERVEDPORT\0"
+/* 1840 */ "usereservedport\0"
+/* 1856 */ "OK to 'step' the time with settimeofday(2)\0"
+/* 1899 */ "STEP\0"
+/* 1904 */ "step\0"
+/* 1909 */ "OK to 'slew' the time with adjtime(2)\0"
+/* 1947 */ "SLEW\0"
+/* 1952 */ "slew\0"
+/* 1957 */ "The number of seconds to wait for responses\0"
+/* 2001 */ "TIMEOUT\0"
+/* 2009 */ "timeout\0"
+/* 2017 */ "Wait for pending replies (if not setting the time)\0"
+/* 2068 */ "WAIT\0"
+/* 2073 */ "no-wait\0"
+/* 2081 */ "no\0"
+/* 2084 */ "display extended usage information and exit\0"
+/* 2128 */ "help\0"
+/* 2133 */ "extended usage information passed thru pager\0"
+/* 2178 */ "more-help\0"
+/* 2188 */ "output version information and exit\0"
+/* 2224 */ "version\0"
+/* 2232 */ "save the option state to a config file\0"
+/* 2271 */ "save-opts\0"
+/* 2281 */ "load options from a config file\0"
+/* 2313 */ "LOAD_OPTS\0"
+/* 2323 */ "no-load-opts\0"
+/* 2336 */ "SNTP\0"
+/* 2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p10\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
-/* 2487 */ "$HOME\0"
-/* 2493 */ ".\0"
-/* 2495 */ ".ntprc\0"
-/* 2502 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2536 */ "\n\0"
-/* 2538 */ "sntp 4.2.8p10";
+/* 2501 */ "$HOME\0"
+/* 2507 */ ".\0"
+/* 2509 */ ".ntprc\0"
+/* 2516 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2550 */ "\n\0"
+/* 2552 */ "sntp 4.2.8p10";
/**
* ipv4 option description with
#define KEYFILE_NAME (sntp_opt_strs+1585)
/** Name string for the keyfile option */
#define KEYFILE_name (sntp_opt_strs+1593)
+/** The compiled in default value for the keyfile option argument */
+#define KEYFILE_DFT_ARG (sntp_opt_strs+1601)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (sntp_opt_strs+1601)
+#define LOGFILE_DESC (sntp_opt_strs+1615)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (sntp_opt_strs+1626)
+#define LOGFILE_NAME (sntp_opt_strs+1640)
/** Name string for the logfile option */
-#define LOGFILE_name (sntp_opt_strs+1634)
+#define LOGFILE_name (sntp_opt_strs+1648)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
* steplimit option description:
*/
/** Descriptive text for the steplimit option */
-#define STEPLIMIT_DESC (sntp_opt_strs+1642)
+#define STEPLIMIT_DESC (sntp_opt_strs+1656)
/** Upper-cased name for the steplimit option */
-#define STEPLIMIT_NAME (sntp_opt_strs+1694)
+#define STEPLIMIT_NAME (sntp_opt_strs+1708)
/** Name string for the steplimit option */
-#define STEPLIMIT_name (sntp_opt_strs+1704)
+#define STEPLIMIT_name (sntp_opt_strs+1718)
/** Compiled in flag settings for the steplimit option */
#define STEPLIMIT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
* ntpversion option description:
*/
/** Descriptive text for the ntpversion option */
-#define NTPVERSION_DESC (sntp_opt_strs+1714)
+#define NTPVERSION_DESC (sntp_opt_strs+1728)
/** Upper-cased name for the ntpversion option */
-#define NTPVERSION_NAME (sntp_opt_strs+1751)
+#define NTPVERSION_NAME (sntp_opt_strs+1765)
/** Name string for the ntpversion option */
-#define NTPVERSION_name (sntp_opt_strs+1762)
+#define NTPVERSION_name (sntp_opt_strs+1776)
/** The compiled in default value for the ntpversion option argument */
#define NTPVERSION_DFT_ARG ((char const*)4)
/** Compiled in flag settings for the ntpversion option */
* usereservedport option description:
*/
/** Descriptive text for the usereservedport option */
-#define USERESERVEDPORT_DESC (sntp_opt_strs+1773)
+#define USERESERVEDPORT_DESC (sntp_opt_strs+1787)
/** Upper-cased name for the usereservedport option */
-#define USERESERVEDPORT_NAME (sntp_opt_strs+1810)
+#define USERESERVEDPORT_NAME (sntp_opt_strs+1824)
/** Name string for the usereservedport option */
-#define USERESERVEDPORT_name (sntp_opt_strs+1826)
+#define USERESERVEDPORT_name (sntp_opt_strs+1840)
/** Compiled in flag settings for the usereservedport option */
#define USERESERVEDPORT_FLAGS (OPTST_DISABLED)
* step option description:
*/
/** Descriptive text for the step option */
-#define STEP_DESC (sntp_opt_strs+1842)
+#define STEP_DESC (sntp_opt_strs+1856)
/** Upper-cased name for the step option */
-#define STEP_NAME (sntp_opt_strs+1885)
+#define STEP_NAME (sntp_opt_strs+1899)
/** Name string for the step option */
-#define STEP_name (sntp_opt_strs+1890)
+#define STEP_name (sntp_opt_strs+1904)
/** Compiled in flag settings for the step option */
#define STEP_FLAGS (OPTST_DISABLED)
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (sntp_opt_strs+1895)
+#define SLEW_DESC (sntp_opt_strs+1909)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (sntp_opt_strs+1933)
+#define SLEW_NAME (sntp_opt_strs+1947)
/** Name string for the slew option */
-#define SLEW_name (sntp_opt_strs+1938)
+#define SLEW_name (sntp_opt_strs+1952)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
* timeout option description:
*/
/** Descriptive text for the timeout option */
-#define TIMEOUT_DESC (sntp_opt_strs+1943)
+#define TIMEOUT_DESC (sntp_opt_strs+1957)
/** Upper-cased name for the timeout option */
-#define TIMEOUT_NAME (sntp_opt_strs+1987)
+#define TIMEOUT_NAME (sntp_opt_strs+2001)
/** Name string for the timeout option */
-#define TIMEOUT_name (sntp_opt_strs+1995)
+#define TIMEOUT_name (sntp_opt_strs+2009)
/** The compiled in default value for the timeout option argument */
#define TIMEOUT_DFT_ARG ((char const*)5)
/** Compiled in flag settings for the timeout option */
* wait option description:
*/
/** Descriptive text for the wait option */
-#define WAIT_DESC (sntp_opt_strs+2003)
+#define WAIT_DESC (sntp_opt_strs+2017)
/** Upper-cased name for the wait option */
-#define WAIT_NAME (sntp_opt_strs+2054)
+#define WAIT_NAME (sntp_opt_strs+2068)
/** disablement name for the wait option */
-#define NOT_WAIT_name (sntp_opt_strs+2059)
+#define NOT_WAIT_name (sntp_opt_strs+2073)
/** disablement prefix for the wait option */
-#define NOT_WAIT_PFX (sntp_opt_strs+2067)
+#define NOT_WAIT_PFX (sntp_opt_strs+2081)
/** Name string for the wait option */
#define WAIT_name (NOT_WAIT_name + 3)
/** Compiled in flag settings for the wait option */
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (sntp_opt_strs+2070)
-#define HELP_name (sntp_opt_strs+2114)
+#define HELP_DESC (sntp_opt_strs+2084)
+#define HELP_name (sntp_opt_strs+2128)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (sntp_opt_strs+2119)
-#define MORE_HELP_name (sntp_opt_strs+2164)
+#define MORE_HELP_DESC (sntp_opt_strs+2133)
+#define MORE_HELP_name (sntp_opt_strs+2178)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (sntp_opt_strs+2174)
-#define VER_name (sntp_opt_strs+2210)
-#define SAVE_OPTS_DESC (sntp_opt_strs+2218)
-#define SAVE_OPTS_name (sntp_opt_strs+2257)
-#define LOAD_OPTS_DESC (sntp_opt_strs+2267)
-#define LOAD_OPTS_NAME (sntp_opt_strs+2299)
-#define NO_LOAD_OPTS_name (sntp_opt_strs+2309)
-#define LOAD_OPTS_pfx (sntp_opt_strs+2067)
+#define VER_DESC (sntp_opt_strs+2188)
+#define VER_name (sntp_opt_strs+2224)
+#define SAVE_OPTS_DESC (sntp_opt_strs+2232)
+#define SAVE_OPTS_name (sntp_opt_strs+2271)
+#define LOAD_OPTS_DESC (sntp_opt_strs+2281)
+#define LOAD_OPTS_NAME (sntp_opt_strs+2313)
+#define NO_LOAD_OPTS_name (sntp_opt_strs+2323)
+#define LOAD_OPTS_pfx (sntp_opt_strs+2081)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --keyfile */
+ /* last opt argumnt */ { KEYFILE_DFT_ARG },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doOptKeyfile,
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of sntp. */
-#define zPROGNAME (sntp_opt_strs+2322)
+#define zPROGNAME (sntp_opt_strs+2336)
/** Reference to the title line for sntp usage. */
-#define zUsageTitle (sntp_opt_strs+2327)
+#define zUsageTitle (sntp_opt_strs+2341)
/** sntp configuration file name. */
-#define zRcName (sntp_opt_strs+2495)
+#define zRcName (sntp_opt_strs+2509)
/** Directories to search for sntp config files. */
static char const * const apzHomeList[3] = {
- sntp_opt_strs+2487,
- sntp_opt_strs+2493,
+ sntp_opt_strs+2501,
+ sntp_opt_strs+2507,
NULL };
/** The sntp program bug email address. */
-#define zBugsAddr (sntp_opt_strs+2502)
+#define zBugsAddr (sntp_opt_strs+2516)
/** Clarification/explanation of what sntp does. */
-#define zExplain (sntp_opt_strs+2536)
+#define zExplain (sntp_opt_strs+2550)
/** Extra detail explaining what sntp does. */
#define zDetail (NULL)
/** The full version string for sntp. */
-#define zFullVersion (sntp_opt_strs+2538)
+#define zFullVersion (sntp_opt_strs+2552)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
descrip = "Look in this file for the key specified with @option{-a}";
arg-type = file;
arg-name = "file-name";
+ arg-default = "/etc/ntp.keys";
doc = <<- _EndOfDoc_
This option specifies the keyfile.
@code{sntp} will search for the key specified with @option{-a}
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed March 21, 2017 at 10:36:28 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed November 18, 2017 at 01:44:16 AM by AutoGen 5.18.5
* From the definitions sntp-opts.def
* and the template file options
*
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "21 Mar 2017" "4.2.8p10" "User Commands"
+.TH sntp 1sntpman "18 Nov 2017" "4.2.8p10" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-aQaqbX/ag-nQaiaX)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:36:45 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed November 18, 2017 at 01:54:09 AM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
Look in this file for the key specified with \fB-a\fP.
+The default
+\f\*[I-Font]file\-name\f[]
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB-a\fP
-.Dd March 21 2017
+.Dd November 18 2017
.Dt SNTP 1sntpmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:36:52 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed November 18, 2017 at 01:54:01 AM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP
<title>Sntp User's Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Sntp User's Manual">
-<meta name="generator" content="makeinfo 4.7">
+<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family: serif; font-weight: normal; }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<h1 class="settitle">Sntp User's Manual</h1>
<div class="node">
<p><hr>
-<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
+<a name="Top"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
+
</div>
<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
<div class="node">
<p><hr>
<a name="sntp-Description"></a>
-<br>
+
+
</div>
<!-- node-name, next, previous, up -->
<div class="node">
<p><hr>
<a name="sntp-Invocation"></a>
-<br>
+
+
</div>
<h3 class="section">Invoking sntp</h3>
This software is released under the NTP license, <http://ntp.org/license>.
<ul class="menu">
-<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp help/usage (<span class="option">--help</span>)
+<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp help/usage (<samp><span class="option">--help</span></samp>)
<li><a accesskey="2" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
<li><a accesskey="3" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
<li><a accesskey="4" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
<div class="node">
<p><hr>
-<a name="sntp-usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
+<a name="sntp-usage"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
-<h4 class="subsection">sntp help/usage (<span class="option">--help</span>)</h4>
+<h4 class="subsection">sntp help/usage (<samp><span class="option">--help</span></samp>)</h4>
<p><a name="index-sntp-help-3"></a>
This is the automatically generated usage text for sntp.
<p>The text printed is the same whether selected with the <code>help</code> option
-(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+(<samp><span class="option">--help</span></samp>) or the <code>more-help</code> option (<samp><span class="option">--more-help</span></samp>). <code>more-help</code> will print
the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
-used to select the program, defaulting to <span class="file">more</span>. Both will exit
+used to select the program, defaulting to <samp><span class="file">more</span></samp>. Both will exit
with a status code of 0.
<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p10
</pre>
<div class="node">
<p><hr>
-<a name="sntp-ipv4"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
+<a name="sntp-ipv4"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ipv4 option (-4)</h4>
to the IPv4 namespace.
<div class="node">
<p><hr>
-<a name="sntp-ipv6"></a>Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
+<a name="sntp-ipv6"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ipv6 option (-6)</h4>
to the IPv6 namespace.
<div class="node">
<p><hr>
-<a name="sntp-authentication"></a>Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
+<a name="sntp-authentication"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">authentication option (-a)</h4>
<p><a name="index-sntp_002dauthentication-6"></a>
This is the “enable authentication with the key <var>auth-keynumber</var>” option.
-This option takes a number argument <span class="file">auth-keynumber</span>.
+This option takes a number argument <samp><span class="file">auth-keynumber</span></samp>.
Enable authentication using the key specified in this option's
-argument. The argument of this option is the <span class="option">keyid</span>, a
-number specified in the <span class="option">keyfile</span> as this key's identifier.
-See the <span class="option">keyfile</span> option (<span class="option">-k</span>) for more details.
+argument. The argument of this option is the <samp><span class="option">keyid</span></samp>, a
+number specified in the <samp><span class="option">keyfile</span></samp> as this key's identifier.
+See the <samp><span class="option">keyfile</span></samp> option (<samp><span class="option">-k</span></samp>) for more details.
<div class="node">
<p><hr>
-<a name="sntp-broadcast"></a>Next: <a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
+<a name="sntp-broadcast"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">broadcast option (-b)</h4>
<p><a name="index-sntp_002dbroadcast-7"></a>
This is the “listen to the address specified for broadcast time sync” option.
-This option takes a string argument <span class="file">broadcast-address</span>.
+This option takes a string argument <samp><span class="file">broadcast-address</span></samp>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<p>If specified <code>sntp</code> will listen to the specified address
for NTP broadcasts. The default maximum wait time
-can (and probably should) be modified with <span class="option">-t</span>.
+can (and probably should) be modified with <samp><span class="option">-t</span></samp>.
<div class="node">
<p><hr>
-<a name="sntp-concurrent"></a>Next: <a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
+<a name="sntp-concurrent"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">concurrent option (-c)</h4>
<p><a name="index-sntp_002dconcurrent-8"></a>
This is the “concurrently query all ips returned for host-name” option.
-This option takes a string argument <span class="file">host-name</span>.
+This option takes a string argument <samp><span class="file">host-name</span></samp>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
one after another, with a 2-second gap in between each query.
- <p>The <span class="option">-c</span> or <span class="option">--concurrent</span> flag says that any IPs
+ <p>The <samp><span class="option">-c</span></samp> or <samp><span class="option">--concurrent</span></samp> flag says that any IPs
returned for the DNS lookup of the supplied host-name are on
different machines, so we can send concurrent queries.
<div class="node">
<p><hr>
-<a name="sntp-gap"></a>Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
+<a name="sntp-gap"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">gap option (-g)</h4>
<p><a name="index-sntp_002dgap-9"></a>
This is the “the gap (in milliseconds) between time requests” option.
-This option takes a number argument <span class="file">milliseconds</span>.
+This option takes a number argument <samp><span class="file">milliseconds</span></samp>.
Since we're only going to use the first valid response we get and
there is benefit to specifying a good number of servers to query,
separate the queries we send out by the specified number of
milliseconds.
<div class="node">
<p><hr>
-<a name="sntp-kod"></a>Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
+<a name="sntp-kod"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">kod option (-K)</h4>
<p><a name="index-sntp_002dkod-10"></a>
This is the “kod history filename” option.
-This option takes a file argument <span class="file">file-name</span>.
+This option takes a file argument <samp><span class="file">file-name</span></samp>.
Specifies the filename to be used for the persistent history of KoD
responses received from servers. If the file does not exist, a
warning message will be displayed. The file will not be created.
<div class="node">
<p><hr>
-<a name="sntp-keyfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
+<a name="sntp-keyfile"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">keyfile option (-k)</h4>
<p><a name="index-sntp_002dkeyfile-11"></a>
-This is the “look in this file for the key specified with <span class="option">-a</span>” option.
-This option takes a file argument <span class="file">file-name</span>.
+This is the “look in this file for the key specified with <samp><span class="option">-a</span></samp>” option.
+This option takes a file argument <samp><span class="file">file-name</span></samp>.
This option specifies the keyfile.
-<code>sntp</code> will search for the key specified with <span class="option">-a</span>
-<span class="file">keyno</span> in this file. See <span class="command">ntp.keys(5)</span> for more
+<code>sntp</code> will search for the key specified with <samp><span class="option">-a</span></samp>
+<samp><span class="file">keyno</span></samp> in this file. See <samp><span class="command">ntp.keys(5)</span></samp> for more
information.
<div class="node">
<p><hr>
-<a name="sntp-logfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
+<a name="sntp-logfile"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">logfile option (-l)</h4>
<p><a name="index-sntp_002dlogfile-12"></a>
This is the “log to specified logfile” option.
-This option takes a file argument <span class="file">file-name</span>.
+This option takes a file argument <samp><span class="file">file-name</span></samp>.
This option causes the client to write log messages to the specified
-<span class="file">logfile</span>.
+<samp><span class="file">logfile</span></samp>.
<div class="node">
<p><hr>
-<a name="sntp-steplimit"></a>Next: <a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
+<a name="sntp-steplimit"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">steplimit option (-M)</h4>
<p><a name="index-sntp_002dsteplimit-13"></a>
This is the “adjustments less than <var>steplimit</var> msec will be slewed” option.
This option takes a number argument.
-If the time adjustment is less than <span class="file">steplimit</span> milliseconds,
-slew the amount using <span class="command">adjtime(2)</span>. Otherwise, step the
-correction using <span class="command">settimeofday(2)</span>. The default value is 0,
+If the time adjustment is less than <samp><span class="file">steplimit</span></samp> milliseconds,
+slew the amount using <samp><span class="command">adjtime(2)</span></samp>. Otherwise, step the
+correction using <samp><span class="command">settimeofday(2)</span></samp>. The default value is 0,
which means all adjustments will be stepped. This is a feature, as
different situations demand different values.
<div class="node">
<p><hr>
-<a name="sntp-ntpversion"></a>Next: <a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
+<a name="sntp-ntpversion"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ntpversion option (-o)</h4>
This is the “send <var>int</var> as our ntp protocol version” option.
This option takes a number argument.
When sending requests to a remote server, tell them we are running
-NTP protocol version <span class="file">ntpversion</span> .
+NTP protocol version <samp><span class="file">ntpversion</span></samp> .
<div class="node">
<p><hr>
-<a name="sntp-usereservedport"></a>Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
+<a name="sntp-usereservedport"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-ntpversion">sntp ntpversion</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">usereservedport option (-r)</h4>
communications.
<div class="node">
<p><hr>
-<a name="sntp-timeout"></a>Next: <a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
+<a name="sntp-timeout"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-usereservedport">sntp usereservedport</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">timeout option (-t)</h4>
<p><a name="index-sntp_002dtimeout-16"></a>
This is the “the number of seconds to wait for responses” option.
-This option takes a number argument <span class="file">seconds</span>.
+This option takes a number argument <samp><span class="file">seconds</span></samp>.
When waiting for a reply, <code>sntp</code> will wait the number
of seconds specified before giving up. The default should be
more than enough for a unicast response. If <code>sntp</code> is
likely needed.
<div class="node">
<p><hr>
-<a name="sntp-wait"></a>Next: <a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
+<a name="sntp-wait"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">wait option</h4>
<div class="node">
<p><hr>
-<a name="sntp-config"></a>Next: <a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
+<a name="sntp-config"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-wait">sntp wait</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">presetting/configuring sntp</h4>
<li>$PWD
</ul>
The environment variables <code>HOME</code>, and <code>PWD</code>
-are expanded and replaced when <span class="file">sntp</span> runs.
+are expanded and replaced when <samp><span class="file">sntp</span></samp> runs.
For any of these that are plain files, they are simply processed.
-For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
+For any that are directories, then a file named <samp><span class="file">.ntprc</span></samp> is searched for
within that directory and processed.
<p>Configuration files may be in a wide variety of formats.
Only the first letter of the argument is examined:
<dl>
-<dt><span class="samp">version</span><dd>Only print the version. This is the default.
-<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
-<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+<dt>`<samp><span class="samp">version</span></samp>'<dd>Only print the version. This is the default.
+<br><dt>`<samp><span class="samp">copyright</span></samp>'<dd>Name the copyright usage licensing terms.
+<br><dt>`<samp><span class="samp">verbose</span></samp>'<dd>Print the full copyright usage licensing terms.
</dl>
<div class="node">
<p><hr>
-<a name="sntp-exit-status"></a>Next: <a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
+<a name="sntp-exit-status"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-config">sntp config</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp exit status</h4>
<p>One of the following exit values will be returned:
<dl>
-<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
-<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
-<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
-<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
+<dt>`<samp><span class="samp">0 (EXIT_SUCCESS)</span></samp>'<dd>Successful program execution.
+<br><dt>`<samp><span class="samp">1 (EXIT_FAILURE)</span></samp>'<dd>The operation failed or the command syntax was not valid.
+<br><dt>`<samp><span class="samp">66 (EX_NOINPUT)</span></samp>'<dd>A specified configuration file could not be loaded.
+<br><dt>`<samp><span class="samp">70 (EX_SOFTWARE)</span></samp>'<dd>libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
</dl>
<div class="node">
<p><hr>
-<a name="sntp-Usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
+<a name="sntp-Usage"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-exit-status">sntp exit status</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp Usage</h4>
<div class="node">
<p><hr>
-<a name="sntp-Authors"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
+<a name="sntp-Authors"></a>
+Previous: <a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp Authors</h4>
<div class="node">
<p><hr>
<a name="Usage"></a>
-<br>
+
+
</div>
<!-- node-name, next, previous, up -->
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "21 Mar 2017" "4.2.8p10" "User Commands"
+.TH sntp @SNTP_MS@ "18 Nov 2017" "4.2.8p10" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-aQaqbX/ag-nQaiaX)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:36:45 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed November 18, 2017 at 01:54:09 AM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
Look in this file for the key specified with \fB-a\fP.
+The default
+\f\*[I-Font]file\-name\f[]
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB-a\fP
-.Dd March 21 2017
+.Dd November 18 2017
.Dt SNTP @SNTP_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:36:52 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed November 18, 2017 at 01:54:01 AM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP