4 * EDIT THIS FILE WITH CAUTION (ntpdsim-opts.h)
6 * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:12 AM EST
7 * From the definitions ntpdsim-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 * ntpdsim 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 * ntpdsim 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 ntpdsim 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_NTPDSIM_OPTS_H_GUARD
35 #define AUTOOPTS_NTPDSIM_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_SIMBROADCASTDELAY
= 5,
63 INDEX_OPT_CONFIGFILE
= 6,
64 INDEX_OPT_PHASENOISE
= 7,
65 INDEX_OPT_DEBUG_LEVEL
= 8,
66 INDEX_OPT_SET_DEBUG_LEVEL
= 9,
67 INDEX_OPT_DRIFTFILE
= 10,
68 INDEX_OPT_PANICGATE
= 11,
69 INDEX_OPT_SIMSLEW
= 12,
70 INDEX_OPT_JAILDIR
= 13,
71 INDEX_OPT_INTERFACE
= 14,
72 INDEX_OPT_KEYFILE
= 15,
73 INDEX_OPT_LOGFILE
= 16,
74 INDEX_OPT_NOVIRTUALIPS
= 17,
75 INDEX_OPT_MODIFYMMTIMER
= 18,
76 INDEX_OPT_NOFORK
= 19,
78 INDEX_OPT_SERVERTIME
= 21,
79 INDEX_OPT_PIDFILE
= 22,
80 INDEX_OPT_PRIORITY
= 23,
82 INDEX_OPT_PROPAGATIONDELAY
= 25,
83 INDEX_OPT_UPDATEINTERVAL
= 26,
84 INDEX_OPT_STATSDIR
= 27,
85 INDEX_OPT_ENDSIMTIME
= 28,
86 INDEX_OPT_TRUSTEDKEY
= 29,
87 INDEX_OPT_FREQERR
= 30,
88 INDEX_OPT_WALKNOISE
= 31,
93 INDEX_OPT_NDELAY
= 36,
94 INDEX_OPT_PDELAY
= 37,
95 INDEX_OPT_VERSION
= 38,
97 INDEX_OPT_MORE_HELP
= 40,
98 INDEX_OPT_SAVE_OPTS
= 41,
99 INDEX_OPT_LOAD_OPTS
= 42
103 #define NTPDSIM_VERSION "4.2.4p8"
104 #define NTPDSIM_FULL_VERSION "ntpdsim - NTP daemon simulation program - Ver. 4.2.4p8"
107 * Interface defines for all options. Replace "n" with the UPPER_CASED
108 * option name (as in the teOptIndex enumeration above).
109 * e.g. HAVE_OPT( IPV4 )
111 #define DESC(n) (ntpdsimOptions.pOptDesc[INDEX_OPT_## n])
112 #define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
113 #define OPT_ARG(n) (DESC(n).optArg.argString)
114 #define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
115 #define COUNT_OPT(n) (DESC(n).optOccCt)
116 #define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
117 #define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
118 #define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
119 #define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
120 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
121 #define CLEAR_OPT(n) STMTS( \
122 DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
123 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
124 DESC(n).fOptState |= OPTST_DISABLED; \
125 DESC(n).optCookie = NULL )
128 * Make sure there are no #define name conflicts with the option names
130 #ifndef NO_OPTION_NAME_WARNINGS
132 # warning undefining IPV4 due to option name conflict
136 # warning undefining IPV6 due to option name conflict
140 # warning undefining AUTHREQ due to option name conflict
144 # warning undefining AUTHNOREQ due to option name conflict
148 # warning undefining BCASTSYNC due to option name conflict
151 # ifdef SIMBROADCASTDELAY
152 # warning undefining SIMBROADCASTDELAY due to option name conflict
153 # undef SIMBROADCASTDELAY
156 # warning undefining CONFIGFILE due to option name conflict
160 # warning undefining PHASENOISE due to option name conflict
164 # warning undefining DEBUG_LEVEL due to option name conflict
167 # ifdef SET_DEBUG_LEVEL
168 # warning undefining SET_DEBUG_LEVEL due to option name conflict
169 # undef SET_DEBUG_LEVEL
172 # warning undefining DRIFTFILE due to option name conflict
176 # warning undefining PANICGATE due to option name conflict
180 # warning undefining SIMSLEW due to option name conflict
184 # warning undefining JAILDIR due to option name conflict
188 # warning undefining INTERFACE due to option name conflict
192 # warning undefining KEYFILE due to option name conflict
196 # warning undefining LOGFILE due to option name conflict
200 # warning undefining NOVIRTUALIPS due to option name conflict
203 # ifdef MODIFYMMTIMER
204 # warning undefining MODIFYMMTIMER due to option name conflict
205 # undef MODIFYMMTIMER
208 # warning undefining NOFORK due to option name conflict
212 # warning undefining NICE due to option name conflict
216 # warning undefining SERVERTIME due to option name conflict
220 # warning undefining PIDFILE due to option name conflict
224 # warning undefining PRIORITY due to option name conflict
228 # warning undefining QUIT due to option name conflict
231 # ifdef PROPAGATIONDELAY
232 # warning undefining PROPAGATIONDELAY due to option name conflict
233 # undef PROPAGATIONDELAY
235 # ifdef UPDATEINTERVAL
236 # warning undefining UPDATEINTERVAL due to option name conflict
237 # undef UPDATEINTERVAL
240 # warning undefining STATSDIR due to option name conflict
244 # warning undefining ENDSIMTIME due to option name conflict
248 # warning undefining TRUSTEDKEY due to option name conflict
252 # warning undefining FREQERR due to option name conflict
256 # warning undefining WALKNOISE due to option name conflict
260 # warning undefining USER due to option name conflict
264 # warning undefining VAR due to option name conflict
268 # warning undefining DVAR due to option name conflict
272 # warning undefining SLEW due to option name conflict
276 # warning undefining NDELAY due to option name conflict
280 # warning undefining PDELAY due to option name conflict
283 #else /* NO_OPTION_NAME_WARNINGS */
289 # undef SIMBROADCASTDELAY
293 # undef SET_DEBUG_LEVEL
302 # undef MODIFYMMTIMER
309 # undef PROPAGATIONDELAY
310 # undef UPDATEINTERVAL
322 #endif /* NO_OPTION_NAME_WARNINGS */
325 * Interface defines for specific options.
327 #define VALUE_OPT_IPV4 '4'
328 #define WHICH_OPT_IPV4 (DESC(IPV4).optActualValue)
329 #define WHICH_IDX_IPV4 (DESC(IPV4).optActualIndex)
330 #define VALUE_OPT_IPV6 '6'
331 #define VALUE_OPT_AUTHREQ 'a'
332 #define VALUE_OPT_AUTHNOREQ 'A'
333 #define VALUE_OPT_BCASTSYNC 'b'
334 #define VALUE_OPT_SIMBROADCASTDELAY 'B'
335 #define VALUE_OPT_CONFIGFILE 'c'
336 #define VALUE_OPT_PHASENOISE 'C'
338 #define VALUE_OPT_DEBUG_LEVEL 'd'
341 #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
343 #define VALUE_OPT_DRIFTFILE 'f'
344 #define VALUE_OPT_PANICGATE 'g'
345 #define VALUE_OPT_SIMSLEW 'H'
346 #define VALUE_OPT_JAILDIR 'i'
347 #define VALUE_OPT_INTERFACE 'I'
348 #define VALUE_OPT_KEYFILE 'k'
349 #define VALUE_OPT_LOGFILE 'l'
350 #define VALUE_OPT_NOVIRTUALIPS 'L'
352 #define VALUE_OPT_MODIFYMMTIMER 'M'
353 #endif /* SYS_WINNT */
354 #define VALUE_OPT_NOFORK 'n'
355 #define VALUE_OPT_NICE 'N'
356 #define VALUE_OPT_SERVERTIME 'O'
357 #define VALUE_OPT_PIDFILE 'p'
358 #define VALUE_OPT_PRIORITY 'P'
359 #define OPT_VALUE_PRIORITY (DESC(PRIORITY).optArg.argInt)
360 #define VALUE_OPT_QUIT 'q'
361 #define VALUE_OPT_PROPAGATIONDELAY 'r'
362 #define VALUE_OPT_UPDATEINTERVAL 'U'
363 #define OPT_VALUE_UPDATEINTERVAL (DESC(UPDATEINTERVAL).optArg.argInt)
364 #define VALUE_OPT_STATSDIR 's'
365 #define VALUE_OPT_ENDSIMTIME 'S'
366 #define VALUE_OPT_TRUSTEDKEY 't'
367 #define VALUE_OPT_FREQERR 'T'
368 #define VALUE_OPT_WALKNOISE 'W'
369 #define VALUE_OPT_USER 'u'
370 #define VALUE_OPT_VAR 'v'
371 #define VALUE_OPT_DVAR 'V'
372 #define VALUE_OPT_SLEW 'x'
373 #define VALUE_OPT_NDELAY 'Y'
374 #define VALUE_OPT_PDELAY 'Z'
376 #define VALUE_OPT_VERSION 'v'
377 #define VALUE_OPT_HELP '?'
378 #define VALUE_OPT_MORE_HELP '!'
379 #define VALUE_OPT_SAVE_OPTS '>'
380 #define VALUE_OPT_LOAD_OPTS '<'
381 #define SET_OPT_SAVE_OPTS(a) STMTS( \
382 DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
383 DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
384 DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
386 * Interface defines not associated with particular options
388 #define ERRSKIP_OPTERR STMTS( ntpdsimOptions.fOptSet &= ~OPTPROC_ERRSTOP )
389 #define ERRSTOP_OPTERR STMTS( ntpdsimOptions.fOptSet |= OPTPROC_ERRSTOP )
390 #define RESTART_OPT(n) STMTS( \
391 ntpdsimOptions.curOptIdx = (n); \
392 ntpdsimOptions.pzCurOpt = NULL )
393 #define START_OPT RESTART_OPT(1)
394 #define USAGE(c) (*ntpdsimOptions.pUsageProc)( &ntpdsimOptions, c )
395 /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/opthead.tpl near line 360 */
399 * Declare the ntpdsim option descriptor.
405 extern tOptions ntpdsimOptions
;
410 static inline char* aoGetsText( char const* pz
) {
411 if (pz
== NULL
) return NULL
;
412 return (char*)gettext( pz
);
414 # define _(s) aoGetsText(s)
415 # else /* ENABLE_NLS */
417 # endif /* ENABLE_NLS */
423 #endif /* AUTOOPTS_NTPDSIM_OPTS_H_GUARD */
424 /* ntpdsim-opts.h ends here */