]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
authorHarlan Stenn <stenn@ntp.org>
Thu, 4 Aug 2011 20:13:31 +0000 (16:13 -0400)
committerHarlan Stenn <stenn@ntp.org>
Thu, 4 Aug 2011 20:13:31 +0000 (16:13 -0400)
bk: 4e3afd6bNgDxwnKuPbULzd3E1UStrw

ChangeLog
sntp/main.c
sntp/sntp-opts.c
sntp/sntp-opts.def
sntp/sntp-opts.h
sntp/sntp-opts.texi
sntp/sntp.1sntpman
sntp/sntp.1sntpmdoc
sntp/sntp.html
sntp/sntp.man.in
sntp/sntp.mdoc.in

index e2ba8ed2fc3ec97abb30b44979b2ffb1c8557389..147909becad45ee8d32b607b93a4340d5b47e5e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+* sntp: change -h/--headspace to -g/--gap, and change the default gap
+  from 10 to 50ms
 (4.2.7p199) 2011/07/29 Released by Harlan Stenn <stenn@ntp.org>
 * Documentation updates from Dave Mills.
 (4.2.7p198) 2011/07/28 Released by Harlan Stenn <stenn@ntp.org>
index e65c9bbe25bc49b9f9665c014250a825e8e3f4fd..ca66034953ae8a11702d93b86b0cd98ef5421437 100644 (file)
@@ -69,7 +69,7 @@ struct xmt_ctx_tag {
        sent_pkt *              spkt;
 };
 
-struct timeval headspace;
+struct timeval gap;
 xmt_ctx *      xmt_q;
 struct key *   keys = NULL;
 struct timeval bcst_timeout_tv;
@@ -157,8 +157,8 @@ sntp_main (
                      : ""));
        ntpver = OPT_VALUE_NTPVERSION;
        steplimit = OPT_VALUE_STEPLIMIT / 1e3;
-       headspace.tv_usec = max(0, OPT_VALUE_HEADSPACE * 1000);
-       headspace.tv_usec = min(headspace.tv_usec, 999999);
+       gap.tv_usec = max(0, OPT_VALUE_GAP * 1000);
+       gap.tv_usec = min(gap.tv_usec, 999999);
 
        if (HAVE_OPT(FILELOG))
                open_logfile(OPT_ARG(FILELOG));
