From: Harlan Stenn Date: Thu, 4 Aug 2011 20:13:31 +0000 (-0400) Subject: sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms X-Git-Tag: NTP_4_2_7P201~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73f9e65fd61d785ab50e2ae97168a722cdef66f9;p=thirdparty%2Fntp.git sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms bk: 4e3afd6bNgDxwnKuPbULzd3E1UStrw --- diff --git a/ChangeLog b/ChangeLog index e2ba8ed2f..147909bec 100644 --- 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 * Documentation updates from Dave Mills. (4.2.7p198) 2011/07/28 Released by Harlan Stenn diff --git a/sntp/main.c b/sntp/main.c index e65c9bbe2..ca6603495 100644 --- a/sntp/main.c +++ b/sntp/main.c @@ -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; diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c index b59a6734d..b8f227af7 100644 --- a/sntp/sntp-opts.c +++ b/sntp/sntp-opts.c @@ -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, diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def index 5f2eb7cea..62bce6da0 100644 --- a/sntp/sntp-opts.def +++ b/sntp/sntp-opts.def @@ -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, diff --git a/sntp/sntp-opts.h b/sntp/sntp-opts.h index 9b68d26eb..bf64c4290 100644 --- a/sntp/sntp-opts.h +++ b/sntp/sntp-opts.h @@ -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' diff --git a/sntp/sntp-opts.texi b/sntp/sntp-opts.texi index 7dfc34410..6295ff201 100644 --- a/sntp/sntp-opts.texi +++ b/sntp/sntp-opts.texi @@ -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 [ - [] | --[@{=| @}] ]... \ - 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 diff --git a/sntp/sntp.1sntpman b/sntp/sntp.1sntpman index cdf14ed8d..5b03fbeb0 100644 --- a/sntp/sntp.1sntpman +++ b/sntp/sntp.1sntpman @@ -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, diff --git a/sntp/sntp.1sntpmdoc b/sntp/sntp.1sntpmdoc index 3ccc9bc3c..09b6e9ee5 100644 --- a/sntp/sntp.1sntpmdoc +++ b/sntp/sntp.1sntpmdoc @@ -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, diff --git a/sntp/sntp.html b/sntp/sntp.html index f4451c985..0a7104a72 100644 --- a/sntp/sntp.html +++ b/sntp/sntp.html @@ -123,7 +123,7 @@ the aginfo template and the option descriptions for the sn
  • 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) @@ -170,7 +170,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 @@ -311,7 +311,7 @@ This is the “increase debug verbosity level” option.


    -Next: , +Next: , Previous: sntp debug-level, Up: sntp Invocation
    @@ -326,15 +326,15 @@ logfile.


    -Next: , +Next: , Previous: sntp filelog, Up: sntp Invocation
    -

    headspace option (-h)

    +

    gap option (-g)

    -

    +

    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 there is benefit to specifying a good number of servers to query, @@ -345,7 +345,7 @@ Default 10 milliseconds.


    Next: , -Previous: sntp headspace, +Previous: sntp gap, Up: sntp Invocation
    diff --git a/sntp/sntp.man.in b/sntp/sntp.man.in index 65f5f9e5a..7157b1e2b 100644 --- a/sntp/sntp.man.in +++ b/sntp/sntp.man.in @@ -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, diff --git a/sntp/sntp.mdoc.in b/sntp/sntp.mdoc.in index a2613235f..d86c7643c 100644 --- a/sntp/sntp.mdoc.in +++ b/sntp/sntp.mdoc.in @@ -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,