From: Harlan Stenn Date: Mon, 27 Jun 2022 05:02:54 +0000 (-0500) Subject: Add -u option for ntpq/ntpdc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a8be33af699e5dfaf47f14b7397b47e2f47a1b8;p=thirdparty%2Fntp.git Add -u option for ntpq/ntpdc bk: 62b939feT2xtd3rHTLlV5e4CTYoTUA --- diff --git a/ntpdc/invoke-ntpdc.texi b/ntpdc/invoke-ntpdc.texi index aaa64e06d..0c5dd3013 100644 --- a/ntpdc/invoke-ntpdc.texi +++ b/ntpdc/invoke-ntpdc.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi) # -# It has been AutoGen-ed June 26, 2022 at 05:34:08 AM by AutoGen 5.18.5 +# It has been AutoGen-ed June 27, 2022 at 12:01:01 AM by AutoGen 5.18.5 # From the definitions ntpdc-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -52,6 +52,7 @@ This software is released under the NTP license, . * ntpdc numeric:: numeric option (-n) * ntpdc peers:: peers option (-p) * ntpdc showpeers:: showpeers option (-s) +* ntpdc unconnected:: unconnected option (-u) * ntpdc config:: presetting/configuring ntpdc * ntpdc exit status:: exit status * ntpdc Usage:: Usage @@ -102,6 +103,7 @@ Usage: ntpdc [ - [] | --[@{=| @}] ]... [ host ...] - prohibits the option 'command' -s no showpeers Show a list of the peers - prohibits the option 'command' + -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows) opt version output version information and exit -? no help display extended usage information and exit -! no more-help extended usage information passed thru pager @@ -243,6 +245,13 @@ command. Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'dmpeers' interactive command. +@node ntpdc unconnected +@subsection unconnected option (-u) +@cindex ntpdc-unconnected + +This is the ``use unconnected udp to communicate with ntpd (default on windows)'' option. +Open an unconnected UDP association to ntpd (the default +on Windows). @node ntpdc config diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c index 0363e6c37..1c06949f4 100644 --- a/ntpdc/ntpdc-opts.c +++ b/ntpdc/ntpdc-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdc-opts.c) * - * It has been AutoGen-ed June 26, 2022 at 05:34:04 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 27, 2022 at 12:00:57 AM by AutoGen 5.18.5 * From the definitions ntpdc-opts.def * and the template file options * @@ -68,7 +68,7 @@ extern FILE * option_usage_fp; /** * static const strings for ntpdc options */ -static char const ntpdc_opt_strs[1914] = +static char const ntpdc_opt_strs[2004] = /* 0 */ "ntpdc 4.2.8p15\n" "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" @@ -115,27 +115,30 @@ static char const ntpdc_opt_strs[1914] = /* 1411 */ "Show a list of the peers\0" /* 1436 */ "SHOWPEERS\0" /* 1446 */ "showpeers\0" -/* 1456 */ "display extended usage information and exit\0" -/* 1500 */ "help\0" -/* 1505 */ "extended usage information passed thru pager\0" -/* 1550 */ "more-help\0" -/* 1560 */ "output version information and exit\0" -/* 1596 */ "version\0" -/* 1604 */ "save the option state to a config file\0" -/* 1643 */ "save-opts\0" -/* 1653 */ "load options from a config file\0" -/* 1685 */ "LOAD_OPTS\0" -/* 1695 */ "no-load-opts\0" -/* 1708 */ "no\0" -/* 1711 */ "NTPDC\0" -/* 1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p15\n" +/* 1456 */ "Use unconnected UDP to communicate with ntpd (default on Windows)\0" +/* 1522 */ "UNCONNECTED\0" +/* 1534 */ "unconnected\0" +/* 1546 */ "display extended usage information and exit\0" +/* 1590 */ "help\0" +/* 1595 */ "extended usage information passed thru pager\0" +/* 1640 */ "more-help\0" +/* 1650 */ "output version information and exit\0" +/* 1686 */ "version\0" +/* 1694 */ "save the option state to a config file\0" +/* 1733 */ "save-opts\0" +/* 1743 */ "load options from a config file\0" +/* 1775 */ "LOAD_OPTS\0" +/* 1785 */ "no-load-opts\0" +/* 1798 */ "no\0" +/* 1801 */ "NTPDC\0" +/* 1807 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p15\n" "Usage: %s [ - [] | --[{=| }] ]... [ host ...]\n\0" -/* 1848 */ "$HOME\0" -/* 1854 */ ".\0" -/* 1856 */ ".ntprc\0" -/* 1863 */ "http://bugs.ntp.org, bugs@ntp.org\0" -/* 1897 */ "\n\0" -/* 1899 */ "ntpdc 4.2.8p15"; +/* 1938 */ "$HOME\0" +/* 1944 */ ".\0" +/* 1946 */ ".ntprc\0" +/* 1953 */ "http://bugs.ntp.org, bugs@ntp.org\0" +/* 1987 */ "\n\0" +/* 1989 */ "ntpdc 4.2.8p15"; /** * ipv4 option description with @@ -286,14 +289,26 @@ static int const aShowpeersCantList[] = { /** Compiled in flag settings for the showpeers option */ #define SHOWPEERS_FLAGS (OPTST_DISABLED) +/** + * unconnected option description: + */ +/** Descriptive text for the unconnected option */ +#define UNCONNECTED_DESC (ntpdc_opt_strs+1456) +/** Upper-cased name for the unconnected option */ +#define UNCONNECTED_NAME (ntpdc_opt_strs+1522) +/** Name string for the unconnected option */ +#define UNCONNECTED_name (ntpdc_opt_strs+1534) +/** Compiled in flag settings for the unconnected option */ +#define UNCONNECTED_FLAGS (OPTST_DISABLED) + /* * Help/More_Help/Version option descriptions: */ -#define HELP_DESC (ntpdc_opt_strs+1456) -#define HELP_name (ntpdc_opt_strs+1500) +#define HELP_DESC (ntpdc_opt_strs+1546) +#define HELP_name (ntpdc_opt_strs+1590) #ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (ntpdc_opt_strs+1505) -#define MORE_HELP_name (ntpdc_opt_strs+1550) +#define MORE_HELP_DESC (ntpdc_opt_strs+1595) +#define MORE_HELP_name (ntpdc_opt_strs+1640) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC HELP_DESC @@ -306,14 +321,14 @@ static int const aShowpeersCantList[] = { # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif -#define VER_DESC (ntpdc_opt_strs+1560) -#define VER_name (ntpdc_opt_strs+1596) -#define SAVE_OPTS_DESC (ntpdc_opt_strs+1604) -#define SAVE_OPTS_name (ntpdc_opt_strs+1643) -#define LOAD_OPTS_DESC (ntpdc_opt_strs+1653) -#define LOAD_OPTS_NAME (ntpdc_opt_strs+1685) -#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1695) -#define LOAD_OPTS_pfx (ntpdc_opt_strs+1708) +#define VER_DESC (ntpdc_opt_strs+1650) +#define VER_name (ntpdc_opt_strs+1686) +#define SAVE_OPTS_DESC (ntpdc_opt_strs+1694) +#define SAVE_OPTS_name (ntpdc_opt_strs+1733) +#define LOAD_OPTS_DESC (ntpdc_opt_strs+1743) +#define LOAD_OPTS_NAME (ntpdc_opt_strs+1775) +#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1785) +#define LOAD_OPTS_pfx (ntpdc_opt_strs+1798) #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) /** * Declare option callback procedures @@ -454,6 +469,18 @@ static tOptDesc optDesc[OPTION_CT] = { /* desc, NAME, name */ SHOWPEERS_DESC, SHOWPEERS_NAME, SHOWPEERS_name, /* disablement strs */ NULL, NULL }, + { /* entry idx, value */ 10, VALUE_OPT_UNCONNECTED, + /* equiv idx, value */ 10, VALUE_OPT_UNCONNECTED, + /* equivalenced to */ NO_EQUIVALENT, + /* min, max, act ct */ 0, 1, 0, + /* opt state flags */ UNCONNECTED_FLAGS, 0, + /* last opt argumnt */ { NULL }, /* --unconnected */ + /* arg list/cookie */ NULL, + /* must/cannot opts */ NULL, NULL, + /* option proc */ NULL, + /* desc, NAME, name */ UNCONNECTED_DESC, UNCONNECTED_NAME, UNCONNECTED_name, + /* disablement strs */ NULL, NULL }, + { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, @@ -522,24 +549,24 @@ static tOptDesc optDesc[OPTION_CT] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** Reference to the upper cased version of ntpdc. */ -#define zPROGNAME (ntpdc_opt_strs+1711) +#define zPROGNAME (ntpdc_opt_strs+1801) /** Reference to the title line for ntpdc usage. */ -#define zUsageTitle (ntpdc_opt_strs+1717) +#define zUsageTitle (ntpdc_opt_strs+1807) /** ntpdc configuration file name. */ -#define zRcName (ntpdc_opt_strs+1856) +#define zRcName (ntpdc_opt_strs+1946) /** Directories to search for ntpdc config files. */ static char const * const apzHomeList[3] = { - ntpdc_opt_strs+1848, - ntpdc_opt_strs+1854, + ntpdc_opt_strs+1938, + ntpdc_opt_strs+1944, NULL }; /** The ntpdc program bug email address. */ -#define zBugsAddr (ntpdc_opt_strs+1863) +#define zBugsAddr (ntpdc_opt_strs+1953) /** Clarification/explanation of what ntpdc does. */ -#define zExplain (ntpdc_opt_strs+1897) +#define zExplain (ntpdc_opt_strs+1987) /** Extra detail explaining what ntpdc does. */ #define zDetail (NULL) /** The full version string for ntpdc. */ -#define zFullVersion (ntpdc_opt_strs+1899) +#define zFullVersion (ntpdc_opt_strs+1989) /* extracted from optcode.tlib near line 364 */ #if defined(ENABLE_NLS) @@ -661,7 +688,7 @@ tOptions ntpdcOptions = { NO_EQUIVALENT, /* '-#' option index */ NO_EQUIVALENT /* index of default opt */ }, - 15 /* full option count */, 10 /* user option count */, + 16 /* full option count */, 11 /* user option count */, ntpdc_full_usage, ntpdc_short_usage, NULL, NULL, PKGDATADIR, ntpdc_packager_info @@ -846,6 +873,9 @@ implied warranty.\n")); /* referenced via ntpdcOptions.pOptDesc->pzText */ puts(_("Show a list of the peers")); + /* referenced via ntpdcOptions.pOptDesc->pzText */ + puts(_("Use unconnected UDP to communicate with ntpd (default on Windows)")); + /* referenced via ntpdcOptions.pOptDesc->pzText */ puts(_("display extended usage information and exit")); diff --git a/ntpdc/ntpdc-opts.def b/ntpdc/ntpdc-opts.def index df3350eb8..62d086ee9 100644 --- a/ntpdc/ntpdc-opts.def +++ b/ntpdc/ntpdc-opts.def @@ -104,6 +104,16 @@ flag = { _EndOfDoc_; }; +flag = { + name = unconnected; + value = u; + descrip = "Use unconnected UDP to communicate with ntpd (default on Windows)"; + doc = <<- _EndOfDoc_ + Open an unconnected UDP association to ntpd (the default + on Windows). + _EndOfDoc_; +}; + /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN _END_EXPLAIN; diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h index 6f10f8a02..ffa1d0d09 100644 --- a/ntpdc/ntpdc-opts.h +++ b/ntpdc/ntpdc-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdc-opts.h) * - * It has been AutoGen-ed June 26, 2022 at 05:34:04 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 27, 2022 at 12:00:57 AM by AutoGen 5.18.5 * From the definitions ntpdc-opts.def * and the template file options * @@ -74,14 +74,15 @@ typedef enum { INDEX_OPT_NUMERIC = 7, INDEX_OPT_PEERS = 8, INDEX_OPT_SHOWPEERS = 9, - INDEX_OPT_VERSION = 10, - INDEX_OPT_HELP = 11, - INDEX_OPT_MORE_HELP = 12, - INDEX_OPT_SAVE_OPTS = 13, - INDEX_OPT_LOAD_OPTS = 14 + INDEX_OPT_UNCONNECTED = 10, + INDEX_OPT_VERSION = 11, + INDEX_OPT_HELP = 12, + INDEX_OPT_MORE_HELP = 13, + INDEX_OPT_SAVE_OPTS = 14, + INDEX_OPT_LOAD_OPTS = 15 } teOptIndex; /** count of all options for ntpdc */ -#define OPTION_CT 15 +#define OPTION_CT 16 /** ntpdc version */ #define NTPDC_VERSION "4.2.8p15" /** Full ntpdc version text */ @@ -178,6 +179,10 @@ typedef enum { # warning undefining SHOWPEERS due to option name conflict # undef SHOWPEERS # endif +# ifdef UNCONNECTED +# warning undefining UNCONNECTED due to option name conflict +# undef UNCONNECTED +# endif #else /* NO_OPTION_NAME_WARNINGS */ # undef IPV4 # undef IPV6 @@ -189,6 +194,7 @@ typedef enum { # undef NUMERIC # undef PEERS # undef SHOWPEERS +# undef UNCONNECTED #endif /* NO_OPTION_NAME_WARNINGS */ /** @@ -207,6 +213,7 @@ typedef enum { #define VALUE_OPT_NUMERIC 'n' #define VALUE_OPT_PEERS 'p' #define VALUE_OPT_SHOWPEERS 's' +#define VALUE_OPT_UNCONNECTED 'u' /** option flag (value) for help-value option */ #define VALUE_OPT_HELP '?' /** option flag (value) for more-help-value option */ diff --git a/ntpdc/ntpdc.1ntpdcman b/ntpdc/ntpdc.1ntpdcman index c6a72cfeb..c9b8d1f51 100644 --- a/ntpdc/ntpdc.1ntpdcman +++ b/ntpdc/ntpdc.1ntpdcman @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpdc 1ntpdcman "26 Jun 2022" "4.2.8p15" "User Commands" +.TH ntpdc 1ntpdcman "27 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:10 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:03 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -107,6 +107,12 @@ command. Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'dmpeers' interactive command. .TP +.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[] +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). +.TP .NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[] Display usage information and exit. .TP diff --git a/ntpdc/ntpdc.1ntpdcmdoc b/ntpdc/ntpdc.1ntpdcmdoc index 4aec18a87..9937e7a58 100644 --- a/ntpdc/ntpdc.1ntpdcmdoc +++ b/ntpdc/ntpdc.1ntpdcmdoc @@ -1,9 +1,9 @@ -.Dd June 26 2022 +.Dd June 27 2022 .Dt NTPDC 1ntpdcmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:07 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:00 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -84,6 +84,11 @@ command. .sp Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'dmpeers' interactive command. +.It Fl u , Fl \-unconnected +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). .It Fl \&? , Fl \-help Display usage information and exit. .It Fl \&! , Fl \-more\-help diff --git a/ntpdc/ntpdc.html b/ntpdc/ntpdc.html index a0b953d91..3bb3d0603 100644 --- a/ntpdc/ntpdc.html +++ b/ntpdc/ntpdc.html @@ -179,6 +179,8 @@ This software is released under the NTP license, <http://ntp.org/license>. • ntpdc showpeers:  showpeers option (-s) +• ntpdc unconnected:  unconnected option (-u) + • ntpdc config:  presetting/configuring ntpdc • ntpdc exit status:  exit status @@ -240,6 +242,7 @@ Usage: ntpdc [ -<flag> [<val>] | --<name>[{=| }<val>] ] - prohibits the option 'command' -s no showpeers Show a list of the peers - prohibits the option 'command' + -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows) opt version output version information and exit -? no help display extended usage information and exit -! no more-help extended usage information passed thru pager @@ -398,7 +401,7 @@ of their state. This is equivalent to the ’peers’ interactive comman