@@ -629,10 +629,10 @@ xmt_timer_cb(
                        return;
        }
        if (xmt_q->sched <= start_cb.tv_sec) {
-               event_add(ev_xmt_timer, &headspace);
-               TRACE(2, ("xmt_timer_cb: at .%6.6u headspace %6.6u\n",
+               event_add(ev_xmt_timer, &gap);
+               TRACE(2, ("xmt_timer_cb: at .%6.6u gap %6.6u\n",
                          (u_int)start_cb.tv_usec,
-                         (u_int)headspace.tv_usec));
+                         (u_int)gap.tv_usec));
        } else {
                delay.tv_sec = xmt_q->sched - start_cb.tv_sec;
                delay.tv_usec = 0;
index b59a6734d74a15748c7c06171312f3bdfafd00c2..b8f227af77b1d22ca55d0e1a022c15de3fa634a9 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  July 29, 2011 at 10:47:38 AM by AutoGen 5.12
+ *  It has been AutoGen-ed  August  4, 2011 at 01:06:06 PM by AutoGen 5.12
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -62,14 +62,14 @@ can be seen at:\n\
 static char const zLicenseDescrip[700] =
 "Permission to use, copy, modify, and distribute this software and its\n\
 documentation for any purpose with or without fee is hereby granted,\n\
-provided that the above copyright notice appears in all copies and that\n\
-both the copyright notice and this permission notice appear in supporting\n\
-documentation, and that the name The University of Delaware, David L.\n\
-Mills, and/or others not be used in advertising or publicity pertaining to\n\
-distribution of the software without specific, written prior permission.\n\
-The University of Delaware, David L. Mills, and/or others makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n";
+provided that the above copyright notice appears in all copies and\n\
+that both the copyright notice and this permission notice appear in\n\
+supporting documentation, and that the name The University of Delaware,\n\
+David L. Mills, and/or others not be used in advertising or publicity\n\
+pertaining to distribution of the software without specific, written\n\
+prior permission. The University of Delaware, David L. Mills, and/or\n\
+others makes no representations about the suitability this software for\n\
+any purpose. It is provided \"as is\" without express or implied warranty.\n";
 
 extern tUsageProc optionUsage;
 
@@ -173,14 +173,14 @@ static char const zSet_Debug_Level_Name[]    = "set-debug-level";
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
- *  Headspace option description:
+ *  Gap option description:
  */
-static char const zHeadspaceText[] =
+static char const zGapText[] =
         "The gap (in milliseconds) between time requests";
-static char const zHeadspace_NAME[]          = "HEADSPACE";
-static char const zHeadspace_Name[]          = "headspace";
-#define zHeadspaceDefaultArg         ((char const*)10)
-#define HEADSPACE_FLAGS       (OPTST_DISABLED \
+static char const zGap_NAME[]                = "GAP";
+static char const zGap_Name[]                = "gap";
+#define zGapDefaultArg               ((char const*)50)
+#define GAP_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
@@ -460,16 +460,16 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 8, VALUE_OPT_HEADSPACE,
-     /* equiv idx, value */ 8, VALUE_OPT_HEADSPACE,
+  {  /* entry idx, value */ 8, VALUE_OPT_GAP,
+     /* equiv idx, value */ 8, VALUE_OPT_GAP,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
-     /* opt state flags  */ HEADSPACE_FLAGS, 0,
-     /* last opt argumnt */ { zHeadspaceDefaultArg },
+     /* opt state flags  */ GAP_FLAGS, 0,
+     /* last opt argumnt */ { zGapDefaultArg },
      /* arg list/cookie  */ NULL,
      /* must/cannot opts */ NULL, NULL,
      /* option proc      */ optionNumericVal,
-     /* desc, NAME, name */ zHeadspaceText, zHeadspace_NAME, zHeadspace_Name,
+     /* desc, NAME, name */ zGapText, zGap_NAME, zGap_Name,
      /* disablement strs */ NULL, NULL },
 
   {  /* entry idx, value */ 9, VALUE_OPT_KOD,
index 5f2eb7cead09096d868e7135403a9cd6c10f8fdc..62bce6da07335c9d15fadc9aebf8aa62683a105f 100644 (file)
@@ -110,12 +110,12 @@ flag = {
 #include debug-opt.def
 
 flag = {
-  name         = headspace;
-  value                = h;
+  name         = gap;
+  value                = g;
   descrip      = "The gap (in milliseconds) between time requests";
   arg-type     = number;
   arg-name     = "milliseconds";
-  arg-default  = 10;
+  arg-default  = 50;
   doc          = <<- _EndOfDoc_
        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,
index 9b68d26ebf9e4ca29b22128302aba449b8df9016..bf64c4290e48e309c6f7963fb8a3cf3ca0b64a37 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  July 29, 2011 at 10:47:37 AM by AutoGen 5.12
+ *  It has been AutoGen-ed  August  4, 2011 at 01:06:06 PM by AutoGen 5.12
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -71,7 +71,7 @@ typedef enum {
     INDEX_OPT_CONCURRENT       =  5,
     INDEX_OPT_DEBUG_LEVEL      =  6,
     INDEX_OPT_SET_DEBUG_LEVEL  =  7,
-    INDEX_OPT_HEADSPACE        =  8,
+    INDEX_OPT_GAP              =  8,
     INDEX_OPT_KOD              =  9,
     INDEX_OPT_KEYFILE          = 10,
     INDEX_OPT_FILELOG          = 11,
@@ -158,9 +158,9 @@ typedef enum {
 #  warning undefining SET_DEBUG_LEVEL due to option name conflict
 #  undef   SET_DEBUG_LEVEL
 # endif
-# ifdef    HEADSPACE
-#  warning undefining HEADSPACE due to option name conflict
-#  undef   HEADSPACE
+# ifdef    GAP
+#  warning undefining GAP due to option name conflict
+#  undef   GAP
 # endif
 # ifdef    KOD
 #  warning undefining KOD due to option name conflict
@@ -211,7 +211,7 @@ typedef enum {
 # undef CONCURRENT
 # undef DEBUG_LEVEL
 # undef SET_DEBUG_LEVEL
-# undef HEADSPACE
+# undef GAP
 # undef KOD
 # undef KEYFILE
 # undef FILELOG
@@ -240,9 +240,9 @@ typedef enum {
 #define VALUE_OPT_CONCURRENT     'c'
 #define VALUE_OPT_DEBUG_LEVEL    'd'
 #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#define VALUE_OPT_HEADSPACE      'h'
+#define VALUE_OPT_GAP            'g'
 
-#define OPT_VALUE_HEADSPACE      (DESC(HEADSPACE).optArg.argInt)
+#define OPT_VALUE_GAP            (DESC(GAP).optArg.argInt)
 #define VALUE_OPT_KOD            'K'
 #define VALUE_OPT_KEYFILE        'k'
 #define VALUE_OPT_FILELOG        'l'
index 7dfc3441004616a518c88e9c47f68925463d3efb..6295ff201ec59a64b539ffd6b448b4c19b075b4c 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
 # 
-# It has been AutoGen-ed  July 29, 2011 at 11:09:34 AM by AutoGen 5.12
+# It has been AutoGen-ed  August  4, 2011 at 01:06:17 PM by AutoGen 5.12
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -53,7 +53,7 @@ This software is released under a specialized copyright license.
 * sntp concurrent::            concurrent option (-c)
 * sntp debug-level::           debug-level option (-d)
 * sntp filelog::               filelog option (-l)
-* sntp headspace::             headspace option (-h)
+* sntp gap::                   gap option (-g)
 * sntp ipv4::                  ipv4 option (-4)
 * sntp ipv6::                  ipv6 option (-6)
 * sntp keyfile::               keyfile option (-k)
@@ -96,7 +96,7 @@ USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
                                 - may appear multiple times
    -D Str set-debug-level Set the debug verbosity level
                                 - may appear multiple times
-   -h Num headspace      The gap (in milliseconds) between time requests
+   -g Num gap            The gap (in milliseconds) between time requests
    -K Fil kod            KoD history filename
    -k Fil keyfile        Look in this file for the key specified with -a
    -l Fil filelog        Log to specified logfile
@@ -215,9 +215,9 @@ This is the ``log to specified logfile'' option.
 This option causes the client to write log messages to the specified
 logfile.
 
-@node sntp headspace
-@subsection headspace option (-h)
-@cindex sntp-headspace
+@node sntp gap
+@subsection gap option (-g)
+@cindex sntp-gap
 
 This is the ``the gap (in milliseconds) between time requests'' option.
 Since we're only going to use the first valid response we get and
index cdf14ed8d4be0df5edc9e218ab85b15e7b1a8462..5b03fbeb0750c27ecef9184f49c5fa20ca26f1b0 100644 (file)
@@ -1,8 +1,8 @@
-.TH sntp 1sntpman "29 Jul 2011" "4.2.7p199" "User Commands"
+.TH sntp 1sntpman "04 Aug 2011" "4.2.7p199" "User Commands"
 .\"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp-opts.man)
 .\"  
-.\"  It has been AutoGen-ed  July 29, 2011 at 11:09:06 AM by AutoGen 5.12
+.\"  It has been AutoGen-ed  August  4, 2011 at 01:06:16 PM by AutoGen 5.12
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman-cmd.tpl
 .\"
@@ -107,12 +107,12 @@ Set the debug verbosity level.
 This option may appear an unlimited number of times.
 .sp
 .TP
-.BR \-h " \fImilliseconds\fP, " \-\-headspace "=" \fImilliseconds\fP
+.BR \-g " \fImilliseconds\fP, " \-\-gap "=" \fImilliseconds\fP
 The gap (in milliseconds) between time requests.
 This option takes an integer number as its argument.
 The default \fImilliseconds\fP for this option is:
 .ti +4
10
50
 .sp
 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,
index 3ccc9bc3c29af5926fbe30717664598a4648fb19..09b6e9ee501d9054fa48088c37f5d2af8b81a817 100644 (file)
@@ -1,9 +1,9 @@
-.Dd July 29 2011
+.Dd August 4 2011
 .Dt SNTP 1sntpmdoc User Commands
-.Os SunOS 5.10
+.Os SunOS 5.11
 .\"  EDIT THIS FILE WITH CAUTION  (sntp-opts.mdoc)
 .\"  
-.\"  It has been AutoGen-ed  July 29, 2011 at 11:09:37 AM by AutoGen 5.12
+.\"  It has been AutoGen-ed  August  4, 2011 at 01:06:18 PM by AutoGen 5.12
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -103,12 +103,12 @@ This option may appear an unlimited number of times.
 Set the debug verbosity level.
 This option may appear an unlimited number of times.
 .sp
-.It  \-h " \fImilliseconds\fP, " \-\-headspace "=" \fImilliseconds\fP
+.It  \-g " \fImilliseconds\fP, " \-\-gap "=" \fImilliseconds\fP
 The gap (in milliseconds) between time requests.
 This option takes an integer number as its argument.
 The default \fImilliseconds\fP for this option is:
 .ti +4
10
50
 .sp
 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,
index f4451c9852a907e0bc5859455858b7b38602da60..0a7104a7221fe1e47a6f086a82dd037dbf37ea88 100644 (file)
@@ -123,7 +123,7 @@ the aginfo template and the option descriptions for the <span class="command">sn
 <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-headspace">sntp headspace</a>:              headspace option (-h)
+<li><a accesskey="8" href="#sntp-gap">sntp gap</a>:                    gap option (-g)
 <li><a accesskey="9" href="#sntp-ipv4">sntp ipv4</a>:                   ipv4 option (-4)
 <li><a href="#sntp-ipv6">sntp ipv6</a>:                   ipv6 option (-6)
 <li><a href="#sntp-keyfile">sntp keyfile</a>:                keyfile option (-k)
@@ -170,7 +170,7 @@ USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
                                 - may appear multiple times
    -D Str set-debug-level Set the debug verbosity level
                                 - may appear multiple times
-   -h Num headspace      The gap (in milliseconds) between time requests
+   -g Num gap            The gap (in milliseconds) between time requests
    -K Fil kod            KoD history filename
    -k Fil keyfile        Look in this file for the key specified with -a
    -l Fil filelog        Log to specified logfile
@@ -311,7 +311,7 @@ This is the &ldquo;increase debug verbosity level&rdquo; option.
 
 <div class="node">
 <p><hr>
-<a name="sntp-filelog"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-headspace">sntp headspace</a>,
+<a name="sntp-filelog"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
 Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-debug_002dlevel">sntp debug-level</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 <br>
@@ -326,15 +326,15 @@ logfile.
 
 <div class="node">
 <p><hr>
-<a name="sntp-headspace"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
+<a name="sntp-gap"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
 Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-filelog">sntp filelog</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 <br>
 </div>
 
-<h4 class="subsection">headspace option (-h)</h4>
+<h4 class="subsection">gap option (-g)</h4>
 
-<p><a name="index-sntp_002dheadspace-10"></a>
+<p><a name="index-sntp_002dgap-10"></a>
 This is the &ldquo;the gap (in milliseconds) between time requests&rdquo; option. 
 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,
@@ -345,7 +345,7 @@ Default 10 milliseconds.
 <div class="node">
 <p><hr>
 <a name="sntp-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-headspace">sntp headspace</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
 Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 <br>
 </div>
index 65f5f9e5a556d4a16e7f5b222f7d2ae12150b9c2..7157b1e2b5719d0299d59c461f2ece312ffe7fc4 100644 (file)
@@ -1,8 +1,8 @@
-.TH sntp @SNTP_MS@ "29 Jul 2011" "4.2.7p199" "User Commands"
+.TH sntp @SNTP_MS@ "04 Aug 2011" "4.2.7p199" "User Commands"
 .\"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp-opts.man)
 .\"  
-.\"  It has been AutoGen-ed  July 29, 2011 at 11:09:06 AM by AutoGen 5.12
+.\"  It has been AutoGen-ed  August  4, 2011 at 01:06:16 PM by AutoGen 5.12
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman-cmd.tpl
 .\"
@@ -107,12 +107,12 @@ Set the debug verbosity level.
 This option may appear an unlimited number of times.
 .sp
 .TP
-.BR \-h " \fImilliseconds\fP, " \-\-headspace "=" \fImilliseconds\fP
+.BR \-g " \fImilliseconds\fP, " \-\-gap "=" \fImilliseconds\fP
 The gap (in milliseconds) between time requests.
 This option takes an integer number as its argument.
 The default \fImilliseconds\fP for this option is:
 .ti +4
10
50
 .sp
 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,
index a2613235fcc6653120c4e6b14dd949773e547356..d86c7643ca78368a22c29b36db7d101d1f93588a 100644 (file)
@@ -1,9 +1,9 @@
-.Dd July 29 2011
+.Dd August 4 2011
 .Dt SNTP @SNTP_MS@ User Commands
-.Os SunOS 5.10
+.Os SunOS 5.11
 .\"  EDIT THIS FILE WITH CAUTION  (sntp-opts.mdoc)
 .\"  
-.\"  It has been AutoGen-ed  July 29, 2011 at 11:09:37 AM by AutoGen 5.12
+.\"  It has been AutoGen-ed  August  4, 2011 at 01:06:18 PM by AutoGen 5.12
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -103,12 +103,12 @@ This option may appear an unlimited number of times.
 Set the debug verbosity level.
 This option may appear an unlimited number of times.
 .sp
-.It  \-h " \fImilliseconds\fP, " \-\-headspace "=" \fImilliseconds\fP
+.It  \-g " \fImilliseconds\fP, " \-\-gap "=" \fImilliseconds\fP
 The gap (in milliseconds) between time requests.
 This option takes an integer number as its argument.
 The default \fImilliseconds\fP for this option is:
 .ti +4
10
50
 .sp
 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,