This is the ``send @var{int} as our ntp protocol version'' option.
This option takes a number argument.
When sending requests to a remote server, tell them we are running
NTP protocol version @file{ntpversion} .
@node sntp usereservedport
@subsection usereservedport option (-r)
@cindex sntp-usereservedport
This is the ``use the ntp reserved port (port 123)'' option.
Use port 123, which is reserved for NTP, for our network
communications.
@node sntp timeout
@subsection timeout option (-t)
@cindex sntp-timeout
This is the ``the number of seconds to wait for responses'' option.
This option takes a number argument @file{seconds}.
When waiting for a reply, @code{sntp} will wait the number
of seconds specified before giving up. The default should be
more than enough for a unicast response. If @code{sntp} is
only waiting for a broadcast response a longer timeout is
likely needed.
@node sntp wait
@subsection wait option
@cindex sntp-wait
This is the ``wait for pending replies (if not setting the time)'' option.
@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
can be disabled with --no-wait.
@item
It is enabled by default.
@end itemize
If we are not setting the time, wait for all pending responses.
@node sntp config
@subsection presetting/configuring sntp
Any option that is not marked as @i{not presettable} may be preset by
loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{SNTP} and @code{SNTP_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
the options listed above in upper case and segmented with underscores.
The @code{SNTP} variable will be tokenized and parsed like
the command line. The remaining variables are tested for existence and their
values are treated like option arguments.
@noindent
@code{libopts} will search in 2 places for configuration files:
@itemize @bullet
@item
$HOME
@item
$PWD
@end itemize
The environment variables @code{HOME}, and @code{PWD}
are expanded and replaced when @file{sntp} runs.
For any of these that are plain files, they are simply processed.
For any that are directories, then a file named @file{.ntprc} is searched for
within that directory and processed.
Configuration files may be in a wide variety of formats.
The basic format is an option name followed by a value (argument) on the
same line. Values may be separated from the option name with a colon,
equal sign or simply white space. Values may be continued across multiple
lines by escaping the newline with a backslash.
Multiple programs may also share the same initialization file.
Common options are collected at the top, followed by program specific
segments. The segments are separated by lines like:
@example
[SNTP]
@end example
@noindent
or by
@example
<?program sntp>
@end example
@noindent
Do not mix these styles within one configuration file.
Compound values and carefully constructed string values may also be
specified using XML syntax:
@example
<option-name>
<sub-opt>...<...>...</sub-opt>
</option-name>
@end example
@noindent
yielding an @code{option-name.sub-opt} string value of
@example
"...<...>..."
@end example
@code{AutoOpts} does not track suboptions. You simply note that it is a
hierarchicly valued option. @code{AutoOpts} does provide a means for searching
the associated name/value pair list (see: optionFindValue).
The command line options relating to configuration and/or usage help are:
@subsubheading version (-)
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
@item version
Only print the version. This is the default.
@item copyright
Name the copyright usage licensing terms.
@item verbose
Print the full copyright usage licensing terms.
@end table
@node sntp exit status
@subsection sntp exit status
One of the following exit values will be returned:
@table @samp
@item 0 (EXIT_SUCCESS)
Successful program execution.
@item 1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
@item 66 (EX_NOINPUT)
A specified configuration file could not be loaded.
@item 70 (EX_SOFTWARE)
libopts had an internal operational error. Please report
it to autogen-users@@lists.sourceforge.net. Thank you.