]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
sntp AutoGen 5.11.6pre5 output
authorDave Hart <hart@ntp.org>
Sun, 19 Dec 2010 03:42:39 +0000 (03:42 +0000)
committerDave Hart <hart@ntp.org>
Sun, 19 Dec 2010 03:42:39 +0000 (03:42 +0000)
bk: 4d0d7f2fTdGbcNIQUixj_atw0kzp5A

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

index 09950b4f19adffc5e8360fde98de7e08fe372afa..beadc94b4dd7237690bd3b806a7baf3746a469ec 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  November 27, 2010 at 11:50:15 PM by AutoGen 5.11.3
+ *  It has been AutoGen-ed  December 19, 2010 at 03:41:47 AM by AutoGen 5.11.6pre5
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:3:8 templates.
+ * Generated from AutoOpts 34:0:9 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -471,33 +471,27 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  *
  *  Define the Sntp Option Environment
  */
-tSCC   zPROGNAME[]   = "SNTP";
-tSCC   zUsageTitle[] =
+static char const zPROGNAME[5] = "SNTP";
+static char const zUsageTitle[126] =
 "sntp - standard SNTP program - Ver. 4.2.6p3-RC11\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...\n";
-tSCC   zRcName[]     = ".ntprc";
-tSCC*  apzHomeList[] = {
-       "$HOME",
-       ".",
-       NULL };
-
-tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
-#define zExplain NULL
-tSCC    zDetail[]     = "\n\
-.I sntp\n\
-implements the Simple Network Time Protocol, and is used\n\
-to query an NTP or SNTP server and either\n\
-display the time\n\
-or\n\
-set the local system's time (given suitable privilege).\n\n\
-It can be\n\
-run interactively from the command line or as a\n\
-.I cron\n\
-job.\n\n\
-NTP and SNTP are defined by RFC 5905, which\n\
-obsoletes RFC 4330 and RFC 1305.\n";
-tSCC    zFullVersion[] = SNTP_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
+static char const zRcName[7] = ".ntprc";
+static char const * const apzHomeList[3] = {
+    "$HOME",
+    ".",
+    NULL };
+
+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\
+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\
+NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC\n\
+1305.\n";
+static char const zFullVersion[] = SNTP_FULL_VERSION;
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -510,6 +504,10 @@ tSCC    zFullVersion[] = SNTP_FULL_VERSION;
 
 #define sntp_full_usage NULL
 #define sntp_short_usage NULL
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
 tOptions sntpOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -540,7 +538,8 @@ tOptions sntpOptions = {
     },
     17 /* full option count */, 12 /* user option count */,
     sntp_full_usage, sntp_short_usage,
-    NULL, NULL
+    NULL, NULL,
+    PKGDATADIR
 };
 
 /*
@@ -554,7 +553,7 @@ doUsageOpt(
     (void)pOptions;
     USAGE(EXIT_SUCCESS);
 }
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from /usr/local/share/autogen/optmain.tpl near line 107 */
 
 #if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -572,7 +571,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_SNTP_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
