[struct sockaddr has sa_len?])
esac
+AC_MSG_CHECKING([if we're including sntp debugging code])
+AC_ARG_ENABLE(
+ [debugging],
+ [AS_HELP_STRING(
+ [--enable-debugging],
+ [+ include sntp debugging code]
+ )],
+ [ans=$enableval],
+ [ans=yes]
+)
+case "$ans" in
+ yes)
+ AC_DEFINE([DEBUG], [1], [Enable sntp debugging code?])
+esac
+AC_MSG_RESULT([$ans])
+
AC_ARG_ENABLE(
[ipv6],
[AS_HELP_STRING(
char keystring[129];
if (keyf == NULL) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp auth_init: Couldn't open key file %s for reading!\n", keyfile);
return -1;
}
if (feof(keyf)) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp auth_init: Key file %s is empty!\n", keyfile);
fclose(keyf);
return -1;
return;
}
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("Starting to read KoD file %s...\n", db_file);
/* First let's see how many entries there are and check for right syntax */
argc -= optct;
argv += optct;
+#ifdef DEBUG
+ debug = DESC(DEBUG_LEVEL).optOccCt;
+ DPRINTF(1, ("%s\n", Version));
+#endif
+
/* Initialize logging system */
init_logging();
if (HAVE_OPT(FILELOG))
/* Let's try using a wildcard... */
ZERO(name);
- AF(&name) = AF_INET;
+ AF(&name) = AF_INET6;
SET_ADDR6N(&name, in6addr_any);
SET_PORT(&name, 0);
{
struct ntp_ctx *ctx = ptr;
- printf("Got an event on socket %d:%s%s%s%s [%s%s] <%s>",
+ if (debug)
+ printf("Got an event on socket %d:%s%s%s%s [%s%s] <%s>\n",
(int) fd,
- (what&EV_TIMEOUT) ? " timeout" : "",
- (what&EV_READ) ? " read" : "",
- (what&EV_WRITE) ? " write" : "",
- (what&EV_SIGNAL) ? " signal" : "",
+ (what & EV_TIMEOUT) ? " timeout" : "",
+ (what & EV_READ) ? " read" : "",
+ (what & EV_WRITE) ? " write" : "",
+ (what & EV_SIGNAL) ? " signal" : "",
(ctx->flags & CTX_BCST) ? "BCST" : "",
(ctx->flags & CTX_UCST) ? "UCST" : "",
ctx->name
ref = (char *)&rpkt->refid;
add_entry(hostname, ref);
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp handle_pkt: Received KOD packet with code: %c%c%c%c from %s, demobilizing all connections\n",
ref[0], ref[1], ref[2], ref[3],
hostname);
break;
case 1:
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
getnameinfo(host->ai_addr, host->ai_addrlen, addr_buf,
sizeof(addr_buf), NULL, 0, NI_NUMERICHOST);
printf("sntp handle_pkt: Received %i bytes from %s\n",
*offset = (t21 + t34) / 2.;
delta = t21 - t34;
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp offset_calculation:\tt21: %.6f\t\t t34: %.6f\n\t\tdelta: %.6f\t offset: %.6f\n",
t21, t34, delta, *offset);
}
#include <l_stdlib.h>
#include <ntp_fp.h>
#include <ntp.h>
+#include <ntp_debug.h>
#include <ntp_stdlib.h>
#include <ntp_unixtime.h>
#include <isc/result.h>
{
*rsock = socket(AF(dest), SOCK_DGRAM, 0);
- if (-1 == *rsock && ENABLED_OPT(NORMALVERBOSE))
+ if (-1 == *rsock && debug)
printf("Failed to create UDP socket with family %d\n", AF(dest));
}
pkt_output(pkt, len, stdout);
#endif
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
printf("sntp sendpkt: Sending packet to %s ...\n", sptoa(dest));
}
if (errno != EWOULDBLOCK && errno != ENOBUFS) {
/* oh well */
}
- } else if (ENABLED_OPT(NORMALVERBOSE)) {
+ } else if (debug) {
printf("Packet sent.\n");
}
}
setsockopt(rsock, SOL_SOCKET, SO_REUSEADDR, &btrue, sizeof(btrue));
if (IS_IPV4(sas)) {
if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp recv_bcst_data: Couldn't bind() address %s.\n",
sptoa(sas));
}
mdevadr.imr_multiaddr.s_addr = NSRCADR(sas);
mdevadr.imr_interface.s_addr = htonl(INADDR_ANY);
if (mdevadr.imr_multiaddr.s_addr == -1) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
printf("sntp recv_bcst_data: %s is not a broad-/multicast address, aborting...\n",
sptoa(sas));
}
return BROADCAST_FAILED;
}
if (setsockopt(rsock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mdevadr, sizeof(mdevadr)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
buf = ss_to_str(sas);
printf("sntp recv_bcst_data: Couldn't add IP membership for %s\n", buf);
free(buf);
#ifdef ISC_PLATFORM_HAVEIPV6
else if (IS_IPV6(sas)) {
if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp recv_bcst_data: Couldn't bind() address.\n");
}
#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
memset(&mdevadr6, 0, sizeof(mdevadr6));
mdevadr6.ipv6mr_multiaddr = SOCK_ADDR6(sas);
if (!IN6_IS_ADDR_MULTICAST(&mdevadr6.ipv6mr_multiaddr)) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
buf = ss_to_str(sas);
printf("sntp recv_bcst_data: %s is not a broad-/multicast address, aborting...\n", buf);
free(buf);
}
if (setsockopt(rsock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
&mdevadr6, sizeof(mdevadr6)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
buf = ss_to_str(sas);
printf("sntp recv_bcst_data: Couldn't join group for %s\n", buf);
free(buf);
rdy_socks = select(rsock + 1, &bcst_fd, 0, 0, &timeout_tv);
switch (rdy_socks) {
case -1:
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
perror("sntp recv_bcst_data: select()");
return BROADCAST_FAILED;
break;
case 0:
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp recv_bcst_data: select() reached timeout (%u sec), aborting.\n",
(unsigned)timeout_tv.tv_sec);
return BROADCAST_FAILED;
break;
}
if (recv_bytes == -1) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
perror("sntp recv_bcst_data: recvfrom:");
recv_bytes = BROADCAST_FAILED;
}
*/
if (pkt_len < LEN_PKT_NOMAC || (pkt_len & 3) != 0) {
unusable:
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp %s: Funny packet length: %i. Discarding package.\n", func_name, pkt_len);
return PACKET_UNUSEABLE;
}
break;
}
/* Yay! Things worked out! */
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
char *hostname = ss_to_str(sas);
printf("sntp %s: packet received from %s successfully authenticated using key id %i.\n",
func_name, hostname, key_id);
if (!is_authentic) {
if (ENABLED_OPT(AUTHENTICATION)) {
/* We want a authenticated packet */
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
char *hostname = ss_to_str(sas);
printf("sntp %s: packet received from %s is not authentic. Will discard it.\n",
func_name, hostname);
** We don't know if the user wanted authentication so let's
** use it anyways
*/
- if (ENABLED_OPT(NORMALVERBOSE)) {
+ if (debug) {
char *hostname = ss_to_str(sas);
printf("sntp %s: packet received from %s is not authentic. Authentication not enforced.\n",
/* Check for server's ntp version */
if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION ||
PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp %s: Packet shows wrong version (%i)\n",
func_name, PKT_VERSION(rpkt->li_vn_mode));
return SERVER_UNUSEABLE;
/* We want a server to sync with */
if (PKT_MODE(rpkt->li_vn_mode) != mode &&
PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp %s: mode %d stratum %i\n", func_name,
PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
return SERVER_UNUSEABLE;
if (STRATUM_PKT_UNSPEC == rpkt->stratum) {
char *ref_char;
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp %s: Stratum unspecified, going to check for KOD (stratum: %i)\n",
func_name, rpkt->stratum);
ref_char = (char *) &rpkt->refid;
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp %s: Packet refid: %c%c%c%c\n", func_name,
ref_char[0], ref_char[1], ref_char[2], ref_char[3]);
/* If it's a KOD packet we'll just use the KOD information */
}
/* If the server is not synced it's not really useable for us */
if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode)) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp %s: Server not in sync, skipping this server\n", func_name);
return SERVER_UNUSEABLE;
}
l_fp_output(&spkt->xmt, stdout);
#endif
if (mode != MODE_BROADCAST && !L_ISEQU(&rpkt->org, &spkt->xmt)) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp process_pkt: pkt.org and peer.xmt differ\n");
return PACKET_UNUSEABLE;
}
rdy_socks = select(rsock + 1, &recv_fd, 0, 0, &timeout_tv);
switch (rdy_socks) {
case -1:
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
perror("sntp recvpkt: select()");
return PACKET_UNUSEABLE;
break;
case 0:
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp recvpkt: select() reached timeout (%u sec), aborting.\n",
(unsigned)timeout_tv.tv_sec);
return PACKET_UNUSEABLE;
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed January 8, 2011 at 09:34:22 AM by AutoGen 5.11.6pre7
+ * It has been AutoGen-ed January 9, 2011 at 06:03:48 AM by AutoGen 5.11.6pre7
* From the definitions sntp-opts.def
* and the template file options
*
extern tUsageProc optionUsage;
+/*
+ * global included definitions
+ */
+#ifdef __windows
+ extern int atoi(const char*);
+#else
+# include <stdlib.h>
+#endif
+
#ifndef NULL
# define NULL 0
#endif
# define EXIT_FAILURE 1
#endif
+/*
+ * Debug_Level option description:
+ */
+static char const zDebug_LevelText[] =
+ "Increase output debug message level";
+static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
+static char const zDebug_Level_Name[] = "debug-level";
+#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+
+/*
+ * Set_Debug_Level option description:
+ */
+static char const zSet_Debug_LevelText[] =
+ "Set the output debug message level";
+static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
+#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
/*
* Ipv4 option description with
* "Must also have options" and "Incompatible options":
INDEX_OPT_IPV4, NO_EQUIVALENT };
#define IPV6_FLAGS (OPTST_DISABLED)
-/*
- * Normalverbose option description:
- */
-static char const zNormalverboseText[] =
- "Normal verbose";
-static char const zNormalverbose_NAME[] = "NORMALVERBOSE";
-static char const zNormalverbose_Name[] = "normalverbose";
-#define NORMALVERBOSE_FLAGS (OPTST_DISABLED)
-
/*
* Kod option description:
*/
static tOptProc
doUsageOpt;
+/*
+ * #define map the "normal" callout procs to the test ones...
+ */
+#define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
+
+
#else /* NOT defined TEST_SNTP_OPTS */
/*
* When not under test, there are different procs to use
optionStackArg, optionTimeVal, optionUnstackArg,
optionVersionStderr;
static tOptProc
- doUsageOpt;
+ doOptSet_Debug_Level, doUsageOpt;
+
+/*
+ * #define map the "normal" callout procs
+ */
+#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
+
+#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
#endif /* defined(TEST_SNTP_OPTS) */
#ifdef TEST_SNTP_OPTS
# define DOVERPROC optionVersionStderr
* Define the Sntp Option Descriptions.
*/
static tOptDesc optDesc[ OPTION_CT ] = {
- { /* entry idx, value */ 0, VALUE_OPT_IPV4,
- /* equiv idx, value */ 0, VALUE_OPT_IPV4,
+ { /* entry idx, value */ 0, VALUE_OPT_DEBUG_LEVEL,
+ /* equiv idx, value */ 0, VALUE_OPT_DEBUG_LEVEL,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ IPV4_FLAGS, 0,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aIpv4CantList,
+ /* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
+ /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 1, VALUE_OPT_SET_DEBUG_LEVEL,
+ /* equiv idx, value */ 1, VALUE_OPT_SET_DEBUG_LEVEL,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
+ /* last opt argumnt */ { NULL },
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
+ /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 1, VALUE_OPT_IPV6,
- /* equiv idx, value */ 1, VALUE_OPT_IPV6,
+ { /* entry idx, value */ 2, VALUE_OPT_IPV4,
+ /* equiv idx, value */ 2, VALUE_OPT_IPV4,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ IPV6_FLAGS, 0,
+ /* opt state flags */ IPV4_FLAGS, 0,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aIpv6CantList,
+ /* must/cannot opts */ NULL, aIpv4CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
+ /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 2, VALUE_OPT_NORMALVERBOSE,
- /* equiv idx, value */ 2, VALUE_OPT_NORMALVERBOSE,
+ { /* entry idx, value */ 3, VALUE_OPT_IPV6,
+ /* equiv idx, value */ 3, VALUE_OPT_IPV6,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ NORMALVERBOSE_FLAGS, 0,
+ /* opt state flags */ IPV6_FLAGS, 0,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
+ /* must/cannot opts */ NULL, aIpv6CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zNormalverboseText, zNormalverbose_NAME, zNormalverbose_Name,
+ /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 3, VALUE_OPT_KOD,
- /* equiv idx, value */ 3, VALUE_OPT_KOD,
+ { /* entry idx, value */ 4, VALUE_OPT_KOD,
+ /* equiv idx, value */ 4, VALUE_OPT_KOD,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KOD_FLAGS, 0,
/* desc, NAME, name */ zKodText, zKod_NAME, zKod_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 4, VALUE_OPT_SYSLOG,
- /* equiv idx, value */ 4, VALUE_OPT_SYSLOG,
+ { /* entry idx, value */ 5, VALUE_OPT_SYSLOG,
+ /* equiv idx, value */ 5, VALUE_OPT_SYSLOG,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SYSLOG_FLAGS, 0,
/* desc, NAME, name */ zSyslogText, zSyslog_NAME, zSyslog_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 5, VALUE_OPT_FILELOG,
- /* equiv idx, value */ 5, VALUE_OPT_FILELOG,
+ { /* entry idx, value */ 6, VALUE_OPT_FILELOG,
+ /* equiv idx, value */ 6, VALUE_OPT_FILELOG,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ FILELOG_FLAGS, 0,
/* desc, NAME, name */ zFilelogText, zFilelog_NAME, zFilelog_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 6, VALUE_OPT_SETTOD,
- /* equiv idx, value */ 6, VALUE_OPT_SETTOD,
+ { /* entry idx, value */ 7, VALUE_OPT_SETTOD,
+ /* equiv idx, value */ 7, VALUE_OPT_SETTOD,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SETTOD_FLAGS, 0,
/* desc, NAME, name */ zSettodText, zSettod_NAME, zSettod_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 7, VALUE_OPT_ADJTIME,
- /* equiv idx, value */ 7, VALUE_OPT_ADJTIME,
+ { /* entry idx, value */ 8, VALUE_OPT_ADJTIME,
+ /* equiv idx, value */ 8, VALUE_OPT_ADJTIME,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ ADJTIME_FLAGS, 0,
/* desc, NAME, name */ zAdjtimeText, zAdjtime_NAME, zAdjtime_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 8, VALUE_OPT_BROADCAST,
- /* equiv idx, value */ 8, VALUE_OPT_BROADCAST,
+ { /* entry idx, value */ 9, VALUE_OPT_BROADCAST,
+ /* equiv idx, value */ 9, VALUE_OPT_BROADCAST,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ BROADCAST_FLAGS, 0,
/* desc, NAME, name */ zBroadcastText, zBroadcast_NAME, zBroadcast_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 9, VALUE_OPT_TIMEOUT,
- /* equiv idx, value */ 9, VALUE_OPT_TIMEOUT,
+ { /* entry idx, value */ 10, VALUE_OPT_TIMEOUT,
+ /* equiv idx, value */ 10, VALUE_OPT_TIMEOUT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ TIMEOUT_FLAGS, 0,
/* desc, NAME, name */ zTimeoutText, zTimeout_NAME, zTimeout_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_AUTHENTICATION,
- /* equiv idx, value */ 10, VALUE_OPT_AUTHENTICATION,
+ { /* entry idx, value */ 11, VALUE_OPT_AUTHENTICATION,
+ /* equiv idx, value */ 11, VALUE_OPT_AUTHENTICATION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ AUTHENTICATION_FLAGS, 0,
/* desc, NAME, name */ zAuthenticationText, zAuthentication_NAME, zAuthentication_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_KEYFILE,
- /* equiv idx, value */ 11, VALUE_OPT_KEYFILE,
+ { /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
+ /* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC\n\
1305.\n";
static char const zFullVersion[] = SNTP_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 504 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 17 /* full option count */, 12 /* user option count */,
+ 18 /* full option count */, 13 /* user option count */,
sntp_full_usage, sntp_short_usage,
NULL, NULL,
PKGDATADIR
(void)pOptions;
USAGE(EXIT_SUCCESS);
}
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+
+#if ! defined(TEST_SNTP_OPTS)
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * For the set-debug-level option.
+ */
+static void
+doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ /* extracted from ../include/debug-opt.def, line 27 */
+DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
+}
+#endif /* defined(TEST_SNTP_OPTS) */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
return res;
}
#endif /* defined TEST_SNTP_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 641 */
#if ENABLE_NLS
#include <stdio.h>
#include autogen-version.def
#include copyright.def
+#include debug-opt.def
prog-name = "sntp";
prog-title = "standard SNTP program";
};
-flag = {
- name = normalverbose;
- value = d;
- descrip = "Normal verbose";
- doc = <<- _EndOfDoc_
- Diagnostic messages for non-fatal errors and a limited amount of
- tracing should be written to standard error. Fatal ones always
- produce a diagnostic. This option should be set when there is a
- suspected problem with the server, network or the source.
- _EndOfDoc_;
-};
-
flag = {
name = kod;
value = K;
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed January 8, 2011 at 09:34:22 AM by AutoGen 5.11.6pre7
+ * It has been AutoGen-ed January 9, 2011 at 06:03:48 AM by AutoGen 5.11.6pre7
* From the definitions sntp-opts.def
* and the template file options
*
* Enumeration of each option:
*/
typedef enum {
- INDEX_OPT_IPV4 = 0,
- INDEX_OPT_IPV6 = 1,
- INDEX_OPT_NORMALVERBOSE = 2,
- INDEX_OPT_KOD = 3,
- INDEX_OPT_SYSLOG = 4,
- INDEX_OPT_FILELOG = 5,
- INDEX_OPT_SETTOD = 6,
- INDEX_OPT_ADJTIME = 7,
- INDEX_OPT_BROADCAST = 8,
- INDEX_OPT_TIMEOUT = 9,
- INDEX_OPT_AUTHENTICATION = 10,
- INDEX_OPT_KEYFILE = 11,
- INDEX_OPT_VERSION = 12,
- INDEX_OPT_HELP = 13,
- INDEX_OPT_MORE_HELP = 14,
- INDEX_OPT_SAVE_OPTS = 15,
- INDEX_OPT_LOAD_OPTS = 16
+ INDEX_OPT_DEBUG_LEVEL = 0,
+ INDEX_OPT_SET_DEBUG_LEVEL = 1,
+ INDEX_OPT_IPV4 = 2,
+ INDEX_OPT_IPV6 = 3,
+ INDEX_OPT_KOD = 4,
+ INDEX_OPT_SYSLOG = 5,
+ INDEX_OPT_FILELOG = 6,
+ INDEX_OPT_SETTOD = 7,
+ INDEX_OPT_ADJTIME = 8,
+ INDEX_OPT_BROADCAST = 9,
+ INDEX_OPT_TIMEOUT = 10,
+ INDEX_OPT_AUTHENTICATION = 11,
+ INDEX_OPT_KEYFILE = 12,
+ INDEX_OPT_VERSION = 13,
+ INDEX_OPT_HELP = 14,
+ INDEX_OPT_MORE_HELP = 15,
+ INDEX_OPT_SAVE_OPTS = 16,
+ INDEX_OPT_LOAD_OPTS = 17
} teOptIndex;
-#define OPTION_CT 17
+#define OPTION_CT 18
#define SNTP_VERSION "4.2.7p114"
#define SNTP_FULL_VERSION "sntp - standard SNTP program - Ver. 4.2.7p114"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT(IPV4)
+ * e.g. HAVE_OPT(DEBUG_LEVEL)
*/
#define DESC(n) (sntpOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
+# ifdef DEBUG_LEVEL
+# warning undefining DEBUG_LEVEL due to option name conflict
+# undef DEBUG_LEVEL
+# endif
+# ifdef SET_DEBUG_LEVEL
+# warning undefining SET_DEBUG_LEVEL due to option name conflict
+# undef SET_DEBUG_LEVEL
+# endif
# ifdef IPV4
# warning undefining IPV4 due to option name conflict
# undef IPV4
# warning undefining IPV6 due to option name conflict
# undef IPV6
# endif
-# ifdef NORMALVERBOSE
-# warning undefining NORMALVERBOSE due to option name conflict
-# undef NORMALVERBOSE
-# endif
# ifdef KOD
# warning undefining KOD due to option name conflict
# undef KOD
# undef KEYFILE
# endif
#else /* NO_OPTION_NAME_WARNINGS */
+# undef DEBUG_LEVEL
+# undef SET_DEBUG_LEVEL
# undef IPV4
# undef IPV6
-# undef NORMALVERBOSE
# undef KOD
# undef SYSLOG
# undef FILELOG
*
* Interface defines for specific options.
*/
+#define VALUE_OPT_DEBUG_LEVEL 'd'
+#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
#define VALUE_OPT_IPV4 '4'
#define VALUE_OPT_IPV6 '6'
-#define VALUE_OPT_NORMALVERBOSE 'd'
#define VALUE_OPT_KOD 'K'
#define VALUE_OPT_SYSLOG 'p'
#define VALUE_OPT_FILELOG 'l'
sntpOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*sntpOptions.pUsageProc)(&sntpOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 435 */
/* * * * * *
*
#
# EDIT THIS FILE WITH CAUTION (sntp-opts.texi)
#
-# It has been AutoGen-ed January 8, 2011 at 04:45:30 AM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed January 9, 2011 at 06:07:36 AM by AutoGen 5.11.6pre7
# From the definitions sntp-opts.def
# and the template file aginfo.tpl
@end ignore
* sntp adjtime:: adjtime option (-j)
* sntp authentication:: authentication option (-a)
* sntp broadcast:: broadcast option (-b)
+* sntp debug-level:: debug-level option (-d)
* sntp filelog:: filelog option (-l)
* sntp ipv4:: ipv4 option (-4)
* sntp ipv6:: ipv6 option (-6)
* sntp keyfile:: keyfile option (-k)
* sntp kod:: kod option (-K)
-* sntp normalverbose:: normalverbose option (-d)
+* sntp set-debug-level:: set-debug-level option (-D)
* sntp settod:: settod option (-s)
* sntp syslog:: syslog option (-p)
* sntp timeout:: timeout option (-t)
sntp - standard SNTP program - Ver. 4.2.7p114
USAGE: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... hostname-or-IP ...
Flg Arg Option-Name Description
+ -d no debug-level Increase output debug message level
+ - may appear multiple times
+ -D Str set-debug-level Set the output debug message level
+ - may appear multiple times
-4 no ipv4 Force IPv4 DNS name resolution
- prohibits these options:
ipv6
-6 no ipv6 Force IPv6 DNS name resolution
- prohibits these options:
ipv4
- -d no normalverbose Normal verbose
-K Str kod KoD history filename
-p no syslog Logging with syslog
- prohibits these options:
for NTP broadcasts. The default maximum wait time,
68 seconds, can be modified with -t.
+@node sntp debug-level
+@subsection debug-level option (-d)
+@cindex sntp-debug-level
+
+This is the ``increase output debug message level'' option.
+
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+Increase the debugging message output level.
+
@node sntp filelog
@subsection filelog option (-l)
@cindex sntp-filelog
responses received from servers. The default is
/var/db/ntp-kod.
-@node sntp normalverbose
-@subsection normalverbose option (-d)
-@cindex sntp-normalverbose
+@node sntp set-debug-level
+@subsection set-debug-level option (-D)
+@cindex sntp-set-debug-level
+
+This is the ``set the output debug message level'' option.
+
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
-This is the ``normal verbose'' option.
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
+Set the output debugging level. Can be supplied multiple times,
+but each overrides the previous value(s).
@node sntp settod
@subsection settod option (-s)
-.TH SNTP 1 2011-01-08 "( 4.2.7p114)" "Programmer's Manual"
+.TH SNTP 1 2011-01-09 "( 4.2.7p114)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (sntp.1)
.\"
-.\" It has been AutoGen-ed January 8, 2011 at 04:45:30 AM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed January 9, 2011 at 06:07:35 AM by AutoGen 5.11.6pre7
.\" From the definitions sntp-opts.def
.\" and the template file agman1.tpl
.\"
seconds.
.SH OPTIONS
.TP
+.BR \-d ", " \--debug-level
+Increase output debug message level.
+This option may appear an unlimited number of times.
+.sp
+Increase the debugging message output level.
+.TP
+.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
+Set the output debug message level.
+This option may appear an unlimited number of times.
+.sp
+Set the output debugging level. Can be supplied multiple times,
+but each overrides the previous value(s).
+.TP
.BR \-4 ", " \--ipv4
Force IPv4 DNS name resolution.
This option must not appear in combination with any of the following options:
Force DNS resolution of following host names on the command line
to the IPv6 namespace.
.TP
-.BR \-d ", " \--normalverbose
-Normal verbose.
-.sp
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
-.TP
.BR \-K " \fIfile-name\fP, " \--kod "=" \fIfile-name\fP
KoD history filename.
.sp
<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>
seconds.
<p>This section was generated by <strong>AutoGen</strong>,
-the aginfo template and the option descriptions for the <span class="command">sntp</span> program. It documents the sntp usage text and option meanings.
+the aginfo template and the option descriptions for the <samp><span class="command">sntp</span></samp> program. It documents the sntp usage text and option meanings.
<p>This software is released under a specialized copyright license.
<li><a accesskey="2" href="#sntp-adjtime">sntp adjtime</a>: adjtime option (-j)
<li><a accesskey="3" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
<li><a accesskey="4" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
-<li><a accesskey="5" href="#sntp-filelog">sntp filelog</a>: filelog option (-l)
-<li><a accesskey="6" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
-<li><a accesskey="7" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
-<li><a accesskey="8" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
-<li><a accesskey="9" href="#sntp-kod">sntp kod</a>: kod option (-K)
-<li><a href="#sntp-normalverbose">sntp normalverbose</a>: normalverbose option (-d)
+<li><a accesskey="5" href="#sntp-debug_002dlevel">sntp debug-level</a>: debug-level option (-d)
+<li><a accesskey="6" href="#sntp-filelog">sntp filelog</a>: filelog option (-l)
+<li><a accesskey="7" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
+<li><a accesskey="8" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
+<li><a accesskey="9" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
+<li><a href="#sntp-kod">sntp kod</a>: kod option (-K)
+<li><a href="#sntp-set_002ddebug_002dlevel">sntp set-debug-level</a>: set-debug-level option (-D)
<li><a href="#sntp-settod">sntp settod</a>: settod option (-s)
<li><a href="#sntp-syslog">sntp syslog</a>: syslog option (-p)
<li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
<div class="node">
<p><hr>
-<a name="sntp-usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-adjtime">sntp adjtime</a>,
+<a name="sntp-usage"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-adjtime">sntp adjtime</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp usage help (-?)</h4>
<pre class="example">sntp - standard SNTP program - Ver. 4.2.7p114
USAGE: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...
Flg Arg Option-Name Description
+ -d no debug-level Increase output debug message level
+ - may appear multiple times
+ -D Str set-debug-level Set the output debug message level
+ - may appear multiple times
-4 no ipv4 Force IPv4 DNS name resolution
- prohibits these options:
ipv6
-6 no ipv6 Force IPv6 DNS name resolution
- prohibits these options:
ipv4
- -d no normalverbose Normal verbose
-K Str kod KoD history filename
-p no syslog Logging with syslog
- prohibits these options:
</pre>
<div class="node">
<p><hr>
-<a name="sntp-adjtime"></a>Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
+<a name="sntp-adjtime"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</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">adjtime option (-j)</h4>
<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-adjtime">sntp adjtime</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">authentication option (-a)</h4>
<div class="node">
<p><hr>
-<a name="sntp-broadcast"></a>Next: <a rel="next" accesskey="n" href="#sntp-filelog">sntp filelog</a>,
+<a name="sntp-broadcast"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-debug_002dlevel">sntp debug-level</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>
<div class="node">
<p><hr>
-<a name="sntp-filelog"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
+<a name="sntp-debug-level"></a>
+<a name="sntp-debug_002dlevel"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-filelog">sntp filelog</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">debug-level option (-d)</h4>
+
+<p><a name="index-sntp_002ddebug_002dlevel-7"></a>
+This is the “increase output debug message level” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Increase the debugging message output level.
+
+<div class="node">
+<p><hr>
+<a name="sntp-filelog"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-debug_002dlevel">sntp debug-level</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+
</div>
<h4 class="subsection">filelog option (-l)</h4>
-<p><a name="index-sntp_002dfilelog-7"></a>
+<p><a name="index-sntp_002dfilelog-8"></a>
This is the “log to specified logfile” option.
<p>This option has some usage constraints. It:
<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-filelog">sntp filelog</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ipv4 option (-4)</h4>
-<p><a name="index-sntp_002dipv4-8"></a>
+<p><a name="index-sntp_002dipv4-9"></a>
This is the “force ipv4 dns name resolution” option.
<p>This option has some usage constraints. It:
<div class="node">
<p><hr>
-<a name="sntp-ipv6"></a>Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
+<a name="sntp-ipv6"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</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>
-<p><a name="index-sntp_002dipv6-9"></a>
+<p><a name="index-sntp_002dipv6-10"></a>
This is the “force ipv6 dns name resolution” option.
<p>This option has some usage constraints. It:
<div class="node">
<p><hr>
-<a name="sntp-keyfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
+<a name="sntp-keyfile"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</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">keyfile option (-k)</h4>
-<p><a name="index-sntp_002dkeyfile-10"></a>
+<p><a name="index-sntp_002dkeyfile-11"></a>
This is the “specify a keyfile. sntp will look in this file for the key specified with -a” option.
This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
file. Key files follow the following format:
<div class="node">
<p><hr>
-<a name="sntp-kod"></a>Next: <a rel="next" accesskey="n" href="#sntp-normalverbose">sntp normalverbose</a>,
+<a name="sntp-kod"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-set_002ddebug_002dlevel">sntp set-debug-level</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">kod option (-K)</h4>
-<p><a name="index-sntp_002dkod-11"></a>
+<p><a name="index-sntp_002dkod-12"></a>
This is the “kod history filename” option.
Modifies the filename to be used to persist the history of KoD
responses received from servers. The default is
<div class="node">
<p><hr>
-<a name="sntp-normalverbose"></a>Next: <a rel="next" accesskey="n" href="#sntp-settod">sntp settod</a>,
+<a name="sntp-set-debug-level"></a>
+<a name="sntp-set_002ddebug_002dlevel"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-settod">sntp settod</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">normalverbose option (-d)</h4>
+<h4 class="subsection">set-debug-level option (-D)</h4>
-<p><a name="index-sntp_002dnormalverbose-12"></a>
-This is the “normal verbose” option.
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
+<p><a name="index-sntp_002dset_002ddebug_002dlevel-13"></a>
+This is the “set the output debug message level” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Set the output debugging level. Can be supplied multiple times,
+but each overrides the previous value(s).
<div class="node">
<p><hr>
-<a name="sntp-settod"></a>Next: <a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
-Previous: <a rel="previous" accesskey="p" href="#sntp-normalverbose">sntp normalverbose</a>,
+<a name="sntp-settod"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-set_002ddebug_002dlevel">sntp set-debug-level</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">settod option (-s)</h4>
-<p><a name="index-sntp_002dsettod-13"></a>
+<p><a name="index-sntp_002dsettod-14"></a>
This is the “set (step) the time with settimeofday()” option.
<p>This option has some usage constraints. It:
<div class="node">
<p><hr>
-<a name="sntp-syslog"></a>Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
+<a name="sntp-syslog"></a>
+Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">syslog option (-p)</h4>
-<p><a name="index-sntp_002dsyslog-14"></a>
+<p><a name="index-sntp_002dsyslog-15"></a>
This is the “logging with syslog” option.
<p>This option has some usage constraints. It:
<div class="node">
<p><hr>
-<a name="sntp-timeout"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</a>,
+<a name="sntp-timeout"></a>
+Previous: <a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</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-15"></a>
+<p><a name="index-sntp_002dtimeout-16"></a>
This is the “specify the number of seconds to wait for broadcasts” option.
When waiting for a broadcast packet SNTP will wait the number
of seconds specified before giving up. Default 68 seconds.
<div class="node">
<p><hr>
<a name="Usage"></a>
-<br>
+
+
</div>
<!-- node-name, next, previous, up -->