-Next: , Previous: , Up: ntpdc Invocation  

+Next: , Previous: , Up: ntpdc Invocation  

1.1.9 showpeers option (-s)

@@ -414,16 +417,29 @@ command.

Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the ’dmpeers’ interactive command. +


+ +
+

+Next: , Previous: , Up: ntpdc Invocation  

+
+ +

1.1.10 unconnected option (-u)

+ + +

This is the “use unconnected udp to communicate with ntpd (default on windows)” option. +Open an unconnected UDP association to ntpd (the default +on Windows).


-

1.1.10 presetting/configuring ntpdc

+

1.1.11 presetting/configuring ntpdc

Any option that is not marked as not presettable may be preset by loading values from configuration ("rc" or "ini") files, and values from environment variables named NTPDC and NTPDC_<OPTION_NAME>. <OPTION_NAME> must be one of @@ -506,7 +522,7 @@ Only the first letter of the argument is examined: Next: , Previous: , Up: ntpdc Invocation  

-

1.1.11 ntpdc exit status

+

1.1.12 ntpdc exit status

One of the following exit values will be returned:

@@ -531,7 +547,7 @@ it to autogen-users@lists.sourceforge.net. Thank you. Next: , Previous: , Up: ntpdc Invocation  

-

1.1.12 ntpdc Usage

