From: Harlan Stenn Date: Thu, 4 Aug 2011 19:45:08 +0000 (-0400) Subject: [Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with... X-Git-Tag: NTP_4_2_7P201~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e11ecbf5202492886f1a9c8e4c269dc12bab8f1e;p=thirdparty%2Fntp.git [Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd bk: 4e3af6c4zJTLpGqRVfWF88M3orfCIg --- diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c index 04ecad49a..ca22d60d3 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 August 4, 2011 at 04:46:05 AM by AutoGen 5.12 + * It has been AutoGen-ed August 4, 2011 at 03:43:18 PM by AutoGen 5.11.10pre10 * From the definitions sntp-opts.def * and the template file options * @@ -104,21 +104,21 @@ static char const zSyslog_NAME[] = "SYSLOG"; static char const zSyslog_Name[] = "syslog"; static const int aSyslogCantList[] = { - INDEX_OPT_FILELOG, NO_EQUIVALENT }; + INDEX_OPT_LOGFILE, NO_EQUIVALENT }; #define SYSLOG_FLAGS (OPTST_DISABLED) /* - * Filelog option description with + * Logfile option description with * "Must also have options" and "Incompatible options": */ -static char const zFilelogText[] = +static char const zLogfileText[] = "Log to specified logfile"; -static char const zFilelog_NAME[] = "FILELOG"; -static char const zFilelog_Name[] = "filelog"; +static char const zLogfile_NAME[] = "LOGFILE"; +static char const zLogfile_Name[] = "logfile"; static const int - aFilelogCantList[] = { + aLogfileCantList[] = { INDEX_OPT_SYSLOG, NO_EQUIVALENT }; -#define FILELOG_FLAGS (OPTST_DISABLED \ +#define LOGFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* @@ -312,16 +312,16 @@ static tOptDesc optDesc[OPTION_CT] = { /* 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 */ 5, VALUE_OPT_LOGFILE, + /* equiv idx, value */ 5, VALUE_OPT_LOGFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ FILELOG_FLAGS, 0, + /* opt state flags */ LOGFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aFilelogCantList, + /* must/cannot opts */ NULL, aLogfileCantList, /* option proc */ NULL, - /* desc, NAME, name */ zFilelogText, zFilelog_NAME, zFilelog_Name, + /* desc, NAME, name */ zLogfileText, zLogfile_NAME, zLogfile_Name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 6, VALUE_OPT_SETTOD, @@ -466,9 +466,10 @@ static tOptDesc optDesc[OPTION_CT] = { * Define the Sntp Option Environment */ static char const zPROGNAME[5] = "SNTP"; -static char const zUsageTitle[125] = -"sntp - standard SNTP program - Ver. 4.2.6p4-RC2\n\ -USAGE: %s [ - [] | --[{=| }] ]... hostname-or-IP ...\n"; +static char const zUsageTitle[156] = +"sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p4-RC2\n\ +USAGE: %s [ - [] | --[{=| }] ]... \\\n\ +\t\t[ hostname-or-IP ...]\n"; static char const zRcName[7] = ".ntprc"; static char const * const apzHomeList[3] = { "$HOME", @@ -482,8 +483,8 @@ sntp implements the Simple Network Time Protocol, and is used to query an\n\ NTP or SNTP server and either display the time or set the local system's\n\ time (given suitable privilege).\n\n\ It can be run interactively from the command line or as a cron job.\n\n\ -NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC\n\ -1305.\n"; +NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and\n\ +RFC 1305.\n"; static char const zFullVersion[] = SNTP_FULL_VERSION; /* extracted from optcode.tlib near line 515 */ @@ -527,7 +528,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, diff --git a/sntp/sntp-opts.h b/sntp/sntp-opts.h index 9f29eb016..60109061a 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 August 4, 2011 at 04:46:04 AM by AutoGen 5.12 + * It has been AutoGen-ed August 4, 2011 at 03:43:18 PM by AutoGen 5.11.10pre10 * From the definitions sntp-opts.def * and the template file options * @@ -54,7 +54,7 @@ typedef enum { INDEX_OPT_NORMALVERBOSE = 2, INDEX_OPT_KOD = 3, INDEX_OPT_SYSLOG = 4, - INDEX_OPT_FILELOG = 5, + INDEX_OPT_LOGFILE = 5, INDEX_OPT_SETTOD = 6, INDEX_OPT_ADJTIME = 7, INDEX_OPT_BROADCAST = 8, @@ -125,9 +125,9 @@ typedef enum { # warning undefining SYSLOG due to option name conflict # undef SYSLOG # endif -# ifdef FILELOG -# warning undefining FILELOG due to option name conflict -# undef FILELOG +# ifdef LOGFILE +# warning undefining LOGFILE due to option name conflict +# undef LOGFILE # endif # ifdef SETTOD # warning undefining SETTOD due to option name conflict @@ -159,7 +159,7 @@ typedef enum { # undef NORMALVERBOSE # undef KOD # undef SYSLOG -# undef FILELOG +# undef LOGFILE # undef SETTOD # undef ADJTIME # undef BROADCAST @@ -177,7 +177,7 @@ typedef enum { #define VALUE_OPT_NORMALVERBOSE 'd' #define VALUE_OPT_KOD 'K' #define VALUE_OPT_SYSLOG 'p' -#define VALUE_OPT_FILELOG 'l' +#define VALUE_OPT_LOGFILE 'l' #define VALUE_OPT_SETTOD 's' #define VALUE_OPT_ADJTIME 'j' #define VALUE_OPT_BROADCAST 'b' diff --git a/sntp/sntp-opts.texi b/sntp/sntp-opts.texi index 6ee1eab04..6e91e20b3 100644 --- a/sntp/sntp-opts.texi +++ b/sntp/sntp-opts.texi @@ -1,12 +1,12 @@ @node sntp Invocation @section Invoking sntp @pindex sntp -@cindex standard SNTP program +@cindex standard Simple Network Time Protocol program @ignore # # EDIT THIS FILE WITH CAUTION (sntp-opts.texi) # -# It has been AutoGen-ed August 4, 2011 at 04:46:31 AM by AutoGen 5.12 +# It has been AutoGen-ed August 4, 2011 at 03:43:21 PM by AutoGen 5.11.10pre10 # From the definitions sntp-opts.def # and the template file aginfo.tpl @end ignore @@ -50,11 +50,11 @@ 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 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 logfile:: logfile option (-l) * sntp normalverbose:: normalverbose option (-d) * sntp settod:: settod option (-s) * sntp syslog:: syslog option (-p) @@ -69,8 +69,9 @@ This is the automatically generated usage text for sntp: @exampleindent 0 @example -sntp - standard SNTP program - Ver. 4.2.6p4-RC2 -USAGE: sntp [ - [] | --[@{=| @}] ]... hostname-or-IP ... +sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p4-RC2 +USAGE: sntp [ - [] | --[@{=| @}] ]... \ + [ hostname-or-IP ...] Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution - prohibits these options: @@ -82,8 +83,8 @@ USAGE: sntp [ - [] | --[@{=| @}] ]... hostname-or-IP ... -K Str kod KoD history filename -p no syslog Logging with syslog - prohibits these options: - filelog - -l Str filelog Log to specified logfile + logfile + -l Str logfile Log to specified logfile - prohibits these options: syslog -s no settod Set (step) the time with settimeofday() @@ -120,8 +121,8 @@ time (given suitable privilege). It can be run interactively from the command line or as a cron job. -NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC -1305. +NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and +RFC 1305. please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org @end example @@ -160,22 +161,6 @@ 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 filelog -@subsection filelog option (-l) -@cindex sntp-filelog - -This is the ``log to specified logfile'' option. - -This option has some usage constraints. It: -@itemize @bullet -@item -must not appear in combination with any of the following options: -syslog. -@end itemize - -This option causes the client to write log messages to the specified -logfile. - @node sntp ipv4 @subsection ipv4 option (-4) @cindex sntp-ipv4 @@ -189,7 +174,7 @@ must not appear in combination with any of the following options: ipv6. @end itemize -Force DNS resolution of following host names on the command line +Force DNS resolution of the following host names on the command line to the IPv4 namespace. @node sntp ipv6 @@ -205,7 +190,7 @@ must not appear in combination with any of the following options: ipv4. @end itemize -Force DNS resolution of following host names on the command line +Force DNS resolution of the following host names on the command line to the IPv6 namespace. @node sntp keyfile @@ -232,10 +217,26 @@ 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 to persist the history of KoD responses received from servers. The default is /var/db/ntp-kod. +@node sntp logfile +@subsection logfile option (-l) +@cindex sntp-logfile + +This is the ``log to specified logfile'' option. + +This option has some usage constraints. It: +@itemize @bullet +@item +must not appear in combination with any of the following options: +syslog. +@end itemize + +This option causes the client to write log messages to the specified +logfile. + @node sntp normalverbose @subsection normalverbose option (-d) @cindex sntp-normalverbose @@ -271,7 +272,7 @@ This option has some usage constraints. It: @itemize @bullet @item must not appear in combination with any of the following options: -filelog. +logfile. @end itemize When this option is set all logging will be done using syslog. diff --git a/sntp/sntp.1 b/sntp/sntp.1 index 9d0c9f422..5d94e077c 100644 --- a/sntp/sntp.1 +++ b/sntp/sntp.1 @@ -1,19 +1,19 @@ .TH SNTP 1 2011-08-04 "( 4.2.6p4-RC2)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (sntp.1) .\" -.\" It has been AutoGen-ed August 4, 2011 at 04:46:30 AM by AutoGen 5.12 +.\" It has been AutoGen-ed August 4, 2011 at 03:43:20 PM by AutoGen 5.11.10pre10 .\" From the definitions sntp-opts.def .\" and the template file agman1.tpl .\" .SH NAME -sntp \- standard SNTP program +sntp \- standard Simple Network Time Protocol program .SH SYNOPSIS .B sntp .\" Mixture of short (flag) options and long options .RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..." .br .in +8 -hostname-or-IP ... +[ hostname-or-IP ...] .PP .SH "DESCRIPTION" @@ -52,7 +52,7 @@ Force IPv4 DNS name resolution. This option must not appear in combination with any of the following options: ipv6. .sp -Force DNS resolution of following host names on the command line +Force DNS resolution of the following host names on the command line to the IPv4 namespace. .TP .BR \-6 ", " \--ipv6 @@ -60,7 +60,7 @@ Force IPv6 DNS name resolution. This option must not appear in combination with any of the following options: ipv4. .sp -Force DNS resolution of following host names on the command line +Force DNS resolution of the following host names on the command line to the IPv6 namespace. .TP .BR \-d ", " \--normalverbose @@ -74,18 +74,18 @@ suspected problem with the server, network or the source. .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 to persist the history of KoD responses received from servers. The default is /var/db/ntp-kod. .TP .BR \-p ", " \--syslog Logging with syslog. This option must not appear in combination with any of the following options: -filelog. +logfile. .sp When this option is set all logging will be done using syslog. .TP -.BR \-l " \fIfile-name\fP, " \--filelog "=" \fIfile-name\fP +.BR \-l " \fIfile-name\fP, " \--logfile "=" \fIfile-name\fP Log to specified logfile. This option must not appear in combination with any of the following options: syslog. diff --git a/sntp/sntp.html b/sntp/sntp.html index c09ff762c..c27dfce8c 100644 --- a/sntp/sntp.html +++ b/sntp/sntp.html @@ -3,7 +3,7 @@ Sntp User's Manual - + @@ -14,18 +14,20 @@ 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; } -->

Sntp User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Simple Network Time Protocol User Manual

@@ -55,9 +57,10 @@ IETF specification.
-


-
+


+ +
@@ -72,14 +75,15 @@ standard output in the format: error bound of the system clock relative to the server clock.
-


-
+


+ +

Invoking sntp

-

+

sntp can be used as a SNTP client to query a NTP or SNTP server and either display the time or set the local system's time (given suitable privilege). It can be @@ -107,7 +111,7 @@ is believed to be correct to within seconds.

This section was generated by AutoGen, -the aginfo template and the option descriptions for the sntp program. It documents the sntp usage text and option meanings. +the aginfo template and the option descriptions for the sntp program. It documents the sntp usage text and option meanings.

This software is released under a specialized copyright license. @@ -116,11 +120,11 @@ the aginfo template and the option descriptions for the sn

  • sntp adjtime: adjtime option (-j)
  • sntp authentication: authentication option (-a)
  • sntp broadcast: broadcast option (-b) -
  • 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 ipv4: ipv4 option (-4) +
  • sntp ipv6: ipv6 option (-6) +
  • sntp keyfile: keyfile option (-k) +
  • sntp kod: kod option (-K) +
  • sntp logfile: logfile option (-l)
  • sntp normalverbose: normalverbose option (-d)
  • sntp settod: settod option (-s)
  • sntp syslog: syslog option (-p) @@ -128,10 +132,11 @@ the aginfo template and the option descriptions for the sn
    +


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

    sntp usage help (-?)

    @@ -139,8 +144,9 @@ Up: sntp Invocation

    This is the automatically generated usage text for sntp: -

    sntp - standard SNTP program - Ver. 4.2.6p4-RC2
    -USAGE:  sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...
    +
    sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p4-RC2
    +USAGE:  sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
    +                [ hostname-or-IP ...]
       Flg Arg Option-Name    Description
        -4 no  ipv4           Force IPv4 DNS name resolution
                                     - prohibits these options:
    @@ -152,8 +158,8 @@ USAGE:  sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ].
        -K Str kod            KoD history filename
        -p no  syslog         Logging with syslog
                                     - prohibits these options:
    -                                filelog
    -   -l Str filelog        Log to specified logfile
    +                                logfile
    +   -l Str logfile        Log to specified logfile
                                     - prohibits these options:
                                     syslog
        -s no  settod         Set (step) the time with settimeofday()
    @@ -190,17 +196,18 @@ time (given suitable privilege).
     
     It can be run interactively from the command line or as a cron job.
     
    -NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC
    -1305.
    +NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and
    +RFC 1305.
     
     please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
     
    +


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

    adjtime option (-j)

    @@ -215,11 +222,12 @@ settod.
    +


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

    authentication option (-a)

    @@ -231,11 +239,12 @@ The argument of this option is the keyid, a number specified in the keyfile as t key's identifier. See the keyfile option (-k) for more details.
    +


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

    broadcast option (-b)

    @@ -247,38 +256,17 @@ for NTP broadcasts. The default maximum wait time, 68 seconds, can be modified with -t.
    +


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

    filelog option (-l)

    -

    -This is the “log to specified logfile” option. - -

    This option has some usage constraints. It: -

      -
    • must not appear in combination with any of the following options: -syslog. -
    - -

    This option causes the client to write log messages to the specified -logfile. - -

    -


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

    ipv4 option (-4)

    -

    +

    This is the “force ipv4 dns name resolution” option.

    This option has some usage constraints. It: @@ -287,20 +275,21 @@ This is the “force ipv4 dns name resolution” option. ipv6. -

    Force DNS resolution of following host names on the command line +

    Force DNS resolution of the following host names on the command line to the IPv4 namespace.

    +


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

    ipv6 option (-6)

    -

    +

    This is the “force ipv6 dns name resolution” option.

    This option has some usage constraints. It: @@ -309,20 +298,21 @@ This is the “force ipv6 dns name resolution” option. ipv4. -

    Force DNS resolution of following host names on the command line +

    Force DNS resolution of the following host names on the command line to the IPv6 namespace.

    +


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

    keyfile option (-k)

    -

    +

    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: @@ -339,27 +329,52 @@ M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.

    For more information see ntp.keys(5).

    +


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

    kod option (-K)

    -

    +

    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 to persist the history of KoD responses received from servers. The default is /var/db/ntp-kod.

    +


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

    logfile option (-l)

    + +

    +This is the “log to specified logfile” option. + +

    This option has some usage constraints. It: +

      +
    • must not appear in combination with any of the following options: +syslog. +
    + +

    This option causes the client to write log messages to the specified +logfile. + +

    + +


    +Next: , +Previous: sntp logfile, +Up: sntp Invocation +

    normalverbose option (-d)

    @@ -372,11 +387,12 @@ produce a diagnostic. This option should be set when there is a suspected problem with the server, network or the source.
    +


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

    settod option (-s)

    @@ -391,11 +407,12 @@ adjtime.
    +


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

    syslog option (-p)

    @@ -406,16 +423,17 @@ This is the “logging with syslog” option.

    This option has some usage constraints. It:

    • must not appear in combination with any of the following options: -filelog. +logfile.

    When this option is set all logging will be done using syslog.

    +


    -Previous: sntp syslog, +Previous: sntp syslog, Up: sntp Invocation -
    +

    timeout option (-t)

    @@ -426,9 +444,10 @@ When waiting for a broadcast packet SNTP will wait the number of seconds specified before giving up. Default 68 seconds.
    -


    -
    +


    + +