/contrib/ntp/ntpd/ntpdsim-opts.c

https://bitbucket.org/freebsd/freebsd-head/ · C · 1262 lines · 936 code · 126 blank · 200 comment · 11 complexity · 5e5ffbd60227eead9c712d58842a6908 MD5 · raw file

  1. /*
  2. * EDIT THIS FILE WITH CAUTION (ntpdsim-opts.c)
  3. *
  4. * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:13 AM EST
  5. * From the definitions ntpdsim-opts.def
  6. * and the template file options
  7. *
  8. * Generated from AutoOpts 29:0:4 templates.
  9. */
  10. /*
  11. * This file was produced by an AutoOpts template. AutoOpts is a
  12. * copyrighted work. This source file is not encumbered by AutoOpts
  13. * licensing, but is provided under the licensing terms chosen by the
  14. * ntpdsim author or copyright holder. AutoOpts is licensed under
  15. * the terms of the LGPL. The redistributable library (``libopts'') is
  16. * licensed under the terms of either the LGPL or, at the users discretion,
  17. * the BSD license. See the AutoOpts and/or libopts sources for details.
  18. *
  19. * This source file is copyrighted and licensed under the following terms:
  20. *
  21. * ntpdsim copyright 1970-2009 David L. Mills and/or others - all rights reserved
  22. *
  23. * see html/copyright.html
  24. */
  25. #include <limits.h>
  26. #define OPTION_CODE_COMPILE 1
  27. #include "ntpdsim-opts.h"
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. tSCC zCopyright[] =
  32. "ntpdsim copyright (c) 1970-2009 David L. Mills and/or others, all rights reserved";
  33. tSCC zCopyrightNotice[] =
  34. /* extracted from ../include/copyright.def near line 8 */
  35. "see html/copyright.html";
  36. extern tUsageProc optionUsage;
  37. /*
  38. * global included definitions
  39. */
  40. #ifdef __windows
  41. extern int atoi(const char*);
  42. #else
  43. # include <stdlib.h>
  44. #endif
  45. #ifndef NULL
  46. # define NULL 0
  47. #endif
  48. #ifndef EXIT_SUCCESS
  49. # define EXIT_SUCCESS 0
  50. #endif
  51. #ifndef EXIT_FAILURE
  52. # define EXIT_FAILURE 1
  53. #endif
  54. /*
  55. * Ipv4 option description:
  56. */
  57. tSCC zIpv4Text[] =
  58. "Force IPv4 DNS name resolution";
  59. tSCC zIpv4_NAME[] = "IPV4";
  60. tSCC zIpv4_Name[] = "ipv4";
  61. #define IPV4_FLAGS (OPTST_DISABLED)
  62. /*
  63. * Ipv6 option description:
  64. */
  65. tSCC zIpv6Text[] =
  66. "Force IPv6 DNS name resolution";
  67. tSCC zIpv6_NAME[] = "IPV6";
  68. tSCC zIpv6_Name[] = "ipv6";
  69. #define IPV6_FLAGS (OPTST_DISABLED)
  70. /*
  71. * Authreq option description with
  72. * "Must also have options" and "Incompatible options":
  73. */
  74. tSCC zAuthreqText[] =
  75. "Require crypto authentication";
  76. tSCC zAuthreq_NAME[] = "AUTHREQ";
  77. tSCC zAuthreq_Name[] = "authreq";
  78. static const int
  79. aAuthreqCantList[] = {
  80. INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
  81. #define AUTHREQ_FLAGS (OPTST_DISABLED)
  82. /*
  83. * Authnoreq option description with
  84. * "Must also have options" and "Incompatible options":
  85. */
  86. tSCC zAuthnoreqText[] =
  87. "Do not require crypto authentication";
  88. tSCC zAuthnoreq_NAME[] = "AUTHNOREQ";
  89. tSCC zAuthnoreq_Name[] = "authnoreq";
  90. static const int
  91. aAuthnoreqCantList[] = {
  92. INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
  93. #define AUTHNOREQ_FLAGS (OPTST_DISABLED)
  94. /*
  95. * Bcastsync option description:
  96. */
  97. tSCC zBcastsyncText[] =
  98. "Allow us to sync to broadcast servers";
  99. tSCC zBcastsync_NAME[] = "BCASTSYNC";
  100. tSCC zBcastsync_Name[] = "bcastsync";
  101. #define BCASTSYNC_FLAGS (OPTST_DISABLED)
  102. /*
  103. * Simbroadcastdelay option description:
  104. */
  105. tSCC zSimbroadcastdelayText[] =
  106. "Simulator broadcast delay";
  107. tSCC zSimbroadcastdelay_NAME[] = "SIMBROADCASTDELAY";
  108. tSCC zSimbroadcastdelay_Name[] = "simbroadcastdelay";
  109. #define SIMBROADCASTDELAY_FLAGS (OPTST_DISABLED \
  110. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  111. /*
  112. * Configfile option description:
  113. */
  114. tSCC zConfigfileText[] =
  115. "configuration file name";
  116. tSCC zConfigfile_NAME[] = "CONFIGFILE";
  117. tSCC zConfigfile_Name[] = "configfile";
  118. #define CONFIGFILE_FLAGS (OPTST_DISABLED \
  119. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  120. /*
  121. * Phasenoise option description:
  122. */
  123. tSCC zPhasenoiseText[] =
  124. "Phase noise level";
  125. tSCC zPhasenoise_NAME[] = "PHASENOISE";
  126. tSCC zPhasenoise_Name[] = "phasenoise";
  127. #define PHASENOISE_FLAGS (OPTST_DISABLED \
  128. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  129. /*
  130. * Debug_Level option description:
  131. */
  132. #ifdef DEBUG
  133. tSCC zDebug_LevelText[] =
  134. "Increase output debug message level";
  135. tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
  136. tSCC zDebug_Level_Name[] = "debug-level";
  137. #define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
  138. #else /* disable Debug_Level */
  139. #define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
  140. #define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  141. #define zDebug_LevelText NULL
  142. #define zDebug_Level_NAME NULL
  143. #define zDebug_Level_Name NULL
  144. #endif /* DEBUG */
  145. /*
  146. * Set_Debug_Level option description:
  147. */
  148. #ifdef DEBUG
  149. tSCC zSet_Debug_LevelText[] =
  150. "Set the output debug message level";
  151. tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
  152. tSCC zSet_Debug_Level_Name[] = "set-debug-level";
  153. #define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
  154. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  155. #else /* disable Set_Debug_Level */
  156. #define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
  157. #define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  158. #define zSet_Debug_LevelText NULL
  159. #define zSet_Debug_Level_NAME NULL
  160. #define zSet_Debug_Level_Name NULL
  161. #endif /* DEBUG */
  162. /*
  163. * Driftfile option description:
  164. */
  165. tSCC zDriftfileText[] =
  166. "frequency drift file name";
  167. tSCC zDriftfile_NAME[] = "DRIFTFILE";
  168. tSCC zDriftfile_Name[] = "driftfile";
  169. #define DRIFTFILE_FLAGS (OPTST_DISABLED \
  170. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  171. /*
  172. * Panicgate option description:
  173. */
  174. tSCC zPanicgateText[] =
  175. "Allow the first adjustment to be Big";
  176. tSCC zPanicgate_NAME[] = "PANICGATE";
  177. tSCC zPanicgate_Name[] = "panicgate";
  178. #define PANICGATE_FLAGS (OPTST_DISABLED)
  179. /*
  180. * Simslew option description:
  181. */
  182. tSCC zSimslewText[] =
  183. "Simuator slew";
  184. tSCC zSimslew_NAME[] = "SIMSLEW";
  185. tSCC zSimslew_Name[] = "simslew";
  186. #define SIMSLEW_FLAGS (OPTST_DISABLED \
  187. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  188. /*
  189. * Jaildir option description:
  190. */
  191. tSCC zJaildirText[] =
  192. "Jail directory";
  193. tSCC zJaildir_NAME[] = "JAILDIR";
  194. tSCC zJaildir_Name[] = "jaildir";
  195. #define JAILDIR_FLAGS (OPTST_DISABLED \
  196. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  197. /*
  198. * Interface option description:
  199. */
  200. tSCC zInterfaceText[] =
  201. "Listen on interface";
  202. tSCC zInterface_NAME[] = "INTERFACE";
  203. tSCC zInterface_Name[] = "interface";
  204. #define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  205. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  206. /*
  207. * Keyfile option description:
  208. */
  209. tSCC zKeyfileText[] =
  210. "path to symmetric keys";
  211. tSCC zKeyfile_NAME[] = "KEYFILE";
  212. tSCC zKeyfile_Name[] = "keyfile";
  213. #define KEYFILE_FLAGS (OPTST_DISABLED \
  214. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  215. /*
  216. * Logfile option description:
  217. */
  218. tSCC zLogfileText[] =
  219. "path to the log file";
  220. tSCC zLogfile_NAME[] = "LOGFILE";
  221. tSCC zLogfile_Name[] = "logfile";
  222. #define LOGFILE_FLAGS (OPTST_DISABLED \
  223. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  224. /*
  225. * Novirtualips option description:
  226. */
  227. tSCC zNovirtualipsText[] =
  228. "Do not listen to virtual IPs";
  229. tSCC zNovirtualips_NAME[] = "NOVIRTUALIPS";
  230. tSCC zNovirtualips_Name[] = "novirtualips";
  231. #define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
  232. /*
  233. * Modifymmtimer option description:
  234. */
  235. #ifdef SYS_WINNT
  236. tSCC zModifymmtimerText[] =
  237. "Modify Multimedia Timer (Windows only)";
  238. tSCC zModifymmtimer_NAME[] = "MODIFYMMTIMER";
  239. tSCC zModifymmtimer_Name[] = "modifymmtimer";
  240. #define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
  241. #else /* disable Modifymmtimer */
  242. #define VALUE_OPT_MODIFYMMTIMER NO_EQUIVALENT
  243. #define MODIFYMMTIMER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  244. #define zModifymmtimerText NULL
  245. #define zModifymmtimer_NAME NULL
  246. #define zModifymmtimer_Name NULL
  247. #endif /* SYS_WINNT */
  248. /*
  249. * Nofork option description:
  250. */
  251. tSCC zNoforkText[] =
  252. "Do not fork";
  253. tSCC zNofork_NAME[] = "NOFORK";
  254. tSCC zNofork_Name[] = "nofork";
  255. #define NOFORK_FLAGS (OPTST_DISABLED)
  256. /*
  257. * Nice option description:
  258. */
  259. tSCC zNiceText[] =
  260. "Run at high priority";
  261. tSCC zNice_NAME[] = "NICE";
  262. tSCC zNice_Name[] = "nice";
  263. #define NICE_FLAGS (OPTST_DISABLED)
  264. /*
  265. * Servertime option description:
  266. */
  267. tSCC zServertimeText[] =
  268. "Server time";
  269. tSCC zServertime_NAME[] = "SERVERTIME";
  270. tSCC zServertime_Name[] = "servertime";
  271. #define SERVERTIME_FLAGS (OPTST_DISABLED \
  272. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  273. /*
  274. * Pidfile option description:
  275. */
  276. tSCC zPidfileText[] =
  277. "path to the PID file";
  278. tSCC zPidfile_NAME[] = "PIDFILE";
  279. tSCC zPidfile_Name[] = "pidfile";
  280. #define PIDFILE_FLAGS (OPTST_DISABLED \
  281. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  282. /*
  283. * Priority option description:
  284. */
  285. tSCC zPriorityText[] =
  286. "Process priority";
  287. tSCC zPriority_NAME[] = "PRIORITY";
  288. tSCC zPriority_Name[] = "priority";
  289. #define PRIORITY_FLAGS (OPTST_DISABLED \
  290. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  291. /*
  292. * Quit option description:
  293. */
  294. tSCC zQuitText[] =
  295. "Set the time and quit";
  296. tSCC zQuit_NAME[] = "QUIT";
  297. tSCC zQuit_Name[] = "quit";
  298. #define QUIT_FLAGS (OPTST_DISABLED)
  299. /*
  300. * Propagationdelay option description:
  301. */
  302. tSCC zPropagationdelayText[] =
  303. "Broadcast/propagation delay";
  304. tSCC zPropagationdelay_NAME[] = "PROPAGATIONDELAY";
  305. tSCC zPropagationdelay_Name[] = "propagationdelay";
  306. #define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
  307. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  308. /*
  309. * Updateinterval option description:
  310. */
  311. tSCC zUpdateintervalText[] =
  312. "interval in seconds between scans for new or dropped interfaces";
  313. tSCC zUpdateinterval_NAME[] = "UPDATEINTERVAL";
  314. tSCC zUpdateinterval_Name[] = "updateinterval";
  315. #define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
  316. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  317. /*
  318. * Statsdir option description:
  319. */
  320. tSCC zStatsdirText[] =
  321. "Statistics file location";
  322. tSCC zStatsdir_NAME[] = "STATSDIR";
  323. tSCC zStatsdir_Name[] = "statsdir";
  324. #define STATSDIR_FLAGS (OPTST_DISABLED \
  325. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  326. /*
  327. * Endsimtime option description:
  328. */
  329. tSCC zEndsimtimeText[] =
  330. "Simulation end time";
  331. tSCC zEndsimtime_NAME[] = "ENDSIMTIME";
  332. tSCC zEndsimtime_Name[] = "endsimtime";
  333. #define ENDSIMTIME_FLAGS (OPTST_DISABLED \
  334. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  335. /*
  336. * Trustedkey option description:
  337. */
  338. tSCC zTrustedkeyText[] =
  339. "Trusted key number";
  340. tSCC zTrustedkey_NAME[] = "TRUSTEDKEY";
  341. tSCC zTrustedkey_Name[] = "trustedkey";
  342. #define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  343. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  344. /*
  345. * Freqerr option description:
  346. */
  347. tSCC zFreqerrText[] =
  348. "Simulation frequency error";
  349. tSCC zFreqerr_NAME[] = "FREQERR";
  350. tSCC zFreqerr_Name[] = "freqerr";
  351. #define FREQERR_FLAGS (OPTST_DISABLED \
  352. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  353. /*
  354. * Walknoise option description:
  355. */
  356. tSCC zWalknoiseText[] =
  357. "Simulation random walk noise";
  358. tSCC zWalknoise_NAME[] = "WALKNOISE";
  359. tSCC zWalknoise_Name[] = "walknoise";
  360. #define WALKNOISE_FLAGS (OPTST_DISABLED \
  361. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  362. /*
  363. * User option description:
  364. */
  365. tSCC zUserText[] =
  366. "Run as userid (or userid:groupid)";
  367. tSCC zUser_NAME[] = "USER";
  368. tSCC zUser_Name[] = "user";
  369. #define USER_FLAGS (OPTST_DISABLED \
  370. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  371. /*
  372. * Var option description:
  373. */
  374. tSCC zVarText[] =
  375. "make ARG an ntp variable (RW)";
  376. tSCC zVar_NAME[] = "VAR";
  377. tSCC zVar_Name[] = "var";
  378. #define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  379. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  380. /*
  381. * Dvar option description:
  382. */
  383. tSCC zDvarText[] =
  384. "make ARG an ntp variable (RW|DEF)";
  385. tSCC zDvar_NAME[] = "DVAR";
  386. tSCC zDvar_Name[] = "dvar";
  387. #define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  388. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  389. /*
  390. * Slew option description:
  391. */
  392. tSCC zSlewText[] =
  393. "Slew up to 600 seconds";
  394. tSCC zSlew_NAME[] = "SLEW";
  395. tSCC zSlew_Name[] = "slew";
  396. #define SLEW_FLAGS (OPTST_DISABLED)
  397. /*
  398. * Ndelay option description:
  399. */
  400. tSCC zNdelayText[] =
  401. "Simulation network delay";
  402. tSCC zNdelay_NAME[] = "NDELAY";
  403. tSCC zNdelay_Name[] = "ndelay";
  404. #define NDELAY_FLAGS (OPTST_DISABLED \
  405. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  406. /*
  407. * Pdelay option description:
  408. */
  409. tSCC zPdelayText[] =
  410. "Simulation processing delay";
  411. tSCC zPdelay_NAME[] = "PDELAY";
  412. tSCC zPdelay_Name[] = "pdelay";
  413. #define PDELAY_FLAGS (OPTST_DISABLED \
  414. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  415. /*
  416. * Help/More_Help/Version option descriptions:
  417. */
  418. tSCC zHelpText[] = "Display usage information and exit";
  419. tSCC zHelp_Name[] = "help";
  420. tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
  421. tSCC zMore_Help_Name[] = "more-help";
  422. tSCC zVersionText[] = "Output version information and exit";
  423. tSCC zVersion_Name[] = "version";
  424. /*
  425. * Save/Load_Opts option description:
  426. */
  427. tSCC zSave_OptsText[] = "Save the option state to a config file";
  428. tSCC zSave_Opts_Name[] = "save-opts";
  429. tSCC zLoad_OptsText[] = "Load options from a config file";
  430. tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
  431. tSCC zNotLoad_Opts_Name[] = "no-load-opts";
  432. tSCC zNotLoad_Opts_Pfx[] = "no";
  433. #define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
  434. /*
  435. * Declare option callback procedures
  436. */
  437. #ifdef DEBUG
  438. static tOptProc doOptSet_Debug_Level;
  439. #else /* not DEBUG */
  440. # define doOptSet_Debug_Level NULL
  441. #endif /* def/not DEBUG */
  442. #if defined(TEST_NTPDSIM_OPTS)
  443. /*
  444. * Under test, omit argument processing, or call optionStackArg,
  445. * if multiple copies are allowed.
  446. */
  447. extern tOptProc
  448. optionNumericVal, optionPagedUsage, optionStackArg,
  449. optionVersionStderr;
  450. static tOptProc
  451. doUsageOpt;
  452. /*
  453. * #define map the "normal" callout procs to the test ones...
  454. */
  455. #define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
  456. #else /* NOT defined TEST_NTPDSIM_OPTS */
  457. /*
  458. * When not under test, there are different procs to use
  459. */
  460. extern tOptProc
  461. optionNumericVal, optionPagedUsage, optionPrintVersion, optionStackArg;
  462. static tOptProc
  463. doUsageOpt;
  464. /*
  465. * #define map the "normal" callout procs
  466. */
  467. #define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
  468. #define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
  469. #endif /* defined(TEST_NTPDSIM_OPTS) */
  470. #ifdef TEST_NTPDSIM_OPTS
  471. # define DOVERPROC optionVersionStderr
  472. #else
  473. # define DOVERPROC optionPrintVersion
  474. #endif /* TEST_NTPDSIM_OPTS */
  475. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  476. *
  477. * Define the Ntpdsim Option Descriptions.
  478. */
  479. static tOptDesc optDesc[ OPTION_CT ] = {
  480. { /* entry idx, value */ 0, VALUE_OPT_IPV4,
  481. /* equiv idx, value */ NO_EQUIVALENT, 0,
  482. /* equivalenced to */ NO_EQUIVALENT,
  483. /* min, max, act ct */ 0, 1, 0,
  484. /* opt state flags */ IPV4_FLAGS, 0,
  485. /* last opt argumnt */ { NULL },
  486. /* arg list/cookie */ NULL,
  487. /* must/cannot opts */ NULL, NULL,
  488. /* option proc */ NULL,
  489. /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
  490. /* disablement strs */ NULL, NULL },
  491. { /* entry idx, value */ 1, VALUE_OPT_IPV6,
  492. /* equiv idx, value */ NOLIMIT, NOLIMIT,
  493. /* equivalenced to */ INDEX_OPT_IPV4,
  494. /* min, max, act ct */ 0, 1, 0,
  495. /* opt state flags */ IPV6_FLAGS, 0,
  496. /* last opt argumnt */ { NULL },
  497. /* arg list/cookie */ NULL,
  498. /* must/cannot opts */ NULL, NULL,
  499. /* option proc */ NULL,
  500. /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
  501. /* disablement strs */ NULL, NULL },
  502. { /* entry idx, value */ 2, VALUE_OPT_AUTHREQ,
  503. /* equiv idx, value */ 2, VALUE_OPT_AUTHREQ,
  504. /* equivalenced to */ NO_EQUIVALENT,
  505. /* min, max, act ct */ 0, 1, 0,
  506. /* opt state flags */ AUTHREQ_FLAGS, 0,
  507. /* last opt argumnt */ { NULL },
  508. /* arg list/cookie */ NULL,
  509. /* must/cannot opts */ NULL, aAuthreqCantList,
  510. /* option proc */ NULL,
  511. /* desc, NAME, name */ zAuthreqText, zAuthreq_NAME, zAuthreq_Name,
  512. /* disablement strs */ NULL, NULL },
  513. { /* entry idx, value */ 3, VALUE_OPT_AUTHNOREQ,
  514. /* equiv idx, value */ 3, VALUE_OPT_AUTHNOREQ,
  515. /* equivalenced to */ NO_EQUIVALENT,
  516. /* min, max, act ct */ 0, 1, 0,
  517. /* opt state flags */ AUTHNOREQ_FLAGS, 0,
  518. /* last opt argumnt */ { NULL },
  519. /* arg list/cookie */ NULL,
  520. /* must/cannot opts */ NULL, aAuthnoreqCantList,
  521. /* option proc */ NULL,
  522. /* desc, NAME, name */ zAuthnoreqText, zAuthnoreq_NAME, zAuthnoreq_Name,
  523. /* disablement strs */ NULL, NULL },
  524. { /* entry idx, value */ 4, VALUE_OPT_BCASTSYNC,
  525. /* equiv idx, value */ 4, VALUE_OPT_BCASTSYNC,
  526. /* equivalenced to */ NO_EQUIVALENT,
  527. /* min, max, act ct */ 0, 1, 0,
  528. /* opt state flags */ BCASTSYNC_FLAGS, 0,
  529. /* last opt argumnt */ { NULL },
  530. /* arg list/cookie */ NULL,
  531. /* must/cannot opts */ NULL, NULL,
  532. /* option proc */ NULL,
  533. /* desc, NAME, name */ zBcastsyncText, zBcastsync_NAME, zBcastsync_Name,
  534. /* disablement strs */ NULL, NULL },
  535. { /* entry idx, value */ 5, VALUE_OPT_SIMBROADCASTDELAY,
  536. /* equiv idx, value */ 5, VALUE_OPT_SIMBROADCASTDELAY,
  537. /* equivalenced to */ NO_EQUIVALENT,
  538. /* min, max, act ct */ 0, 1, 0,
  539. /* opt state flags */ SIMBROADCASTDELAY_FLAGS, 0,
  540. /* last opt argumnt */ { NULL },
  541. /* arg list/cookie */ NULL,
  542. /* must/cannot opts */ NULL, NULL,
  543. /* option proc */ NULL,
  544. /* desc, NAME, name */ zSimbroadcastdelayText, zSimbroadcastdelay_NAME, zSimbroadcastdelay_Name,
  545. /* disablement strs */ NULL, NULL },
  546. { /* entry idx, value */ 6, VALUE_OPT_CONFIGFILE,
  547. /* equiv idx, value */ 6, VALUE_OPT_CONFIGFILE,
  548. /* equivalenced to */ NO_EQUIVALENT,
  549. /* min, max, act ct */ 0, 1, 0,
  550. /* opt state flags */ CONFIGFILE_FLAGS, 0,
  551. /* last opt argumnt */ { NULL },
  552. /* arg list/cookie */ NULL,
  553. /* must/cannot opts */ NULL, NULL,
  554. /* option proc */ NULL,
  555. /* desc, NAME, name */ zConfigfileText, zConfigfile_NAME, zConfigfile_Name,
  556. /* disablement strs */ NULL, NULL },
  557. { /* entry idx, value */ 7, VALUE_OPT_PHASENOISE,
  558. /* equiv idx, value */ 7, VALUE_OPT_PHASENOISE,
  559. /* equivalenced to */ NO_EQUIVALENT,
  560. /* min, max, act ct */ 0, 1, 0,
  561. /* opt state flags */ PHASENOISE_FLAGS, 0,
  562. /* last opt argumnt */ { NULL },
  563. /* arg list/cookie */ NULL,
  564. /* must/cannot opts */ NULL, NULL,
  565. /* option proc */ NULL,
  566. /* desc, NAME, name */ zPhasenoiseText, zPhasenoise_NAME, zPhasenoise_Name,
  567. /* disablement strs */ NULL, NULL },
  568. { /* entry idx, value */ 8, VALUE_OPT_DEBUG_LEVEL,
  569. /* equiv idx, value */ 8, VALUE_OPT_DEBUG_LEVEL,
  570. /* equivalenced to */ NO_EQUIVALENT,
  571. /* min, max, act ct */ 0, NOLIMIT, 0,
  572. /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
  573. /* last opt argumnt */ { NULL },
  574. /* arg list/cookie */ NULL,
  575. /* must/cannot opts */ NULL, NULL,
  576. /* option proc */ NULL,
  577. /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
  578. /* disablement strs */ NULL, NULL },
  579. { /* entry idx, value */ 9, VALUE_OPT_SET_DEBUG_LEVEL,
  580. /* equiv idx, value */ 9, VALUE_OPT_SET_DEBUG_LEVEL,
  581. /* equivalenced to */ NO_EQUIVALENT,
  582. /* min, max, act ct */ 0, NOLIMIT, 0,
  583. /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
  584. /* last opt argumnt */ { NULL },
  585. /* arg list/cookie */ NULL,
  586. /* must/cannot opts */ NULL, NULL,
  587. /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
  588. /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
  589. /* disablement strs */ NULL, NULL },
  590. { /* entry idx, value */ 10, VALUE_OPT_DRIFTFILE,
  591. /* equiv idx, value */ 10, VALUE_OPT_DRIFTFILE,
  592. /* equivalenced to */ NO_EQUIVALENT,
  593. /* min, max, act ct */ 0, 1, 0,
  594. /* opt state flags */ DRIFTFILE_FLAGS, 0,
  595. /* last opt argumnt */ { NULL },
  596. /* arg list/cookie */ NULL,
  597. /* must/cannot opts */ NULL, NULL,
  598. /* option proc */ NULL,
  599. /* desc, NAME, name */ zDriftfileText, zDriftfile_NAME, zDriftfile_Name,
  600. /* disablement strs */ NULL, NULL },
  601. { /* entry idx, value */ 11, VALUE_OPT_PANICGATE,
  602. /* equiv idx, value */ 11, VALUE_OPT_PANICGATE,
  603. /* equivalenced to */ NO_EQUIVALENT,
  604. /* min, max, act ct */ 0, 1, 0,
  605. /* opt state flags */ PANICGATE_FLAGS, 0,
  606. /* last opt argumnt */ { NULL },
  607. /* arg list/cookie */ NULL,
  608. /* must/cannot opts */ NULL, NULL,
  609. /* option proc */ NULL,
  610. /* desc, NAME, name */ zPanicgateText, zPanicgate_NAME, zPanicgate_Name,
  611. /* disablement strs */ NULL, NULL },
  612. { /* entry idx, value */ 12, VALUE_OPT_SIMSLEW,
  613. /* equiv idx, value */ 12, VALUE_OPT_SIMSLEW,
  614. /* equivalenced to */ NO_EQUIVALENT,
  615. /* min, max, act ct */ 0, 1, 0,
  616. /* opt state flags */ SIMSLEW_FLAGS, 0,
  617. /* last opt argumnt */ { NULL },
  618. /* arg list/cookie */ NULL,
  619. /* must/cannot opts */ NULL, NULL,
  620. /* option proc */ NULL,
  621. /* desc, NAME, name */ zSimslewText, zSimslew_NAME, zSimslew_Name,
  622. /* disablement strs */ NULL, NULL },
  623. { /* entry idx, value */ 13, VALUE_OPT_JAILDIR,
  624. /* equiv idx, value */ 13, VALUE_OPT_JAILDIR,
  625. /* equivalenced to */ NO_EQUIVALENT,
  626. /* min, max, act ct */ 0, 1, 0,
  627. /* opt state flags */ JAILDIR_FLAGS, 0,
  628. /* last opt argumnt */ { NULL },
  629. /* arg list/cookie */ NULL,
  630. /* must/cannot opts */ NULL, NULL,
  631. /* option proc */ NULL,
  632. /* desc, NAME, name */ zJaildirText, zJaildir_NAME, zJaildir_Name,
  633. /* disablement strs */ NULL, NULL },
  634. { /* entry idx, value */ 14, VALUE_OPT_INTERFACE,
  635. /* equiv idx, value */ 14, VALUE_OPT_INTERFACE,
  636. /* equivalenced to */ NO_EQUIVALENT,
  637. /* min, max, act ct */ 0, NOLIMIT, 0,
  638. /* opt state flags */ INTERFACE_FLAGS, 0,
  639. /* last opt argumnt */ { NULL },
  640. /* arg list/cookie */ NULL,
  641. /* must/cannot opts */ NULL, NULL,
  642. /* option proc */ optionStackArg,
  643. /* desc, NAME, name */ zInterfaceText, zInterface_NAME, zInterface_Name,
  644. /* disablement strs */ NULL, NULL },
  645. { /* entry idx, value */ 15, VALUE_OPT_KEYFILE,
  646. /* equiv idx, value */ 15, VALUE_OPT_KEYFILE,
  647. /* equivalenced to */ NO_EQUIVALENT,
  648. /* min, max, act ct */ 0, 1, 0,
  649. /* opt state flags */ KEYFILE_FLAGS, 0,
  650. /* last opt argumnt */ { NULL },
  651. /* arg list/cookie */ NULL,
  652. /* must/cannot opts */ NULL, NULL,
  653. /* option proc */ NULL,
  654. /* desc, NAME, name */ zKeyfileText, zKeyfile_NAME, zKeyfile_Name,
  655. /* disablement strs */ NULL, NULL },
  656. { /* entry idx, value */ 16, VALUE_OPT_LOGFILE,
  657. /* equiv idx, value */ 16, VALUE_OPT_LOGFILE,
  658. /* equivalenced to */ NO_EQUIVALENT,
  659. /* min, max, act ct */ 0, 1, 0,
  660. /* opt state flags */ LOGFILE_FLAGS, 0,
  661. /* last opt argumnt */ { NULL },
  662. /* arg list/cookie */ NULL,
  663. /* must/cannot opts */ NULL, NULL,
  664. /* option proc */ NULL,
  665. /* desc, NAME, name */ zLogfileText, zLogfile_NAME, zLogfile_Name,
  666. /* disablement strs */ NULL, NULL },
  667. { /* entry idx, value */ 17, VALUE_OPT_NOVIRTUALIPS,
  668. /* equiv idx, value */ 17, VALUE_OPT_NOVIRTUALIPS,
  669. /* equivalenced to */ NO_EQUIVALENT,
  670. /* min, max, act ct */ 0, 1, 0,
  671. /* opt state flags */ NOVIRTUALIPS_FLAGS, 0,
  672. /* last opt argumnt */ { NULL },
  673. /* arg list/cookie */ NULL,
  674. /* must/cannot opts */ NULL, NULL,
  675. /* option proc */ NULL,
  676. /* desc, NAME, name */ zNovirtualipsText, zNovirtualips_NAME, zNovirtualips_Name,
  677. /* disablement strs */ NULL, NULL },
  678. { /* entry idx, value */ 18, VALUE_OPT_MODIFYMMTIMER,
  679. /* equiv idx, value */ 18, VALUE_OPT_MODIFYMMTIMER,
  680. /* equivalenced to */ NO_EQUIVALENT,
  681. /* min, max, act ct */ 0, 1, 0,
  682. /* opt state flags */ MODIFYMMTIMER_FLAGS, 0,
  683. /* last opt argumnt */ { NULL },
  684. /* arg list/cookie */ NULL,
  685. /* must/cannot opts */ NULL, NULL,
  686. /* option proc */ NULL,
  687. /* desc, NAME, name */ zModifymmtimerText, zModifymmtimer_NAME, zModifymmtimer_Name,
  688. /* disablement strs */ NULL, NULL },
  689. { /* entry idx, value */ 19, VALUE_OPT_NOFORK,
  690. /* equiv idx, value */ 19, VALUE_OPT_NOFORK,
  691. /* equivalenced to */ NO_EQUIVALENT,
  692. /* min, max, act ct */ 0, 1, 0,
  693. /* opt state flags */ NOFORK_FLAGS, 0,
  694. /* last opt argumnt */ { NULL },
  695. /* arg list/cookie */ NULL,
  696. /* must/cannot opts */ NULL, NULL,
  697. /* option proc */ NULL,
  698. /* desc, NAME, name */ zNoforkText, zNofork_NAME, zNofork_Name,
  699. /* disablement strs */ NULL, NULL },
  700. { /* entry idx, value */ 20, VALUE_OPT_NICE,
  701. /* equiv idx, value */ 20, VALUE_OPT_NICE,
  702. /* equivalenced to */ NO_EQUIVALENT,
  703. /* min, max, act ct */ 0, 1, 0,
  704. /* opt state flags */ NICE_FLAGS, 0,
  705. /* last opt argumnt */ { NULL },
  706. /* arg list/cookie */ NULL,
  707. /* must/cannot opts */ NULL, NULL,
  708. /* option proc */ NULL,
  709. /* desc, NAME, name */ zNiceText, zNice_NAME, zNice_Name,
  710. /* disablement strs */ NULL, NULL },
  711. { /* entry idx, value */ 21, VALUE_OPT_SERVERTIME,
  712. /* equiv idx, value */ 21, VALUE_OPT_SERVERTIME,
  713. /* equivalenced to */ NO_EQUIVALENT,
  714. /* min, max, act ct */ 0, 1, 0,
  715. /* opt state flags */ SERVERTIME_FLAGS, 0,
  716. /* last opt argumnt */ { NULL },
  717. /* arg list/cookie */ NULL,
  718. /* must/cannot opts */ NULL, NULL,
  719. /* option proc */ NULL,
  720. /* desc, NAME, name */ zServertimeText, zServertime_NAME, zServertime_Name,
  721. /* disablement strs */ NULL, NULL },
  722. { /* entry idx, value */ 22, VALUE_OPT_PIDFILE,
  723. /* equiv idx, value */ 22, VALUE_OPT_PIDFILE,
  724. /* equivalenced to */ NO_EQUIVALENT,
  725. /* min, max, act ct */ 0, 1, 0,
  726. /* opt state flags */ PIDFILE_FLAGS, 0,
  727. /* last opt argumnt */ { NULL },
  728. /* arg list/cookie */ NULL,
  729. /* must/cannot opts */ NULL, NULL,
  730. /* option proc */ NULL,
  731. /* desc, NAME, name */ zPidfileText, zPidfile_NAME, zPidfile_Name,
  732. /* disablement strs */ NULL, NULL },
  733. { /* entry idx, value */ 23, VALUE_OPT_PRIORITY,
  734. /* equiv idx, value */ 23, VALUE_OPT_PRIORITY,
  735. /* equivalenced to */ NO_EQUIVALENT,
  736. /* min, max, act ct */ 0, 1, 0,
  737. /* opt state flags */ PRIORITY_FLAGS, 0,
  738. /* last opt argumnt */ { NULL },
  739. /* arg list/cookie */ NULL,
  740. /* must/cannot opts */ NULL, NULL,
  741. /* option proc */ optionNumericVal,
  742. /* desc, NAME, name */ zPriorityText, zPriority_NAME, zPriority_Name,
  743. /* disablement strs */ NULL, NULL },
  744. { /* entry idx, value */ 24, VALUE_OPT_QUIT,
  745. /* equiv idx, value */ 24, VALUE_OPT_QUIT,
  746. /* equivalenced to */ NO_EQUIVALENT,
  747. /* min, max, act ct */ 0, 1, 0,
  748. /* opt state flags */ QUIT_FLAGS, 0,
  749. /* last opt argumnt */ { NULL },
  750. /* arg list/cookie */ NULL,
  751. /* must/cannot opts */ NULL, NULL,
  752. /* option proc */ NULL,
  753. /* desc, NAME, name */ zQuitText, zQuit_NAME, zQuit_Name,
  754. /* disablement strs */ NULL, NULL },
  755. { /* entry idx, value */ 25, VALUE_OPT_PROPAGATIONDELAY,
  756. /* equiv idx, value */ 25, VALUE_OPT_PROPAGATIONDELAY,
  757. /* equivalenced to */ NO_EQUIVALENT,
  758. /* min, max, act ct */ 0, 1, 0,
  759. /* opt state flags */ PROPAGATIONDELAY_FLAGS, 0,
  760. /* last opt argumnt */ { NULL },
  761. /* arg list/cookie */ NULL,
  762. /* must/cannot opts */ NULL, NULL,
  763. /* option proc */ NULL,
  764. /* desc, NAME, name */ zPropagationdelayText, zPropagationdelay_NAME, zPropagationdelay_Name,
  765. /* disablement strs */ NULL, NULL },
  766. { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
  767. /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
  768. /* equivalenced to */ NO_EQUIVALENT,
  769. /* min, max, act ct */ 0, 1, 0,
  770. /* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
  771. /* last opt argumnt */ { NULL },
  772. /* arg list/cookie */ NULL,
  773. /* must/cannot opts */ NULL, NULL,
  774. /* option proc */ optionNumericVal,
  775. /* desc, NAME, name */ zUpdateintervalText, zUpdateinterval_NAME, zUpdateinterval_Name,
  776. /* disablement strs */ NULL, NULL },
  777. { /* entry idx, value */ 27, VALUE_OPT_STATSDIR,
  778. /* equiv idx, value */ 27, VALUE_OPT_STATSDIR,
  779. /* equivalenced to */ NO_EQUIVALENT,
  780. /* min, max, act ct */ 0, 1, 0,
  781. /* opt state flags */ STATSDIR_FLAGS, 0,
  782. /* last opt argumnt */ { NULL },
  783. /* arg list/cookie */ NULL,
  784. /* must/cannot opts */ NULL, NULL,
  785. /* option proc */ NULL,
  786. /* desc, NAME, name */ zStatsdirText, zStatsdir_NAME, zStatsdir_Name,
  787. /* disablement strs */ NULL, NULL },
  788. { /* entry idx, value */ 28, VALUE_OPT_ENDSIMTIME,
  789. /* equiv idx, value */ 28, VALUE_OPT_ENDSIMTIME,
  790. /* equivalenced to */ NO_EQUIVALENT,
  791. /* min, max, act ct */ 0, 1, 0,
  792. /* opt state flags */ ENDSIMTIME_FLAGS, 0,
  793. /* last opt argumnt */ { NULL },
  794. /* arg list/cookie */ NULL,
  795. /* must/cannot opts */ NULL, NULL,
  796. /* option proc */ NULL,
  797. /* desc, NAME, name */ zEndsimtimeText, zEndsimtime_NAME, zEndsimtime_Name,
  798. /* disablement strs */ NULL, NULL },
  799. { /* entry idx, value */ 29, VALUE_OPT_TRUSTEDKEY,
  800. /* equiv idx, value */ 29, VALUE_OPT_TRUSTEDKEY,
  801. /* equivalenced to */ NO_EQUIVALENT,
  802. /* min, max, act ct */ 0, NOLIMIT, 0,
  803. /* opt state flags */ TRUSTEDKEY_FLAGS, 0,
  804. /* last opt argumnt */ { NULL },
  805. /* arg list/cookie */ NULL,
  806. /* must/cannot opts */ NULL, NULL,
  807. /* option proc */ optionStackArg,
  808. /* desc, NAME, name */ zTrustedkeyText, zTrustedkey_NAME, zTrustedkey_Name,
  809. /* disablement strs */ NULL, NULL },
  810. { /* entry idx, value */ 30, VALUE_OPT_FREQERR,
  811. /* equiv idx, value */ 30, VALUE_OPT_FREQERR,
  812. /* equivalenced to */ NO_EQUIVALENT,
  813. /* min, max, act ct */ 0, 1, 0,
  814. /* opt state flags */ FREQERR_FLAGS, 0,
  815. /* last opt argumnt */ { NULL },
  816. /* arg list/cookie */ NULL,
  817. /* must/cannot opts */ NULL, NULL,
  818. /* option proc */ NULL,
  819. /* desc, NAME, name */ zFreqerrText, zFreqerr_NAME, zFreqerr_Name,
  820. /* disablement strs */ NULL, NULL },
  821. { /* entry idx, value */ 31, VALUE_OPT_WALKNOISE,
  822. /* equiv idx, value */ 31, VALUE_OPT_WALKNOISE,
  823. /* equivalenced to */ NO_EQUIVALENT,
  824. /* min, max, act ct */ 0, 1, 0,
  825. /* opt state flags */ WALKNOISE_FLAGS, 0,
  826. /* last opt argumnt */ { NULL },
  827. /* arg list/cookie */ NULL,
  828. /* must/cannot opts */ NULL, NULL,
  829. /* option proc */ NULL,
  830. /* desc, NAME, name */ zWalknoiseText, zWalknoise_NAME, zWalknoise_Name,
  831. /* disablement strs */ NULL, NULL },
  832. { /* entry idx, value */ 32, VALUE_OPT_USER,
  833. /* equiv idx, value */ 32, VALUE_OPT_USER,
  834. /* equivalenced to */ NO_EQUIVALENT,
  835. /* min, max, act ct */ 0, 1, 0,
  836. /* opt state flags */ USER_FLAGS, 0,
  837. /* last opt argumnt */ { NULL },
  838. /* arg list/cookie */ NULL,
  839. /* must/cannot opts */ NULL, NULL,
  840. /* option proc */ NULL,
  841. /* desc, NAME, name */ zUserText, zUser_NAME, zUser_Name,
  842. /* disablement strs */ NULL, NULL },
  843. { /* entry idx, value */ 33, VALUE_OPT_VAR,
  844. /* equiv idx, value */ 33, VALUE_OPT_VAR,
  845. /* equivalenced to */ NO_EQUIVALENT,
  846. /* min, max, act ct */ 0, NOLIMIT, 0,
  847. /* opt state flags */ VAR_FLAGS, 0,
  848. /* last opt argumnt */ { NULL },
  849. /* arg list/cookie */ NULL,
  850. /* must/cannot opts */ NULL, NULL,
  851. /* option proc */ optionStackArg,
  852. /* desc, NAME, name */ zVarText, zVar_NAME, zVar_Name,
  853. /* disablement strs */ NULL, NULL },
  854. { /* entry idx, value */ 34, VALUE_OPT_DVAR,
  855. /* equiv idx, value */ 34, VALUE_OPT_DVAR,
  856. /* equivalenced to */ NO_EQUIVALENT,
  857. /* min, max, act ct */ 0, NOLIMIT, 0,
  858. /* opt state flags */ DVAR_FLAGS, 0,
  859. /* last opt argumnt */ { NULL },
  860. /* arg list/cookie */ NULL,
  861. /* must/cannot opts */ NULL, NULL,
  862. /* option proc */ optionStackArg,
  863. /* desc, NAME, name */ zDvarText, zDvar_NAME, zDvar_Name,
  864. /* disablement strs */ NULL, NULL },
  865. { /* entry idx, value */ 35, VALUE_OPT_SLEW,
  866. /* equiv idx, value */ 35, VALUE_OPT_SLEW,
  867. /* equivalenced to */ NO_EQUIVALENT,
  868. /* min, max, act ct */ 0, 1, 0,
  869. /* opt state flags */ SLEW_FLAGS, 0,
  870. /* last opt argumnt */ { NULL },
  871. /* arg list/cookie */ NULL,
  872. /* must/cannot opts */ NULL, NULL,
  873. /* option proc */ NULL,
  874. /* desc, NAME, name */ zSlewText, zSlew_NAME, zSlew_Name,
  875. /* disablement strs */ NULL, NULL },
  876. { /* entry idx, value */ 36, VALUE_OPT_NDELAY,
  877. /* equiv idx, value */ 36, VALUE_OPT_NDELAY,
  878. /* equivalenced to */ NO_EQUIVALENT,
  879. /* min, max, act ct */ 0, 1, 0,
  880. /* opt state flags */ NDELAY_FLAGS, 0,
  881. /* last opt argumnt */ { NULL },
  882. /* arg list/cookie */ NULL,
  883. /* must/cannot opts */ NULL, NULL,
  884. /* option proc */ NULL,
  885. /* desc, NAME, name */ zNdelayText, zNdelay_NAME, zNdelay_Name,
  886. /* disablement strs */ NULL, NULL },
  887. { /* entry idx, value */ 37, VALUE_OPT_PDELAY,
  888. /* equiv idx, value */ 37, VALUE_OPT_PDELAY,
  889. /* equivalenced to */ NO_EQUIVALENT,
  890. /* min, max, act ct */ 0, 1, 0,
  891. /* opt state flags */ PDELAY_FLAGS, 0,
  892. /* last opt argumnt */ { NULL },
  893. /* arg list/cookie */ NULL,
  894. /* must/cannot opts */ NULL, NULL,
  895. /* option proc */ NULL,
  896. /* desc, NAME, name */ zPdelayText, zPdelay_NAME, zPdelay_Name,
  897. /* disablement strs */ NULL, NULL },
  898. #ifdef NO_OPTIONAL_OPT_ARGS
  899. # define VERSION_OPT_FLAGS OPTST_IMM | OPTST_NO_INIT
  900. #else
  901. # define VERSION_OPT_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
  902. OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
  903. #endif
  904. { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
  905. /* equiv idx value */ NO_EQUIVALENT, 0,
  906. /* equivalenced to */ NO_EQUIVALENT,
  907. /* min, max, act ct */ 0, 1, 0,
  908. /* opt state flags */ VERSION_OPT_FLAGS, 0,
  909. /* last opt argumnt */ { NULL },
  910. /* arg list/cookie */ NULL,
  911. /* must/cannot opts */ NULL, NULL,
  912. /* option proc */ DOVERPROC,
  913. /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
  914. /* disablement strs */ NULL, NULL },
  915. #undef VERSION_OPT_FLAGS
  916. { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
  917. /* equiv idx value */ NO_EQUIVALENT, 0,
  918. /* equivalenced to */ NO_EQUIVALENT,
  919. /* min, max, act ct */ 0, 1, 0,
  920. /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
  921. /* last opt argumnt */ { NULL },
  922. /* arg list/cookie */ NULL,
  923. /* must/cannot opts */ NULL, NULL,
  924. /* option proc */ doUsageOpt,
  925. /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
  926. /* disablement strs */ NULL, NULL },
  927. { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
  928. /* equiv idx value */ NO_EQUIVALENT, 0,
  929. /* equivalenced to */ NO_EQUIVALENT,
  930. /* min, max, act ct */ 0, 1, 0,
  931. /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
  932. /* last opt argumnt */ { NULL },
  933. /* arg list/cookie */ NULL,
  934. /* must/cannot opts */ NULL, NULL,
  935. /* option proc */ optionPagedUsage,
  936. /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
  937. /* disablement strs */ NULL, NULL },
  938. { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
  939. /* equiv idx value */ NO_EQUIVALENT, 0,
  940. /* equivalenced to */ NO_EQUIVALENT,
  941. /* min, max, act ct */ 0, 1, 0,
  942. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  943. | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
  944. /* last opt argumnt */ { NULL },
  945. /* arg list/cookie */ NULL,
  946. /* must/cannot opts */ NULL, NULL,
  947. /* option proc */ NULL,
  948. /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
  949. /* disablement strs */ NULL, NULL },
  950. { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
  951. /* equiv idx value */ NO_EQUIVALENT, 0,
  952. /* equivalenced to */ NO_EQUIVALENT,
  953. /* min, max, act ct */ 0, NOLIMIT, 0,
  954. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) \
  955. | OPTST_DISABLE_IMM, 0,
  956. /* last opt argumnt */ { NULL },
  957. /* arg list/cookie */ NULL,
  958. /* must/cannot opts */ NULL, NULL,
  959. /* option proc */ optionLoadOpt,
  960. /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
  961. /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
  962. };
  963. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  964. *
  965. * Define the Ntpdsim Option Environment
  966. */
  967. tSCC zPROGNAME[] = "NTPDSIM";
  968. tSCC zUsageTitle[] =
  969. "ntpdsim - NTP daemon simulation program - Ver. 4.2.4p8\n\
  970. USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
  971. tSCC zRcName[] = ".ntprc";
  972. tSCC* apzHomeList[] = {
  973. "$HOME",
  974. ".",
  975. NULL };
  976. tSCC zBugsAddr[] = "http://bugs.ntp.org, bugs@ntp.org";
  977. #define zExplain NULL
  978. tSCC zDetail[] = "\n\n";
  979. tSCC zFullVersion[] = NTPDSIM_FULL_VERSION;
  980. /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 408 */
  981. #if defined(ENABLE_NLS)
  982. # define OPTPROC_BASE OPTPROC_TRANSLATE
  983. static tOptionXlateProc translate_option_strings;
  984. #else
  985. # define OPTPROC_BASE OPTPROC_NONE
  986. # define translate_option_strings NULL
  987. #endif /* ENABLE_NLS */
  988. tOptions ntpdsimOptions = {
  989. OPTIONS_STRUCT_VERSION,
  990. 0, NULL, /* original argc + argv */
  991. ( OPTPROC_BASE
  992. + OPTPROC_ERRSTOP
  993. + OPTPROC_SHORTOPT
  994. + OPTPROC_LONGOPT
  995. + OPTPROC_NO_REQ_OPT
  996. + OPTPROC_ENVIRON
  997. + OPTPROC_NO_ARGS
  998. + OPTPROC_HAS_IMMED ),
  999. 0, NULL, /* current option index, current option */
  1000. NULL, NULL, zPROGNAME,
  1001. zRcName, zCopyright, zCopyrightNotice,
  1002. zFullVersion, apzHomeList, zUsageTitle,
  1003. zExplain, zDetail, optDesc,
  1004. zBugsAddr, /* address to send bugs to */
  1005. NULL, NULL, /* extensions/saved state */
  1006. optionUsage, /* usage procedure */
  1007. translate_option_strings, /* translation procedure */
  1008. /*
  1009. * Indexes to special options
  1010. */
  1011. { INDEX_OPT_MORE_HELP,
  1012. INDEX_OPT_SAVE_OPTS,
  1013. NO_EQUIVALENT /* index of '-#' option */,
  1014. NO_EQUIVALENT /* index of default opt */
  1015. },
  1016. 43 /* full option count */, 38 /* user option count */
  1017. };
  1018. /*
  1019. * Create the static procedure(s) declared above.
  1020. */
  1021. static void
  1022. doUsageOpt(
  1023. tOptions* pOptions,
  1024. tOptDesc* pOptDesc )
  1025. {
  1026. USAGE( EXIT_SUCCESS );
  1027. }
  1028. #if ! defined(TEST_NTPDSIM_OPTS)
  1029. /* * * * * * *
  1030. *
  1031. * For the set-debug-level option, when DEBUG is #define-d.
  1032. */
  1033. #ifdef DEBUG
  1034. static void
  1035. doOptSet_Debug_Level(
  1036. tOptions* pOptions,
  1037. tOptDesc* pOptDesc )
  1038. {
  1039. /* extracted from ../include/debug-opt.def, line 29 */
  1040. DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
  1041. }
  1042. #endif /* defined DEBUG */
  1043. #endif /* defined(TEST_NTPDSIM_OPTS) */
  1044. /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optmain.tpl near line 92 */
  1045. #if defined(TEST_NTPDSIM_OPTS) /* TEST MAIN PROCEDURE: */
  1046. int
  1047. main( int argc, char** argv )
  1048. {
  1049. int res = EXIT_SUCCESS;
  1050. (void)optionProcess( &ntpdsimOptions, argc, argv );
  1051. {
  1052. void optionPutShell( tOptions* );
  1053. optionPutShell( &ntpdsimOptions );
  1054. }
  1055. return res;
  1056. }
  1057. #endif /* defined TEST_NTPDSIM_OPTS */
  1058. /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 514 */
  1059. #if ENABLE_NLS
  1060. #include <stdio.h>
  1061. #include <stdlib.h>
  1062. #include <string.h>
  1063. #include <unistd.h>
  1064. #include <autoopts/usage-txt.h>
  1065. static char* AO_gettext( char const* pz );
  1066. static void coerce_it(void** s);
  1067. static char*
  1068. AO_gettext( char const* pz )
  1069. {
  1070. char* pzRes;
  1071. if (pz == NULL)
  1072. return NULL;
  1073. pzRes = _(pz);
  1074. if (pzRes == pz)
  1075. return pzRes;
  1076. pzRes = strdup( pzRes );
  1077. if (pzRes == NULL) {
  1078. fputs( _("No memory for duping translated strings\n"), stderr );
  1079. exit( EXIT_FAILURE );
  1080. }
  1081. return pzRes;
  1082. }
  1083. static void coerce_it(void** s) { *s = AO_gettext(*s); }
  1084. #define COERSION(_f) \
  1085. coerce_it((void*)&(ntpdsimOptions._f))
  1086. /*
  1087. * This invokes the translation code (e.g. gettext(3)).
  1088. */
  1089. static void
  1090. translate_option_strings( void )
  1091. {
  1092. /*
  1093. * Guard against re-translation. It won't work. The strings will have
  1094. * been changed by the first pass through this code. One shot only.
  1095. */
  1096. if (option_usage_text.field_ct == 0)
  1097. return;
  1098. /*
  1099. * Do the translations. The first pointer follows the field count field.
  1100. * The field count field is the size of a pointer.
  1101. */
  1102. {
  1103. char** ppz = (char**)(void*)&(option_usage_text);
  1104. int ix = option_usage_text.field_ct;
  1105. do {
  1106. ppz++;
  1107. *ppz = AO_gettext(*ppz);
  1108. } while (--ix > 0);
  1109. }
  1110. option_usage_text.field_ct = 0;
  1111. {
  1112. tOptDesc* pOD = ntpdsimOptions.pOptDesc;
  1113. int ix = ntpdsimOptions.optCt;
  1114. for (;;) {
  1115. pOD->pzText = AO_gettext(pOD->pzText);
  1116. pOD->pz_NAME = AO_gettext(pOD->pz_NAME);
  1117. pOD->pz_Name = AO_gettext(pOD->pz_Name);
  1118. pOD->pz_DisableName = AO_gettext(pOD->pz_DisableName);
  1119. pOD->pz_DisablePfx = AO_gettext(pOD->pz_DisablePfx);
  1120. if (--ix <= 0)
  1121. break;
  1122. pOD++;
  1123. }
  1124. }
  1125. COERSION(pzCopyright);
  1126. COERSION(pzCopyNotice);
  1127. COERSION(pzFullVersion);
  1128. COERSION(pzUsageTitle);
  1129. COERSION(pzExplain);
  1130. COERSION(pzDetail);
  1131. }
  1132. #endif /* ENABLE_NLS */
  1133. #ifdef __cplusplus
  1134. }
  1135. #endif
  1136. /* ntpdsim-opts.c ends here */