ntpd-opts.c revision 1.2
1/* $NetBSD: ntpd-opts.c,v 1.2 2014/12/19 20:43:17 christos Exp $ */ 2 3/* 4 * EDIT THIS FILE WITH CAUTION (ntpd-opts.c) 5 * 6 * It has been AutoGen-ed December 19, 2014 at 07:46:33 AM by AutoGen 5.18.5pre4 7 * From the definitions ntpd-opts.def 8 * and the template file options 9 * 10 * Generated from AutoOpts 41:0:16 templates. 11 * 12 * AutoOpts is a copyrighted work. This source file is not encumbered 13 * by AutoOpts licensing, but is provided under the licensing terms chosen 14 * by the ntpd author or copyright holder. AutoOpts is 15 * licensed under the terms of the LGPL. The redistributable library 16 * (``libopts'') is licensed under the terms of either the LGPL or, at the 17 * users discretion, the BSD license. See the AutoOpts and/or libopts sources 18 * for details. 19 * 20 * The ntpd program is copyrighted and licensed 21 * under the following terms: 22 * 23 * Copyright (C) 1970-2014 The University of Delaware, all rights reserved. 24 * This is free software. It is licensed for use, modification and 25 * redistribution under the terms of the NTP License, copies of which 26 * can be seen at: 27 * <http://ntp.org/license> 28 * <http://opensource.org/licenses/ntp-license.php> 29 * 30 * Permission to use, copy, modify, and distribute this software and its 31 * documentation for any purpose with or without fee is hereby granted, 32 * provided that the above copyright notice appears in all copies and that 33 * both the copyright notice and this permission notice appear in 34 * supporting documentation, and that the name The University of Delaware not be used in 35 * advertising or publicity pertaining to distribution of the software 36 * without specific, written prior permission. The University of Delaware makes no 37 * representations about the suitability this software for any purpose. It 38 * is provided "as is" without express or implied warranty. 39 */ 40 41#ifndef __doxygen__ 42#define OPTION_CODE_COMPILE 1 43#include "ntpd-opts.h" 44#include <sys/types.h> 45 46#include <limits.h> 47#include <stdio.h> 48#include <stdlib.h> 49 50#ifdef __cplusplus 51extern "C" { 52#endif 53extern FILE * option_usage_fp; 54#define zCopyright (ntpd_opt_strs+0) 55#define zLicenseDescrip (ntpd_opt_strs+310) 56 57/* 58 * global included definitions 59 */ 60#ifdef __windows 61 extern int atoi(const char *); 62#else 63# include <stdlib.h> 64#endif 65 66#ifdef __windows 67 extern int atoi(const char*); 68#else 69# include <stdlib.h> 70#endif 71 72#ifndef NULL 73# define NULL 0 74#endif 75 76/** 77 * static const strings for ntpd options 78 */ 79static char const ntpd_opt_strs[2999] = 80/* 0 */ "ntpd 4.2.8\n" 81 "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n" 82 "This is free software. It is licensed for use, modification and\n" 83 "redistribution under the terms of the NTP License, copies of which\n" 84 "can be seen at:\n" 85 " <http://ntp.org/license>\n" 86 " <http://opensource.org/licenses/ntp-license.php>\n\0" 87/* 310 */ "Permission to use, copy, modify, and distribute this software and its\n" 88 "documentation for any purpose with or without fee is hereby granted,\n" 89 "provided that the above copyright notice appears in all copies and that\n" 90 "both the copyright notice and this permission notice appear in supporting\n" 91 "documentation, and that the name The University of Delaware not be used in\n" 92 "advertising or publicity pertaining to distribution of the software without\n" 93 "specific, written prior permission. The University of Delaware makes no\n" 94 "representations about the suitability this software for any purpose. It is\n" 95 "provided \"as is\" without express or implied warranty.\n\0" 96/* 950 */ "Force IPv4 DNS name resolution\0" 97/* 981 */ "IPV4\0" 98/* 986 */ "ipv4\0" 99/* 991 */ "Force IPv6 DNS name resolution\0" 100/* 1022 */ "IPV6\0" 101/* 1027 */ "ipv6\0" 102/* 1032 */ "Require crypto authentication\0" 103/* 1062 */ "AUTHREQ\0" 104/* 1070 */ "authreq\0" 105/* 1078 */ "Do not require crypto authentication\0" 106/* 1115 */ "AUTHNOREQ\0" 107/* 1125 */ "authnoreq\0" 108/* 1135 */ "Allow us to sync to broadcast servers\0" 109/* 1173 */ "BCASTSYNC\0" 110/* 1183 */ "bcastsync\0" 111/* 1193 */ "configuration file name\0" 112/* 1217 */ "CONFIGFILE\0" 113/* 1228 */ "configfile\0" 114/* 1239 */ "Increase debug verbosity level\0" 115/* 1270 */ "DEBUG_LEVEL\0" 116/* 1282 */ "debug-level\0" 117/* 1294 */ "Set the debug verbosity level\0" 118/* 1324 */ "SET_DEBUG_LEVEL\0" 119/* 1340 */ "set-debug-level\0" 120/* 1356 */ "frequency drift file name\0" 121/* 1382 */ "DRIFTFILE\0" 122/* 1392 */ "driftfile\0" 123/* 1402 */ "Allow the first adjustment to be Big\0" 124/* 1439 */ "PANICGATE\0" 125/* 1449 */ "panicgate\0" 126/* 1459 */ "Jail directory\0" 127/* 1474 */ "JAILDIR\0" 128/* 1482 */ "jaildir\0" 129/* 1490 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0" 130/* 1569 */ "Listen on an interface name or address\0" 131/* 1608 */ "INTERFACE\0" 132/* 1618 */ "interface\0" 133/* 1628 */ "path to symmetric keys\0" 134/* 1651 */ "KEYFILE\0" 135/* 1659 */ "keyfile\0" 136/* 1667 */ "path to the log file\0" 137/* 1688 */ "LOGFILE\0" 138/* 1696 */ "logfile\0" 139/* 1704 */ "Do not listen to virtual interfaces\0" 140/* 1740 */ "NOVIRTUALIPS\0" 141/* 1753 */ "novirtualips\0" 142/* 1766 */ "Modify Multimedia Timer (Windows only)\0" 143/* 1805 */ "MODIFYMMTIMER\0" 144/* 1819 */ "modifymmtimer\0" 145/* 1833 */ "Do not fork\0" 146/* 1845 */ "NOFORK\0" 147/* 1852 */ "nofork\0" 148/* 1859 */ "Run at high priority\0" 149/* 1880 */ "NICE\0" 150/* 1885 */ "nice\0" 151/* 1890 */ "path to the PID file\0" 152/* 1911 */ "PIDFILE\0" 153/* 1919 */ "pidfile\0" 154/* 1927 */ "Process priority\0" 155/* 1944 */ "PRIORITY\0" 156/* 1953 */ "priority\0" 157/* 1962 */ "Set the time and quit\0" 158/* 1984 */ "QUIT\0" 159/* 1989 */ "quit\0" 160/* 1994 */ "Broadcast/propagation delay\0" 161/* 2022 */ "PROPAGATIONDELAY\0" 162/* 2039 */ "propagationdelay\0" 163/* 2056 */ "Save parsed configuration and quit\0" 164/* 2091 */ "SAVECONFIGQUIT\0" 165/* 2106 */ "saveconfigquit\0" 166/* 2121 */ "Statistics file location\0" 167/* 2146 */ "STATSDIR\0" 168/* 2155 */ "statsdir\0" 169/* 2164 */ "Trusted key number\0" 170/* 2183 */ "TRUSTEDKEY\0" 171/* 2194 */ "trustedkey\0" 172/* 2205 */ "Run as userid (or userid:groupid)\0" 173/* 2239 */ "USER\0" 174/* 2244 */ "user\0" 175/* 2249 */ "interval in seconds between scans for new or dropped interfaces\0" 176/* 2313 */ "UPDATEINTERVAL\0" 177/* 2328 */ "updateinterval\0" 178/* 2343 */ "make ARG an ntp variable (RW)\0" 179/* 2373 */ "VAR\0" 180/* 2377 */ "var\0" 181/* 2381 */ "make ARG an ntp variable (RW|DEF)\0" 182/* 2415 */ "DVAR\0" 183/* 2420 */ "dvar\0" 184/* 2425 */ "Seconds to wait for first clock sync\0" 185/* 2462 */ "WAIT_SYNC\0" 186/* 2472 */ "wait-sync\0" 187/* 2482 */ "Slew up to 600 seconds\0" 188/* 2505 */ "SLEW\0" 189/* 2510 */ "slew\0" 190/* 2515 */ "Use CPU cycle counter (Windows only)\0" 191/* 2552 */ "USEPCC\0" 192/* 2559 */ "usepcc\0" 193/* 2566 */ "Force CPU cycle counter use (Windows only)\0" 194/* 2609 */ "PCCFREQ\0" 195/* 2617 */ "pccfreq\0" 196/* 2625 */ "Register with mDNS as a NTP server\0" 197/* 2660 */ "MDNS\0" 198/* 2665 */ "mdns\0" 199/* 2670 */ "display extended usage information and exit\0" 200/* 2714 */ "help\0" 201/* 2719 */ "extended usage information passed thru pager\0" 202/* 2764 */ "more-help\0" 203/* 2774 */ "output version information and exit\0" 204/* 2810 */ "version\0" 205/* 2818 */ "NTPD\0" 206/* 2823 */ "ntpd - NTP daemon program - Ver. 4.2.8\n" 207 "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n" 208 "\t\t[ <server1> ... <serverN> ]\n\0" 209/* 2952 */ "http://bugs.ntp.org, bugs@ntp.org\0" 210/* 2986 */ "\n\0" 211/* 2988 */ "ntpd 4.2.8"; 212 213/** 214 * ipv4 option description with 215 * "Must also have options" and "Incompatible options": 216 */ 217/** Descriptive text for the ipv4 option */ 218#define IPV4_DESC (ntpd_opt_strs+950) 219/** Upper-cased name for the ipv4 option */ 220#define IPV4_NAME (ntpd_opt_strs+981) 221/** Name string for the ipv4 option */ 222#define IPV4_name (ntpd_opt_strs+986) 223/** Other options that appear in conjunction with the ipv4 option */ 224static int const aIpv4CantList[] = { 225 INDEX_OPT_IPV6, NO_EQUIVALENT }; 226/** Compiled in flag settings for the ipv4 option */ 227#define IPV4_FLAGS (OPTST_DISABLED) 228 229/** 230 * ipv6 option description with 231 * "Must also have options" and "Incompatible options": 232 */ 233/** Descriptive text for the ipv6 option */ 234#define IPV6_DESC (ntpd_opt_strs+991) 235/** Upper-cased name for the ipv6 option */ 236#define IPV6_NAME (ntpd_opt_strs+1022) 237/** Name string for the ipv6 option */ 238#define IPV6_name (ntpd_opt_strs+1027) 239/** Other options that appear in conjunction with the ipv6 option */ 240static int const aIpv6CantList[] = { 241 INDEX_OPT_IPV4, NO_EQUIVALENT }; 242/** Compiled in flag settings for the ipv6 option */ 243#define IPV6_FLAGS (OPTST_DISABLED) 244 245/** 246 * authreq option description with 247 * "Must also have options" and "Incompatible options": 248 */ 249/** Descriptive text for the authreq option */ 250#define AUTHREQ_DESC (ntpd_opt_strs+1032) 251/** Upper-cased name for the authreq option */ 252#define AUTHREQ_NAME (ntpd_opt_strs+1062) 253/** Name string for the authreq option */ 254#define AUTHREQ_name (ntpd_opt_strs+1070) 255/** Other options that appear in conjunction with the authreq option */ 256static int const aAuthreqCantList[] = { 257 INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT }; 258/** Compiled in flag settings for the authreq option */ 259#define AUTHREQ_FLAGS (OPTST_DISABLED) 260 261/** 262 * authnoreq option description with 263 * "Must also have options" and "Incompatible options": 264 */ 265/** Descriptive text for the authnoreq option */ 266#define AUTHNOREQ_DESC (ntpd_opt_strs+1078) 267/** Upper-cased name for the authnoreq option */ 268#define AUTHNOREQ_NAME (ntpd_opt_strs+1115) 269/** Name string for the authnoreq option */ 270#define AUTHNOREQ_name (ntpd_opt_strs+1125) 271/** Other options that appear in conjunction with the authnoreq option */ 272static int const aAuthnoreqCantList[] = { 273 INDEX_OPT_AUTHREQ, NO_EQUIVALENT }; 274/** Compiled in flag settings for the authnoreq option */ 275#define AUTHNOREQ_FLAGS (OPTST_DISABLED) 276 277/** 278 * bcastsync option description: 279 */ 280/** Descriptive text for the bcastsync option */ 281#define BCASTSYNC_DESC (ntpd_opt_strs+1135) 282/** Upper-cased name for the bcastsync option */ 283#define BCASTSYNC_NAME (ntpd_opt_strs+1173) 284/** Name string for the bcastsync option */ 285#define BCASTSYNC_name (ntpd_opt_strs+1183) 286/** Compiled in flag settings for the bcastsync option */ 287#define BCASTSYNC_FLAGS (OPTST_DISABLED) 288 289/** 290 * configfile option description: 291 */ 292/** Descriptive text for the configfile option */ 293#define CONFIGFILE_DESC (ntpd_opt_strs+1193) 294/** Upper-cased name for the configfile option */ 295#define CONFIGFILE_NAME (ntpd_opt_strs+1217) 296/** Name string for the configfile option */ 297#define CONFIGFILE_name (ntpd_opt_strs+1228) 298/** Compiled in flag settings for the configfile option */ 299#define CONFIGFILE_FLAGS (OPTST_DISABLED \ 300 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 301 302/** 303 * debug-level option description: 304 */ 305/** Descriptive text for the debug-level option */ 306#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1239) 307/** Upper-cased name for the debug-level option */ 308#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1270) 309/** Name string for the debug-level option */ 310#define DEBUG_LEVEL_name (ntpd_opt_strs+1282) 311/** Compiled in flag settings for the debug-level option */ 312#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) 313 314/** 315 * set-debug-level option description: 316 */ 317/** Descriptive text for the set-debug-level option */ 318#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1294) 319/** Upper-cased name for the set-debug-level option */ 320#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1324) 321/** Name string for the set-debug-level option */ 322#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1340) 323/** Compiled in flag settings for the set-debug-level option */ 324#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ 325 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 326 327/** 328 * driftfile option description: 329 */ 330/** Descriptive text for the driftfile option */ 331#define DRIFTFILE_DESC (ntpd_opt_strs+1356) 332/** Upper-cased name for the driftfile option */ 333#define DRIFTFILE_NAME (ntpd_opt_strs+1382) 334/** Name string for the driftfile option */ 335#define DRIFTFILE_name (ntpd_opt_strs+1392) 336/** Compiled in flag settings for the driftfile option */ 337#define DRIFTFILE_FLAGS (OPTST_DISABLED \ 338 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 339 340/** 341 * panicgate option description: 342 */ 343/** Descriptive text for the panicgate option */ 344#define PANICGATE_DESC (ntpd_opt_strs+1402) 345/** Upper-cased name for the panicgate option */ 346#define PANICGATE_NAME (ntpd_opt_strs+1439) 347/** Name string for the panicgate option */ 348#define PANICGATE_name (ntpd_opt_strs+1449) 349/** Compiled in flag settings for the panicgate option */ 350#define PANICGATE_FLAGS (OPTST_DISABLED) 351 352/** 353 * jaildir option description: 354 */ 355#ifdef HAVE_DROPROOT 356/** Descriptive text for the jaildir option */ 357#define JAILDIR_DESC (ntpd_opt_strs+1459) 358/** Upper-cased name for the jaildir option */ 359#define JAILDIR_NAME (ntpd_opt_strs+1474) 360/** Name string for the jaildir option */ 361#define JAILDIR_name (ntpd_opt_strs+1482) 362/** Compiled in flag settings for the jaildir option */ 363#define JAILDIR_FLAGS (OPTST_DISABLED \ 364 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 365 366#else /* disable jaildir */ 367#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 368#define JAILDIR_NAME NULL 369/** Descriptive text for the jaildir option */ 370#define JAILDIR_DESC (ntpd_opt_strs+1490) 371#define JAILDIR_name (ntpd_opt_strs+1482) 372#endif /* HAVE_DROPROOT */ 373 374/** 375 * interface option description: 376 */ 377/** Descriptive text for the interface option */ 378#define INTERFACE_DESC (ntpd_opt_strs+1569) 379/** Upper-cased name for the interface option */ 380#define INTERFACE_NAME (ntpd_opt_strs+1608) 381/** Name string for the interface option */ 382#define INTERFACE_name (ntpd_opt_strs+1618) 383/** Compiled in flag settings for the interface option */ 384#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ 385 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 386 387/** 388 * keyfile option description: 389 */ 390/** Descriptive text for the keyfile option */ 391#define KEYFILE_DESC (ntpd_opt_strs+1628) 392/** Upper-cased name for the keyfile option */ 393#define KEYFILE_NAME (ntpd_opt_strs+1651) 394/** Name string for the keyfile option */ 395#define KEYFILE_name (ntpd_opt_strs+1659) 396/** Compiled in flag settings for the keyfile option */ 397#define KEYFILE_FLAGS (OPTST_DISABLED \ 398 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 399 400/** 401 * logfile option description: 402 */ 403/** Descriptive text for the logfile option */ 404#define LOGFILE_DESC (ntpd_opt_strs+1667) 405/** Upper-cased name for the logfile option */ 406#define LOGFILE_NAME (ntpd_opt_strs+1688) 407/** Name string for the logfile option */ 408#define LOGFILE_name (ntpd_opt_strs+1696) 409/** Compiled in flag settings for the logfile option */ 410#define LOGFILE_FLAGS (OPTST_DISABLED \ 411 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 412 413/** 414 * novirtualips option description: 415 */ 416/** Descriptive text for the novirtualips option */ 417#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1704) 418/** Upper-cased name for the novirtualips option */ 419#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1740) 420/** Name string for the novirtualips option */ 421#define NOVIRTUALIPS_name (ntpd_opt_strs+1753) 422/** Compiled in flag settings for the novirtualips option */ 423#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED) 424 425/** 426 * modifymmtimer option description: 427 */ 428#ifdef SYS_WINNT 429/** Descriptive text for the modifymmtimer option */ 430#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1766) 431/** Upper-cased name for the modifymmtimer option */ 432#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1805) 433/** Name string for the modifymmtimer option */ 434#define MODIFYMMTIMER_name (ntpd_opt_strs+1819) 435/** Compiled in flag settings for the modifymmtimer option */ 436#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED) 437 438#else /* disable modifymmtimer */ 439#define MODIFYMMTIMER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 440#define MODIFYMMTIMER_NAME NULL 441#define MODIFYMMTIMER_DESC NULL 442#define MODIFYMMTIMER_name NULL 443#endif /* SYS_WINNT */ 444 445/** 446 * nofork option description with 447 * "Must also have options" and "Incompatible options": 448 */ 449/** Descriptive text for the nofork option */ 450#define NOFORK_DESC (ntpd_opt_strs+1833) 451/** Upper-cased name for the nofork option */ 452#define NOFORK_NAME (ntpd_opt_strs+1845) 453/** Name string for the nofork option */ 454#define NOFORK_name (ntpd_opt_strs+1852) 455/** Other options that appear in conjunction with the nofork option */ 456static int const aNoforkCantList[] = { 457 INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT }; 458/** Compiled in flag settings for the nofork option */ 459#define NOFORK_FLAGS (OPTST_DISABLED) 460 461/** 462 * nice option description: 463 */ 464/** Descriptive text for the nice option */ 465#define NICE_DESC (ntpd_opt_strs+1859) 466/** Upper-cased name for the nice option */ 467#define NICE_NAME (ntpd_opt_strs+1880) 468/** Name string for the nice option */ 469#define NICE_name (ntpd_opt_strs+1885) 470/** Compiled in flag settings for the nice option */ 471#define NICE_FLAGS (OPTST_DISABLED) 472 473/** 474 * pidfile option description: 475 */ 476/** Descriptive text for the pidfile option */ 477#define PIDFILE_DESC (ntpd_opt_strs+1890) 478/** Upper-cased name for the pidfile option */ 479#define PIDFILE_NAME (ntpd_opt_strs+1911) 480/** Name string for the pidfile option */ 481#define PIDFILE_name (ntpd_opt_strs+1919) 482/** Compiled in flag settings for the pidfile option */ 483#define PIDFILE_FLAGS (OPTST_DISABLED \ 484 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 485 486/** 487 * priority option description: 488 */ 489/** Descriptive text for the priority option */ 490#define PRIORITY_DESC (ntpd_opt_strs+1927) 491/** Upper-cased name for the priority option */ 492#define PRIORITY_NAME (ntpd_opt_strs+1944) 493/** Name string for the priority option */ 494#define PRIORITY_name (ntpd_opt_strs+1953) 495/** Compiled in flag settings for the priority option */ 496#define PRIORITY_FLAGS (OPTST_DISABLED \ 497 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 498 499/** 500 * quit option description with 501 * "Must also have options" and "Incompatible options": 502 */ 503/** Descriptive text for the quit option */ 504#define QUIT_DESC (ntpd_opt_strs+1962) 505/** Upper-cased name for the quit option */ 506#define QUIT_NAME (ntpd_opt_strs+1984) 507/** Name string for the quit option */ 508#define QUIT_name (ntpd_opt_strs+1989) 509/** Other options that appear in conjunction with the quit option */ 510static int const aQuitCantList[] = { 511 INDEX_OPT_SAVECONFIGQUIT, 512 INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT }; 513/** Compiled in flag settings for the quit option */ 514#define QUIT_FLAGS (OPTST_DISABLED) 515 516/** 517 * propagationdelay option description: 518 */ 519/** Descriptive text for the propagationdelay option */ 520#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+1994) 521/** Upper-cased name for the propagationdelay option */ 522#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2022) 523/** Name string for the propagationdelay option */ 524#define PROPAGATIONDELAY_name (ntpd_opt_strs+2039) 525/** Compiled in flag settings for the propagationdelay option */ 526#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \ 527 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 528 529/** 530 * saveconfigquit option description with 531 * "Must also have options" and "Incompatible options": 532 */ 533#ifdef SAVECONFIG 534/** Descriptive text for the saveconfigquit option */ 535#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2056) 536/** Upper-cased name for the saveconfigquit option */ 537#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2091) 538/** Name string for the saveconfigquit option */ 539#define SAVECONFIGQUIT_name (ntpd_opt_strs+2106) 540/** Other options that appear in conjunction with the saveconfigquit option */ 541static int const aSaveconfigquitCantList[] = { 542 INDEX_OPT_QUIT, 543 INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT }; 544/** Compiled in flag settings for the saveconfigquit option */ 545#define SAVECONFIGQUIT_FLAGS (OPTST_DISABLED \ 546 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 547 548#else /* disable saveconfigquit */ 549#define SAVECONFIGQUIT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 550#define aSaveconfigquitCantList NULL 551#define SAVECONFIGQUIT_NAME NULL 552#define SAVECONFIGQUIT_DESC NULL 553#define SAVECONFIGQUIT_name NULL 554#endif /* SAVECONFIG */ 555 556/** 557 * statsdir option description: 558 */ 559/** Descriptive text for the statsdir option */ 560#define STATSDIR_DESC (ntpd_opt_strs+2121) 561/** Upper-cased name for the statsdir option */ 562#define STATSDIR_NAME (ntpd_opt_strs+2146) 563/** Name string for the statsdir option */ 564#define STATSDIR_name (ntpd_opt_strs+2155) 565/** Compiled in flag settings for the statsdir option */ 566#define STATSDIR_FLAGS (OPTST_DISABLED \ 567 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 568 569/** 570 * trustedkey option description: 571 */ 572/** Descriptive text for the trustedkey option */ 573#define TRUSTEDKEY_DESC (ntpd_opt_strs+2164) 574/** Upper-cased name for the trustedkey option */ 575#define TRUSTEDKEY_NAME (ntpd_opt_strs+2183) 576/** Name string for the trustedkey option */ 577#define TRUSTEDKEY_name (ntpd_opt_strs+2194) 578/** Compiled in flag settings for the trustedkey option */ 579#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \ 580 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 581 582/** 583 * user option description: 584 */ 585#ifdef HAVE_DROPROOT 586/** Descriptive text for the user option */ 587#define USER_DESC (ntpd_opt_strs+2205) 588/** Upper-cased name for the user option */ 589#define USER_NAME (ntpd_opt_strs+2239) 590/** Name string for the user option */ 591#define USER_name (ntpd_opt_strs+2244) 592/** Compiled in flag settings for the user option */ 593#define USER_FLAGS (OPTST_DISABLED \ 594 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 595 596#else /* disable user */ 597#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 598#define USER_NAME NULL 599/** Descriptive text for the user option */ 600#define USER_DESC (ntpd_opt_strs+1490) 601#define USER_name (ntpd_opt_strs+2244) 602#endif /* HAVE_DROPROOT */ 603 604/** 605 * updateinterval option description: 606 */ 607/** Descriptive text for the updateinterval option */ 608#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2249) 609/** Upper-cased name for the updateinterval option */ 610#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2313) 611/** Name string for the updateinterval option */ 612#define UPDATEINTERVAL_name (ntpd_opt_strs+2328) 613/** Compiled in flag settings for the updateinterval option */ 614#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \ 615 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 616 617/** 618 * var option description: 619 */ 620/** Descriptive text for the var option */ 621#define VAR_DESC (ntpd_opt_strs+2343) 622/** Upper-cased name for the var option */ 623#define VAR_NAME (ntpd_opt_strs+2373) 624/** Name string for the var option */ 625#define VAR_name (ntpd_opt_strs+2377) 626/** Compiled in flag settings for the var option */ 627#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \ 628 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 629 630/** 631 * dvar option description: 632 */ 633/** Descriptive text for the dvar option */ 634#define DVAR_DESC (ntpd_opt_strs+2381) 635/** Upper-cased name for the dvar option */ 636#define DVAR_NAME (ntpd_opt_strs+2415) 637/** Name string for the dvar option */ 638#define DVAR_name (ntpd_opt_strs+2420) 639/** Compiled in flag settings for the dvar option */ 640#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \ 641 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 642 643/** 644 * wait-sync option description with 645 * "Must also have options" and "Incompatible options": 646 */ 647#ifdef HAVE_WORKING_FORK 648/** Descriptive text for the wait-sync option */ 649#define WAIT_SYNC_DESC (ntpd_opt_strs+2425) 650/** Upper-cased name for the wait-sync option */ 651#define WAIT_SYNC_NAME (ntpd_opt_strs+2462) 652/** Name string for the wait-sync option */ 653#define WAIT_SYNC_name (ntpd_opt_strs+2472) 654/** Other options that appear in conjunction with the wait-sync option */ 655static int const aWait_SyncCantList[] = { 656 INDEX_OPT_NOFORK, 657 INDEX_OPT_QUIT, 658 INDEX_OPT_SAVECONFIGQUIT, NO_EQUIVALENT }; 659/** Compiled in flag settings for the wait-sync option */ 660#define WAIT_SYNC_FLAGS (OPTST_DISABLED \ 661 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 662 663#else /* disable wait-sync */ 664#define WAIT_SYNC_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 665#define aWait_SyncCantList NULL 666#define WAIT_SYNC_NAME NULL 667#define WAIT_SYNC_DESC NULL 668#define WAIT_SYNC_name NULL 669#endif /* HAVE_WORKING_FORK */ 670 671/** 672 * slew option description: 673 */ 674/** Descriptive text for the slew option */ 675#define SLEW_DESC (ntpd_opt_strs+2482) 676/** Upper-cased name for the slew option */ 677#define SLEW_NAME (ntpd_opt_strs+2505) 678/** Name string for the slew option */ 679#define SLEW_name (ntpd_opt_strs+2510) 680/** Compiled in flag settings for the slew option */ 681#define SLEW_FLAGS (OPTST_DISABLED) 682 683/** 684 * usepcc option description: 685 */ 686#ifdef SYS_WINNT 687/** Descriptive text for the usepcc option */ 688#define USEPCC_DESC (ntpd_opt_strs+2515) 689/** Upper-cased name for the usepcc option */ 690#define USEPCC_NAME (ntpd_opt_strs+2552) 691/** Name string for the usepcc option */ 692#define USEPCC_name (ntpd_opt_strs+2559) 693/** Compiled in flag settings for the usepcc option */ 694#define USEPCC_FLAGS (OPTST_DISABLED) 695 696#else /* disable usepcc */ 697#define USEPCC_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 698#define USEPCC_NAME NULL 699#define USEPCC_DESC NULL 700#define USEPCC_name NULL 701#endif /* SYS_WINNT */ 702 703/** 704 * pccfreq option description: 705 */ 706#ifdef SYS_WINNT 707/** Descriptive text for the pccfreq option */ 708#define PCCFREQ_DESC (ntpd_opt_strs+2566) 709/** Upper-cased name for the pccfreq option */ 710#define PCCFREQ_NAME (ntpd_opt_strs+2609) 711/** Name string for the pccfreq option */ 712#define PCCFREQ_name (ntpd_opt_strs+2617) 713/** Compiled in flag settings for the pccfreq option */ 714#define PCCFREQ_FLAGS (OPTST_DISABLED \ 715 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 716 717#else /* disable pccfreq */ 718#define PCCFREQ_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 719#define PCCFREQ_NAME NULL 720#define PCCFREQ_DESC NULL 721#define PCCFREQ_name NULL 722#endif /* SYS_WINNT */ 723 724/** 725 * mdns option description: 726 */ 727#ifdef HAVE_DNSREGISTRATION 728/** Descriptive text for the mdns option */ 729#define MDNS_DESC (ntpd_opt_strs+2625) 730/** Upper-cased name for the mdns option */ 731#define MDNS_NAME (ntpd_opt_strs+2660) 732/** Name string for the mdns option */ 733#define MDNS_name (ntpd_opt_strs+2665) 734/** Compiled in flag settings for the mdns option */ 735#define MDNS_FLAGS (OPTST_DISABLED) 736 737#else /* disable mdns */ 738#define MDNS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 739#define MDNS_NAME NULL 740#define MDNS_DESC NULL 741#define MDNS_name NULL 742#endif /* HAVE_DNSREGISTRATION */ 743 744/* 745 * Help/More_Help/Version option descriptions: 746 */ 747#define HELP_DESC (ntpd_opt_strs+2670) 748#define HELP_name (ntpd_opt_strs+2714) 749#ifdef HAVE_WORKING_FORK 750#define MORE_HELP_DESC (ntpd_opt_strs+2719) 751#define MORE_HELP_name (ntpd_opt_strs+2764) 752#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 753#else 754#define MORE_HELP_DESC HELP_DESC 755#define MORE_HELP_name HELP_name 756#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 757#endif 758#ifdef NO_OPTIONAL_OPT_ARGS 759# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 760#else 761# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 762 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 763#endif 764#define VER_DESC (ntpd_opt_strs+2774) 765#define VER_name (ntpd_opt_strs+2810) 766/** 767 * Declare option callback procedures 768 */ 769extern tOptProc 770 ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, 771 optionNumericVal, optionPagedUsage, optionResetOpt, 772 optionStackArg, optionTimeDate, optionTimeVal, 773 optionUnstackArg, optionVendorOption; 774static tOptProc 775 doOptDebug_Level, doUsageOpt; 776#define VER_PROC ntpOptionPrintVersion 777 778/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 779/** 780 * Define the ntpd Option Descriptions. 781 * This is an array of OPTION_CT entries, one for each 782 * option that the ntpd program responds to. 783 */ 784static tOptDesc optDesc[OPTION_CT] = { 785 { /* entry idx, value */ 0, VALUE_OPT_IPV4, 786 /* equiv idx, value */ 0, VALUE_OPT_IPV4, 787 /* equivalenced to */ NO_EQUIVALENT, 788 /* min, max, act ct */ 0, 1, 0, 789 /* opt state flags */ IPV4_FLAGS, 0, 790 /* last opt argumnt */ { NULL }, /* --ipv4 */ 791 /* arg list/cookie */ NULL, 792 /* must/cannot opts */ NULL, aIpv4CantList, 793 /* option proc */ NULL, 794 /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name, 795 /* disablement strs */ NULL, NULL }, 796 797 { /* entry idx, value */ 1, VALUE_OPT_IPV6, 798 /* equiv idx, value */ 1, VALUE_OPT_IPV6, 799 /* equivalenced to */ NO_EQUIVALENT, 800 /* min, max, act ct */ 0, 1, 0, 801 /* opt state flags */ IPV6_FLAGS, 0, 802 /* last opt argumnt */ { NULL }, /* --ipv6 */ 803 /* arg list/cookie */ NULL, 804 /* must/cannot opts */ NULL, aIpv6CantList, 805 /* option proc */ NULL, 806 /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name, 807 /* disablement strs */ NULL, NULL }, 808 809 { /* entry idx, value */ 2, VALUE_OPT_AUTHREQ, 810 /* equiv idx, value */ 2, VALUE_OPT_AUTHREQ, 811 /* equivalenced to */ NO_EQUIVALENT, 812 /* min, max, act ct */ 0, 1, 0, 813 /* opt state flags */ AUTHREQ_FLAGS, 0, 814 /* last opt argumnt */ { NULL }, /* --authreq */ 815 /* arg list/cookie */ NULL, 816 /* must/cannot opts */ NULL, aAuthreqCantList, 817 /* option proc */ NULL, 818 /* desc, NAME, name */ AUTHREQ_DESC, AUTHREQ_NAME, AUTHREQ_name, 819 /* disablement strs */ NULL, NULL }, 820 821 { /* entry idx, value */ 3, VALUE_OPT_AUTHNOREQ, 822 /* equiv idx, value */ 3, VALUE_OPT_AUTHNOREQ, 823 /* equivalenced to */ NO_EQUIVALENT, 824 /* min, max, act ct */ 0, 1, 0, 825 /* opt state flags */ AUTHNOREQ_FLAGS, 0, 826 /* last opt argumnt */ { NULL }, /* --authnoreq */ 827 /* arg list/cookie */ NULL, 828 /* must/cannot opts */ NULL, aAuthnoreqCantList, 829 /* option proc */ NULL, 830 /* desc, NAME, name */ AUTHNOREQ_DESC, AUTHNOREQ_NAME, AUTHNOREQ_name, 831 /* disablement strs */ NULL, NULL }, 832 833 { /* entry idx, value */ 4, VALUE_OPT_BCASTSYNC, 834 /* equiv idx, value */ 4, VALUE_OPT_BCASTSYNC, 835 /* equivalenced to */ NO_EQUIVALENT, 836 /* min, max, act ct */ 0, 1, 0, 837 /* opt state flags */ BCASTSYNC_FLAGS, 0, 838 /* last opt argumnt */ { NULL }, /* --bcastsync */ 839 /* arg list/cookie */ NULL, 840 /* must/cannot opts */ NULL, NULL, 841 /* option proc */ NULL, 842 /* desc, NAME, name */ BCASTSYNC_DESC, BCASTSYNC_NAME, BCASTSYNC_name, 843 /* disablement strs */ NULL, NULL }, 844 845 { /* entry idx, value */ 5, VALUE_OPT_CONFIGFILE, 846 /* equiv idx, value */ 5, VALUE_OPT_CONFIGFILE, 847 /* equivalenced to */ NO_EQUIVALENT, 848 /* min, max, act ct */ 0, 1, 0, 849 /* opt state flags */ CONFIGFILE_FLAGS, 0, 850 /* last opt argumnt */ { NULL }, /* --configfile */ 851 /* arg list/cookie */ NULL, 852 /* must/cannot opts */ NULL, NULL, 853 /* option proc */ NULL, 854 /* desc, NAME, name */ CONFIGFILE_DESC, CONFIGFILE_NAME, CONFIGFILE_name, 855 /* disablement strs */ NULL, NULL }, 856 857 { /* entry idx, value */ 6, VALUE_OPT_DEBUG_LEVEL, 858 /* equiv idx, value */ 6, VALUE_OPT_DEBUG_LEVEL, 859 /* equivalenced to */ NO_EQUIVALENT, 860 /* min, max, act ct */ 0, NOLIMIT, 0, 861 /* opt state flags */ DEBUG_LEVEL_FLAGS, 0, 862 /* last opt argumnt */ { NULL }, /* --debug-level */ 863 /* arg list/cookie */ NULL, 864 /* must/cannot opts */ NULL, NULL, 865 /* option proc */ doOptDebug_Level, 866 /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, 867 /* disablement strs */ NULL, NULL }, 868 869 { /* entry idx, value */ 7, VALUE_OPT_SET_DEBUG_LEVEL, 870 /* equiv idx, value */ 7, VALUE_OPT_SET_DEBUG_LEVEL, 871 /* equivalenced to */ NO_EQUIVALENT, 872 /* min, max, act ct */ 0, NOLIMIT, 0, 873 /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0, 874 /* last opt argumnt */ { NULL }, /* --set-debug-level */ 875 /* arg list/cookie */ NULL, 876 /* must/cannot opts */ NULL, NULL, 877 /* option proc */ optionNumericVal, 878 /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name, 879 /* disablement strs */ NULL, NULL }, 880 881 { /* entry idx, value */ 8, VALUE_OPT_DRIFTFILE, 882 /* equiv idx, value */ 8, VALUE_OPT_DRIFTFILE, 883 /* equivalenced to */ NO_EQUIVALENT, 884 /* min, max, act ct */ 0, 1, 0, 885 /* opt state flags */ DRIFTFILE_FLAGS, 0, 886 /* last opt argumnt */ { NULL }, /* --driftfile */ 887 /* arg list/cookie */ NULL, 888 /* must/cannot opts */ NULL, NULL, 889 /* option proc */ NULL, 890 /* desc, NAME, name */ DRIFTFILE_DESC, DRIFTFILE_NAME, DRIFTFILE_name, 891 /* disablement strs */ NULL, NULL }, 892 893 { /* entry idx, value */ 9, VALUE_OPT_PANICGATE, 894 /* equiv idx, value */ 9, VALUE_OPT_PANICGATE, 895 /* equivalenced to */ NO_EQUIVALENT, 896 /* min, max, act ct */ 0, NOLIMIT, 0, 897 /* opt state flags */ PANICGATE_FLAGS, 0, 898 /* last opt argumnt */ { NULL }, /* --panicgate */ 899 /* arg list/cookie */ NULL, 900 /* must/cannot opts */ NULL, NULL, 901 /* option proc */ NULL, 902 /* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name, 903 /* disablement strs */ NULL, NULL }, 904 905 { /* entry idx, value */ 10, VALUE_OPT_JAILDIR, 906 /* equiv idx, value */ 10, VALUE_OPT_JAILDIR, 907 /* equivalenced to */ NO_EQUIVALENT, 908 /* min, max, act ct */ 0, 1, 0, 909 /* opt state flags */ JAILDIR_FLAGS, 0, 910 /* last opt argumnt */ { NULL }, /* --jaildir */ 911 /* arg list/cookie */ NULL, 912 /* must/cannot opts */ NULL, NULL, 913 /* option proc */ NULL, 914 /* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name, 915 /* disablement strs */ NULL, NULL }, 916 917 { /* entry idx, value */ 11, VALUE_OPT_INTERFACE, 918 /* equiv idx, value */ 11, VALUE_OPT_INTERFACE, 919 /* equivalenced to */ NO_EQUIVALENT, 920 /* min, max, act ct */ 0, NOLIMIT, 0, 921 /* opt state flags */ INTERFACE_FLAGS, 0, 922 /* last opt argumnt */ { NULL }, /* --interface */ 923 /* arg list/cookie */ NULL, 924 /* must/cannot opts */ NULL, NULL, 925 /* option proc */ optionStackArg, 926 /* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name, 927 /* disablement strs */ NULL, NULL }, 928 929 { /* entry idx, value */ 12, VALUE_OPT_KEYFILE, 930 /* equiv idx, value */ 12, VALUE_OPT_KEYFILE, 931 /* equivalenced to */ NO_EQUIVALENT, 932 /* min, max, act ct */ 0, 1, 0, 933 /* opt state flags */ KEYFILE_FLAGS, 0, 934 /* last opt argumnt */ { NULL }, /* --keyfile */ 935 /* arg list/cookie */ NULL, 936 /* must/cannot opts */ NULL, NULL, 937 /* option proc */ NULL, 938 /* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name, 939 /* disablement strs */ NULL, NULL }, 940 941 { /* entry idx, value */ 13, VALUE_OPT_LOGFILE, 942 /* equiv idx, value */ 13, VALUE_OPT_LOGFILE, 943 /* equivalenced to */ NO_EQUIVALENT, 944 /* min, max, act ct */ 0, 1, 0, 945 /* opt state flags */ LOGFILE_FLAGS, 0, 946 /* last opt argumnt */ { NULL }, /* --logfile */ 947 /* arg list/cookie */ NULL, 948 /* must/cannot opts */ NULL, NULL, 949 /* option proc */ NULL, 950 /* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name, 951 /* disablement strs */ NULL, NULL }, 952 953 { /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS, 954 /* equiv idx, value */ 14, VALUE_OPT_NOVIRTUALIPS, 955 /* equivalenced to */ NO_EQUIVALENT, 956 /* min, max, act ct */ 0, 1, 0, 957 /* opt state flags */ NOVIRTUALIPS_FLAGS, 0, 958 /* last opt argumnt */ { NULL }, /* --novirtualips */ 959 /* arg list/cookie */ NULL, 960 /* must/cannot opts */ NULL, NULL, 961 /* option proc */ NULL, 962 /* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name, 963 /* disablement strs */ NULL, NULL }, 964 965 { /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER, 966 /* equiv idx, value */ 15, VALUE_OPT_MODIFYMMTIMER, 967 /* equivalenced to */ NO_EQUIVALENT, 968 /* min, max, act ct */ 0, 1, 0, 969 /* opt state flags */ MODIFYMMTIMER_FLAGS, 0, 970 /* last opt argumnt */ { NULL }, /* --modifymmtimer */ 971 /* arg list/cookie */ NULL, 972 /* must/cannot opts */ NULL, NULL, 973 /* option proc */ NULL, 974 /* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name, 975 /* disablement strs */ NULL, NULL }, 976 977 { /* entry idx, value */ 16, VALUE_OPT_NOFORK, 978 /* equiv idx, value */ 16, VALUE_OPT_NOFORK, 979 /* equivalenced to */ NO_EQUIVALENT, 980 /* min, max, act ct */ 0, 1, 0, 981 /* opt state flags */ NOFORK_FLAGS, 0, 982 /* last opt argumnt */ { NULL }, /* --nofork */ 983 /* arg list/cookie */ NULL, 984 /* must/cannot opts */ NULL, aNoforkCantList, 985 /* option proc */ NULL, 986 /* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name, 987 /* disablement strs */ NULL, NULL }, 988 989 { /* entry idx, value */ 17, VALUE_OPT_NICE, 990 /* equiv idx, value */ 17, VALUE_OPT_NICE, 991 /* equivalenced to */ NO_EQUIVALENT, 992 /* min, max, act ct */ 0, 1, 0, 993 /* opt state flags */ NICE_FLAGS, 0, 994 /* last opt argumnt */ { NULL }, /* --nice */ 995 /* arg list/cookie */ NULL, 996 /* must/cannot opts */ NULL, NULL, 997 /* option proc */ NULL, 998 /* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name, 999 /* disablement strs */ NULL, NULL }, 1000 1001 { /* entry idx, value */ 18, VALUE_OPT_PIDFILE, 1002 /* equiv idx, value */ 18, VALUE_OPT_PIDFILE, 1003 /* equivalenced to */ NO_EQUIVALENT, 1004 /* min, max, act ct */ 0, 1, 0, 1005 /* opt state flags */ PIDFILE_FLAGS, 0, 1006 /* last opt argumnt */ { NULL }, /* --pidfile */ 1007 /* arg list/cookie */ NULL, 1008 /* must/cannot opts */ NULL, NULL, 1009 /* option proc */ NULL, 1010 /* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name, 1011 /* disablement strs */ NULL, NULL }, 1012 1013 { /* entry idx, value */ 19, VALUE_OPT_PRIORITY, 1014 /* equiv idx, value */ 19, VALUE_OPT_PRIORITY, 1015 /* equivalenced to */ NO_EQUIVALENT, 1016 /* min, max, act ct */ 0, 1, 0, 1017 /* opt state flags */ PRIORITY_FLAGS, 0, 1018 /* last opt argumnt */ { NULL }, /* --priority */ 1019 /* arg list/cookie */ NULL, 1020 /* must/cannot opts */ NULL, NULL, 1021 /* option proc */ optionNumericVal, 1022 /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, 1023 /* disablement strs */ NULL, NULL }, 1024 1025 { /* entry idx, value */ 20, VALUE_OPT_QUIT, 1026 /* equiv idx, value */ 20, VALUE_OPT_QUIT, 1027 /* equivalenced to */ NO_EQUIVALENT, 1028 /* min, max, act ct */ 0, 1, 0, 1029 /* opt state flags */ QUIT_FLAGS, 0, 1030 /* last opt argumnt */ { NULL }, /* --quit */ 1031 /* arg list/cookie */ NULL, 1032 /* must/cannot opts */ NULL, aQuitCantList, 1033 /* option proc */ NULL, 1034 /* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name, 1035 /* disablement strs */ NULL, NULL }, 1036 1037 { /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY, 1038 /* equiv idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY, 1039 /* equivalenced to */ NO_EQUIVALENT, 1040 /* min, max, act ct */ 0, 1, 0, 1041 /* opt state flags */ PROPAGATIONDELAY_FLAGS, 0, 1042 /* last opt argumnt */ { NULL }, /* --propagationdelay */ 1043 /* arg list/cookie */ NULL, 1044 /* must/cannot opts */ NULL, NULL, 1045 /* option proc */ NULL, 1046 /* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name, 1047 /* disablement strs */ NULL, NULL }, 1048 1049 { /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT, 1050 /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT, 1051 /* equivalenced to */ NO_EQUIVALENT, 1052 /* min, max, act ct */ 0, 1, 0, 1053 /* opt state flags */ SAVECONFIGQUIT_FLAGS, 0, 1054 /* last opt argumnt */ { NULL }, /* --saveconfigquit */ 1055 /* arg list/cookie */ NULL, 1056 /* must/cannot opts */ NULL, aSaveconfigquitCantList, 1057 /* option proc */ NULL, 1058 /* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name, 1059 /* disablement strs */ NULL, NULL }, 1060 1061 { /* entry idx, value */ 23, VALUE_OPT_STATSDIR, 1062 /* equiv idx, value */ 23, VALUE_OPT_STATSDIR, 1063 /* equivalenced to */ NO_EQUIVALENT, 1064 /* min, max, act ct */ 0, 1, 0, 1065 /* opt state flags */ STATSDIR_FLAGS, 0, 1066 /* last opt argumnt */ { NULL }, /* --statsdir */ 1067 /* arg list/cookie */ NULL, 1068 /* must/cannot opts */ NULL, NULL, 1069 /* option proc */ NULL, 1070 /* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name, 1071 /* disablement strs */ NULL, NULL }, 1072 1073 { /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY, 1074 /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY, 1075 /* equivalenced to */ NO_EQUIVALENT, 1076 /* min, max, act ct */ 0, NOLIMIT, 0, 1077 /* opt state flags */ TRUSTEDKEY_FLAGS, 0, 1078 /* last opt argumnt */ { NULL }, /* --trustedkey */ 1079 /* arg list/cookie */ NULL, 1080 /* must/cannot opts */ NULL, NULL, 1081 /* option proc */ optionStackArg, 1082 /* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name, 1083 /* disablement strs */ NULL, NULL }, 1084 1085 { /* entry idx, value */ 25, VALUE_OPT_USER, 1086 /* equiv idx, value */ 25, VALUE_OPT_USER, 1087 /* equivalenced to */ NO_EQUIVALENT, 1088 /* min, max, act ct */ 0, 1, 0, 1089 /* opt state flags */ USER_FLAGS, 0, 1090 /* last opt argumnt */ { NULL }, /* --user */ 1091 /* arg list/cookie */ NULL, 1092 /* must/cannot opts */ NULL, NULL, 1093 /* option proc */ NULL, 1094 /* desc, NAME, name */ USER_DESC, USER_NAME, USER_name, 1095 /* disablement strs */ NULL, NULL }, 1096 1097 { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL, 1098 /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL, 1099 /* equivalenced to */ NO_EQUIVALENT, 1100 /* min, max, act ct */ 0, 1, 0, 1101 /* opt state flags */ UPDATEINTERVAL_FLAGS, 0, 1102 /* last opt argumnt */ { NULL }, /* --updateinterval */ 1103 /* arg list/cookie */ NULL, 1104 /* must/cannot opts */ NULL, NULL, 1105 /* option proc */ optionNumericVal, 1106 /* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name, 1107 /* disablement strs */ NULL, NULL }, 1108 1109 { /* entry idx, value */ 27, VALUE_OPT_VAR, 1110 /* equiv idx, value */ 27, VALUE_OPT_VAR, 1111 /* equivalenced to */ NO_EQUIVALENT, 1112 /* min, max, act ct */ 0, NOLIMIT, 0, 1113 /* opt state flags */ VAR_FLAGS, 0, 1114 /* last opt argumnt */ { NULL }, /* --var */ 1115 /* arg list/cookie */ NULL, 1116 /* must/cannot opts */ NULL, NULL, 1117 /* option proc */ optionStackArg, 1118 /* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name, 1119 /* disablement strs */ NULL, NULL }, 1120 1121 { /* entry idx, value */ 28, VALUE_OPT_DVAR, 1122 /* equiv idx, value */ 28, VALUE_OPT_DVAR, 1123 /* equivalenced to */ NO_EQUIVALENT, 1124 /* min, max, act ct */ 0, NOLIMIT, 0, 1125 /* opt state flags */ DVAR_FLAGS, 0, 1126 /* last opt argumnt */ { NULL }, /* --dvar */ 1127 /* arg list/cookie */ NULL, 1128 /* must/cannot opts */ NULL, NULL, 1129 /* option proc */ optionStackArg, 1130 /* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name, 1131 /* disablement strs */ NULL, NULL }, 1132 1133 { /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC, 1134 /* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC, 1135 /* equivalenced to */ NO_EQUIVALENT, 1136 /* min, max, act ct */ 0, 1, 0, 1137 /* opt state flags */ WAIT_SYNC_FLAGS, 0, 1138 /* last opt argumnt */ { NULL }, /* --wait-sync */ 1139 /* arg list/cookie */ NULL, 1140 /* must/cannot opts */ NULL, aWait_SyncCantList, 1141 /* option proc */ optionNumericVal, 1142 /* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name, 1143 /* disablement strs */ NULL, NULL }, 1144 1145 { /* entry idx, value */ 30, VALUE_OPT_SLEW, 1146 /* equiv idx, value */ 30, VALUE_OPT_SLEW, 1147 /* equivalenced to */ NO_EQUIVALENT, 1148 /* min, max, act ct */ 0, 1, 0, 1149 /* opt state flags */ SLEW_FLAGS, 0, 1150 /* last opt argumnt */ { NULL }, /* --slew */ 1151 /* arg list/cookie */ NULL, 1152 /* must/cannot opts */ NULL, NULL, 1153 /* option proc */ NULL, 1154 /* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name, 1155 /* disablement strs */ NULL, NULL }, 1156 1157 { /* entry idx, value */ 31, VALUE_OPT_USEPCC, 1158 /* equiv idx, value */ 31, VALUE_OPT_USEPCC, 1159 /* equivalenced to */ NO_EQUIVALENT, 1160 /* min, max, act ct */ 0, 1, 0, 1161 /* opt state flags */ USEPCC_FLAGS, 0, 1162 /* last opt argumnt */ { NULL }, /* --usepcc */ 1163 /* arg list/cookie */ NULL, 1164 /* must/cannot opts */ NULL, NULL, 1165 /* option proc */ NULL, 1166 /* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name, 1167 /* disablement strs */ NULL, NULL }, 1168 1169 { /* entry idx, value */ 32, VALUE_OPT_PCCFREQ, 1170 /* equiv idx, value */ 32, VALUE_OPT_PCCFREQ, 1171 /* equivalenced to */ NO_EQUIVALENT, 1172 /* min, max, act ct */ 0, 1, 0, 1173 /* opt state flags */ PCCFREQ_FLAGS, 0, 1174 /* last opt argumnt */ { NULL }, /* --pccfreq */ 1175 /* arg list/cookie */ NULL, 1176 /* must/cannot opts */ NULL, NULL, 1177 /* option proc */ NULL, 1178 /* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name, 1179 /* disablement strs */ NULL, NULL }, 1180 1181 { /* entry idx, value */ 33, VALUE_OPT_MDNS, 1182 /* equiv idx, value */ 33, VALUE_OPT_MDNS, 1183 /* equivalenced to */ NO_EQUIVALENT, 1184 /* min, max, act ct */ 0, 1, 0, 1185 /* opt state flags */ MDNS_FLAGS, 0, 1186 /* last opt argumnt */ { NULL }, /* --mdns */ 1187 /* arg list/cookie */ NULL, 1188 /* must/cannot opts */ NULL, NULL, 1189 /* option proc */ NULL, 1190 /* desc, NAME, name */ MDNS_DESC, MDNS_NAME, MDNS_name, 1191 /* disablement strs */ NULL, NULL }, 1192 1193 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, 1194 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, 1195 /* equivalenced to */ NO_EQUIVALENT, 1196 /* min, max, act ct */ 0, 1, 0, 1197 /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 1198 /* last opt argumnt */ { NULL }, 1199 /* arg list/cookie */ NULL, 1200 /* must/cannot opts */ NULL, NULL, 1201 /* option proc */ VER_PROC, 1202 /* desc, NAME, name */ VER_DESC, NULL, VER_name, 1203 /* disablement strs */ NULL, NULL }, 1204 1205 1206 1207 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, 1208 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, 1209 /* equivalenced to */ NO_EQUIVALENT, 1210 /* min, max, act ct */ 0, 1, 0, 1211 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 1212 /* last opt argumnt */ { NULL }, 1213 /* arg list/cookie */ NULL, 1214 /* must/cannot opts */ NULL, NULL, 1215 /* option proc */ doUsageOpt, 1216 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 1217 /* disablement strs */ NULL, NULL }, 1218 1219 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, 1220 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, 1221 /* equivalenced to */ NO_EQUIVALENT, 1222 /* min, max, act ct */ 0, 1, 0, 1223 /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 1224 /* last opt argumnt */ { NULL }, 1225 /* arg list/cookie */ NULL, 1226 /* must/cannot opts */ NULL, NULL, 1227 /* option proc */ optionPagedUsage, 1228 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 1229 /* disablement strs */ NULL, NULL } 1230}; 1231 1232 1233/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1234/** Reference to the upper cased version of ntpd. */ 1235#define zPROGNAME (ntpd_opt_strs+2818) 1236/** Reference to the title line for ntpd usage. */ 1237#define zUsageTitle (ntpd_opt_strs+2823) 1238/** There is no ntpd configuration file. */ 1239#define zRcName NULL 1240/** There are no directories to search for ntpd config files. */ 1241#define apzHomeList NULL 1242/** The ntpd program bug email address. */ 1243#define zBugsAddr (ntpd_opt_strs+2952) 1244/** Clarification/explanation of what ntpd does. */ 1245#define zExplain (ntpd_opt_strs+2986) 1246/** Extra detail explaining what ntpd does. */ 1247#define zDetail (NULL) 1248/** The full version string for ntpd. */ 1249#define zFullVersion (ntpd_opt_strs+2988) 1250/* extracted from optcode.tlib near line 364 */ 1251 1252#if defined(ENABLE_NLS) 1253# define OPTPROC_BASE OPTPROC_TRANSLATE 1254 static tOptionXlateProc translate_option_strings; 1255#else 1256# define OPTPROC_BASE OPTPROC_NONE 1257# define translate_option_strings NULL 1258#endif /* ENABLE_NLS */ 1259 1260#define ntpd_full_usage (NULL) 1261#define ntpd_short_usage (NULL) 1262 1263#endif /* not defined __doxygen__ */ 1264 1265/* 1266 * Create the static procedure(s) declared above. 1267 */ 1268/** 1269 * The callout function that invokes the optionUsage function. 1270 * 1271 * @param[in] opts the AutoOpts option description structure 1272 * @param[in] od the descriptor for the "help" (usage) option. 1273 * @noreturn 1274 */ 1275static void 1276doUsageOpt(tOptions * opts, tOptDesc * od) 1277{ 1278 int ex_code; 1279 ex_code = NTPD_EXIT_SUCCESS; 1280 optionUsage(&ntpdOptions, ex_code); 1281 /* NOTREACHED */ 1282 exit(1); 1283 (void)opts; 1284 (void)od; 1285} 1286 1287/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1288/** 1289 * Code to handle the debug-level option. 1290 * 1291 * @param[in] pOptions the ntpd options data structure 1292 * @param[in,out] pOptDesc the option descriptor for this option. 1293 */ 1294static void 1295doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc) 1296{ 1297 /* 1298 * Be sure the flag-code[0] handles special values for the options pointer 1299 * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit 1300 * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to 1301 * reset its state. 1302 */ 1303 /* extracted from debug-opt.def, line 15 */ 1304OPT_VALUE_SET_DEBUG_LEVEL++; 1305 (void)pOptDesc; 1306 (void)pOptions; 1307} 1308/* extracted from optmain.tlib near line 1245 */ 1309 1310/** 1311 * The directory containing the data associated with ntpd. 1312 */ 1313#ifndef PKGDATADIR 1314# define PKGDATADIR "" 1315#endif 1316 1317/** 1318 * Information about the person or institution that packaged ntpd 1319 * for the current distribution. 1320 */ 1321#ifndef WITH_PACKAGER 1322# define ntpd_packager_info NULL 1323#else 1324/** Packager information for ntpd. */ 1325static char const ntpd_packager_info[] = 1326 "Packaged by " WITH_PACKAGER 1327 1328# ifdef WITH_PACKAGER_VERSION 1329 " ("WITH_PACKAGER_VERSION")" 1330# endif 1331 1332# ifdef WITH_PACKAGER_BUG_REPORTS 1333 "\nReport ntpd bugs to " WITH_PACKAGER_BUG_REPORTS 1334# endif 1335 "\n"; 1336#endif 1337#ifndef __doxygen__ 1338 1339#endif /* __doxygen__ */ 1340/** 1341 * The option definitions for ntpd. The one structure that 1342 * binds them all. 1343 */ 1344tOptions ntpdOptions = { 1345 OPTIONS_STRUCT_VERSION, 1346 0, NULL, /* original argc + argv */ 1347 ( OPTPROC_BASE 1348 + OPTPROC_ERRSTOP 1349 + OPTPROC_SHORTOPT 1350 + OPTPROC_LONGOPT 1351 + OPTPROC_NO_REQ_OPT 1352 + OPTPROC_ENVIRON 1353 + OPTPROC_MISUSE ), 1354 0, NULL, /* current option index, current option */ 1355 NULL, NULL, zPROGNAME, 1356 zRcName, zCopyright, zLicenseDescrip, 1357 zFullVersion, apzHomeList, zUsageTitle, 1358 zExplain, zDetail, optDesc, 1359 zBugsAddr, /* address to send bugs to */ 1360 NULL, NULL, /* extensions/saved state */ 1361 optionUsage, /* usage procedure */ 1362 translate_option_strings, /* translation procedure */ 1363 /* 1364 * Indexes to special options 1365 */ 1366 { INDEX_OPT_MORE_HELP, /* more-help option index */ 1367 NO_EQUIVALENT, /* save option index */ 1368 NO_EQUIVALENT, /* '-#' option index */ 1369 NO_EQUIVALENT /* index of default opt */ 1370 }, 1371 37 /* full option count */, 34 /* user option count */, 1372 ntpd_full_usage, ntpd_short_usage, 1373 NULL, NULL, 1374 PKGDATADIR, ntpd_packager_info 1375}; 1376 1377#if ENABLE_NLS 1378/** 1379 * This code is designed to translate translatable option text for the 1380 * ntpd program. These translations happen upon entry 1381 * to optionProcess(). 1382 */ 1383#include <stdio.h> 1384#include <stdlib.h> 1385#include <string.h> 1386#include <unistd.h> 1387#ifdef HAVE_DCGETTEXT 1388# include <gettext.h> 1389#endif 1390#include <autoopts/usage-txt.h> 1391 1392static char * AO_gettext(char const * pz); 1393static void coerce_it(void ** s); 1394 1395/** 1396 * AutoGen specific wrapper function for gettext. It relies on the macro _() 1397 * to convert from English to the target language, then strdup-duplicates the 1398 * result string. It tries the "libopts" domain first, then whatever has been 1399 * set via the \a textdomain(3) call. 1400 * 1401 * @param[in] pz the input text used as a lookup key. 1402 * @returns the translated text (if there is one), 1403 * or the original text (if not). 1404 */ 1405static char * 1406AO_gettext(char const * pz) 1407{ 1408 char * res; 1409 if (pz == NULL) 1410 return NULL; 1411#ifdef HAVE_DCGETTEXT 1412 /* 1413 * While processing the option_xlateable_txt data, try to use the 1414 * "libopts" domain. Once we switch to the option descriptor data, 1415 * do *not* use that domain. 1416 */ 1417 if (option_xlateable_txt.field_ct != 0) { 1418 res = dgettext("libopts", pz); 1419 if (res == pz) 1420 res = (char *)(void *)_(pz); 1421 } else 1422 res = (char *)(void *)_(pz); 1423#else 1424 res = (char *)(void *)_(pz); 1425#endif 1426 if (res == pz) 1427 return res; 1428 res = strdup(res); 1429 if (res == NULL) { 1430 fputs(_("No memory for duping translated strings\n"), stderr); 1431 exit(NTPD_EXIT_FAILURE); 1432 } 1433 return res; 1434} 1435 1436/** 1437 * All the pointers we use are marked "* const", but they are stored in 1438 * writable memory. Coerce the mutability and set the pointer. 1439 */ 1440static void coerce_it(void ** s) { *s = AO_gettext(*s); 1441} 1442 1443/** 1444 * Translate all the translatable strings in the ntpdOptions 1445 * structure defined above. This is done only once. 1446 */ 1447static void 1448translate_option_strings(void) 1449{ 1450 tOptions * const opts = &ntpdOptions; 1451 1452 /* 1453 * Guard against re-translation. It won't work. The strings will have 1454 * been changed by the first pass through this code. One shot only. 1455 */ 1456 if (option_xlateable_txt.field_ct != 0) { 1457 /* 1458 * Do the translations. The first pointer follows the field count 1459 * field. The field count field is the size of a pointer. 1460 */ 1461 char ** ppz = (char**)(void*)&(option_xlateable_txt); 1462 int ix = option_xlateable_txt.field_ct; 1463 1464 do { 1465 ppz++; /* skip over field_ct */ 1466 *ppz = AO_gettext(*ppz); 1467 } while (--ix > 0); 1468 /* prevent re-translation and disable "libopts" domain lookup */ 1469 option_xlateable_txt.field_ct = 0; 1470 1471 coerce_it((void*)&(opts->pzCopyright)); 1472 coerce_it((void*)&(opts->pzCopyNotice)); 1473 coerce_it((void*)&(opts->pzFullVersion)); 1474 coerce_it((void*)&(opts->pzUsageTitle)); 1475 coerce_it((void*)&(opts->pzExplain)); 1476 coerce_it((void*)&(opts->pzDetail)); 1477 { 1478 tOptDesc * od = opts->pOptDesc; 1479 for (ix = opts->optCt; ix > 0; ix--, od++) 1480 coerce_it((void*)&(od->pzText)); 1481 } 1482 } 1483} 1484#endif /* ENABLE_NLS */ 1485 1486#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 1487/** I18N function strictly for xgettext. Do not compile. */ 1488static void bogus_function(void) { 1489 /* TRANSLATORS: 1490 1491 The following dummy function was crated solely so that xgettext can 1492 extract the correct strings. These strings are actually referenced 1493 by a field name in the ntpdOptions structure noted in the 1494 comments below. The literal text is defined in ntpd_opt_strs. 1495 1496 NOTE: the strings below are segmented with respect to the source string 1497 ntpd_opt_strs. The strings above are handed off for translation 1498 at run time a paragraph at a time. Consequently, they are presented here 1499 for translation a paragraph at a time. 1500 1501 ALSO: often the description for an option will reference another option 1502 by name. These are set off with apostrophe quotes (I hope). Do not 1503 translate option names. 1504 */ 1505 /* referenced via ntpdOptions.pzCopyright */ 1506 puts(_("ntpd 4.2.8\n\ 1507Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\ 1508This is free software. It is licensed for use, modification and\n\ 1509redistribution under the terms of the NTP License, copies of which\n\ 1510can be seen at:\n")); 1511 puts(_(" <http://ntp.org/license>\n\ 1512 <http://opensource.org/licenses/ntp-license.php>\n")); 1513 1514 /* referenced via ntpdOptions.pzCopyNotice */ 1515 puts(_("Permission to use, copy, modify, and distribute this software and its\n\ 1516documentation for any purpose with or without fee is hereby granted,\n\ 1517provided that the above copyright notice appears in all copies and that\n\ 1518both the copyright notice and this permission notice appear in supporting\n\ 1519documentation, and that the name The University of Delaware not be used in\n\ 1520advertising or publicity pertaining to distribution of the software without\n\ 1521specific, written prior permission. The University of Delaware makes no\n\ 1522representations about the suitability this software for any purpose. It is\n\ 1523provided \"as is\" without express or implied warranty.\n")); 1524 1525 /* referenced via ntpdOptions.pOptDesc->pzText */ 1526 puts(_("Force IPv4 DNS name resolution")); 1527 1528 /* referenced via ntpdOptions.pOptDesc->pzText */ 1529 puts(_("Force IPv6 DNS name resolution")); 1530 1531 /* referenced via ntpdOptions.pOptDesc->pzText */ 1532 puts(_("Require crypto authentication")); 1533 1534 /* referenced via ntpdOptions.pOptDesc->pzText */ 1535 puts(_("Do not require crypto authentication")); 1536 1537 /* referenced via ntpdOptions.pOptDesc->pzText */ 1538 puts(_("Allow us to sync to broadcast servers")); 1539 1540 /* referenced via ntpdOptions.pOptDesc->pzText */ 1541 puts(_("configuration file name")); 1542 1543 /* referenced via ntpdOptions.pOptDesc->pzText */ 1544 puts(_("Increase debug verbosity level")); 1545 1546 /* referenced via ntpdOptions.pOptDesc->pzText */ 1547 puts(_("Set the debug verbosity level")); 1548 1549 /* referenced via ntpdOptions.pOptDesc->pzText */ 1550 puts(_("frequency drift file name")); 1551 1552 /* referenced via ntpdOptions.pOptDesc->pzText */ 1553 puts(_("Allow the first adjustment to be Big")); 1554 1555 /* referenced via ntpdOptions.pOptDesc->pzText */ 1556 puts(_("Jail directory")); 1557 1558 /* referenced via ntpdOptions.pOptDesc->pzText */ 1559 puts(_("built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs")); 1560 1561 /* referenced via ntpdOptions.pOptDesc->pzText */ 1562 puts(_("Listen on an interface name or address")); 1563 1564 /* referenced via ntpdOptions.pOptDesc->pzText */ 1565 puts(_("path to symmetric keys")); 1566 1567 /* referenced via ntpdOptions.pOptDesc->pzText */ 1568 puts(_("path to the log file")); 1569 1570 /* referenced via ntpdOptions.pOptDesc->pzText */ 1571 puts(_("Do not listen to virtual interfaces")); 1572 1573 /* referenced via ntpdOptions.pOptDesc->pzText */ 1574 puts(_("Modify Multimedia Timer (Windows only)")); 1575 1576 /* referenced via ntpdOptions.pOptDesc->pzText */ 1577 puts(_("Do not fork")); 1578 1579 /* referenced via ntpdOptions.pOptDesc->pzText */ 1580 puts(_("Run at high priority")); 1581 1582 /* referenced via ntpdOptions.pOptDesc->pzText */ 1583 puts(_("path to the PID file")); 1584 1585 /* referenced via ntpdOptions.pOptDesc->pzText */ 1586 puts(_("Process priority")); 1587 1588 /* referenced via ntpdOptions.pOptDesc->pzText */ 1589 puts(_("Set the time and quit")); 1590 1591 /* referenced via ntpdOptions.pOptDesc->pzText */ 1592 puts(_("Broadcast/propagation delay")); 1593 1594 /* referenced via ntpdOptions.pOptDesc->pzText */ 1595 puts(_("Save parsed configuration and quit")); 1596 1597 /* referenced via ntpdOptions.pOptDesc->pzText */ 1598 puts(_("Statistics file location")); 1599 1600 /* referenced via ntpdOptions.pOptDesc->pzText */ 1601 puts(_("Trusted key number")); 1602 1603 /* referenced via ntpdOptions.pOptDesc->pzText */ 1604 puts(_("Run as userid (or userid:groupid)")); 1605 1606 /* referenced via ntpdOptions.pOptDesc->pzText */ 1607 puts(_("built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs")); 1608 1609 /* referenced via ntpdOptions.pOptDesc->pzText */ 1610 puts(_("interval in seconds between scans for new or dropped interfaces")); 1611 1612 /* referenced via ntpdOptions.pOptDesc->pzText */ 1613 puts(_("make ARG an ntp variable (RW)")); 1614 1615 /* referenced via ntpdOptions.pOptDesc->pzText */ 1616 puts(_("make ARG an ntp variable (RW|DEF)")); 1617 1618 /* referenced via ntpdOptions.pOptDesc->pzText */ 1619 puts(_("Seconds to wait for first clock sync")); 1620 1621 /* referenced via ntpdOptions.pOptDesc->pzText */ 1622 puts(_("Slew up to 600 seconds")); 1623 1624 /* referenced via ntpdOptions.pOptDesc->pzText */ 1625 puts(_("Use CPU cycle counter (Windows only)")); 1626 1627 /* referenced via ntpdOptions.pOptDesc->pzText */ 1628 puts(_("Force CPU cycle counter use (Windows only)")); 1629 1630 /* referenced via ntpdOptions.pOptDesc->pzText */ 1631 puts(_("Register with mDNS as a NTP server")); 1632 1633 /* referenced via ntpdOptions.pOptDesc->pzText */ 1634 puts(_("display extended usage information and exit")); 1635 1636 /* referenced via ntpdOptions.pOptDesc->pzText */ 1637 puts(_("extended usage information passed thru pager")); 1638 1639 /* referenced via ntpdOptions.pOptDesc->pzText */ 1640 puts(_("output version information and exit")); 1641 1642 /* referenced via ntpdOptions.pzUsageTitle */ 1643 puts(_("ntpd - NTP daemon program - Ver. 4.2.8\n\ 1644Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\ 1645\t\t[ <server1> ... <serverN> ]\n")); 1646 1647 /* referenced via ntpdOptions.pzExplain */ 1648 puts(_("\n")); 1649 1650 /* referenced via ntpdOptions.pzFullVersion */ 1651 puts(_("ntpd 4.2.8")); 1652 1653 /* referenced via ntpdOptions.pzFullUsage */ 1654 puts(_("<<<NOT-FOUND>>>")); 1655 1656 /* referenced via ntpdOptions.pzShortUsage */ 1657 puts(_("<<<NOT-FOUND>>>")); 1658 /* LIBOPTS-MESSAGES: */ 1659#line 67 "../autoopts.c" 1660 puts(_("allocation of %d bytes failed\n")); 1661#line 93 "../autoopts.c" 1662 puts(_("allocation of %d bytes failed\n")); 1663#line 53 "../init.c" 1664 puts(_("AutoOpts function called without option descriptor\n")); 1665#line 86 "../init.c" 1666 puts(_("\tThis exceeds the compiled library version: ")); 1667#line 84 "../init.c" 1668 puts(_("Automated Options Processing Error!\n" 1669 "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 1670#line 80 "../autoopts.c" 1671 puts(_("realloc of %d bytes at 0x%p failed\n")); 1672#line 88 "../init.c" 1673 puts(_("\tThis is less than the minimum library version: ")); 1674#line 121 "../version.c" 1675 puts(_("Automated Options version %s\n" 1676 "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); 1677#line 82 "../makeshell.c" 1678 puts(_("(AutoOpts bug): %s.\n")); 1679#line 90 "../reset.c" 1680 puts(_("optionResetOpt() called, but reset-option not configured")); 1681#line 292 "../usage.c" 1682 puts(_("could not locate the 'help' option")); 1683#line 336 "../autoopts.c" 1684 puts(_("optionProcess() was called with invalid data")); 1685#line 748 "../usage.c" 1686 puts(_("invalid argument type specified")); 1687#line 598 "../find.c" 1688 puts(_("defaulted to option with optional arg")); 1689#line 76 "../alias.c" 1690 puts(_("aliasing option is out of range.")); 1691#line 234 "../enum.c" 1692 puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 1693#line 108 "../find.c" 1694 puts(_(" The following options match:\n")); 1695#line 293 "../find.c" 1696 puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 1697#line 161 "../check.c" 1698 puts(_("%s: Command line arguments required\n")); 1699#line 43 "../alias.c" 1700 puts(_("%d %s%s options allowed\n")); 1701#line 89 "../makeshell.c" 1702 puts(_("%s error %d (%s) calling %s for '%s'\n")); 1703#line 301 "../makeshell.c" 1704 puts(_("interprocess pipe")); 1705#line 168 "../version.c" 1706 puts(_("error: version option argument '%c' invalid. Use:\n" 1707 "\t'v' - version only\n" 1708 "\t'c' - version and copyright\n" 1709 "\t'n' - version and full copyright notice\n")); 1710#line 58 "../check.c" 1711 puts(_("%s error: the '%s' and '%s' options conflict\n")); 1712#line 217 "../find.c" 1713 puts(_("%s: The '%s' option has been disabled.")); 1714#line 430 "../find.c" 1715 puts(_("%s: The '%s' option has been disabled.")); 1716#line 38 "../alias.c" 1717 puts(_("-equivalence")); 1718#line 469 "../find.c" 1719 puts(_("%s: illegal option -- %c\n")); 1720#line 110 "../reset.c" 1721 puts(_("%s: illegal option -- %c\n")); 1722#line 271 "../find.c" 1723 puts(_("%s: illegal option -- %s\n")); 1724#line 755 "../find.c" 1725 puts(_("%s: illegal option -- %s\n")); 1726#line 118 "../reset.c" 1727 puts(_("%s: illegal option -- %s\n")); 1728#line 335 "../find.c" 1729 puts(_("%s: unknown vendor extension option -- %s\n")); 1730#line 159 "../enum.c" 1731 puts(_(" or an integer from %d through %d\n")); 1732#line 169 "../enum.c" 1733 puts(_(" or an integer from %d through %d\n")); 1734#line 747 "../usage.c" 1735 puts(_("%s error: invalid option descriptor for %s\n")); 1736#line 1081 "../usage.c" 1737 puts(_("%s error: invalid option descriptor for %s\n")); 1738#line 385 "../find.c" 1739 puts(_("%s: invalid option name: %s\n")); 1740#line 527 "../find.c" 1741 puts(_("%s: The '%s' option requires an argument.\n")); 1742#line 156 "../autoopts.c" 1743 puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 1744 "\t'%s' and '%s'.")); 1745#line 94 "../check.c" 1746 puts(_("%s error: The %s option is required\n")); 1747#line 632 "../find.c" 1748 puts(_("%s: The '%s' option cannot have an argument.\n")); 1749#line 151 "../check.c" 1750 puts(_("%s: Command line arguments are not allowed.\n")); 1751#line 535 "../save.c" 1752 puts(_("error %d (%s) creating %s\n")); 1753#line 234 "../enum.c" 1754 puts(_("%s error: '%s' does not match any %s keywords.\n")); 1755#line 93 "../reset.c" 1756 puts(_("%s error: The '%s' option requires an argument.\n")); 1757#line 184 "../save.c" 1758 puts(_("error %d (%s) stat-ing %s\n")); 1759#line 238 "../save.c" 1760 puts(_("error %d (%s) stat-ing %s\n")); 1761#line 143 "../restore.c" 1762 puts(_("%s error: no saved option state\n")); 1763#line 231 "../autoopts.c" 1764 puts(_("'%s' is not a command line option.\n")); 1765#line 111 "../time.c" 1766 puts(_("%s error: '%s' is not a recognizable date/time.\n")); 1767#line 132 "../save.c" 1768 puts(_("'%s' not defined\n")); 1769#line 50 "../time.c" 1770 puts(_("%s error: '%s' is not a recognizable time duration.\n")); 1771#line 92 "../check.c" 1772 puts(_("%s error: The %s option must appear %d times.\n")); 1773#line 164 "../numeric.c" 1774 puts(_("%s error: '%s' is not a recognizable number.\n")); 1775#line 200 "../enum.c" 1776 puts(_("%s error: %s exceeds %s keyword count\n")); 1777#line 330 "../usage.c" 1778 puts(_("Try '%s %s' for more information.\n")); 1779#line 45 "../alias.c" 1780 puts(_("one %s%s option allowed\n")); 1781#line 203 "../makeshell.c" 1782 puts(_("standard output")); 1783#line 938 "../makeshell.c" 1784 puts(_("standard output")); 1785#line 274 "../usage.c" 1786 puts(_("standard output")); 1787#line 415 "../usage.c" 1788 puts(_("standard output")); 1789#line 625 "../usage.c" 1790 puts(_("standard output")); 1791#line 175 "../version.c" 1792 puts(_("standard output")); 1793#line 274 "../usage.c" 1794 puts(_("standard error")); 1795#line 415 "../usage.c" 1796 puts(_("standard error")); 1797#line 625 "../usage.c" 1798 puts(_("standard error")); 1799#line 175 "../version.c" 1800 puts(_("standard error")); 1801#line 203 "../makeshell.c" 1802 puts(_("write")); 1803#line 938 "../makeshell.c" 1804 puts(_("write")); 1805#line 273 "../usage.c" 1806 puts(_("write")); 1807#line 414 "../usage.c" 1808 puts(_("write")); 1809#line 624 "../usage.c" 1810 puts(_("write")); 1811#line 174 "../version.c" 1812 puts(_("write")); 1813#line 60 "../numeric.c" 1814 puts(_("%s error: %s option value %ld is out of range.\n")); 1815#line 44 "../check.c" 1816 puts(_("%s error: %s option requires the %s option\n")); 1817#line 131 "../save.c" 1818 puts(_("%s warning: cannot save options - %s not regular file\n")); 1819#line 183 "../save.c" 1820 puts(_("%s warning: cannot save options - %s not regular file\n")); 1821#line 237 "../save.c" 1822 puts(_("%s warning: cannot save options - %s not regular file\n")); 1823#line 256 "../save.c" 1824 puts(_("%s warning: cannot save options - %s not regular file\n")); 1825#line 534 "../save.c" 1826 puts(_("%s warning: cannot save options - %s not regular file\n")); 1827 /* END-LIBOPTS-MESSAGES */ 1828 1829 /* USAGE-TEXT: */ 1830#line 873 "../usage.c" 1831 puts(_("\t\t\t\t- an alternate for '%s'\n")); 1832#line 1148 "../usage.c" 1833 puts(_("Version, usage and configuration options:")); 1834#line 924 "../usage.c" 1835 puts(_("\t\t\t\t- default option for unnamed options\n")); 1836#line 837 "../usage.c" 1837 puts(_("\t\t\t\t- disabled as '--%s'\n")); 1838#line 1117 "../usage.c" 1839 puts(_(" --- %-14s %s\n")); 1840#line 1115 "../usage.c" 1841 puts(_("This option has been disabled")); 1842#line 864 "../usage.c" 1843 puts(_("\t\t\t\t- enabled by default\n")); 1844#line 40 "../alias.c" 1845 puts(_("%s error: only ")); 1846#line 1194 "../usage.c" 1847 puts(_(" - examining environment variables named %s_*\n")); 1848#line 168 "../file.c" 1849 puts(_("\t\t\t\t- file must not pre-exist\n")); 1850#line 172 "../file.c" 1851 puts(_("\t\t\t\t- file must pre-exist\n")); 1852#line 380 "../usage.c" 1853 puts(_("Options are specified by doubled hyphens and their name or by a single\n" 1854 "hyphen and the flag character.\n")); 1855#line 916 "../makeshell.c" 1856 puts(_("\n" 1857 "= = = = = = = =\n\n" 1858 "This incarnation of genshell will produce\n" 1859 "a shell script to parse the options for %s:\n\n")); 1860#line 166 "../enum.c" 1861 puts(_(" or an integer mask with any of the lower %d bits set\n")); 1862#line 897 "../usage.c" 1863 puts(_("\t\t\t\t- is a set membership option\n")); 1864#line 918 "../usage.c" 1865 puts(_("\t\t\t\t- must appear between %d and %d times\n")); 1866#line 382 "../usage.c" 1867 puts(_("Options are specified by single or double hyphens and their name.\n")); 1868#line 904 "../usage.c" 1869 puts(_("\t\t\t\t- may appear multiple times\n")); 1870#line 891 "../usage.c" 1871 puts(_("\t\t\t\t- may not be preset\n")); 1872#line 1309 "../usage.c" 1873 puts(_(" Arg Option-Name Description\n")); 1874#line 1245 "../usage.c" 1875 puts(_(" Flg Arg Option-Name Description\n")); 1876#line 1303 "../usage.c" 1877 puts(_(" Flg Arg Option-Name Description\n")); 1878#line 1304 "../usage.c" 1879 puts(_(" %3s %s")); 1880#line 1310 "../usage.c" 1881 puts(_(" %3s %s")); 1882#line 387 "../usage.c" 1883 puts(_("The '-#<number>' option may omit the hash char\n")); 1884#line 383 "../usage.c" 1885 puts(_("All arguments are named options.\n")); 1886#line 971 "../usage.c" 1887 puts(_(" - reading file %s")); 1888#line 409 "../usage.c" 1889 puts(_("\n" 1890 "Please send bug reports to: <%s>\n")); 1891#line 100 "../version.c" 1892 puts(_("\n" 1893 "Please send bug reports to: <%s>\n")); 1894#line 129 "../version.c" 1895 puts(_("\n" 1896 "Please send bug reports to: <%s>\n")); 1897#line 903 "../usage.c" 1898 puts(_("\t\t\t\t- may NOT appear - preset only\n")); 1899#line 944 "../usage.c" 1900 puts(_("\n" 1901 "The following option preset mechanisms are supported:\n")); 1902#line 1192 "../usage.c" 1903 puts(_("\n" 1904 "The following option preset mechanisms are supported:\n")); 1905#line 682 "../usage.c" 1906 puts(_("prohibits these options:\n")); 1907#line 677 "../usage.c" 1908 puts(_("prohibits the option '%s'\n")); 1909#line 81 "../numeric.c" 1910 puts(_("%s%ld to %ld")); 1911#line 79 "../numeric.c" 1912 puts(_("%sgreater than or equal to %ld")); 1913#line 75 "../numeric.c" 1914 puts(_("%s%ld exactly")); 1915#line 68 "../numeric.c" 1916 puts(_("%sit must lie in one of the ranges:\n")); 1917#line 68 "../numeric.c" 1918 puts(_("%sit must be in the range:\n")); 1919#line 88 "../numeric.c" 1920 puts(_(", or\n")); 1921#line 66 "../numeric.c" 1922 puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 1923#line 77 "../numeric.c" 1924 puts(_("%sless than or equal to %ld")); 1925#line 390 "../usage.c" 1926 puts(_("Operands and options may be intermixed. They will be reordered.\n")); 1927#line 652 "../usage.c" 1928 puts(_("requires the option '%s'\n")); 1929#line 655 "../usage.c" 1930 puts(_("requires these options:\n")); 1931#line 1321 "../usage.c" 1932 puts(_(" Arg Option-Name Req? Description\n")); 1933#line 1315 "../usage.c" 1934 puts(_(" Flg Arg Option-Name Req? Description\n")); 1935#line 167 "../enum.c" 1936 puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 1937 "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 1938 "will set them all. Multiple entries may be passed as an option\n" 1939 "argument list.\n")); 1940#line 910 "../usage.c" 1941 puts(_("\t\t\t\t- may appear up to %d times\n")); 1942#line 77 "../enum.c" 1943 puts(_("The valid \"%s\" option keywords are:\n")); 1944#line 1152 "../usage.c" 1945 puts(_("The next option supports vendor supported extra options:")); 1946#line 773 "../usage.c" 1947 puts(_("These additional options are:")); 1948 /* END-USAGE-TEXT */ 1949} 1950#endif /* uncompilable code */ 1951#ifdef __cplusplus 1952} 1953#endif 1954/* ntpd-opts.c ends here */ 1955