]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
autogen cleanup, debug level cleanup, add --concurrent support
authorHarlan Stenn <stenn@ntp.org>
Mon, 10 Jan 2011 23:29:43 +0000 (23:29 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 10 Jan 2011 23:29:43 +0000 (23:29 +0000)
bk: 4d2b96674vFSI127CNj-KCDwvtDEMA

sntp/main.c
sntp/sntp-opts.c
sntp/sntp-opts.def
sntp/sntp-opts.h
sntp/sntp-opts.texi
sntp/sntp.1
sntp/sntp.html

index 32592220c7e7e41fffd2884255c54467ba6ccd2d..517e465b8a353eef698b8afab79df8e6f352554a 100644 (file)
@@ -31,6 +31,7 @@ struct dns_ctx {
        int             flags;
 #define CTX_BCST       0x0001
 #define CTX_UCST       0x0002
+#define CTX_CONC       0x0004
 #define CTX_unused     0xfffd
        int             key_id;
        struct timeval  timeout;
@@ -46,6 +47,8 @@ struct ntp_ctx {
 struct key *keys = NULL;
 struct timeval timeout_tv;
 
+struct timeval ucst_timeout_tv = { 5, 0 };
+
 static union {
        struct pkt pkt;
        char   buf[1500];
@@ -218,6 +221,16 @@ sntp_main (
                printf("broadcast-after: <%s> n_pending_dns = %d\n", OPT_ARG(BROADCAST), n_pending_dns);
        }
 
+       if (HAVE_OPT(CONCURRENT)) {
+               int             cn = STACKCT_OPT( CONCURRENT );
+               const char **   cp = STACKLST_OPT( CONCURRENT );
+
+               while (cn-- > 0) {
+                       /* Do something with *cp++ */
+                       printf("Concurrent: <%s>\n", *cp++);
+               }
+       }
+
        for (i = 0; i < argc; ++i) {
                struct evutil_addrinfo hints; /* local copy is OK */
                struct dns_ctx *dns_ctx;
@@ -239,7 +252,7 @@ sntp_main (
 
                dns_ctx->name = argv[i];
                dns_ctx->flags = CTX_UCST;
-               dns_ctx->timeout = timeout_tv;
+               dns_ctx->timeout = ucst_timeout_tv;
 
                if (ENABLED_OPT(AUTHENTICATION) &&
                    atoint(OPT_ARG(AUTHENTICATION), &l)) {
@@ -428,7 +441,6 @@ dns_cb(
 
                        /*
                        ** HMS: Exactly why do we want a timeout?
-                       ** Should we use the same value for bcast and ucast?
                        */
                        ev = event_new(base, sock,
                                EV_TIMEOUT|EV_READ|EV_PERSIST,
@@ -680,12 +692,12 @@ offset_calculation (
        NTOHL_FP(&rpkt->xmt, &p_xmt);
 
        *precision = LOGTOD(rpkt->precision);
-       DPRINTF(1, ("offset_calculation: precision: %f", *precision));
+       DPRINTF(2, ("offset_calculation: precision: %f", *precision));
 
        *root_dispersion = FPTOD(p_rdsp);
 
 #ifdef DEBUG
-       if (debug) {
+       if (debug > 2) {
                printf("sntp rootdelay: %f\n", FPTOD(p_rdly));
                printf("sntp rootdisp: %f\n", *root_dispersion);
 
index d7450a62d76ed89fe108015ca76d1bd1450cd82a..aaad1e7b504424dd0c0b1cb438fe6e2ea7c11bee 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  January  9, 2011 at 06:03:48 AM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  January 10, 2011 at 11:23:51 PM by AutoGen 5.11.6pre7
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -117,7 +117,7 @@ static char const zKodText[] =
 static char const zKod_NAME[]                = "KOD";
 static char const zKod_Name[]                = "kod";
 #define KOD_FLAGS       (OPTST_DISABLED \
-        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  Syslog option description with
@@ -144,7 +144,22 @@ static const int
     aFilelogCantList[] = {
     INDEX_OPT_SYSLOG, NO_EQUIVALENT };
 #define FILELOG_FLAGS       (OPTST_DISABLED \
-        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  Steplimit option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+static char const zSteplimitText[] =
+        "Adjustments less than steplimit msec will be slewed.";
+static char const zSteplimit_NAME[]          = "STEPLIMIT";
+static char const zSteplimit_Name[]          = "steplimit";
+static const int
+    aSteplimitCantList[] = {
+    INDEX_OPT_ADJTIME,
+    INDEX_OPT_SETTOD, NO_EQUIVALENT };
+#define STEPLIMIT_FLAGS       (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  Settod option description with
@@ -156,7 +171,8 @@ static char const zSettod_NAME[]             = "SETTOD";
 static char const zSettod_Name[]             = "settod";
 static const int
     aSettodCantList[] = {
-    INDEX_OPT_ADJTIME, NO_EQUIVALENT };
+    INDEX_OPT_ADJTIME,
+    INDEX_OPT_STEPLIMIT, NO_EQUIVALENT };
 #define SETTOD_FLAGS       (OPTST_DISABLED)
 
 /*
@@ -169,9 +185,20 @@ static char const zAdjtime_NAME[]            = "ADJTIME";
 static char const zAdjtime_Name[]            = "adjtime";
 static const int
     aAdjtimeCantList[] = {
-    INDEX_OPT_SETTOD, NO_EQUIVALENT };
+    INDEX_OPT_SETTOD,
+    INDEX_OPT_STEPLIMIT, NO_EQUIVALENT };
 #define ADJTIME_FLAGS       (OPTST_DISABLED)
 
+/*
+ *  Concurrent option description:
+ */
+static char const zConcurrentText[] =
+        "Send concurrent queries to all IPs returned for host-name";
+static char const zConcurrent_NAME[]         = "CONCURRENT";
+static char const zConcurrent_Name[]         = "concurrent";
+#define CONCURRENT_FLAGS       (OPTST_DISABLED | OPTST_STACKED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
 /*
  *  Broadcast option description:
  */
@@ -211,7 +238,7 @@ static char const zKeyfileText[] =
 static char const zKeyfile_NAME[]            = "KEYFILE";
 static char const zKeyfile_Name[]            = "keyfile";
 #define KEYFILE_FLAGS       (OPTST_DISABLED \
-        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  Help/More_Help/Version option descriptions:
@@ -252,7 +279,7 @@ static char const zNotLoad_Opts_Pfx[]  = "no";
  *  if multiple copies are allowed.
  */
 static tOptProc
-    doUsageOpt;
+    doOptFilelog, doOptKeyfile, doOptKod, doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs to the test ones...
@@ -270,7 +297,7 @@ extern tOptProc
     optionStackArg,      optionTimeVal,       optionUnstackArg,
     optionVersionStderr;
 static tOptProc
-    doOptSet_Debug_Level, doUsageOpt;
+    doOptFilelog, doOptKeyfile, doOptKod, doOptSet_Debug_Level, doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs
@@ -346,7 +373,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
      /* must/cannot opts */ NULL, NULL,
-     /* option proc      */ NULL,
+     /* option proc      */ doOptKod,
      /* desc, NAME, name */ zKodText, zKod_NAME, zKod_Name,
      /* disablement strs */ NULL, NULL },
 
@@ -370,12 +397,24 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
      /* must/cannot opts */ NULL, aFilelogCantList,
-     /* option proc      */ NULL,
+     /* option proc      */ doOptFilelog,
      /* desc, NAME, name */ zFilelogText, zFilelog_NAME, zFilelog_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 7, VALUE_OPT_SETTOD,
-     /* equiv idx, value */ 7, VALUE_OPT_SETTOD,
+  {  /* entry idx, value */ 7, VALUE_OPT_STEPLIMIT,
+     /* equiv idx, value */ 7, VALUE_OPT_STEPLIMIT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ STEPLIMIT_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, aSteplimitCantList,
+     /* option proc      */ optionNumericVal,
+     /* desc, NAME, name */ zSteplimitText, zSteplimit_NAME, zSteplimit_Name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 8, VALUE_OPT_SETTOD,
+     /* equiv idx, value */ 8, VALUE_OPT_SETTOD,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ SETTOD_FLAGS, 0,
@@ -386,8 +425,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zSettodText, zSettod_NAME, zSettod_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 8, VALUE_OPT_ADJTIME,
-     /* equiv idx, value */ 8, VALUE_OPT_ADJTIME,
+  {  /* entry idx, value */ 9, VALUE_OPT_ADJTIME,
+     /* equiv idx, value */ 9, VALUE_OPT_ADJTIME,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ ADJTIME_FLAGS, 0,
@@ -398,8 +437,20 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zAdjtimeText, zAdjtime_NAME, zAdjtime_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 9, VALUE_OPT_BROADCAST,
-     /* equiv idx, value */ 9, VALUE_OPT_BROADCAST,
+  {  /* entry idx, value */ 10, VALUE_OPT_CONCURRENT,
+     /* equiv idx, value */ 10, VALUE_OPT_CONCURRENT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, NOLIMIT, 0,
+     /* opt state flags  */ CONCURRENT_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ optionStackArg,
+     /* desc, NAME, name */ zConcurrentText, zConcurrent_NAME, zConcurrent_Name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 11, VALUE_OPT_BROADCAST,
+     /* equiv idx, value */ 11, VALUE_OPT_BROADCAST,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ BROADCAST_FLAGS, 0,
@@ -410,8 +461,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zBroadcastText, zBroadcast_NAME, zBroadcast_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 10, VALUE_OPT_TIMEOUT,
-     /* equiv idx, value */ 10, VALUE_OPT_TIMEOUT,
+  {  /* entry idx, value */ 12, VALUE_OPT_TIMEOUT,
+     /* equiv idx, value */ 12, VALUE_OPT_TIMEOUT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ TIMEOUT_FLAGS, 0,
@@ -422,8 +473,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zTimeoutText, zTimeout_NAME, zTimeout_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 11, VALUE_OPT_AUTHENTICATION,
-     /* equiv idx, value */ 11, VALUE_OPT_AUTHENTICATION,
+  {  /* entry idx, value */ 13, VALUE_OPT_AUTHENTICATION,
+     /* equiv idx, value */ 13, VALUE_OPT_AUTHENTICATION,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ AUTHENTICATION_FLAGS, 0,
@@ -434,15 +485,15 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zAuthenticationText, zAuthentication_NAME, zAuthentication_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
-     /* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
+  {  /* entry idx, value */ 14, VALUE_OPT_KEYFILE,
+     /* equiv idx, value */ 14, VALUE_OPT_KEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ KEYFILE_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
      /* must/cannot opts */ NULL, NULL,
-     /* option proc      */ NULL,
+     /* option proc      */ doOptKeyfile,
      /* desc, NAME, name */ zKeyfileText, zKeyfile_NAME, zKeyfile_Name,
      /* disablement strs */ NULL, NULL },
 
@@ -516,9 +567,10 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  *  Define the Sntp Option Environment
  */
 static char const zPROGNAME[5] = "SNTP";
-static char const zUsageTitle[123] =
+static char const zUsageTitle[130] =
 "sntp - standard SNTP program - Ver. 4.2.7p114\n\
-USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...\n";
+USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
+\t\t[ hostname-or-IP ...]\n";
 static char const zRcName[7] = ".ntprc";
 static char const * const apzHomeList[3] = {
     "$HOME",
@@ -527,8 +579,8 @@ static char const * const apzHomeList[3] = {
 
 static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 static char const zExplain[] = "\n\n";
-static char const zDetail[352] = "\n\
-sntp implements the Simple Network Time Protocol, and is used to query\n\
+static char const zDetail[351] = "\n\
+sntp implements the Simple Network Time Protocol and is used to query\n\
 an NTP or SNTP server and either display the time or set the local\n\
 system's time (given suitable privilege).\n\n\
 It can be run interactively from the command line or as a cron job.\n\n\
@@ -561,7 +613,6 @@ tOptions sntpOptions = {
     + OPTPROC_LONGOPT
     + OPTPROC_NO_REQ_OPT
     + OPTPROC_ENVIRON
-    + OPTPROC_ARGS_REQ
     + OPTPROC_MISUSE ),
     0, NULL,                    /* current option index, current option */
     NULL,         NULL,         zPROGNAME,
@@ -580,7 +631,7 @@ tOptions sntpOptions = {
       NO_EQUIVALENT, /* '-#' option index */
       NO_EQUIVALENT /* index of default opt */
     },
-    18 /* full option count */, 13 /* user option count */,
+    20 /* full option count */, 15 /* user option count */,
     sntp_full_usage, sntp_short_usage,
     NULL, NULL,
     PKGDATADIR
@@ -611,6 +662,60 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_SNTP_OPTS) */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *   For the kod option.
+ */
+static void
+doOptKod(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *   For the filelog option.
+ */
+static void
+doOptFilelog(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *   For the keyfile option.
+ */
+static void
+doOptKeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
 /* extracted from /usr/local/share/autogen/optmain.tpl near line 107 */
 
 #if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
index 2a90323ee681dd24a62c375e3f90e86cb6f35187..0c724ee8f3d973fc0b2e5fed231d0c7196b9e570 100644 (file)
@@ -9,7 +9,7 @@ autogen definitions options;
 prog-name      = "sntp";
 prog-title     = "standard SNTP program";
 homerc         =  $HOME, ".";
-argument       = 'hostname-or-IP ...';
+argument       = '[ hostname-or-IP ...]';
 
 long-opts;
 
@@ -53,11 +53,11 @@ flag = {
 flag = {
     name      = kod;
     value     = K;
-    arg-type  = string;
+    arg-type  = file;
     arg-name  = "file-name";
     descrip   = "KoD history filename";
     doc = <<-  _EndOfDoc_
-       Modifies the filename to be used to persist the history of KoD
+       Specifies the filename to be used for the  persistent history of KoD
        responses received from servers.  The default is
        /var/db/ntp-kod.
        _EndOfDoc_;
@@ -77,7 +77,7 @@ flag = {
 flag = {
        name       = filelog;
        value      = l;
-       arg-type   = string;
+       arg-type   = file;
        arg-name   = "file-name";
        flags-cant = syslog;
        descrip = "Log to specified logfile";
@@ -88,20 +88,52 @@ flag = {
 };
 
 flag = {
-    name      = settod;
-    value     = s;
-    flags-cant = adjtime;
-    descrip   = "Set (step) the time with settimeofday()";
-    doc = <<-  _EndOfDoc_
+       name       = steplimit;
+       value      = S;
+       arg-type   = number;
+       flags-cant = adjtime, settod;
+       descrip    = "Adjustments less than steplimit msec will be slewed.";
+       doc = <<-  _EndOfDoc_
+       If the time adjustment is less than steplimit milliseconds, slew the amount using adjtime().  Otherwise, step the correction using settimeofday().
+       _EndOfDoc_;
+       };
+
+flag = {
+       name       = settod;
+       value      = s;
+       flags-cant = adjtime, steplimit;
+       descrip    = "Set (step) the time with settimeofday()";
+       doc = <<-  _EndOfDoc_
        _EndOfDoc_;
 };
 
 flag = {
-    name      = adjtime;
-    value     = j;
-    flags-cant = settod;
-    descrip   = "Set (slew) the time with adjtime()";
-    doc = <<-  _EndOfDoc_
+       name       = adjtime;
+       value      = j;
+       flags-cant = settod, steplimit;
+       descrip    = "Set (slew) the time with adjtime()";
+       doc = <<-  _EndOfDoc_
+       _EndOfDoc_;
+};
+
+flag = {
+       name     = concurrent;
+       value    = c;
+       descrip  = "Send concurrent queries to all IPs returned for host-name";
+       arg-type = string;
+       arg-name = "host-name";
+       max      = NOLIMIT;
+       stack-arg;
+       doc      = <<-  _EndOfDoc_
+       Requests from an NTP "client" to a "server" should never be sent
+       more rapidly than one every 2 seconds.  By default, any IPs returned
+       as part of a DNS lookup are assumed to be for a single instance of
+       ntpd, and therefore sntp will send  queries to these IPs one after
+       another, with a 2-second gap in between each query.
+
+       The -c or --concurrent 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.
        _EndOfDoc_;
 };
 
@@ -148,7 +180,7 @@ flag = {
        name    = keyfile;
        value   = k;
        descrip = "Specify a keyfile. SNTP will look in this file for the key specified with -a";
-       arg-type = string;
+       arg-type = file;
        arg-name = "file-name";
        doc     = <<-  _EndOfDoc_
        This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
@@ -173,7 +205,7 @@ explain = <<- _END_EXPLAIN
        _END_EXPLAIN;
 
 detail = <<-  _END_DETAIL
-sntp implements the Simple Network Time Protocol, and is used to query
+sntp implements the Simple Network Time Protocol and is used to query
 an NTP or SNTP server and either display the time or set the local
 system's time (given suitable privilege).
 
index a11cba3fbedc03adef1b0ee4bdbf78b6c08ab8ef..7d943173222e0d32804dbd31f70dfebd460ce6ed 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  January  9, 2011 at 06:03:48 AM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  January 10, 2011 at 11:23:51 PM by AutoGen 5.11.6pre7
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -57,20 +57,22 @@ typedef enum {
     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
+    INDEX_OPT_STEPLIMIT        =  7,
+    INDEX_OPT_SETTOD           =  8,
+    INDEX_OPT_ADJTIME          =  9,
+    INDEX_OPT_CONCURRENT       = 10,
+    INDEX_OPT_BROADCAST        = 11,
+    INDEX_OPT_TIMEOUT          = 12,
+    INDEX_OPT_AUTHENTICATION   = 13,
+    INDEX_OPT_KEYFILE          = 14,
+    INDEX_OPT_VERSION          = 15,
+    INDEX_OPT_HELP             = 16,
+    INDEX_OPT_MORE_HELP        = 17,
+    INDEX_OPT_SAVE_OPTS        = 18,
+    INDEX_OPT_LOAD_OPTS        = 19
 } teOptIndex;
 
-#define OPTION_CT    18
+#define OPTION_CT    20
 #define SNTP_VERSION       "4.2.7p114"
 #define SNTP_FULL_VERSION  "sntp - standard SNTP program - Ver. 4.2.7p114"
 
@@ -136,6 +138,10 @@ typedef enum {
 #  warning undefining FILELOG due to option name conflict
 #  undef   FILELOG
 # endif
+# ifdef    STEPLIMIT
+#  warning undefining STEPLIMIT due to option name conflict
+#  undef   STEPLIMIT
+# endif
 # ifdef    SETTOD
 #  warning undefining SETTOD due to option name conflict
 #  undef   SETTOD
@@ -144,6 +150,10 @@ typedef enum {
 #  warning undefining ADJTIME due to option name conflict
 #  undef   ADJTIME
 # endif
+# ifdef    CONCURRENT
+#  warning undefining CONCURRENT due to option name conflict
+#  undef   CONCURRENT
+# endif
 # ifdef    BROADCAST
 #  warning undefining BROADCAST due to option name conflict
 #  undef   BROADCAST
@@ -168,8 +178,10 @@ typedef enum {
 # undef KOD
 # undef SYSLOG
 # undef FILELOG
+# undef STEPLIMIT
 # undef SETTOD
 # undef ADJTIME
+# undef CONCURRENT
 # undef BROADCAST
 # undef TIMEOUT
 # undef AUTHENTICATION
@@ -187,8 +199,12 @@ typedef enum {
 #define VALUE_OPT_KOD            'K'
 #define VALUE_OPT_SYSLOG         'p'
 #define VALUE_OPT_FILELOG        'l'
+#define VALUE_OPT_STEPLIMIT      'S'
+
+#define OPT_VALUE_STEPLIMIT      (DESC(STEPLIMIT).optArg.argInt)
 #define VALUE_OPT_SETTOD         's'
 #define VALUE_OPT_ADJTIME        'j'
+#define VALUE_OPT_CONCURRENT     'c'
 #define VALUE_OPT_BROADCAST      'b'
 #define VALUE_OPT_TIMEOUT        't'
 
index a1808b9619117826b7c14e855a251068a33e1d61..aa0439201bdf10ed6561e5ca0afe6732814bbdee 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
 # 
-# It has been AutoGen-ed  January  9, 2011 at 06:07:36 AM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed  January 10, 2011 at 11:23:56 PM by AutoGen 5.11.6pre7
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -50,6 +50,7 @@ This software is released under a specialized copyright license.
 * sntp adjtime::               adjtime option (-j)
 * sntp authentication::        authentication option (-a)
 * sntp broadcast::             broadcast option (-b)
+* sntp concurrent::            concurrent option (-c)
 * sntp debug-level::           debug-level option (-d)
 * sntp filelog::               filelog option (-l)
 * sntp ipv4::                  ipv4 option (-4)
@@ -58,6 +59,7 @@ This software is released under a specialized copyright license.
 * sntp kod::                   kod option (-K)
 * sntp set-debug-level::       set-debug-level option (-D)
 * sntp settod::                settod option (-s)
+* sntp steplimit::             steplimit option (-S)
 * sntp syslog::                syslog option (-p)
 * sntp timeout::               timeout option (-t)
 @end menu
@@ -71,7 +73,8 @@ This is the automatically generated usage text for sntp:
 @exampleindent 0
 @example
 sntp - standard SNTP program - Ver. 4.2.7p114
-USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... hostname-or-IP ...
+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
@@ -83,23 +86,31 @@ USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... hostname-or-IP ...
    -6 no  ipv6           Force IPv6 DNS name resolution
                                 - prohibits these options:
                                 ipv4
-   -K Str kod            KoD history filename
+   -K Fil kod            KoD history filename
    -p no  syslog         Logging with syslog
                                 - prohibits these options:
                                 filelog
-   -l Str filelog        Log to specified logfile
+   -l Fil filelog        Log to specified logfile
                                 - prohibits these options:
                                 syslog
+   -S Num steplimit      Adjustments less than steplimit msec will be slewed.
+                                - prohibits these options:
+                                adjtime
+                                settod
    -s no  settod         Set (step) the time with settimeofday()
                                 - prohibits these options:
                                 adjtime
+                                steplimit
    -j no  adjtime        Set (slew) the time with adjtime()
                                 - prohibits these options:
                                 settod
+                                steplimit
+   -c Str concurrent     Send concurrent queries to all IPs returned for host-name
+                                - may appear multiple times
    -b Str broadcast      Use broadcasts to the address specified for synchronisation
    -t Num timeout        Specify the number of seconds to wait for broadcasts
    -a Num authentication Enable authentication with the key auth-keynumber
-   -k Str keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
+   -k Fil keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
       opt version        Output version information and exit
    -? no  help           Display extended usage information and exit
    -! no  more-help      Extended usage information passed thru pager
@@ -118,7 +129,7 @@ The following option preset mechanisms are supported:
  - reading file ./.ntprc
  - examining environment variables named SNTP_*
 
-sntp implements the Simple Network Time Protocol, and is used to query
+sntp implements the Simple Network Time Protocol and is used to query
 an NTP or SNTP server and either display the time or set the local
 system's time (given suitable privilege).
 
@@ -141,7 +152,7 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 must not appear in combination with any of the following options:
-settod.
+settod, steplimit.
 @end itemize
 
 
@@ -164,6 +175,28 @@ If specified SNTP will listen to the specified broadcast address
 for NTP broadcasts.  The default maximum wait time,
 68 seconds, can be modified with -t.
 
+@node sntp concurrent
+@subsection concurrent option (-c)
+@cindex sntp-concurrent
+
+This is the ``send concurrent queries to all ips returned for host-name'' option.
+
+This option has some usage constraints.  It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds.  By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+ntpd, and therefore sntp will send  queries to these IPs one after
+another, with a 2-second gap in between each query.
+
+The -c or --concurrent 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.
+
 @node sntp debug-level
 @subsection debug-level option (-d)
 @cindex sntp-debug-level
@@ -250,7 +283,7 @@ For more information see ntp.keys(5).
 @cindex sntp-kod
 
 This is the ``kod history filename'' option.
-Modifies the filename to be used to persist the history of KoD
+Specifies the filename to be used for the  persistent history of KoD
 responses received from servers.  The default is
 /var/db/ntp-kod.
 
@@ -279,11 +312,26 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 must not appear in combination with any of the following options:
-adjtime.
+adjtime, steplimit.
 @end itemize
 
 
 
+@node sntp steplimit
+@subsection steplimit option (-S)
+@cindex sntp-steplimit
+
+This is the ``adjustments less than steplimit msec will be slewed.'' option.
+
+This option has some usage constraints.  It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+adjtime, settod.
+@end itemize
+
+If the time adjustment is less than steplimit milliseconds, slew the amount using adjtime().  Otherwise, step the correction using settimeofday().
+
 @node sntp syslog
 @subsection syslog option (-p)
 @cindex sntp-syslog
index c1df8671d0f482004da74354f81e319ef493d4e5..bda755c027a2bc4c4fa8c92a2f5755daba232555 100644 (file)
@@ -1,7 +1,7 @@
-.TH SNTP 1 2011-01-09 "( 4.2.7p114)" "Programmer's Manual"
+.TH SNTP 1 2011-01-10 "( 4.2.7p114)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp.1)
 .\"  
-.\"  It has been AutoGen-ed  January  9, 2011 at 06:07:35 AM by AutoGen 5.11.6pre7
+.\"  It has been AutoGen-ed  January 10, 2011 at 11:23:55 PM by AutoGen 5.11.6pre7
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -13,7 +13,7 @@ sntp \- standard SNTP program
 .RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
 .br
 .in +8
-hostname-or-IP ...
+[ hostname-or-IP ...]
 .PP
 
 .SH "DESCRIPTION"
@@ -79,7 +79,7 @@ to the IPv6 namespace.
 .BR \-K " \fIfile-name\fP, " \--kod "=" \fIfile-name\fP
 KoD history filename.
 .sp
-Modifies the filename to be used to persist the history of KoD
+Specifies the filename to be used for the  persistent history of KoD
 responses received from servers.  The default is
 /var/db/ntp-kod.
 .TP
@@ -98,19 +98,41 @@ syslog.
 This option causes the client to write log messages to the specified
 logfile.
 .TP
+.BR \-S " \fInumber\fP, " \--steplimit "=" \fInumber\fP
+Adjustments less than steplimit msec will be slewed..
+This option must not appear in combination with any of the following options:
+adjtime, settod.
+This option takes an integer number as its argument.
+.sp
+If the time adjustment is less than steplimit milliseconds, slew the amount using adjtime().  Otherwise, step the correction using settimeofday().
+.TP
 .BR \-s ", " \--settod
 Set (step) the time with settimeofday().
 This option must not appear in combination with any of the following options:
-adjtime.
+adjtime, steplimit.
 .sp
 
 .TP
 .BR \-j ", " \--adjtime
 Set (slew) the time with adjtime().
 This option must not appear in combination with any of the following options:
-settod.
+settod, steplimit.
+.sp
+
+.TP
+.BR \-c " \fIhost-name\fP, " \--concurrent "=" \fIhost-name\fP
+Send concurrent queries to all IPs returned for host-name.
+This option may appear an unlimited number of times.
 .sp
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds.  By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+ntpd, and therefore sntp will send  queries to these IPs one after
+another, with a 2-second gap in between each query.
 
+The \-c or \--concurrent 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.
 .TP
 .BR \-b " \fIbroadcast-address\fP, " \--broadcast "=" \fIbroadcast-address\fP
 Use broadcasts to the address specified for synchronisation.
index 7da2de6c9208fcbfe1ae4c58af6352104473a029..83a59243e1722f823d9553f4e5e5672af4d797b0 100644 (file)
@@ -120,14 +120,16 @@ the aginfo template and the option descriptions for the <samp><span class="comma
 <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-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 accesskey="5" href="#sntp-concurrent">sntp concurrent</a>:             concurrent option (-c)
+<li><a accesskey="6" href="#sntp-debug_002dlevel">sntp debug-level</a>:            debug-level option (-d)
+<li><a accesskey="7" href="#sntp-filelog">sntp filelog</a>:                filelog option (-l)
+<li><a accesskey="8" href="#sntp-ipv4">sntp ipv4</a>:                   ipv4 option (-4)
+<li><a accesskey="9" href="#sntp-ipv6">sntp ipv6</a>:                   ipv6 option (-6)
+<li><a 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-steplimit">sntp steplimit</a>:              steplimit option (-S)
 <li><a href="#sntp-syslog">sntp syslog</a>:                 syslog option (-p)
 <li><a href="#sntp-timeout">sntp timeout</a>:                timeout option (-t)
 </ul>
@@ -146,7 +148,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 This is the automatically generated usage text for sntp:
 
 <pre class="example">sntp - standard SNTP program - Ver. 4.2.7p114
-USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... hostname-or-IP ...
+USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
+                [ hostname-or-IP ...]
   Flg Arg Option-Name    Description
    -d no  debug-level    Increase output debug message level
                                 - may appear multiple times
@@ -158,23 +161,31 @@ USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
    -6 no  ipv6           Force IPv6 DNS name resolution
                                 - prohibits these options:
                                 ipv4
-   -K Str kod            KoD history filename
+   -K Fil kod            KoD history filename
    -p no  syslog         Logging with syslog
                                 - prohibits these options:
                                 filelog
-   -l Str filelog        Log to specified logfile
+   -l Fil filelog        Log to specified logfile
                                 - prohibits these options:
                                 syslog
+   -S Num steplimit      Adjustments less than steplimit msec will be slewed.
+                                - prohibits these options:
+                                adjtime
+                                settod
    -s no  settod         Set (step) the time with settimeofday()
                                 - prohibits these options:
                                 adjtime
+                                steplimit
    -j no  adjtime        Set (slew) the time with adjtime()
                                 - prohibits these options:
                                 settod
+                                steplimit
+   -c Str concurrent     Send concurrent queries to all IPs returned for host-name
+                                - may appear multiple times
    -b Str broadcast      Use broadcasts to the address specified for synchronisation
    -t Num timeout        Specify the number of seconds to wait for broadcasts
    -a Num authentication Enable authentication with the key auth-keynumber
-   -k Str keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
+   -k Fil keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
       opt version        Output version information and exit
    -? no  help           Display extended usage information and exit
    -! no  more-help      Extended usage information passed thru pager
@@ -193,7 +204,7 @@ The following option preset mechanisms are supported:
  - reading file ./.ntprc
  - examining environment variables named SNTP_*
 
-sntp implements the Simple Network Time Protocol, and is used to query
+sntp implements the Simple Network Time Protocol and is used to query
 an NTP or SNTP server and either display the time or set the local
 system's time (given suitable privilege).
 
@@ -221,7 +232,7 @@ This is the &ldquo;set (slew) the time with adjtime()&rdquo; option.
   <p>This option has some usage constraints.  It:
      <ul>
 <li>must not appear in combination with any of the following options:
-settod. 
+settod, steplimit
 </ul>
 
 <div class="node">
@@ -244,7 +255,7 @@ key's identifier. See the keyfile option (-k) for more details.
 <div class="node">
 <p><hr>
 <a name="sntp-broadcast"></a>
-Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-debug_002dlevel">sntp debug-level</a>,
+Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
 Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
@@ -258,19 +269,48 @@ If specified SNTP will listen to the specified broadcast address
 for NTP broadcasts.  The default maximum wait time,
 68 seconds, can be modified with -t.
 
+<div class="node">
+<p><hr>
+<a name="sntp-concurrent"></a>
+Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-debug_002dlevel">sntp debug-level</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+
+</div>
+
+<h4 class="subsection">concurrent option (-c)</h4>
+
+<p><a name="index-sntp_002dconcurrent-7"></a>
+This is the &ldquo;send concurrent queries to all ips returned for host-name&rdquo; option.
+
+  <p>This option has some usage constraints.  It:
+     <ul>
+<li>may appear an unlimited number of times. 
+</ul>
+
+  <p>Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds.  By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+ntpd, and therefore sntp will send  queries to these IPs one after
+another, with a 2-second gap in between each query.
+
+  <p>The -c or &ndash;concurrent 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-debug-level"></a>
 <a name="sntp-debug_002dlevel"></a>
 Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-filelog">sntp filelog</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 </div>
 
 <h4 class="subsection">debug-level option (-d)</h4>
 
-<p><a name="index-sntp_002ddebug_002dlevel-7"></a>
+<p><a name="index-sntp_002ddebug_002dlevel-8"></a>
 This is the &ldquo;increase output debug message level&rdquo; option.
 
   <p>This option has some usage constraints.  It:
@@ -291,7 +331,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">filelog option (-l)</h4>
 
-<p><a name="index-sntp_002dfilelog-8"></a>
+<p><a name="index-sntp_002dfilelog-9"></a>
 This is the &ldquo;log to specified logfile&rdquo; option.
 
   <p>This option has some usage constraints.  It:
@@ -314,7 +354,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">ipv4 option (-4)</h4>
 
-<p><a name="index-sntp_002dipv4-9"></a>
+<p><a name="index-sntp_002dipv4-10"></a>
 This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
 
   <p>This option has some usage constraints.  It:
@@ -337,7 +377,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">ipv6 option (-6)</h4>
 
-<p><a name="index-sntp_002dipv6-10"></a>
+<p><a name="index-sntp_002dipv6-11"></a>
 This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
 
   <p>This option has some usage constraints.  It:
@@ -360,7 +400,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">keyfile option (-k)</h4>
 
-<p><a name="index-sntp_002dkeyfile-11"></a>
+<p><a name="index-sntp_002dkeyfile-12"></a>
 This is the &ldquo;specify a keyfile. sntp will look in this file for the key specified with -a&rdquo; 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:
@@ -387,9 +427,9 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">kod option (-K)</h4>
 
-<p><a name="index-sntp_002dkod-12"></a>
+<p><a name="index-sntp_002dkod-13"></a>
 This is the &ldquo;kod history filename&rdquo; option. 
-Modifies the filename to be used to persist the history of KoD
+Specifies the filename to be used for the  persistent history of KoD
 responses received from servers.  The default is
 /var/db/ntp-kod.
 
@@ -405,7 +445,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">set-debug-level option (-D)</h4>
 
-<p><a name="index-sntp_002dset_002ddebug_002dlevel-13"></a>
+<p><a name="index-sntp_002dset_002ddebug_002dlevel-14"></a>
 This is the &ldquo;set the output debug message level&rdquo; option.
 
   <p>This option has some usage constraints.  It:
@@ -419,7 +459,7 @@ but each overrides the previous value(s).
 <div class="node">
 <p><hr>
 <a name="sntp-settod"></a>
-Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
+Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
 Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-set_002ddebug_002dlevel">sntp set-debug-level</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
@@ -427,27 +467,49 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">settod option (-s)</h4>
 
-<p><a name="index-sntp_002dsettod-14"></a>
+<p><a name="index-sntp_002dsettod-15"></a>
 This is the &ldquo;set (step) the time with settimeofday()&rdquo; option.
 
   <p>This option has some usage constraints.  It:
      <ul>
 <li>must not appear in combination with any of the following options:
-adjtime. 
+adjtime, steplimit. 
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="sntp-steplimit"></a>
+Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+
+</div>
+
+<h4 class="subsection">steplimit option (-S)</h4>
+
+<p><a name="index-sntp_002dsteplimit-16"></a>
+This is the &ldquo;adjustments less than steplimit msec will be slewed.&rdquo; option.
+
+  <p>This option has some usage constraints.  It:
+     <ul>
+<li>must not appear in combination with any of the following options:
+adjtime, settod. 
 </ul>
 
+  <p>If the time adjustment is less than steplimit milliseconds, slew the amount using adjtime().  Otherwise, step the correction using settimeofday().
+
 <div class="node">
 <p><hr>
 <a name="sntp-syslog"></a>
 Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 </div>
 
 <h4 class="subsection">syslog option (-p)</h4>
 
-<p><a name="index-sntp_002dsyslog-15"></a>
+<p><a name="index-sntp_002dsyslog-17"></a>
 This is the &ldquo;logging with syslog&rdquo; option.
 
   <p>This option has some usage constraints.  It:
@@ -468,7 +530,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 
 <h4 class="subsection">timeout option (-t)</h4>
 
-<p><a name="index-sntp_002dtimeout-16"></a>
+<p><a name="index-sntp_002dtimeout-18"></a>
 This is the &ldquo;specify the number of seconds to wait for broadcasts&rdquo; option. 
 When waiting for a broadcast packet SNTP will wait the number
 of seconds specified before giving up.  Default 68 seconds.