+/* extracted from /usr/local/share/autogen/optcode.tpl near line 641 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index 6492e4a47c34275965bcfcc362099e089bacf538..c42d9ad8936e26a9f253510d00594a2fdbabed11 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  November 27, 2010 at 11:50:15 PM by AutoGen 5.11.3
+ *  It has been AutoGen-ed  December 19, 2010 at 03:41:47 AM by AutoGen 5.11.6pre5
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:3:8 templates.
+ * Generated from AutoOpts 34:0:9 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -39,7 +39,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 135171
+#define AO_TEMPLATE_VERSION 139264
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -94,6 +94,15 @@ typedef enum {
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
 
+/* * * * * *
+ *
+ *  Enumeration of sntp exit codes
+ */
+typedef enum {
+    SNTP_EXIT_SUCCESS = 0,
+    SNTP_EXIT_FAILURE = 1
+} sntp_exit_code_t;
+
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -200,7 +209,7 @@ typedef enum {
                 sntpOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*sntpOptions.pUsageProc)(&sntpOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
+/* extracted from /usr/local/share/autogen/opthead.tpl near line 435 */
 
 /* * * * * *
  *
index 432909e52f289d0eadb56e80627e455bc9be7eae..33668451ec8e3b3c77f965c44e2379a13bf48a65 100644 (file)
@@ -6,26 +6,38 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
 # 
-# It has been AutoGen-ed  November 27, 2010 at 11:50:25 PM by AutoGen 5.11.3
+# It has been AutoGen-ed  December 19, 2010 at 03:41:53 AM by AutoGen 5.11.6pre5
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
-This program has no explanation.
-
-.I 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).
-
-It can be
-run interactively from the command line or as a
-.I cron
+
+@code{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
+run as an interactive command or in a
+@code{cron}
 job.
 
-NTP and SNTP are defined by RFC 5905, which
-obsoletes RFC 4330 and RFC 1305.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+
+@indent
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like
+@example
+1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
+@end example
+where the
+@example
++4.567 +/- 0.089 secs
+@end example
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct),
+and the time of
+@code{1996 Oct 15 20:17:25.123}
+is believed to be correct to within
+@code{+/- 0.089}
+seconds.
 
 This section was generated by @strong{AutoGen},
 the aginfo template and the option descriptions for the @command{sntp} program.  It documents the sntp usage text and option meanings.
@@ -56,7 +68,61 @@ This is the automatically generated usage text for sntp:
 
 @exampleindent 0
 @example
-sntp is unavailable - no --help
+sntp - standard SNTP program - Ver. 4.2.6p3-RC11
+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:
+                                ipv6
+   -6 no  ipv6           Force IPv6 DNS name resolution
+                                - prohibits these options:
+                                ipv4
+   -d no  normalverbose  Normal verbose
+   -K Str kod            KoD history filename
+   -p no  syslog         Logging with syslog
+                                - prohibits these options:
+                                filelog
+   -l Str filelog        Log to specified logfile
+                                - prohibits these options:
+                                syslog
+   -s no  settod         Set (step) the time with settimeofday()
+                                - prohibits these options:
+                                adjtime
+   -j no  adjtime        Set (slew) the time with adjtime()
+                                - prohibits these options:
+                                settod
+   -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
+      opt version        Output version information and exit
+   -? no  help           Display extended usage information and exit
+   -! no  more-help      Extended usage information passed thru pager
+   -> opt save-opts      Save the option state to a config file
+   -< Str load-opts      Load options from a config file
+                                - disabled as --no-load-opts
+                                - may appear multiple times
+
+Options are specified by doubled hyphens and their name
+or by a single hyphen and the flag character.
+
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named SNTP_*
+
+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).
+
+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.
+
+please send bug reports to:  http://bugs.ntp.org, bugs@@ntp.org
 @end example
 @exampleindent 4
 
@@ -107,7 +173,7 @@ syslog.
 @end itemize
 
 This option causes the client to write log messages to the specified
-logfile. 
+logfile.
 
 @node sntp ipv4
 @subsection ipv4 option (-4)
@@ -146,12 +212,12 @@ to the IPv6 namespace.
 @cindex sntp-keyfile
 
 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 
+This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
 file. Key files follow the following format:
 
 keyid keytype key
 
-Where  keyid is a number identifying this key
+Where  keyid is a number identifying this key
 keytype is one of the follow:
 S  Key in 64 Bit hexadecimal number as specified in in the DES specification.
 N  Key in 64 Bit hexadecimal number as specified in the NTP standard.
@@ -214,5 +280,5 @@ When this option is set all logging will be done using syslog.
 @cindex sntp-timeout
 
 This is the ``specify the number of seconds to wait for broadcasts'' option.
-When waiting for a broadcast packet SNTP will wait the number 
+When waiting for a broadcast packet SNTP will wait the number
 of seconds specified before giving up.  Default 68 seconds.
index 45aa8a13ca004235c9894f5e4d7dac47fa39ebd2..a7f5856ee82a3bb5c42a4a5be5f1e45bfc3827b4 100644 (file)
@@ -1,7 +1,7 @@
-.TH SNTP 1 2010-11-27 "( 4.2.6p3-RC11)" "Programmer's Manual"
+.TH SNTP 1 2010-12-19 "( 4.2.6p3-RC11)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp.1)
 .\"  
-.\"  It has been AutoGen-ed  November 27, 2010 at 11:50:24 PM by AutoGen 5.11.3
+.\"  It has been AutoGen-ed  December 19, 2010 at 03:41:52 AM by AutoGen 5.11.6pre5
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -14,6 +14,8 @@ sntp \- standard SNTP program
 .br
 .in +8
 hostname-or-IP ...
+.PP
+
 .SH "DESCRIPTION"
 This manual page briefly documents the \fBsntp\fP command.
 .I sntp
@@ -85,7 +87,7 @@ This option must not appear in combination with any of the following options:
 syslog.
 .sp
 This option causes the client to write log messages to the specified
-logfile. 
+logfile.
 .TP
 .BR \-s ", " \--settod
 Set (step) the time with settimeofday().
@@ -115,7 +117,7 @@ The default \fIseconds\fP for this option is:
 .ti +4
  68
 .sp
-When waiting for a broadcast packet SNTP will wait the number 
+When waiting for a broadcast packet SNTP will wait the number
 of seconds specified before giving up.  Default 68 seconds.
 .TP
 .BR \-a " \fIauth-keynumber\fP, " \--authentication "=" \fIauth-keynumber\fP
@@ -129,12 +131,12 @@ key's identifier. See the keyfile option (-k) for more details.
 .BR \-k " \fIfile-name\fP, " \--keyfile "=" \fIfile-name\fP
 Specify a keyfile. SNTP will look in this file for the key specified with \-a.
 .sp
-This option specifies the keyfile. SNTP will search for the key specified with \-a keyno in this 
+This option specifies the keyfile. SNTP will search for the key specified with \-a keyno in this
 file. Key files follow the following format:
 
 keyid keytype key
 
-Where  keyid is a number identifying this key
+Where  keyid is a number identifying this key
 keytype is one of the follow:
 S  Key in 64 Bit hexadecimal number as specified in in the DES specification.
 N  Key in 64 Bit hexadecimal number as specified in the NTP standard.
index 5aa1d6f531607e3287645143cb77431df66c1d93..d6cceca48f642c4626065a259c1ea7a4be1dca29 100644 (file)
@@ -79,22 +79,31 @@ error bound of the system clock relative to the server clock.
 
 <h3 class="section">Invoking sntp</h3>
 
-<p><a name="index-sntp-1"></a><a name="index-standard-SNTP-program-2"></a>This program has no explanation.
-
-  <p>.I 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).
-
-  <p>It can be
-run interactively from the command line or as a
-.I cron
+<p><a name="index-sntp-1"></a><a name="index-standard-SNTP-program-2"></a>
+<code>sntp</code>
+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
+run as an interactive command or in a
+<code>cron</code>
 job.
 
-  <p>NTP and SNTP are defined by RFC 5905, which
-obsoletes RFC 4330 and RFC 1305.
+  <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+
+  <p class="indent">The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like
+<pre class="example">     1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
+</pre>
+  <p>where the
+<pre class="example">     +4.567 +/- 0.089 secs
+</pre>
+  <p>indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct),
+and the time of
+<code>1996 Oct 15 20:17:25.123</code>
+is believed to be correct to within
+<code>+/- 0.089</code>
+seconds.
 
   <p>This section was generated by <strong>AutoGen</strong>,
 the aginfo template and the option descriptions for the <span class="command">sntp</span> program.  It documents the sntp usage text and option meanings.
@@ -129,7 +138,61 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 <p><a name="index-sntp-usage-3"></a>
 This is the automatically generated usage text for sntp:
 
-<pre class="example">sntp is unavailable - no --help
+<pre class="example">sntp - standard SNTP program - Ver. 4.2.6p3-RC11
+USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... hostname-or-IP ...
+  Flg Arg Option-Name    Description
+   -4 no  ipv4           Force IPv4 DNS name resolution
+                                - prohibits these options:
+                                ipv6
+   -6 no  ipv6           Force IPv6 DNS name resolution
+                                - prohibits these options:
+                                ipv4
+   -d no  normalverbose  Normal verbose
+   -K Str kod            KoD history filename
+   -p no  syslog         Logging with syslog
+                                - prohibits these options:
+                                filelog
+   -l Str filelog        Log to specified logfile
+                                - prohibits these options:
+                                syslog
+   -s no  settod         Set (step) the time with settimeofday()
+                                - prohibits these options:
+                                adjtime
+   -j no  adjtime        Set (slew) the time with adjtime()
+                                - prohibits these options:
+                                settod
+   -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
+      opt version        Output version information and exit
+   -? no  help           Display extended usage information and exit
+   -! no  more-help      Extended usage information passed thru pager
+   -&gt; opt save-opts      Save the option state to a config file
+   -&lt; Str load-opts      Load options from a config file
+                                - disabled as --no-load-opts
+                                - may appear multiple times
+
+Options are specified by doubled hyphens and their name
+or by a single hyphen and the flag character.
+
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named SNTP_*
+
+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).
+
+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.
+
+please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 </pre>
   <div class="node">
 <p><hr>
@@ -265,7 +328,7 @@ file. Key files follow the following format:
 
   <p>keyid keytype key
 
-  <p>Where     keyid is a number identifying this key
+  <p>Where     keyid is a number identifying this key
 keytype is one of the follow:
 S  Key in 64 Bit hexadecimal number as specified in in the DES specification. 
 N  Key in 64 Bit hexadecimal number as specified in the NTP standard.