---
+(4.2.6p4-beta1) 2011/05/16 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1554] peer may stay selected as system peer after becoming
unreachable.
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 12:28:59 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:23:35 AM by AutoGen 5.11.9
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
#include <sys/types.h>
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
+extern FILE * option_usage_fp;
/* TRANSLATORS: choose the translation for option names wisely because you
cannot ever change your mind. */
-tSCC zCopyright[] =
- "ntpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[44] =
+"ntpd 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/*
* Ipv4 option description with
extern tOptProc
optionBooleanVal, optionNestedVal, optionNumericVal,
optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeVal, optionUnstackArg,
- optionVersionStderr;
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVersionStderr;
static tOptProc
doUsageOpt;
*
* Define the Ntpd Option Descriptions.
*/
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
/* equiv idx, value */ 0, VALUE_OPT_IPV4,
/* equivalenced to */ NO_EQUIVALENT,
* Define the Ntpd Option Environment
*/
static char const zPROGNAME[5] = "NTPD";
-static char const zUsageTitle[99] =
-"ntpd - NTP daemon program - Ver. 4.2.6p3\n\
+static char const zUsageTitle[105] =
+"ntpd - NTP daemon program - Ver. 4.2.6p4-beta1\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
#define zRcName NULL
#define apzHomeList NULL
#define zExplain NULL
static char const zDetail[7] = "\n\n";
static char const zFullVersion[] = NTPD_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
* Create the static procedure(s) declared above.
*/
static void
-doUsageOpt(
- tOptions* pOptions,
- tOptDesc* pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
{
(void)pOptions;
- USAGE(EXIT_SUCCESS);
+ USAGE(NTPD_EXIT_SUCCESS);
}
#if ! defined(TEST_NTPD_OPTS)
}
#endif /* defined DEBUG */
#endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
#if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
extern void optionPutShell(tOptions*);
int
-main(int argc, char** argv)
+main(int argc, char ** argv)
{
- int res = EXIT_SUCCESS;
+ int res = NTPD_EXIT_SUCCESS;
(void)optionProcess(&ntpdOptions, argc, argv);
optionPutShell(&ntpdOptions);
res = ferror(stdout);
return res;
}
#endif /* defined TEST_NTPD_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
#if ENABLE_NLS
#include <stdio.h>
pzRes = strdup(pzRes);
if (pzRes == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
- exit(EXIT_FAILURE);
+ exit(NTPD_EXIT_FAILURE);
}
return pzRes;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
- coerce_it((void*)&(ntpdOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
/*
* This invokes the translation code (e.g. gettext(3)).
static void
translate_option_strings(void)
{
+ tOptions * const pOpt = &ntpdOptions;
+
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc* pOD = ntpdOptions.pOptDesc;
- char** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ tOptDesc * pOD = pOpt->pOptDesc;
+ char ** ppz = (char**)(void*)&(option_usage_text);
+ int ix = option_usage_text.field_ct;
do {
ppz++;
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
- COERSION(pzCopyright);
- COERSION(pzCopyNotice);
- COERSION(pzFullVersion);
- COERSION(pzUsageTitle);
- COERSION(pzExplain);
- COERSION(pzDetail);
- COERSION(pzPackager);
+ coerce_it((void*)&(pOpt->pzCopyright));
+ coerce_it((void*)&(pOpt->pzCopyNotice));
+ coerce_it((void*)&(pOpt->pzFullVersion));
+ coerce_it((void*)&(pOpt->pzUsageTitle));
+ coerce_it((void*)&(pOpt->pzExplain));
+ coerce_it((void*)&(pOpt->pzDetail));
+ coerce_it((void*)&(pOpt->pzPackager));
option_usage_text.field_ct = 0;
- for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++)
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
coerce_it((void*)&(pOD->pzText));
}
- if ((ntpdOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc* pOD = ntpdOptions.pOptDesc;
- int ix;
+ if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+ tOptDesc * pOD = pOpt->pOptDesc;
+ int ix;
- for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++) {
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
coerce_it((void*)&(pOD->pz_Name));
coerce_it((void*)&(pOD->pz_DisableName));
coerce_it((void*)&(pOD->pz_DisablePfx));
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 12:28:59 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:23:34 AM by AutoGen 5.11.9
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
/*
* This file contains the programmatic interface to the Automated
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
} teOptIndex;
#define OPTION_CT 35
-#define NTPD_VERSION "4.2.6p3"
-#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.6p3"
+#define NTPD_VERSION "4.2.6p4-beta1"
+#define NTPD_FULL_VERSION "ntpd 4.2.6p4-beta1"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
NTPD_EXIT_SUCCESS = 0,
NTPD_EXIT_FAILURE = 1
} ntpd_exit_code_t;
-
/*
* Make sure there are no #define name conflicts with the option names
*/
ntpdOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
-/* * * * * *
- *
- * Declare the ntpd option descriptor.
- */
#ifdef __cplusplus
extern "C" {
#endif
-extern tOptions ntpdOptions;
+/* * * * * *
+ *
+ * Declare the ntpd option descriptor.
+ */
+extern tOptions ntpdOptions;
#if defined(ENABLE_NLS)
# ifndef _
#
# EDIT THIS FILE WITH CAUTION (ntpd-opts.texi)
#
-# It has been AutoGen-ed January 3, 2011 at 09:18:03 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed May 16, 2011 at 04:24:04 AM by AutoGen 5.11.9
# From the definitions ntpd-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.6p3
+ntpd - NTP daemon program - Ver. 4.2.6p4-beta1
USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
-? no help Display extended usage information and exit
-! no more-help Extended usage information passed thru pager
-Options are specified by doubled hyphens and their name
-or by a single hyphen and the flag character.
+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:
- examining environment variables named NTPD_*
-.TH NTPD 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual"
+.TH NTPD 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpd.1)
.\"
-.\" It has been AutoGen-ed January 3, 2011 at 09:18:03 PM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed May 16, 2011 at 04:24:03 AM by AutoGen 5.11.9
.\" From the definitions ntpd-opts.def
.\" and the template file agman1.tpl
.\"
.nf
.na
see html/copyright.html
+
.fi
.ad
.PP
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:13 AM by AutoGen 5.11.9
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpdc copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
#include <sys/types.h>
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
+extern FILE * option_usage_fp;
/* TRANSLATORS: choose the translation for option names wisely because you
cannot ever change your mind. */
-tSCC zCopyright[] =
- "ntpdc copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[45] =
+"ntpdc 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/*
* Ipv4 option description with
extern tOptProc
optionBooleanVal, optionNestedVal, optionNumericVal,
optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeVal, optionUnstackArg,
- optionVersionStderr;
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVersionStderr;
static tOptProc
doOptSet_Debug_Level, doUsageOpt;
*
* Define the Ntpdc Option Descriptions.
*/
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
/* equiv idx, value */ 0, VALUE_OPT_IPV4,
/* equivalenced to */ NO_EQUIVALENT,
* Define the Ntpdc Option Environment
*/
static char const zPROGNAME[6] = "NTPDC";
-static char const zUsageTitle[127] =
-"ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3\n\
+static char const zUsageTitle[133] =
+"ntpdc - vendor-specific NTP query program - Ver. 4.2.6p4-beta1\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
configuration file may also be specified at run time using [= prog-name =]\n\
.\n";
static char const zFullVersion[] = NTPDC_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
* Create the static procedure(s) declared above.
*/
static void
-doUsageOpt(
- tOptions* pOptions,
- tOptDesc* pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
{
(void)pOptions;
- USAGE(EXIT_SUCCESS);
+ USAGE(NTPDC_EXIT_SUCCESS);
}
#if ! defined(TEST_NTPDC_OPTS)
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
#endif /* defined(TEST_NTPDC_OPTS) */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
#if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */
extern void optionPutShell(tOptions*);
int
-main(int argc, char** argv)
+main(int argc, char ** argv)
{
- int res = EXIT_SUCCESS;
+ int res = NTPDC_EXIT_SUCCESS;
(void)optionProcess(&ntpdcOptions, argc, argv);
optionPutShell(&ntpdcOptions);
res = ferror(stdout);
return res;
}
#endif /* defined TEST_NTPDC_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
#if ENABLE_NLS
#include <stdio.h>
pzRes = strdup(pzRes);
if (pzRes == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
- exit(EXIT_FAILURE);
+ exit(NTPDC_EXIT_FAILURE);
}
return pzRes;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
- coerce_it((void*)&(ntpdcOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
/*
* This invokes the translation code (e.g. gettext(3)).
static void
translate_option_strings(void)
{
+ tOptions * const pOpt = &ntpdcOptions;
+
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc* pOD = ntpdcOptions.pOptDesc;
- char** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ tOptDesc * pOD = pOpt->pOptDesc;
+ char ** ppz = (char**)(void*)&(option_usage_text);
+ int ix = option_usage_text.field_ct;
do {
ppz++;
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
- COERSION(pzCopyright);
- COERSION(pzCopyNotice);
- COERSION(pzFullVersion);
- COERSION(pzUsageTitle);
- COERSION(pzExplain);
- COERSION(pzDetail);
- COERSION(pzPackager);
+ coerce_it((void*)&(pOpt->pzCopyright));
+ coerce_it((void*)&(pOpt->pzCopyNotice));
+ coerce_it((void*)&(pOpt->pzFullVersion));
+ coerce_it((void*)&(pOpt->pzUsageTitle));
+ coerce_it((void*)&(pOpt->pzExplain));
+ coerce_it((void*)&(pOpt->pzDetail));
+ coerce_it((void*)&(pOpt->pzPackager));
option_usage_text.field_ct = 0;
- for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++)
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
coerce_it((void*)&(pOD->pzText));
}
- if ((ntpdcOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc* pOD = ntpdcOptions.pOptDesc;
- int ix;
+ if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+ tOptDesc * pOD = pOpt->pOptDesc;
+ int ix;
- for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++) {
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
coerce_it((void*)&(pOD->pz_Name));
coerce_it((void*)&(pOD->pz_DisableName));
coerce_it((void*)&(pOD->pz_DisablePfx));
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:13 AM by AutoGen 5.11.9
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpdc copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
/*
* This file contains the programmatic interface to the Automated
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
} teOptIndex;
#define OPTION_CT 15
-#define NTPDC_VERSION "4.2.6p3"
-#define NTPDC_FULL_VERSION "ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3"
+#define NTPDC_VERSION "4.2.6p4-beta1"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.6p4-beta1"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
NTPDC_EXIT_SUCCESS = 0,
NTPDC_EXIT_FAILURE = 1
} ntpdc_exit_code_t;
-
/*
* Make sure there are no #define name conflicts with the option names
*/
ntpdcOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpdcOptions.pUsageProc)(&ntpdcOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
-/* * * * * *
- *
- * Declare the ntpdc option descriptor.
- */
#ifdef __cplusplus
extern "C" {
#endif
-extern tOptions ntpdcOptions;
+/* * * * * *
+ *
+ * Declare the ntpdc option descriptor.
+ */
+extern tOptions ntpdcOptions;
#if defined(ENABLE_NLS)
# ifndef _
#
# EDIT THIS FILE WITH CAUTION (ntpdc-opts.texi)
#
-# It has been AutoGen-ed January 3, 2011 at 09:18:22 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed May 16, 2011 at 04:24:22 AM by AutoGen 5.11.9
# From the definitions ntpdc-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3
+ntpdc - vendor-specific NTP query program - Ver. 4.2.6p4-beta1
USAGE: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
- 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.
+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 NTPDC_*
-The
-[= prog-name =]
-utility program is used to query an NTP daemon about its
-current state and to request changes in that state.
-It uses NTP mode 7 control message formats described in the source code.
-The program may
+The [= prog-name =] utility program is used to query an NTP daemon about
+its current state and to request changes in that state. It uses NTP mode
+7 control message formats described in the source code. The program may
be run either in interactive mode or controlled using command line
-arguments.
-Extensive state and statistics information is available
-through the
-[= prog-name =]
-interface.
-In addition, nearly all the
-configuration options which can be specified at startup using
-ntpd's configuration file may also be specified at run time using
-[= prog-name =] .
+arguments. Extensive state and statistics information is available
+through the [= prog-name =] interface. In addition, nearly all the
+configuration options which can be specified at startup using ntpd's
+configuration file may also be specified at run time using [= prog-name =]
+.
please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
@end example
-.TH NTPDC 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual"
+.TH NTPDC 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpdc.1)
.\"
-.\" It has been AutoGen-ed January 3, 2011 at 09:18:22 PM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed May 16, 2011 at 04:24:22 AM by AutoGen 5.11.9
.\" From the definitions ntpdc-opts.def
.\" and the template file agman1.tpl
.\"
.nf
.na
see html/copyright.html
+
.fi
.ad
.PP
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:01 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:23 AM by AutoGen 5.11.9
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpq copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
#include <sys/types.h>
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
+extern FILE * option_usage_fp;
/* TRANSLATORS: choose the translation for option names wisely because you
cannot ever change your mind. */
-tSCC zCopyright[] =
- "ntpq copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[44] =
+"ntpq 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/*
* Ipv4 option description with
extern tOptProc
ntpq_custom_opt_handler, optionBooleanVal, optionNestedVal,
optionNumericVal, optionPagedUsage, optionPrintVersion,
- optionResetOpt, optionStackArg, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ optionResetOpt, optionStackArg, optionTimeDate,
+ optionTimeVal, optionUnstackArg, optionVersionStderr;
static tOptProc
doOptSet_Debug_Level, doUsageOpt;
*
* Define the Ntpq Option Descriptions.
*/
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
/* equiv idx, value */ 0, VALUE_OPT_IPV4,
/* equivalenced to */ NO_EQUIVALENT,
* Define the Ntpq Option Environment
*/
static char const zPROGNAME[5] = "NTPQ";
-static char const zUsageTitle[119] =
-"ntpq - standard NTP query program - Ver. 4.2.6p3\n\
+static char const zUsageTitle[125] =
+"ntpq - standard NTP query program - Ver. 4.2.6p4-beta1\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
used in NTPv4, although some of the variables have changed and new ones\n\
added.\n";
static char const zFullVersion[] = NTPQ_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
* Create the static procedure(s) declared above.
*/
static void
-doUsageOpt(
- tOptions* pOptions,
- tOptDesc* pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
{
(void)pOptions;
- USAGE(EXIT_SUCCESS);
+ USAGE(NTPQ_EXIT_SUCCESS);
}
#if ! defined(TEST_NTPQ_OPTS)
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
#endif /* defined(TEST_NTPQ_OPTS) */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
#if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
extern void optionPutShell(tOptions*);
int
-main(int argc, char** argv)
+main(int argc, char ** argv)
{
- int res = EXIT_SUCCESS;
+ int res = NTPQ_EXIT_SUCCESS;
(void)optionProcess(&ntpqOptions, argc, argv);
optionPutShell(&ntpqOptions);
res = ferror(stdout);
return res;
}
#endif /* defined TEST_NTPQ_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
#if ENABLE_NLS
#include <stdio.h>
pzRes = strdup(pzRes);
if (pzRes == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
- exit(EXIT_FAILURE);
+ exit(NTPQ_EXIT_FAILURE);
}
return pzRes;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
- coerce_it((void*)&(ntpqOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
/*
* This invokes the translation code (e.g. gettext(3)).
static void
translate_option_strings(void)
{
+ tOptions * const pOpt = &ntpqOptions;
+
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc* pOD = ntpqOptions.pOptDesc;
- char** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ tOptDesc * pOD = pOpt->pOptDesc;
+ char ** ppz = (char**)(void*)&(option_usage_text);
+ int ix = option_usage_text.field_ct;
do {
ppz++;
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
- COERSION(pzCopyright);
- COERSION(pzCopyNotice);
- COERSION(pzFullVersion);
- COERSION(pzUsageTitle);
- COERSION(pzExplain);
- COERSION(pzDetail);
- COERSION(pzPackager);
+ coerce_it((void*)&(pOpt->pzCopyright));
+ coerce_it((void*)&(pOpt->pzCopyNotice));
+ coerce_it((void*)&(pOpt->pzFullVersion));
+ coerce_it((void*)&(pOpt->pzUsageTitle));
+ coerce_it((void*)&(pOpt->pzExplain));
+ coerce_it((void*)&(pOpt->pzDetail));
+ coerce_it((void*)&(pOpt->pzPackager));
option_usage_text.field_ct = 0;
- for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++)
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
coerce_it((void*)&(pOD->pzText));
}
- if ((ntpqOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc* pOD = ntpqOptions.pOptDesc;
- int ix;
+ if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+ tOptDesc * pOD = pOpt->pOptDesc;
+ int ix;
- for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++) {
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
coerce_it((void*)&(pOD->pz_Name));
coerce_it((void*)&(pOD->pz_DisableName));
coerce_it((void*)&(pOD->pz_DisablePfx));
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:01 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:22 AM by AutoGen 5.11.9
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpq copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
/*
* This file contains the programmatic interface to the Automated
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
} teOptIndex;
#define OPTION_CT 14
-#define NTPQ_VERSION "4.2.6p3"
-#define NTPQ_FULL_VERSION "ntpq - standard NTP query program - Ver. 4.2.6p3"
+#define NTPQ_VERSION "4.2.6p4-beta1"
+#define NTPQ_FULL_VERSION "ntpq 4.2.6p4-beta1"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
NTPQ_EXIT_SUCCESS = 0,
NTPQ_EXIT_FAILURE = 1
} ntpq_exit_code_t;
-
/*
* Make sure there are no #define name conflicts with the option names
*/
ntpqOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpqOptions.pUsageProc)(&ntpqOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
-/* * * * * *
- *
- * Declare the ntpq option descriptor.
- */
#ifdef __cplusplus
extern "C" {
#endif
-extern tOptions ntpqOptions;
+/* * * * * *
+ *
+ * Declare the ntpq option descriptor.
+ */
+extern tOptions ntpqOptions;
#if defined(ENABLE_NLS)
# ifndef _
#
# EDIT THIS FILE WITH CAUTION (ntpq-opts.texi)
#
-# It has been AutoGen-ed January 3, 2011 at 09:18:38 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed May 16, 2011 at 04:24:31 AM by AutoGen 5.11.9
# From the definitions ntpq-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.6p3
+ntpq - standard NTP query program - Ver. 4.2.6p4-beta1
USAGE: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
- 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.
+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 NTPQ_*
-The
-[= prog-name =]
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
-information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added.
+The [= prog-name =] utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined in
+Appendix B of the NTPv3 specification RFC1305, requesting information
+about current state and/or changes in that state. The same formats are
+used in NTPv4, although some of the variables have changed and new ones
+added.
please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
@end example
-.TH NTPQ 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual"
+.TH NTPQ 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpq.1)
.\"
-.\" It has been AutoGen-ed January 3, 2011 at 09:18:38 PM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed May 16, 2011 at 04:24:30 AM by AutoGen 5.11.9
.\" From the definitions ntpq-opts.def
.\" and the template file agman1.tpl
.\"
.nf
.na
see html/copyright.html
+
.fi
.ad
.PP
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:31 AM by AutoGen 5.11.9
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
#include <sys/types.h>
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
+extern FILE * option_usage_fp;
/* TRANSLATORS: choose the translation for option names wisely because you
cannot ever change your mind. */
-tSCC zCopyright[] =
- "ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[48] =
+"ntpsnmpd 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/*
* Nofork option description:
extern tOptProc
optionBooleanVal, optionNestedVal, optionNumericVal,
optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeVal, optionUnstackArg,
- optionVersionStderr;
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVersionStderr;
static tOptProc
doUsageOpt;
#endif /* defined(TEST_NTPSNMPD_OPTS) */
*
* Define the Ntpsnmpd Option Descriptions.
*/
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_NOFORK,
/* equiv idx, value */ 0, VALUE_OPT_NOFORK,
/* equivalenced to */ NO_EQUIVALENT,
* Define the Ntpsnmpd Option Environment
*/
static char const zPROGNAME[9] = "NTPSNMPD";
-static char const zUsageTitle[103] =
-"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3\n\
+static char const zUsageTitle[109] =
+"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p4-beta1\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
#define zExplain NULL
#define zDetail NULL
static char const zFullVersion[] = NTPSNMPD_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
* Create the static procedure(s) declared above.
*/
static void
-doUsageOpt(
- tOptions* pOptions,
- tOptDesc* pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
{
(void)pOptions;
- USAGE(EXIT_SUCCESS);
+ USAGE(NTPSNMPD_EXIT_SUCCESS);
}
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
#if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */
extern void optionPutShell(tOptions*);
int
-main(int argc, char** argv)
+main(int argc, char ** argv)
{
- int res = EXIT_SUCCESS;
+ int res = NTPSNMPD_EXIT_SUCCESS;
(void)optionProcess(&ntpsnmpdOptions, argc, argv);
optionPutShell(&ntpsnmpdOptions);
res = ferror(stdout);
return res;
}
#endif /* defined TEST_NTPSNMPD_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
#if ENABLE_NLS
#include <stdio.h>
pzRes = strdup(pzRes);
if (pzRes == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
- exit(EXIT_FAILURE);
+ exit(NTPSNMPD_EXIT_FAILURE);
}
return pzRes;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
- coerce_it((void*)&(ntpsnmpdOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
/*
* This invokes the translation code (e.g. gettext(3)).
static void
translate_option_strings(void)
{
+ tOptions * const pOpt = &ntpsnmpdOptions;
+
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc* pOD = ntpsnmpdOptions.pOptDesc;
- char** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ tOptDesc * pOD = pOpt->pOptDesc;
+ char ** ppz = (char**)(void*)&(option_usage_text);
+ int ix = option_usage_text.field_ct;
do {
ppz++;
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
- COERSION(pzCopyright);
- COERSION(pzCopyNotice);
- COERSION(pzFullVersion);
- COERSION(pzUsageTitle);
- COERSION(pzExplain);
- COERSION(pzDetail);
- COERSION(pzPackager);
+ coerce_it((void*)&(pOpt->pzCopyright));
+ coerce_it((void*)&(pOpt->pzCopyNotice));
+ coerce_it((void*)&(pOpt->pzFullVersion));
+ coerce_it((void*)&(pOpt->pzUsageTitle));
+ coerce_it((void*)&(pOpt->pzExplain));
+ coerce_it((void*)&(pOpt->pzDetail));
+ coerce_it((void*)&(pOpt->pzPackager));
option_usage_text.field_ct = 0;
- for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++)
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
coerce_it((void*)&(pOD->pzText));
}
- if ((ntpsnmpdOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc* pOD = ntpsnmpdOptions.pOptDesc;
- int ix;
+ if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+ tOptDesc * pOD = pOpt->pOptDesc;
+ int ix;
- for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++) {
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
coerce_it((void*)&(pOD->pz_Name));
coerce_it((void*)&(pOD->pz_DisableName));
coerce_it((void*)&(pOD->pz_DisablePfx));
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:31 AM by AutoGen 5.11.9
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
/*
* This file contains the programmatic interface to the Automated
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
} teOptIndex;
#define OPTION_CT 8
-#define NTPSNMPD_VERSION "4.2.6p3"
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3"
+#define NTPSNMPD_VERSION "4.2.6p4-beta1"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.6p4-beta1"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
NTPSNMPD_EXIT_SUCCESS = 0,
NTPSNMPD_EXIT_FAILURE = 1
} ntpsnmpd_exit_code_t;
-
/*
* Make sure there are no #define name conflicts with the option names
*/
ntpsnmpdOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
-/* * * * * *
- *
- * Declare the ntpsnmpd option descriptor.
- */
#ifdef __cplusplus
extern "C" {
#endif
-extern tOptions ntpsnmpdOptions;
+/* * * * * *
+ *
+ * Declare the ntpsnmpd option descriptor.
+ */
+extern tOptions ntpsnmpdOptions;
#if defined(ENABLE_NLS)
# ifndef _
#
# EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.texi)
#
-# It has been AutoGen-ed January 3, 2011 at 09:18:49 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed May 16, 2011 at 04:24:36 AM by AutoGen 5.11.9
# From the definitions ntpsnmpd-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p4-beta1
USAGE: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
- 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.
+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
-.TH NTPSNMPD 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual"
+.TH NTPSNMPD 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd.1)
.\"
-.\" It has been AutoGen-ed January 3, 2011 at 09:18:48 PM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed May 16, 2011 at 04:24:35 AM by AutoGen 5.11.9
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman1.tpl
.\"
.nf
.na
see html/copyright.html
+
.fi
.ad
.PP
special=
# prerelease can be empty, 'beta', or 'rc'.
-prerelease=
+prerelease=beta
# ChangeLog starting tag (see also CommitLog-4.1.0)
CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=3
+point=4
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
# Should be zeroed at release, and left at zero until first beta.
# The first beta is -beta1.
# betapoint is always zero in ntp-dev.
-betapoint=0
+betapoint=1
### rcpoint is normally modified by script except for GO.
# RC number (rcpoint)
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:23:15 AM by AutoGen 5.11.9
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* sntp copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
#include <sys/types.h>
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
+extern FILE * option_usage_fp;
/* TRANSLATORS: choose the translation for option names wisely because you
cannot ever change your mind. */
-tSCC zCopyright[] =
- "sntp copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[44] =
+"sntp 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/*
* Ipv4 option description with
extern tOptProc
optionBooleanVal, optionNestedVal, optionNumericVal,
optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeVal, optionUnstackArg,
- optionVersionStderr;
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVersionStderr;
static tOptProc
doUsageOpt;
#endif /* defined(TEST_SNTP_OPTS) */
*
* Define the Sntp Option Descriptions.
*/
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
/* equiv idx, value */ 0, VALUE_OPT_IPV4,
/* equivalenced to */ NO_EQUIVALENT,
* Define the Sntp Option Environment
*/
static char const zPROGNAME[5] = "SNTP";
-static char const zUsageTitle[121] =
-"sntp - standard SNTP program - Ver. 4.2.6p3\n\
+static char const zUsageTitle[127] =
+"sntp - standard SNTP program - Ver. 4.2.6p4-beta1\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
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 optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
* Create the static procedure(s) declared above.
*/
static void
-doUsageOpt(
- tOptions* pOptions,
- tOptDesc* pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
{
(void)pOptions;
- USAGE(EXIT_SUCCESS);
+ USAGE(SNTP_EXIT_SUCCESS);
}
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
#if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
extern void optionPutShell(tOptions*);
int
-main(int argc, char** argv)
+main(int argc, char ** argv)
{
- int res = EXIT_SUCCESS;
+ int res = SNTP_EXIT_SUCCESS;
(void)optionProcess(&sntpOptions, argc, argv);
optionPutShell(&sntpOptions);
res = ferror(stdout);
return res;
}
#endif /* defined TEST_SNTP_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
#if ENABLE_NLS
#include <stdio.h>
pzRes = strdup(pzRes);
if (pzRes == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
- exit(EXIT_FAILURE);
+ exit(SNTP_EXIT_FAILURE);
}
return pzRes;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
- coerce_it((void*)&(sntpOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
/*
* This invokes the translation code (e.g. gettext(3)).
static void
translate_option_strings(void)
{
+ tOptions * const pOpt = &sntpOptions;
+
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc* pOD = sntpOptions.pOptDesc;
- char** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ tOptDesc * pOD = pOpt->pOptDesc;
+ char ** ppz = (char**)(void*)&(option_usage_text);
+ int ix = option_usage_text.field_ct;
do {
ppz++;
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
- COERSION(pzCopyright);
- COERSION(pzCopyNotice);
- COERSION(pzFullVersion);
- COERSION(pzUsageTitle);
- COERSION(pzExplain);
- COERSION(pzDetail);
- COERSION(pzPackager);
+ coerce_it((void*)&(pOpt->pzCopyright));
+ coerce_it((void*)&(pOpt->pzCopyNotice));
+ coerce_it((void*)&(pOpt->pzFullVersion));
+ coerce_it((void*)&(pOpt->pzUsageTitle));
+ coerce_it((void*)&(pOpt->pzExplain));
+ coerce_it((void*)&(pOpt->pzDetail));
+ coerce_it((void*)&(pOpt->pzPackager));
option_usage_text.field_ct = 0;
- for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++)
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
coerce_it((void*)&(pOD->pzText));
}
- if ((sntpOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc* pOD = sntpOptions.pOptDesc;
- int ix;
+ if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+ tOptDesc * pOD = pOpt->pOptDesc;
+ int ix;
- for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++) {
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
coerce_it((void*)&(pOD->pz_Name));
coerce_it((void*)&(pOD->pz_DisableName));
coerce_it((void*)&(pOD->pz_DisablePfx));
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:23:15 AM by AutoGen 5.11.9
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* sntp copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
/*
* This file contains the programmatic interface to the Automated
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
} teOptIndex;
#define OPTION_CT 17
-#define SNTP_VERSION "4.2.6p3"
-#define SNTP_FULL_VERSION "sntp - standard SNTP program - Ver. 4.2.6p3"
+#define SNTP_VERSION "4.2.6p4-beta1"
+#define SNTP_FULL_VERSION "sntp 4.2.6p4-beta1"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
SNTP_EXIT_SUCCESS = 0,
SNTP_EXIT_FAILURE = 1
} sntp_exit_code_t;
-
/*
* Make sure there are no #define name conflicts with the option names
*/
sntpOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*sntpOptions.pUsageProc)(&sntpOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
-/* * * * * *
- *
- * Declare the sntp option descriptor.
- */
#ifdef __cplusplus
extern "C" {
#endif
-extern tOptions sntpOptions;
+/* * * * * *
+ *
+ * Declare the sntp option descriptor.
+ */
+extern tOptions sntpOptions;
#if defined(ENABLE_NLS)
# ifndef _
#
# EDIT THIS FILE WITH CAUTION (sntp-opts.texi)
#
-# It has been AutoGen-ed January 3, 2011 at 09:15:34 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed May 16, 2011 at 04:23:33 AM by AutoGen 5.11.9
# From the definitions sntp-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-sntp - standard SNTP program - Ver. 4.2.6p3
+sntp - standard SNTP program - Ver. 4.2.6p4-beta1
USAGE: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... hostname-or-IP ...
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
- 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.
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
- 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).
+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.
-.TH SNTP 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual"
+.TH SNTP 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (sntp.1)
.\"
-.\" It has been AutoGen-ed January 3, 2011 at 09:07:46 PM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed May 16, 2011 at 04:23:31 AM by AutoGen 5.11.9
.\" From the definitions sntp-opts.def
.\" and the template file agman1.tpl
.\"
.nf
.na
see html/copyright.html
+
.fi
.ad
.PP
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
- <p>This document applies to version 4.2.6p3 of <code>sntp</code>.
+ <p>This document applies to version 4.2.6p4-beta1 of <code>sntp</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
<p><a name="index-sntp-usage-3"></a>
This is the automatically generated usage text for sntp:
-<pre class="example">sntp - standard SNTP program - Ver. 4.2.6p3
+<pre class="example">sntp - standard SNTP program - Ver. 4.2.6p4-beta1
USAGE: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
- 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.
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
- 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).
+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.
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:04 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:37 AM by AutoGen 5.11.9
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
#include <sys/types.h>
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-extern FILE * option_usage_fp;
#define OPTION_CODE_COMPILE 1
#include "ntp-keygen-opts.h"
#ifdef __cplusplus
extern "C" {
#endif
+extern FILE * option_usage_fp;
/* TRANSLATORS: choose the translation for option names wisely because you
cannot ever change your mind. */
-tSCC zCopyright[] =
- "ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[56] =
+"ntp-keygen (ntp) 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/*
* Certificate option description:
* if multiple copies are allowed.
*/
static tOptProc
- doOptModulus, doUsageOpt;
+ doUsageOpt;
/*
* #define map the "normal" callout procs to the test ones...
extern tOptProc
optionBooleanVal, optionNestedVal, optionNumericVal,
optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeVal, optionUnstackArg,
- optionVersionStderr;
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVersionStderr;
static tOptProc
doOptSet_Debug_Level, doUsageOpt;
*
* Define the Ntp_Keygen Option Descriptions.
*/
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_CERTIFICATE,
/* equiv idx, value */ 0, VALUE_OPT_CERTIFICATE,
/* equivalenced to */ NO_EQUIVALENT,
* Define the Ntp_Keygen Option Environment
*/
static char const zPROGNAME[11] = "NTP_KEYGEN";
-static char const zUsageTitle[114] =
-"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3\n\
+static char const zUsageTitle[120] =
+"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p4-beta1\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
static char const zRcName[7] = ".ntprc";
static char const * const apzHomeList[3] = {
If there is no new host key, look for an existing one. If one is not\n\
found, create it.\n";
static char const zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
* Create the static procedure(s) declared above.
*/
static void
-doUsageOpt(
- tOptions* pOptions,
- tOptDesc* pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
{
(void)pOptions;
- USAGE(EXIT_SUCCESS);
+ USAGE(NTP_KEYGEN_EXIT_SUCCESS);
}
#if ! defined(TEST_NTP_KEYGEN_OPTS)
{
static const struct {long const rmin, rmax;} rng[1] = {
{ 256, 2048 } };
- long val;
int ix;
- char * pzEnd;
if (pOptions <= OPTPROC_EMIT_LIMIT)
goto emit_ranges;
+ optionNumericVal(pOptions, pOptDesc);
- errno = 0;
- val = strtol(pOptDesc->optArg.argString, &pzEnd, 0);
- if ((pOptDesc->optArg.argString == pzEnd) || (errno != 0))
- goto bad_value;
-
- if (*pzEnd != '\0')
- goto bad_value;
for (ix = 0; ix < 1; ix++) {
- if (val < rng[ix].rmin)
+ if (pOptDesc->optArg.argInt < rng[ix].rmin)
continue; /* ranges need not be ordered. */
- if (val == rng[ix].rmin)
- goto valid_return;
+ if (pOptDesc->optArg.argInt == rng[ix].rmin)
+ return;
if (rng[ix].rmax == LONG_MIN)
continue;
- if (val <= rng[ix].rmax)
- goto valid_return;
+ if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+ return;
}
- bad_value:
-
option_usage_fp = stderr;
- emit_ranges:
- optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
- return;
+emit_ranges:
- valid_return:
- if ((pOptDesc->fOptState & OPTST_ALLOC_ARG) != 0) {
- free((void *)pOptDesc->optArg.argString);
- pOptDesc->fOptState &= ~OPTST_ALLOC_ARG;
- }
- pOptDesc->optArg.argInt = val;
+ optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
}
#endif /* defined OPENSSL */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
#if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
extern void optionPutShell(tOptions*);
int
-main(int argc, char** argv)
+main(int argc, char ** argv)
{
- int res = EXIT_SUCCESS;
+ int res = NTP_KEYGEN_EXIT_SUCCESS;
(void)optionProcess(&ntp_keygenOptions, argc, argv);
optionPutShell(&ntp_keygenOptions);
res = ferror(stdout);
return res;
}
#endif /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
#if ENABLE_NLS
#include <stdio.h>
pzRes = strdup(pzRes);
if (pzRes == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
- exit(EXIT_FAILURE);
+ exit(NTP_KEYGEN_EXIT_FAILURE);
}
return pzRes;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
- coerce_it((void*)&(ntp_keygenOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
/*
* This invokes the translation code (e.g. gettext(3)).
static void
translate_option_strings(void)
{
+ tOptions * const pOpt = &ntp_keygenOptions;
+
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc* pOD = ntp_keygenOptions.pOptDesc;
- char** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ tOptDesc * pOD = pOpt->pOptDesc;
+ char ** ppz = (char**)(void*)&(option_usage_text);
+ int ix = option_usage_text.field_ct;
do {
ppz++;
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
- COERSION(pzCopyright);
- COERSION(pzCopyNotice);
- COERSION(pzFullVersion);
- COERSION(pzUsageTitle);
- COERSION(pzExplain);
- COERSION(pzDetail);
- COERSION(pzPackager);
+ coerce_it((void*)&(pOpt->pzCopyright));
+ coerce_it((void*)&(pOpt->pzCopyNotice));
+ coerce_it((void*)&(pOpt->pzFullVersion));
+ coerce_it((void*)&(pOpt->pzUsageTitle));
+ coerce_it((void*)&(pOpt->pzExplain));
+ coerce_it((void*)&(pOpt->pzDetail));
+ coerce_it((void*)&(pOpt->pzPackager));
option_usage_text.field_ct = 0;
- for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++)
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
coerce_it((void*)&(pOD->pzText));
}
- if ((ntp_keygenOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc* pOD = ntp_keygenOptions.pOptDesc;
- int ix;
+ if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+ tOptDesc * pOD = pOpt->pOptDesc;
+ int ix;
- for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++) {
+ for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
coerce_it((void*)&(pOD->pz_Name));
coerce_it((void*)&(pOD->pz_DisableName));
coerce_it((void*)&(pOD->pz_DisablePfx));
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed February 22, 2011 at 12:29:03 AM by AutoGen 5.11.6
+ * It has been AutoGen-ed May 16, 2011 at 04:24:37 AM by AutoGen 5.11.9
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
+ *
*/
/*
* This file contains the programmatic interface to the Automated
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
} teOptIndex;
#define OPTION_CT 23
-#define NTP_KEYGEN_VERSION "4.2.6p3"
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3"
+#define NTP_KEYGEN_VERSION "4.2.6p4-beta1"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.6p4-beta1"
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
NTP_KEYGEN_EXIT_SUCCESS = 0,
NTP_KEYGEN_EXIT_FAILURE = 1
} ntp_keygen_exit_code_t;
-
/*
* Make sure there are no #define name conflicts with the option names
*/
ntp_keygenOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
-/* * * * * *
- *
- * Declare the ntp-keygen option descriptor.
- */
#ifdef __cplusplus
extern "C" {
#endif
-extern tOptions ntp_keygenOptions;
+/* * * * * *
+ *
+ * Declare the ntp-keygen option descriptor.
+ */
+extern tOptions ntp_keygenOptions;
#if defined(ENABLE_NLS)
# ifndef _
#
# EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.texi)
#
-# It has been AutoGen-ed January 3, 2011 at 09:19:07 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed May 16, 2011 at 04:24:43 AM by AutoGen 5.11.9
# From the definitions ntp-keygen-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p4-beta1
USAGE: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-c Str certificate certificate scheme
-i Str issuer-name set issuer name
-M no md5key generate MD5 keys
-m Num modulus modulus
- - it must be: 256 to 2048
+ - It must be in the range:
+ 256 to 2048
-P no pvt-cert generate PC private certificate
-p Str pvt-passwd output private password
-q Str get-pvt-passwd input private password
- 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.
+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 NTP_KEYGEN_*
-If there is no new host key, look for an existing one.
-If one is not found, create it.
+If there is no new host key, look for an existing one. If one is not
+found, create it.
please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
@end example
-.TH NTP-KEYGEN 1 2011-01-03 "(ntp 4.2.6p3)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2011-05-16 "(ntp 4.2.6p4-beta1)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen.1)
.\"
-.\" It has been AutoGen-ed January 3, 2011 at 09:19:05 PM by AutoGen 5.11.6pre7
+.\" It has been AutoGen-ed May 16, 2011 at 04:24:43 AM by AutoGen 5.11.9
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman1.tpl
.\"
.nf
.na
see html/copyright.html
+
.fi
.ad
.PP