4 * EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
6 * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:09 AM EST
7 * From the definitions ntpd-opts.def
8 * and the template file options
10 * Generated from AutoOpts 29:0:4 templates.
14 * This file was produced by an AutoOpts template. AutoOpts is a
15 * copyrighted work. This header file is not encumbered by AutoOpts
16 * licensing, but is provided under the licensing terms chosen by the
17 * ntpd author or copyright holder. AutoOpts is licensed under
18 * the terms of the LGPL. The redistributable library (``libopts'') is
19 * licensed under the terms of either the LGPL or, at the users discretion,
20 * the BSD license. See the AutoOpts and/or libopts sources for details.
22 * This source file is copyrighted and licensed under the following terms:
24 * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved
26 * see html/copyright.html
29 * This file contains the programmatic interface to the Automated
30 * Options generated for the ntpd program.
31 * These macros are documented in the AutoGen info file in the
32 * "AutoOpts" chapter. Please refer to that doc for usage help.
34 #ifndef AUTOOPTS_NTPD_OPTS_H_GUARD
35 #define AUTOOPTS_NTPD_OPTS_H_GUARD
37 #include <autoopts/options.h>
40 * Ensure that the library used for compiling this generated header is at
41 * least as new as the version current when the header template was released
42 * (not counting patch version increments). Also ensure that the oldest
43 * tolerable version is at least as old as what was current when the header
44 * template was released.
46 #define AO_TEMPLATE_VERSION 118784
47 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
48 || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
49 # error option template version mismatches autoopts/options.h header
54 * Enumeration of each option:
59 INDEX_OPT_AUTHREQ
= 2,
60 INDEX_OPT_AUTHNOREQ
= 3,
61 INDEX_OPT_BCASTSYNC
= 4,
62 INDEX_OPT_CONFIGFILE
= 5,
63 INDEX_OPT_DEBUG_LEVEL
= 6,
64 INDEX_OPT_SET_DEBUG_LEVEL
= 7,
65 INDEX_OPT_DRIFTFILE
= 8,
66 INDEX_OPT_PANICGATE
= 9,
67 INDEX_OPT_JAILDIR
= 10,
68 INDEX_OPT_INTERFACE
= 11,
69 INDEX_OPT_KEYFILE
= 12,
70 INDEX_OPT_LOGFILE
= 13,
71 INDEX_OPT_NOVIRTUALIPS
= 14,
72 INDEX_OPT_MODIFYMMTIMER
= 15,
73 INDEX_OPT_NOFORK
= 16,
75 INDEX_OPT_PIDFILE
= 18,
76 INDEX_OPT_PRIORITY
= 19,
78 INDEX_OPT_PROPAGATIONDELAY
= 21,
79 INDEX_OPT_UPDATEINTERVAL
= 22,
80 INDEX_OPT_STATSDIR
= 23,
81 INDEX_OPT_TRUSTEDKEY
= 24,
86 INDEX_OPT_VERSION
= 29,
88 INDEX_OPT_MORE_HELP
= 31
92 #define NTPD_VERSION "4.2.4p8"
93 #define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.4p8"
96 * Interface defines for all options. Replace "n" with the UPPER_CASED
97 * option name (as in the teOptIndex enumeration above).
98 * e.g. HAVE_OPT( IPV4 )
100 #define DESC(n) (ntpdOptions.pOptDesc[INDEX_OPT_## n])
101 #define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
102 #define OPT_ARG(n) (DESC(n).optArg.argString)
103 #define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
104 #define COUNT_OPT(n) (DESC(n).optOccCt)
105 #define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
106 #define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
107 #define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
108 #define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
109 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
110 #define CLEAR_OPT(n) STMTS( \
111 DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
112 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
113 DESC(n).fOptState |= OPTST_DISABLED; \
114 DESC(n).optCookie = NULL )
117 * Make sure there are no #define name conflicts with the option names
119 #ifndef NO_OPTION_NAME_WARNINGS
121 # warning undefining IPV4 due to option name conflict
125 # warning undefining IPV6 due to option name conflict
129 # warning undefining AUTHREQ due to option name conflict
133 # warning undefining AUTHNOREQ due to option name conflict
137 # warning undefining BCASTSYNC due to option name conflict
141 # warning undefining CONFIGFILE due to option name conflict
145 # warning undefining DEBUG_LEVEL due to option name conflict
148 # ifdef SET_DEBUG_LEVEL
149 # warning undefining SET_DEBUG_LEVEL due to option name conflict
150 # undef SET_DEBUG_LEVEL
153 # warning undefining DRIFTFILE due to option name conflict
157 # warning undefining PANICGATE due to option name conflict
161 # warning undefining JAILDIR due to option name conflict
165 # warning undefining INTERFACE due to option name conflict
169 # warning undefining KEYFILE due to option name conflict
173 # warning undefining LOGFILE due to option name conflict
177 # warning undefining NOVIRTUALIPS due to option name conflict
180 # ifdef MODIFYMMTIMER
181 # warning undefining MODIFYMMTIMER due to option name conflict
182 # undef MODIFYMMTIMER
185 # warning undefining NOFORK due to option name conflict
189 # warning undefining NICE due to option name conflict
193 # warning undefining PIDFILE due to option name conflict
197 # warning undefining PRIORITY due to option name conflict
201 # warning undefining QUIT due to option name conflict
204 # ifdef PROPAGATIONDELAY
205 # warning undefining PROPAGATIONDELAY due to option name conflict
206 # undef PROPAGATIONDELAY
208 # ifdef UPDATEINTERVAL
209 # warning undefining UPDATEINTERVAL due to option name conflict
210 # undef UPDATEINTERVAL
213 # warning undefining STATSDIR due to option name conflict
217 # warning undefining TRUSTEDKEY due to option name conflict
221 # warning undefining USER due to option name conflict
225 # warning undefining VAR due to option name conflict
229 # warning undefining DVAR due to option name conflict
233 # warning undefining SLEW due to option name conflict
236 #else /* NO_OPTION_NAME_WARNINGS */
244 # undef SET_DEBUG_LEVEL
252 # undef MODIFYMMTIMER
258 # undef PROPAGATIONDELAY
259 # undef UPDATEINTERVAL
266 #endif /* NO_OPTION_NAME_WARNINGS */
269 * Interface defines for specific options.
271 #define VALUE_OPT_IPV4 '4'
272 #define WHICH_OPT_IPV4 (DESC(IPV4).optActualValue)
273 #define WHICH_IDX_IPV4 (DESC(IPV4).optActualIndex)
274 #define VALUE_OPT_IPV6 '6'
275 #define VALUE_OPT_AUTHREQ 'a'
276 #define VALUE_OPT_AUTHNOREQ 'A'
277 #define VALUE_OPT_BCASTSYNC 'b'
278 #define VALUE_OPT_CONFIGFILE 'c'
280 #define VALUE_OPT_DEBUG_LEVEL 'd'
283 #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
285 #define VALUE_OPT_DRIFTFILE 'f'
286 #define VALUE_OPT_PANICGATE 'g'
287 #define VALUE_OPT_JAILDIR 'i'
288 #define VALUE_OPT_INTERFACE 'I'
289 #define VALUE_OPT_KEYFILE 'k'
290 #define VALUE_OPT_LOGFILE 'l'
291 #define VALUE_OPT_NOVIRTUALIPS 'L'
293 #define VALUE_OPT_MODIFYMMTIMER 'M'
294 #endif /* SYS_WINNT */
295 #define VALUE_OPT_NOFORK 'n'
296 #define VALUE_OPT_NICE 'N'
297 #define VALUE_OPT_PIDFILE 'p'
298 #define VALUE_OPT_PRIORITY 'P'
299 #define OPT_VALUE_PRIORITY (DESC(PRIORITY).optArg.argInt)
300 #define VALUE_OPT_QUIT 'q'
301 #define VALUE_OPT_PROPAGATIONDELAY 'r'
302 #define VALUE_OPT_UPDATEINTERVAL 'U'
303 #define OPT_VALUE_UPDATEINTERVAL (DESC(UPDATEINTERVAL).optArg.argInt)
304 #define VALUE_OPT_STATSDIR 's'
305 #define VALUE_OPT_TRUSTEDKEY 't'
306 #define VALUE_OPT_USER 'u'
307 #define VALUE_OPT_VAR 'v'
308 #define VALUE_OPT_DVAR 'V'
309 #define VALUE_OPT_SLEW 'x'
311 #define VALUE_OPT_VERSION 'v'
312 #define VALUE_OPT_HELP '?'
313 #define VALUE_OPT_MORE_HELP '!'
315 * Interface defines not associated with particular options
317 #define ERRSKIP_OPTERR STMTS( ntpdOptions.fOptSet &= ~OPTPROC_ERRSTOP )
318 #define ERRSTOP_OPTERR STMTS( ntpdOptions.fOptSet |= OPTPROC_ERRSTOP )
319 #define RESTART_OPT(n) STMTS( \
320 ntpdOptions.curOptIdx = (n); \
321 ntpdOptions.pzCurOpt = NULL )
322 #define START_OPT RESTART_OPT(1)
323 #define USAGE(c) (*ntpdOptions.pUsageProc)( &ntpdOptions, c )
324 /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/opthead.tpl near line 360 */
328 * Declare the ntpd option descriptor.
334 extern tOptions ntpdOptions
;
339 static inline char* aoGetsText( char const* pz
) {
340 if (pz
== NULL
) return NULL
;
341 return (char*)gettext( pz
);
343 # define _(s) aoGetsText(s)
344 # else /* ENABLE_NLS */
346 # endif /* ENABLE_NLS */
352 #endif /* AUTOOPTS_NTPD_OPTS_H_GUARD */
353 /* ntpd-opts.h ends here */