+

1.1.13 ntpdc Usage


@@ -539,7 +555,7 @@ Next: , Pre Next: , Previous: , Up: ntpdc Invocation  

-

1.1.13 ntpdc See Also

+

1.1.14 ntpdc See Also


@@ -547,7 +563,7 @@ Next: , Previ Next: , Previous: , Up: ntpdc Invocation  

-

1.1.14 ntpdc Authors

+

1.1.15 ntpdc Authors


@@ -555,7 +571,7 @@ Next: , Previous: < Previous: , Up: ntpdc Invocation  

-

1.1.15 ntpdc Bugs

+

1.1.16 ntpdc Bugs


diff --git a/ntpdc/ntpdc.man.in b/ntpdc/ntpdc.man.in index edacdc31c..062f1e772 100644 --- a/ntpdc/ntpdc.man.in +++ b/ntpdc/ntpdc.man.in @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpdc @NTPDC_MS@ "26 Jun 2022" "4.2.8p15" "User Commands" +.TH ntpdc @NTPDC_MS@ "27 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:10 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:03 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -107,6 +107,12 @@ command. Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'dmpeers' interactive command. .TP +.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[] +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). +.TP .NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[] Display usage information and exit. .TP diff --git a/ntpdc/ntpdc.mdoc.in b/ntpdc/ntpdc.mdoc.in index 36585a318..edeba4088 100644 --- a/ntpdc/ntpdc.mdoc.in +++ b/ntpdc/ntpdc.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 26 2022 +.Dd June 27 2022 .Dt NTPDC @NTPDC_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:07 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:00 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -84,6 +84,11 @@ command. .sp Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'dmpeers' interactive command. +.It Fl u , Fl \-unconnected +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). .It Fl \&? , Fl \-help Display usage information and exit. .It Fl \&! , Fl \-more\-help diff --git a/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi index 959ef86c4..92fe4837a 100644 --- a/ntpq/invoke-ntpq.texi +++ b/ntpq/invoke-ntpq.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi) # -# It has been AutoGen-ed June 26, 2022 at 05:34:19 AM by AutoGen 5.18.5 +# It has been AutoGen-ed June 27, 2022 at 12:01:13 AM by AutoGen 5.18.5 # From the definitions ntpq-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -923,6 +923,7 @@ This software is released under the NTP license, . * ntpq old-rv:: old-rv option * ntpq peers:: peers option (-p) * ntpq refid:: refid option (-r) +* ntpq unconnected:: unconnected option (-u) * ntpq wide:: wide option (-w) * ntpq config:: presetting/configuring ntpq * ntpq exit status:: exit status @@ -966,6 +967,7 @@ Usage: ntpq [ - [] | --[@{=| @}] ]... [ host ...] -p no peers Print a list of the peers - prohibits the option 'interactive' -r KWd refid Set default display type for S2+ refids + -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows) -w no wide Display the full 'remote' value opt version output version information and exit -? no help display extended usage information and exit @@ -1115,6 +1117,13 @@ The available keywords are: or their numeric equivalent.@end itemize Set the default display format for S2+ refids. +@node ntpq unconnected +@subsection unconnected option (-u) +@cindex ntpq-unconnected + +This is the ``use unconnected udp to communicate with ntpd (default on windows)'' option. +Open an unconnected UDP association to ntpd (the default +on Windows). @node ntpq wide @subsection wide option (-w) @cindex ntpq-wide diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c index 81df825e0..8ecbff4e1 100644 --- a/ntpq/ntpq-opts.c +++ b/ntpq/ntpq-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpq-opts.c) * - * It has been AutoGen-ed June 26, 2022 at 05:41:46 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 27, 2022 at 12:01:04 AM by AutoGen 5.18.5 * From the definitions ntpq-opts.def * and the template file options * @@ -68,7 +68,7 @@ extern FILE * option_usage_fp; /** * static const strings for ntpq options */ -static char const ntpq_opt_strs[1977] = +static char const ntpq_opt_strs[2067] = /* 0 */ "ntpq 4.2.8p15\n" "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" @@ -116,30 +116,33 @@ static char const ntpq_opt_strs[1977] = /* 1435 */ "Set default display type for S2+ refids\0" /* 1475 */ "REFID\0" /* 1481 */ "refid\0" -/* 1487 */ "Display the full 'remote' value\0" -/* 1519 */ "WIDE\0" -/* 1524 */ "wide\0" -/* 1529 */ "display extended usage information and exit\0" -/* 1573 */ "help\0" -/* 1578 */ "extended usage information passed thru pager\0" -/* 1623 */ "more-help\0" -/* 1633 */ "output version information and exit\0" -/* 1669 */ "version\0" -/* 1677 */ "save the option state to a config file\0" -/* 1716 */ "save-opts\0" -/* 1726 */ "load options from a config file\0" -/* 1758 */ "LOAD_OPTS\0" -/* 1768 */ "no-load-opts\0" -/* 1781 */ "no\0" -/* 1784 */ "NTPQ\0" -/* 1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p15\n" +/* 1487 */ "Use unconnected UDP to communicate with ntpd (default on Windows)\0" +/* 1553 */ "UNCONNECTED\0" +/* 1565 */ "unconnected\0" +/* 1577 */ "Display the full 'remote' value\0" +/* 1609 */ "WIDE\0" +/* 1614 */ "wide\0" +/* 1619 */ "display extended usage information and exit\0" +/* 1663 */ "help\0" +/* 1668 */ "extended usage information passed thru pager\0" +/* 1713 */ "more-help\0" +/* 1723 */ "output version information and exit\0" +/* 1759 */ "version\0" +/* 1767 */ "save the option state to a config file\0" +/* 1806 */ "save-opts\0" +/* 1816 */ "load options from a config file\0" +/* 1848 */ "LOAD_OPTS\0" +/* 1858 */ "no-load-opts\0" +/* 1871 */ "no\0" +/* 1874 */ "NTPQ\0" +/* 1879 */ "ntpq - standard NTP query program - Ver. 4.2.8p15\n" "Usage: %s [ - [] | --[{=| }] ]... [ host ...]\n\0" -/* 1909 */ "$HOME\0" -/* 1915 */ ".\0" -/* 1917 */ ".ntprc\0" -/* 1924 */ "http://bugs.ntp.org, bugs@ntp.org\0" -/* 1958 */ "ntpq 4.2.8p15\0" -/* 1972 */ "hash"; +/* 1999 */ "$HOME\0" +/* 2005 */ ".\0" +/* 2007 */ ".ntprc\0" +/* 2014 */ "http://bugs.ntp.org, bugs@ntp.org\0" +/* 2048 */ "ntpq 4.2.8p15\0" +/* 2062 */ "hash"; /** * ipv4 option description with @@ -283,26 +286,38 @@ static int const aPeersCantList[] = { #define REFID_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_ENUMERATION)) +/** + * unconnected option description: + */ +/** Descriptive text for the unconnected option */ +#define UNCONNECTED_DESC (ntpq_opt_strs+1487) +/** Upper-cased name for the unconnected option */ +#define UNCONNECTED_NAME (ntpq_opt_strs+1553) +/** Name string for the unconnected option */ +#define UNCONNECTED_name (ntpq_opt_strs+1565) +/** Compiled in flag settings for the unconnected option */ +#define UNCONNECTED_FLAGS (OPTST_DISABLED) + /** * wide option description: */ /** Descriptive text for the wide option */ -#define WIDE_DESC (ntpq_opt_strs+1487) +#define WIDE_DESC (ntpq_opt_strs+1577) /** Upper-cased name for the wide option */ -#define WIDE_NAME (ntpq_opt_strs+1519) +#define WIDE_NAME (ntpq_opt_strs+1609) /** Name string for the wide option */ -#define WIDE_name (ntpq_opt_strs+1524) +#define WIDE_name (ntpq_opt_strs+1614) /** Compiled in flag settings for the wide option */ #define WIDE_FLAGS (OPTST_DISABLED) /* * Help/More_Help/Version option descriptions: */ -#define HELP_DESC (ntpq_opt_strs+1529) -#define HELP_name (ntpq_opt_strs+1573) +#define HELP_DESC (ntpq_opt_strs+1619) +#define HELP_name (ntpq_opt_strs+1663) #ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (ntpq_opt_strs+1578) -#define MORE_HELP_name (ntpq_opt_strs+1623) +#define MORE_HELP_DESC (ntpq_opt_strs+1668) +#define MORE_HELP_name (ntpq_opt_strs+1713) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC HELP_DESC @@ -315,14 +330,14 @@ static int const aPeersCantList[] = { # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif -#define VER_DESC (ntpq_opt_strs+1633) -#define VER_name (ntpq_opt_strs+1669) -#define SAVE_OPTS_DESC (ntpq_opt_strs+1677) -#define SAVE_OPTS_name (ntpq_opt_strs+1716) -#define LOAD_OPTS_DESC (ntpq_opt_strs+1726) -#define LOAD_OPTS_NAME (ntpq_opt_strs+1758) -#define NO_LOAD_OPTS_name (ntpq_opt_strs+1768) -#define LOAD_OPTS_pfx (ntpq_opt_strs+1781) +#define VER_DESC (ntpq_opt_strs+1723) +#define VER_name (ntpq_opt_strs+1759) +#define SAVE_OPTS_DESC (ntpq_opt_strs+1767) +#define SAVE_OPTS_name (ntpq_opt_strs+1806) +#define LOAD_OPTS_DESC (ntpq_opt_strs+1816) +#define LOAD_OPTS_NAME (ntpq_opt_strs+1848) +#define NO_LOAD_OPTS_name (ntpq_opt_strs+1858) +#define LOAD_OPTS_pfx (ntpq_opt_strs+1871) #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) /** * Declare option callback procedures @@ -463,8 +478,20 @@ static tOptDesc optDesc[OPTION_CT] = { /* desc, NAME, name */ REFID_DESC, REFID_NAME, REFID_name, /* disablement strs */ NULL, NULL }, - { /* entry idx, value */ 10, VALUE_OPT_WIDE, - /* equiv idx, value */ 10, VALUE_OPT_WIDE, + { /* entry idx, value */ 10, VALUE_OPT_UNCONNECTED, + /* equiv idx, value */ 10, VALUE_OPT_UNCONNECTED, + /* equivalenced to */ NO_EQUIVALENT, + /* min, max, act ct */ 0, 1, 0, + /* opt state flags */ UNCONNECTED_FLAGS, 0, + /* last opt argumnt */ { NULL }, /* --unconnected */ + /* arg list/cookie */ NULL, + /* must/cannot opts */ NULL, NULL, + /* option proc */ NULL, + /* desc, NAME, name */ UNCONNECTED_DESC, UNCONNECTED_NAME, UNCONNECTED_name, + /* disablement strs */ NULL, NULL }, + + { /* entry idx, value */ 11, VALUE_OPT_WIDE, + /* equiv idx, value */ 11, VALUE_OPT_WIDE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ WIDE_FLAGS, 0, @@ -543,24 +570,24 @@ static tOptDesc optDesc[OPTION_CT] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** Reference to the upper cased version of ntpq. */ -#define zPROGNAME (ntpq_opt_strs+1784) +#define zPROGNAME (ntpq_opt_strs+1874) /** Reference to the title line for ntpq usage. */ -#define zUsageTitle (ntpq_opt_strs+1789) +#define zUsageTitle (ntpq_opt_strs+1879) /** ntpq configuration file name. */ -#define zRcName (ntpq_opt_strs+1917) +#define zRcName (ntpq_opt_strs+2007) /** Directories to search for ntpq config files. */ static char const * const apzHomeList[3] = { - ntpq_opt_strs+1909, - ntpq_opt_strs+1915, + ntpq_opt_strs+1999, + ntpq_opt_strs+2005, NULL }; /** The ntpq program bug email address. */ -#define zBugsAddr (ntpq_opt_strs+1924) +#define zBugsAddr (ntpq_opt_strs+2014) /** Clarification/explanation of what ntpq does. */ #define zExplain (NULL) /** Extra detail explaining what ntpq does. */ #define zDetail (NULL) /** The full version string for ntpq. */ -#define zFullVersion (ntpq_opt_strs+1958) +#define zFullVersion (ntpq_opt_strs+2048) /* extracted from optcode.tlib near line 364 */ #if defined(ENABLE_NLS) @@ -633,7 +660,7 @@ doOptRefid(tOptions* pOptions, tOptDesc* pOptDesc) /* extracted from optmain.tlib near line 945 */ static char const * const names[2] = { - ntpq_opt_strs+1972, ntpq_opt_strs+1041 }; + ntpq_opt_strs+2062, ntpq_opt_strs+1041 }; if (pOptions <= OPTPROC_EMIT_LIMIT) { (void) optionEnumerationVal(pOptions, pOptDesc, names, 2); @@ -706,7 +733,7 @@ tOptions ntpqOptions = { NO_EQUIVALENT, /* '-#' option index */ NO_EQUIVALENT /* index of default opt */ }, - 16 /* full option count */, 11 /* user option count */, + 17 /* full option count */, 12 /* user option count */, ntpq_full_usage, ntpq_short_usage, NULL, NULL, PKGDATADIR, ntpq_packager_info @@ -891,6 +918,9 @@ implied warranty.\n")); /* referenced via ntpqOptions.pOptDesc->pzText */ puts(_("Set default display type for S2+ refids")); + /* referenced via ntpqOptions.pOptDesc->pzText */ + puts(_("Use unconnected UDP to communicate with ntpd (default on Windows)")); + /* referenced via ntpqOptions.pOptDesc->pzText */ puts(_("Display the full 'remote' value")); diff --git a/ntpq/ntpq-opts.def b/ntpq/ntpq-opts.def index f34653d12..85655a9d6 100644 --- a/ntpq/ntpq-opts.def +++ b/ntpq/ntpq-opts.def @@ -111,6 +111,16 @@ flag = { _EndOfDoc_; }; +flag = { + name = unconnected; + value = u; + descrip = "Use unconnected UDP to communicate with ntpd (default on Windows)"; + doc = <<- _EndOfDoc_ + Open an unconnected UDP association to ntpd (the default + on Windows). + _EndOfDoc_; +}; + flag = { name = wide; value = w; diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h index 264c2ac6f..2fef0f697 100644 --- a/ntpq/ntpq-opts.h +++ b/ntpq/ntpq-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpq-opts.h) * - * It has been AutoGen-ed June 26, 2022 at 05:41:46 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 27, 2022 at 12:01:04 AM by AutoGen 5.18.5 * From the definitions ntpq-opts.def * and the template file options * @@ -74,15 +74,16 @@ typedef enum { INDEX_OPT_OLD_RV = 7, INDEX_OPT_PEERS = 8, INDEX_OPT_REFID = 9, - INDEX_OPT_WIDE = 10, - INDEX_OPT_VERSION = 11, - INDEX_OPT_HELP = 12, - INDEX_OPT_MORE_HELP = 13, - INDEX_OPT_SAVE_OPTS = 14, - INDEX_OPT_LOAD_OPTS = 15 + INDEX_OPT_UNCONNECTED = 10, + INDEX_OPT_WIDE = 11, + INDEX_OPT_VERSION = 12, + INDEX_OPT_HELP = 13, + INDEX_OPT_MORE_HELP = 14, + INDEX_OPT_SAVE_OPTS = 15, + INDEX_OPT_LOAD_OPTS = 16 } teOptIndex; /** count of all options for ntpq */ -#define OPTION_CT 16 +#define OPTION_CT 17 /** ntpq version */ #define NTPQ_VERSION "4.2.8p15" /** Full ntpq version text */ @@ -179,6 +180,10 @@ typedef enum { # warning undefining REFID due to option name conflict # undef REFID # endif +# ifdef UNCONNECTED +# warning undefining UNCONNECTED due to option name conflict +# undef UNCONNECTED +# endif # ifdef WIDE # warning undefining WIDE due to option name conflict # undef WIDE @@ -194,6 +199,7 @@ typedef enum { # undef OLD_RV # undef PEERS # undef REFID +# undef UNCONNECTED # undef WIDE #endif /* NO_OPTION_NAME_WARNINGS */ @@ -219,6 +225,7 @@ typedef enum { } te_Refid; #define OPT_REFID_VAL2STR(_v) optionKeywordName(&DESC(REFID), (_v)) #define OPT_VALUE_REFID (DESC(REFID).optArg.argEnum) +#define VALUE_OPT_UNCONNECTED 'u' #define VALUE_OPT_WIDE 'w' /** option flag (value) for help-value option */ #define VALUE_OPT_HELP '?' diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman index 1c6b50c35..19bd198d6 100644 --- a/ntpq/ntpq.1ntpqman +++ b/ntpq/ntpq.1ntpqman @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpq 1ntpqman "26 Jun 2022" "4.2.8p15" "User Commands" +.TH ntpq 1ntpqman "27 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:20 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:14 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -126,6 +126,12 @@ for this option is: .sp Set the default display format for S2+ refids. .TP +.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[] +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). +.TP .NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[] Display the full 'remote' value. .sp diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc index 222ffbe85..1a16e6b8b 100644 --- a/ntpq/ntpq.1ntpqmdoc +++ b/ntpq/ntpq.1ntpqmdoc @@ -1,9 +1,9 @@ -.Dd June 26 2022 +.Dd June 27 2022 .Dt NTPQ 1ntpqmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:18 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:11 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -103,6 +103,11 @@ for this option is: ipv4 .sp Set the default display format for S2+ refids. +.It Fl u , Fl \-unconnected +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). .It Fl w , Fl \-wide Display the full 'remote' value. .sp diff --git a/ntpq/ntpq.man.in b/ntpq/ntpq.man.in index 2714e3808..7d92ca0bc 100644 --- a/ntpq/ntpq.man.in +++ b/ntpq/ntpq.man.in @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpq @NTPQ_MS@ "26 Jun 2022" "4.2.8p15" "User Commands" +.TH ntpq @NTPQ_MS@ "27 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:20 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:14 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -126,6 +126,12 @@ for this option is: .sp Set the default display format for S2+ refids. .TP +.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[] +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). +.TP .NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[] Display the full 'remote' value. .sp diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in index cf150e4af..c0a137675 100644 --- a/ntpq/ntpq.mdoc.in +++ b/ntpq/ntpq.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 26 2022 +.Dd June 27 2022 .Dt NTPQ @NTPQ_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) .\" -.\" It has been AutoGen-ed June 26, 2022 at 05:34:18 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 27, 2022 at 12:01:11 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -103,6 +103,11 @@ for this option is: ipv4 .sp Set the default display format for S2+ refids. +.It Fl u , Fl \-unconnected +Use unconnected UDP to communicate with ntpd (default on Windows). +.sp +Open an unconnected UDP association to ntpd (the default +on Windows). .It Fl w , Fl \-wide Display the full 'remote' value. .sp