1/* $NetBSD: ntp-keygen-opts.c,v 1.19 2022/10/09 21:41:04 christos Exp $ */ 2 3/* 4 * EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c) 5 * 6 * It has been AutoGen-ed June 23, 2020 at 02:21:03 AM by AutoGen 5.18.5 7 * From the definitions ntp-keygen-opts.def 8 * and the template file options 9 * 10 * Generated from AutoOpts 41:1: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 ntp-keygen 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 ntp-keygen program is copyrighted and licensed 21 * under the following terms: 22 * 23 * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, 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 and Network Time Foundation 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 "ntp-keygen-opts.h" 44#include <sys/types.h> 45 46#include <limits.h> 47#include <stdio.h> 48#include <stdlib.h> 49#include <errno.h> 50 51#ifdef __cplusplus 52extern "C" { 53#endif 54extern FILE * option_usage_fp; 55#define zCopyright (ntp_keygen_opt_strs+0) 56#define zLicenseDescrip (ntp_keygen_opt_strs+353) 57 58/* 59 * global included definitions 60 */ 61#include <stdlib.h> 62 63#ifdef __windows 64 extern int atoi(const char*); 65#else 66# include <stdlib.h> 67#endif 68 69#ifndef NULL 70# define NULL 0 71#endif 72 73/** 74 * static const strings for ntp-keygen options 75 */ 76static char const ntp_keygen_opt_strs[2442] = 77/* 0 */ "ntp-keygen (ntp) 4.2.8p15\n" 78 "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n" 79 "This is free software. It is licensed for use, modification and\n" 80 "redistribution under the terms of the NTP License, copies of which\n" 81 "can be seen at:\n" 82 " <http://ntp.org/license>\n" 83 " <http://opensource.org/licenses/ntp-license.php>\n\0" 84/* 353 */ "Permission to use, copy, modify, and distribute this software and its\n" 85 "documentation for any purpose with or without fee is hereby granted,\n" 86 "provided that the above copyright notice appears in all copies and that\n" 87 "both the copyright notice and this permission notice appear in supporting\n" 88 "documentation, and that the name The University of Delaware not be used in\n" 89 "advertising or publicity pertaining to distribution of the software without\n" 90 "specific, written prior permission. The University of Delaware and Network\n" 91 "Time Foundation makes no representations about the suitability this\n" 92 "software for any purpose. It is provided \"as is\" without express or\n" 93 "implied warranty.\n\0" 94/* 1021 */ "identity modulus bits\0" 95/* 1043 */ "IMBITS\0" 96/* 1050 */ "imbits\0" 97/* 1057 */ "certificate scheme\0" 98/* 1076 */ "CERTIFICATE\0" 99/* 1088 */ "certificate\0" 100/* 1100 */ "privatekey cipher\0" 101/* 1118 */ "CIPHER\0" 102/* 1125 */ "cipher\0" 103/* 1132 */ "Increase debug verbosity level\0" 104/* 1163 */ "DEBUG_LEVEL\0" 105/* 1175 */ "debug-level\0" 106/* 1187 */ "Set the debug verbosity level\0" 107/* 1217 */ "SET_DEBUG_LEVEL\0" 108/* 1233 */ "set-debug-level\0" 109/* 1249 */ "Write IFF or GQ identity keys\0" 110/* 1279 */ "ID_KEY\0" 111/* 1286 */ "id-key\0" 112/* 1293 */ "Generate GQ parameters and keys\0" 113/* 1325 */ "GQ_PARAMS\0" 114/* 1335 */ "gq-params\0" 115/* 1345 */ "generate RSA host key\0" 116/* 1367 */ "HOST_KEY\0" 117/* 1376 */ "host-key\0" 118/* 1385 */ "generate IFF parameters\0" 119/* 1409 */ "IFFKEY\0" 120/* 1416 */ "iffkey\0" 121/* 1423 */ "set Autokey group name\0" 122/* 1446 */ "IDENT\0" 123/* 1452 */ "ident\0" 124/* 1458 */ "set certificate lifetime\0" 125/* 1483 */ "LIFETIME\0" 126/* 1492 */ "lifetime\0" 127/* 1501 */ "prime modulus\0" 128/* 1515 */ "MODULUS\0" 129/* 1523 */ "modulus\0" 130/* 1531 */ "generate symmetric keys\0" 131/* 1555 */ "MD5KEY\0" 132/* 1562 */ "md5key\0" 133/* 1569 */ "generate PC private certificate\0" 134/* 1601 */ "PVT_CERT\0" 135/* 1610 */ "pvt-cert\0" 136/* 1619 */ "local private password\0" 137/* 1642 */ "PASSWORD\0" 138/* 1651 */ "password\0" 139/* 1660 */ "export IFF or GQ group keys with password\0" 140/* 1702 */ "EXPORT_PASSWD\0" 141/* 1716 */ "export-passwd\0" 142/* 1730 */ "set host and optionally group name\0" 143/* 1765 */ "SUBJECT_NAME\0" 144/* 1778 */ "subject-name\0" 145/* 1791 */ "generate sign key (RSA or DSA)\0" 146/* 1822 */ "SIGN_KEY\0" 147/* 1831 */ "sign-key\0" 148/* 1840 */ "trusted certificate (TC scheme)\0" 149/* 1872 */ "TRUSTED_CERT\0" 150/* 1885 */ "trusted-cert\0" 151/* 1898 */ "generate <num> MV parameters\0" 152/* 1927 */ "MV_PARAMS\0" 153/* 1937 */ "mv-params\0" 154/* 1947 */ "update <num> MV keys\0" 155/* 1968 */ "MV_KEYS\0" 156/* 1976 */ "mv-keys\0" 157/* 1984 */ "display extended usage information and exit\0" 158/* 2028 */ "help\0" 159/* 2033 */ "extended usage information passed thru pager\0" 160/* 2078 */ "more-help\0" 161/* 2088 */ "output version information and exit\0" 162/* 2124 */ "version\0" 163/* 2132 */ "save the option state to a config file\0" 164/* 2171 */ "save-opts\0" 165/* 2181 */ "load options from a config file\0" 166/* 2213 */ "LOAD_OPTS\0" 167/* 2223 */ "no-load-opts\0" 168/* 2236 */ "no\0" 169/* 2239 */ "NTP_KEYGEN\0" 170/* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p15\n" 171 "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" 172/* 2365 */ "$HOME\0" 173/* 2371 */ ".\0" 174/* 2373 */ ".ntprc\0" 175/* 2380 */ "http://bugs.ntp.org, bugs@ntp.org\0" 176/* 2414 */ "\n\0" 177/* 2416 */ "ntp-keygen (ntp) 4.2.8p15"; 178 179/** 180 * imbits option description: 181 */ 182#ifdef AUTOKEY 183/** Descriptive text for the imbits option */ 184#define IMBITS_DESC (ntp_keygen_opt_strs+1021) 185/** Upper-cased name for the imbits option */ 186#define IMBITS_NAME (ntp_keygen_opt_strs+1043) 187/** Name string for the imbits option */ 188#define IMBITS_name (ntp_keygen_opt_strs+1050) 189/** Compiled in flag settings for the imbits option */ 190#define IMBITS_FLAGS (OPTST_DISABLED \ 191 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 192 193#else /* disable imbits */ 194#define IMBITS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 195#define IMBITS_NAME NULL 196#define IMBITS_DESC NULL 197#define IMBITS_name NULL 198#endif /* AUTOKEY */ 199 200/** 201 * certificate option description: 202 */ 203#ifdef AUTOKEY 204/** Descriptive text for the certificate option */ 205#define CERTIFICATE_DESC (ntp_keygen_opt_strs+1057) 206/** Upper-cased name for the certificate option */ 207#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1076) 208/** Name string for the certificate option */ 209#define CERTIFICATE_name (ntp_keygen_opt_strs+1088) 210/** Compiled in flag settings for the certificate option */ 211#define CERTIFICATE_FLAGS (OPTST_DISABLED \ 212 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 213 214#else /* disable certificate */ 215#define CERTIFICATE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 216#define CERTIFICATE_NAME NULL 217#define CERTIFICATE_DESC NULL 218#define CERTIFICATE_name NULL 219#endif /* AUTOKEY */ 220 221/** 222 * cipher option description: 223 */ 224#ifdef AUTOKEY 225/** Descriptive text for the cipher option */ 226#define CIPHER_DESC (ntp_keygen_opt_strs+1100) 227/** Upper-cased name for the cipher option */ 228#define CIPHER_NAME (ntp_keygen_opt_strs+1118) 229/** Name string for the cipher option */ 230#define CIPHER_name (ntp_keygen_opt_strs+1125) 231/** Compiled in flag settings for the cipher option */ 232#define CIPHER_FLAGS (OPTST_DISABLED \ 233 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 234 235#else /* disable cipher */ 236#define CIPHER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 237#define CIPHER_NAME NULL 238#define CIPHER_DESC NULL 239#define CIPHER_name NULL 240#endif /* AUTOKEY */ 241 242/** 243 * debug-level option description: 244 */ 245/** Descriptive text for the debug-level option */ 246#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1132) 247/** Upper-cased name for the debug-level option */ 248#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1163) 249/** Name string for the debug-level option */ 250#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1175) 251/** Compiled in flag settings for the debug-level option */ 252#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) 253 254/** 255 * set-debug-level option description: 256 */ 257/** Descriptive text for the set-debug-level option */ 258#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1187) 259/** Upper-cased name for the set-debug-level option */ 260#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1217) 261/** Name string for the set-debug-level option */ 262#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1233) 263/** Compiled in flag settings for the set-debug-level option */ 264#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ 265 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 266 267/** 268 * id-key option description: 269 */ 270#ifdef AUTOKEY 271/** Descriptive text for the id-key option */ 272#define ID_KEY_DESC (ntp_keygen_opt_strs+1249) 273/** Upper-cased name for the id-key option */ 274#define ID_KEY_NAME (ntp_keygen_opt_strs+1279) 275/** Name string for the id-key option */ 276#define ID_KEY_name (ntp_keygen_opt_strs+1286) 277/** Compiled in flag settings for the id-key option */ 278#define ID_KEY_FLAGS (OPTST_DISABLED) 279 280#else /* disable id-key */ 281#define ID_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 282#define ID_KEY_NAME NULL 283#define ID_KEY_DESC NULL 284#define ID_KEY_name NULL 285#endif /* AUTOKEY */ 286 287/** 288 * gq-params option description: 289 */ 290#ifdef AUTOKEY 291/** Descriptive text for the gq-params option */ 292#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1293) 293/** Upper-cased name for the gq-params option */ 294#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1325) 295/** Name string for the gq-params option */ 296#define GQ_PARAMS_name (ntp_keygen_opt_strs+1335) 297/** Compiled in flag settings for the gq-params option */ 298#define GQ_PARAMS_FLAGS (OPTST_DISABLED) 299 300#else /* disable gq-params */ 301#define GQ_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 302#define GQ_PARAMS_NAME NULL 303#define GQ_PARAMS_DESC NULL 304#define GQ_PARAMS_name NULL 305#endif /* AUTOKEY */ 306 307/** 308 * host-key option description: 309 */ 310#ifdef AUTOKEY 311/** Descriptive text for the host-key option */ 312#define HOST_KEY_DESC (ntp_keygen_opt_strs+1345) 313/** Upper-cased name for the host-key option */ 314#define HOST_KEY_NAME (ntp_keygen_opt_strs+1367) 315/** Name string for the host-key option */ 316#define HOST_KEY_name (ntp_keygen_opt_strs+1376) 317/** Compiled in flag settings for the host-key option */ 318#define HOST_KEY_FLAGS (OPTST_DISABLED) 319 320#else /* disable host-key */ 321#define HOST_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 322#define HOST_KEY_NAME NULL 323#define HOST_KEY_DESC NULL 324#define HOST_KEY_name NULL 325#endif /* AUTOKEY */ 326 327/** 328 * iffkey option description: 329 */ 330#ifdef AUTOKEY 331/** Descriptive text for the iffkey option */ 332#define IFFKEY_DESC (ntp_keygen_opt_strs+1385) 333/** Upper-cased name for the iffkey option */ 334#define IFFKEY_NAME (ntp_keygen_opt_strs+1409) 335/** Name string for the iffkey option */ 336#define IFFKEY_name (ntp_keygen_opt_strs+1416) 337/** Compiled in flag settings for the iffkey option */ 338#define IFFKEY_FLAGS (OPTST_DISABLED) 339 340#else /* disable iffkey */ 341#define IFFKEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 342#define IFFKEY_NAME NULL 343#define IFFKEY_DESC NULL 344#define IFFKEY_name NULL 345#endif /* AUTOKEY */ 346 347/** 348 * ident option description: 349 */ 350#ifdef AUTOKEY 351/** Descriptive text for the ident option */ 352#define IDENT_DESC (ntp_keygen_opt_strs+1423) 353/** Upper-cased name for the ident option */ 354#define IDENT_NAME (ntp_keygen_opt_strs+1446) 355/** Name string for the ident option */ 356#define IDENT_name (ntp_keygen_opt_strs+1452) 357/** Compiled in flag settings for the ident option */ 358#define IDENT_FLAGS (OPTST_DISABLED \ 359 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 360 361#else /* disable ident */ 362#define IDENT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 363#define IDENT_NAME NULL 364#define IDENT_DESC NULL 365#define IDENT_name NULL 366#endif /* AUTOKEY */ 367 368/** 369 * lifetime option description: 370 */ 371#ifdef AUTOKEY 372/** Descriptive text for the lifetime option */ 373#define LIFETIME_DESC (ntp_keygen_opt_strs+1458) 374/** Upper-cased name for the lifetime option */ 375#define LIFETIME_NAME (ntp_keygen_opt_strs+1483) 376/** Name string for the lifetime option */ 377#define LIFETIME_name (ntp_keygen_opt_strs+1492) 378/** Compiled in flag settings for the lifetime option */ 379#define LIFETIME_FLAGS (OPTST_DISABLED \ 380 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 381 382#else /* disable lifetime */ 383#define LIFETIME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 384#define LIFETIME_NAME NULL 385#define LIFETIME_DESC NULL 386#define LIFETIME_name NULL 387#endif /* AUTOKEY */ 388 389/** 390 * modulus option description: 391 */ 392#ifdef AUTOKEY 393/** Descriptive text for the modulus option */ 394#define MODULUS_DESC (ntp_keygen_opt_strs+1501) 395/** Upper-cased name for the modulus option */ 396#define MODULUS_NAME (ntp_keygen_opt_strs+1515) 397/** Name string for the modulus option */ 398#define MODULUS_name (ntp_keygen_opt_strs+1523) 399/** Compiled in flag settings for the modulus option */ 400#define MODULUS_FLAGS (OPTST_DISABLED \ 401 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 402 403#else /* disable modulus */ 404#define MODULUS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 405#define MODULUS_NAME NULL 406#define MODULUS_DESC NULL 407#define MODULUS_name NULL 408#endif /* AUTOKEY */ 409 410/** 411 * md5key option description: 412 */ 413/** Descriptive text for the md5key option */ 414#define MD5KEY_DESC (ntp_keygen_opt_strs+1531) 415/** Upper-cased name for the md5key option */ 416#define MD5KEY_NAME (ntp_keygen_opt_strs+1555) 417/** Name string for the md5key option */ 418#define MD5KEY_name (ntp_keygen_opt_strs+1562) 419/** Compiled in flag settings for the md5key option */ 420#define MD5KEY_FLAGS (OPTST_DISABLED) 421 422/** 423 * pvt-cert option description: 424 */ 425#ifdef AUTOKEY 426/** Descriptive text for the pvt-cert option */ 427#define PVT_CERT_DESC (ntp_keygen_opt_strs+1569) 428/** Upper-cased name for the pvt-cert option */ 429#define PVT_CERT_NAME (ntp_keygen_opt_strs+1601) 430/** Name string for the pvt-cert option */ 431#define PVT_CERT_name (ntp_keygen_opt_strs+1610) 432/** Compiled in flag settings for the pvt-cert option */ 433#define PVT_CERT_FLAGS (OPTST_DISABLED) 434 435#else /* disable pvt-cert */ 436#define PVT_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 437#define PVT_CERT_NAME NULL 438#define PVT_CERT_DESC NULL 439#define PVT_CERT_name NULL 440#endif /* AUTOKEY */ 441 442/** 443 * password option description: 444 */ 445#ifdef AUTOKEY 446/** Descriptive text for the password option */ 447#define PASSWORD_DESC (ntp_keygen_opt_strs+1619) 448/** Upper-cased name for the password option */ 449#define PASSWORD_NAME (ntp_keygen_opt_strs+1642) 450/** Name string for the password option */ 451#define PASSWORD_name (ntp_keygen_opt_strs+1651) 452/** Compiled in flag settings for the password option */ 453#define PASSWORD_FLAGS (OPTST_DISABLED \ 454 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 455 456#else /* disable password */ 457#define PASSWORD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 458#define PASSWORD_NAME NULL 459#define PASSWORD_DESC NULL 460#define PASSWORD_name NULL 461#endif /* AUTOKEY */ 462 463/** 464 * export-passwd option description: 465 */ 466#ifdef AUTOKEY 467/** Descriptive text for the export-passwd option */ 468#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1660) 469/** Upper-cased name for the export-passwd option */ 470#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1702) 471/** Name string for the export-passwd option */ 472#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1716) 473/** Compiled in flag settings for the export-passwd option */ 474#define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \ 475 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 476 477#else /* disable export-passwd */ 478#define EXPORT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 479#define EXPORT_PASSWD_NAME NULL 480#define EXPORT_PASSWD_DESC NULL 481#define EXPORT_PASSWD_name NULL 482#endif /* AUTOKEY */ 483 484/** 485 * subject-name option description: 486 */ 487#ifdef AUTOKEY 488/** Descriptive text for the subject-name option */ 489#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1730) 490/** Upper-cased name for the subject-name option */ 491#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1765) 492/** Name string for the subject-name option */ 493#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1778) 494/** Compiled in flag settings for the subject-name option */ 495#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \ 496 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 497 498#else /* disable subject-name */ 499#define SUBJECT_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 500#define SUBJECT_NAME_NAME NULL 501#define SUBJECT_NAME_DESC NULL 502#define SUBJECT_NAME_name NULL 503#endif /* AUTOKEY */ 504 505/** 506 * sign-key option description: 507 */ 508#ifdef AUTOKEY 509/** Descriptive text for the sign-key option */ 510#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1791) 511/** Upper-cased name for the sign-key option */ 512#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1822) 513/** Name string for the sign-key option */ 514#define SIGN_KEY_name (ntp_keygen_opt_strs+1831) 515/** Compiled in flag settings for the sign-key option */ 516#define SIGN_KEY_FLAGS (OPTST_DISABLED \ 517 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 518 519#else /* disable sign-key */ 520#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 521#define SIGN_KEY_NAME NULL 522#define SIGN_KEY_DESC NULL 523#define SIGN_KEY_name NULL 524#endif /* AUTOKEY */ 525 526/** 527 * trusted-cert option description: 528 */ 529#ifdef AUTOKEY 530/** Descriptive text for the trusted-cert option */ 531#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1840) 532/** Upper-cased name for the trusted-cert option */ 533#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1872) 534/** Name string for the trusted-cert option */ 535#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1885) 536/** Compiled in flag settings for the trusted-cert option */ 537#define TRUSTED_CERT_FLAGS (OPTST_DISABLED) 538 539#else /* disable trusted-cert */ 540#define TRUSTED_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 541#define TRUSTED_CERT_NAME NULL 542#define TRUSTED_CERT_DESC NULL 543#define TRUSTED_CERT_name NULL 544#endif /* AUTOKEY */ 545 546/** 547 * mv-params option description: 548 */ 549#ifdef AUTOKEY 550/** Descriptive text for the mv-params option */ 551#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1898) 552/** Upper-cased name for the mv-params option */ 553#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1927) 554/** Name string for the mv-params option */ 555#define MV_PARAMS_name (ntp_keygen_opt_strs+1937) 556/** Compiled in flag settings for the mv-params option */ 557#define MV_PARAMS_FLAGS (OPTST_DISABLED \ 558 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 559 560#else /* disable mv-params */ 561#define MV_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 562#define MV_PARAMS_NAME NULL 563#define MV_PARAMS_DESC NULL 564#define MV_PARAMS_name NULL 565#endif /* AUTOKEY */ 566 567/** 568 * mv-keys option description: 569 */ 570#ifdef AUTOKEY 571/** Descriptive text for the mv-keys option */ 572#define MV_KEYS_DESC (ntp_keygen_opt_strs+1947) 573/** Upper-cased name for the mv-keys option */ 574#define MV_KEYS_NAME (ntp_keygen_opt_strs+1968) 575/** Name string for the mv-keys option */ 576#define MV_KEYS_name (ntp_keygen_opt_strs+1976) 577/** Compiled in flag settings for the mv-keys option */ 578#define MV_KEYS_FLAGS (OPTST_DISABLED \ 579 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 580 581#else /* disable mv-keys */ 582#define MV_KEYS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 583#define MV_KEYS_NAME NULL 584#define MV_KEYS_DESC NULL 585#define MV_KEYS_name NULL 586#endif /* AUTOKEY */ 587 588/* 589 * Help/More_Help/Version option descriptions: 590 */ 591#define HELP_DESC (ntp_keygen_opt_strs+1984) 592#define HELP_name (ntp_keygen_opt_strs+2028) 593#ifdef HAVE_WORKING_FORK 594#define MORE_HELP_DESC (ntp_keygen_opt_strs+2033) 595#define MORE_HELP_name (ntp_keygen_opt_strs+2078) 596#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 597#else 598#define MORE_HELP_DESC HELP_DESC 599#define MORE_HELP_name HELP_name 600#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 601#endif 602#ifdef NO_OPTIONAL_OPT_ARGS 603# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 604#else 605# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 606 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 607#endif 608#define VER_DESC (ntp_keygen_opt_strs+2088) 609#define VER_name (ntp_keygen_opt_strs+2124) 610#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2132) 611#define SAVE_OPTS_name (ntp_keygen_opt_strs+2171) 612#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2181) 613#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2213) 614#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2223) 615#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2236) 616#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) 617/** 618 * Declare option callback procedures 619 */ 620#ifdef AUTOKEY 621 static tOptProc doOptImbits; 622#else /* not AUTOKEY */ 623# define doOptImbits NULL 624#endif /* def/not AUTOKEY */ 625#ifdef AUTOKEY 626 static tOptProc doOptModulus; 627#else /* not AUTOKEY */ 628# define doOptModulus NULL 629#endif /* def/not AUTOKEY */ 630extern tOptProc 631 ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, 632 optionNumericVal, optionPagedUsage, optionResetOpt, 633 optionStackArg, optionTimeDate, optionTimeVal, 634 optionUnstackArg, optionVendorOption; 635static tOptProc 636 doOptDebug_Level, doUsageOpt; 637#define VER_PROC ntpOptionPrintVersion 638 639/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 640/** 641 * Define the ntp-keygen Option Descriptions. 642 * This is an array of OPTION_CT entries, one for each 643 * option that the ntp-keygen program responds to. 644 */ 645static tOptDesc optDesc[OPTION_CT] = { 646 { /* entry idx, value */ 0, VALUE_OPT_IMBITS, 647 /* equiv idx, value */ 0, VALUE_OPT_IMBITS, 648 /* equivalenced to */ NO_EQUIVALENT, 649 /* min, max, act ct */ 0, 1, 0, 650 /* opt state flags */ IMBITS_FLAGS, 0, 651 /* last opt argumnt */ { NULL }, /* --imbits */ 652 /* arg list/cookie */ NULL, 653 /* must/cannot opts */ NULL, NULL, 654 /* option proc */ doOptImbits, 655 /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name, 656 /* disablement strs */ NULL, NULL }, 657 658 { /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE, 659 /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE, 660 /* equivalenced to */ NO_EQUIVALENT, 661 /* min, max, act ct */ 0, 1, 0, 662 /* opt state flags */ CERTIFICATE_FLAGS, 0, 663 /* last opt argumnt */ { NULL }, /* --certificate */ 664 /* arg list/cookie */ NULL, 665 /* must/cannot opts */ NULL, NULL, 666 /* option proc */ NULL, 667 /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name, 668 /* disablement strs */ NULL, NULL }, 669 670 { /* entry idx, value */ 2, VALUE_OPT_CIPHER, 671 /* equiv idx, value */ 2, VALUE_OPT_CIPHER, 672 /* equivalenced to */ NO_EQUIVALENT, 673 /* min, max, act ct */ 0, 1, 0, 674 /* opt state flags */ CIPHER_FLAGS, 0, 675 /* last opt argumnt */ { NULL }, /* --cipher */ 676 /* arg list/cookie */ NULL, 677 /* must/cannot opts */ NULL, NULL, 678 /* option proc */ NULL, 679 /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name, 680 /* disablement strs */ NULL, NULL }, 681 682 { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 683 /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 684 /* equivalenced to */ NO_EQUIVALENT, 685 /* min, max, act ct */ 0, NOLIMIT, 0, 686 /* opt state flags */ DEBUG_LEVEL_FLAGS, 0, 687 /* last opt argumnt */ { NULL }, /* --debug-level */ 688 /* arg list/cookie */ NULL, 689 /* must/cannot opts */ NULL, NULL, 690 /* option proc */ doOptDebug_Level, 691 /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, 692 /* disablement strs */ NULL, NULL }, 693 694 { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 695 /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 696 /* equivalenced to */ NO_EQUIVALENT, 697 /* min, max, act ct */ 0, NOLIMIT, 0, 698 /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0, 699 /* last opt argumnt */ { NULL }, /* --set-debug-level */ 700 /* arg list/cookie */ NULL, 701 /* must/cannot opts */ NULL, NULL, 702 /* option proc */ optionNumericVal, 703 /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name, 704 /* disablement strs */ NULL, NULL }, 705 706 { /* entry idx, value */ 5, VALUE_OPT_ID_KEY, 707 /* equiv idx, value */ 5, VALUE_OPT_ID_KEY, 708 /* equivalenced to */ NO_EQUIVALENT, 709 /* min, max, act ct */ 0, 1, 0, 710 /* opt state flags */ ID_KEY_FLAGS, 0, 711 /* last opt argumnt */ { NULL }, /* --id-key */ 712 /* arg list/cookie */ NULL, 713 /* must/cannot opts */ NULL, NULL, 714 /* option proc */ NULL, 715 /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name, 716 /* disablement strs */ NULL, NULL }, 717 718 { /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS, 719 /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS, 720 /* equivalenced to */ NO_EQUIVALENT, 721 /* min, max, act ct */ 0, 1, 0, 722 /* opt state flags */ GQ_PARAMS_FLAGS, 0, 723 /* last opt argumnt */ { NULL }, /* --gq-params */ 724 /* arg list/cookie */ NULL, 725 /* must/cannot opts */ NULL, NULL, 726 /* option proc */ NULL, 727 /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name, 728 /* disablement strs */ NULL, NULL }, 729 730 { /* entry idx, value */ 7, VALUE_OPT_HOST_KEY, 731 /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY, 732 /* equivalenced to */ NO_EQUIVALENT, 733 /* min, max, act ct */ 0, 1, 0, 734 /* opt state flags */ HOST_KEY_FLAGS, 0, 735 /* last opt argumnt */ { NULL }, /* --host-key */ 736 /* arg list/cookie */ NULL, 737 /* must/cannot opts */ NULL, NULL, 738 /* option proc */ NULL, 739 /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name, 740 /* disablement strs */ NULL, NULL }, 741 742 { /* entry idx, value */ 8, VALUE_OPT_IFFKEY, 743 /* equiv idx, value */ 8, VALUE_OPT_IFFKEY, 744 /* equivalenced to */ NO_EQUIVALENT, 745 /* min, max, act ct */ 0, 1, 0, 746 /* opt state flags */ IFFKEY_FLAGS, 0, 747 /* last opt argumnt */ { NULL }, /* --iffkey */ 748 /* arg list/cookie */ NULL, 749 /* must/cannot opts */ NULL, NULL, 750 /* option proc */ NULL, 751 /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name, 752 /* disablement strs */ NULL, NULL }, 753 754 { /* entry idx, value */ 9, VALUE_OPT_IDENT, 755 /* equiv idx, value */ 9, VALUE_OPT_IDENT, 756 /* equivalenced to */ NO_EQUIVALENT, 757 /* min, max, act ct */ 0, 1, 0, 758 /* opt state flags */ IDENT_FLAGS, 0, 759 /* last opt argumnt */ { NULL }, /* --ident */ 760 /* arg list/cookie */ NULL, 761 /* must/cannot opts */ NULL, NULL, 762 /* option proc */ NULL, 763 /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name, 764 /* disablement strs */ NULL, NULL }, 765 766 { /* entry idx, value */ 10, VALUE_OPT_LIFETIME, 767 /* equiv idx, value */ 10, VALUE_OPT_LIFETIME, 768 /* equivalenced to */ NO_EQUIVALENT, 769 /* min, max, act ct */ 0, 1, 0, 770 /* opt state flags */ LIFETIME_FLAGS, 0, 771 /* last opt argumnt */ { NULL }, /* --lifetime */ 772 /* arg list/cookie */ NULL, 773 /* must/cannot opts */ NULL, NULL, 774 /* option proc */ optionNumericVal, 775 /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name, 776 /* disablement strs */ NULL, NULL }, 777 778 { /* entry idx, value */ 11, VALUE_OPT_MODULUS, 779 /* equiv idx, value */ 11, VALUE_OPT_MODULUS, 780 /* equivalenced to */ NO_EQUIVALENT, 781 /* min, max, act ct */ 0, 1, 0, 782 /* opt state flags */ MODULUS_FLAGS, 0, 783 /* last opt argumnt */ { NULL }, /* --modulus */ 784 /* arg list/cookie */ NULL, 785 /* must/cannot opts */ NULL, NULL, 786 /* option proc */ doOptModulus, 787 /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name, 788 /* disablement strs */ NULL, NULL }, 789 790 { /* entry idx, value */ 12, VALUE_OPT_MD5KEY, 791 /* equiv idx, value */ 12, VALUE_OPT_MD5KEY, 792 /* equivalenced to */ NO_EQUIVALENT, 793 /* min, max, act ct */ 0, 1, 0, 794 /* opt state flags */ MD5KEY_FLAGS, 0, 795 /* last opt argumnt */ { NULL }, /* --md5key */ 796 /* arg list/cookie */ NULL, 797 /* must/cannot opts */ NULL, NULL, 798 /* option proc */ NULL, 799 /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name, 800 /* disablement strs */ NULL, NULL }, 801 802 { /* entry idx, value */ 13, VALUE_OPT_PVT_CERT, 803 /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT, 804 /* equivalenced to */ NO_EQUIVALENT, 805 /* min, max, act ct */ 0, 1, 0, 806 /* opt state flags */ PVT_CERT_FLAGS, 0, 807 /* last opt argumnt */ { NULL }, /* --pvt-cert */ 808 /* arg list/cookie */ NULL, 809 /* must/cannot opts */ NULL, NULL, 810 /* option proc */ NULL, 811 /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name, 812 /* disablement strs */ NULL, NULL }, 813 814 { /* entry idx, value */ 14, VALUE_OPT_PASSWORD, 815 /* equiv idx, value */ 14, VALUE_OPT_PASSWORD, 816 /* equivalenced to */ NO_EQUIVALENT, 817 /* min, max, act ct */ 0, 1, 0, 818 /* opt state flags */ PASSWORD_FLAGS, 0, 819 /* last opt argumnt */ { NULL }, /* --password */ 820 /* arg list/cookie */ NULL, 821 /* must/cannot opts */ NULL, NULL, 822 /* option proc */ NULL, 823 /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name, 824 /* disablement strs */ NULL, NULL }, 825 826 { /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 827 /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 828 /* equivalenced to */ NO_EQUIVALENT, 829 /* min, max, act ct */ 0, 1, 0, 830 /* opt state flags */ EXPORT_PASSWD_FLAGS, 0, 831 /* last opt argumnt */ { NULL }, /* --export-passwd */ 832 /* arg list/cookie */ NULL, 833 /* must/cannot opts */ NULL, NULL, 834 /* option proc */ NULL, 835 /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name, 836 /* disablement strs */ NULL, NULL }, 837 838 { /* entry idx, value */ 16, VALUE_OPT_SUBJECT_NAME, 839 /* equiv idx, value */ 16, VALUE_OPT_SUBJECT_NAME, 840 /* equivalenced to */ NO_EQUIVALENT, 841 /* min, max, act ct */ 0, 1, 0, 842 /* opt state flags */ SUBJECT_NAME_FLAGS, 0, 843 /* last opt argumnt */ { NULL }, /* --subject-name */ 844 /* arg list/cookie */ NULL, 845 /* must/cannot opts */ NULL, NULL, 846 /* option proc */ NULL, 847 /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name, 848 /* disablement strs */ NULL, NULL }, 849 850 { /* entry idx, value */ 17, VALUE_OPT_SIGN_KEY, 851 /* equiv idx, value */ 17, VALUE_OPT_SIGN_KEY, 852 /* equivalenced to */ NO_EQUIVALENT, 853 /* min, max, act ct */ 0, 1, 0, 854 /* opt state flags */ SIGN_KEY_FLAGS, 0, 855 /* last opt argumnt */ { NULL }, /* --sign-key */ 856 /* arg list/cookie */ NULL, 857 /* must/cannot opts */ NULL, NULL, 858 /* option proc */ NULL, 859 /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name, 860 /* disablement strs */ NULL, NULL }, 861 862 { /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 863 /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 864 /* equivalenced to */ NO_EQUIVALENT, 865 /* min, max, act ct */ 0, 1, 0, 866 /* opt state flags */ TRUSTED_CERT_FLAGS, 0, 867 /* last opt argumnt */ { NULL }, /* --trusted-cert */ 868 /* arg list/cookie */ NULL, 869 /* must/cannot opts */ NULL, NULL, 870 /* option proc */ NULL, 871 /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name, 872 /* disablement strs */ NULL, NULL }, 873 874 { /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS, 875 /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS, 876 /* equivalenced to */ NO_EQUIVALENT, 877 /* min, max, act ct */ 0, 1, 0, 878 /* opt state flags */ MV_PARAMS_FLAGS, 0, 879 /* last opt argumnt */ { NULL }, /* --mv-params */ 880 /* arg list/cookie */ NULL, 881 /* must/cannot opts */ NULL, NULL, 882 /* option proc */ optionNumericVal, 883 /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name, 884 /* disablement strs */ NULL, NULL }, 885 886 { /* entry idx, value */ 20, VALUE_OPT_MV_KEYS, 887 /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS, 888 /* equivalenced to */ NO_EQUIVALENT, 889 /* min, max, act ct */ 0, 1, 0, 890 /* opt state flags */ MV_KEYS_FLAGS, 0, 891 /* last opt argumnt */ { NULL }, /* --mv-keys */ 892 /* arg list/cookie */ NULL, 893 /* must/cannot opts */ NULL, NULL, 894 /* option proc */ optionNumericVal, 895 /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name, 896 /* disablement strs */ NULL, NULL }, 897 898 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, 899 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, 900 /* equivalenced to */ NO_EQUIVALENT, 901 /* min, max, act ct */ 0, 1, 0, 902 /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 903 /* last opt argumnt */ { NULL }, 904 /* arg list/cookie */ NULL, 905 /* must/cannot opts */ NULL, NULL, 906 /* option proc */ VER_PROC, 907 /* desc, NAME, name */ VER_DESC, NULL, VER_name, 908 /* disablement strs */ NULL, NULL }, 909 910 911 912 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, 913 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, 914 /* equivalenced to */ NO_EQUIVALENT, 915 /* min, max, act ct */ 0, 1, 0, 916 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 917 /* last opt argumnt */ { NULL }, 918 /* arg list/cookie */ NULL, 919 /* must/cannot opts */ NULL, NULL, 920 /* option proc */ doUsageOpt, 921 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 922 /* disablement strs */ NULL, NULL }, 923 924 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, 925 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, 926 /* equivalenced to */ NO_EQUIVALENT, 927 /* min, max, act ct */ 0, 1, 0, 928 /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 929 /* last opt argumnt */ { NULL }, 930 /* arg list/cookie */ NULL, 931 /* must/cannot opts */ NULL, NULL, 932 /* option proc */ optionPagedUsage, 933 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 934 /* disablement strs */ NULL, NULL }, 935 936 { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS, 937 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS, 938 /* equivalenced to */ NO_EQUIVALENT, 939 /* min, max, act ct */ 0, 1, 0, 940 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 941 | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS, 942 /* last opt argumnt */ { NULL }, 943 /* arg list/cookie */ NULL, 944 /* must/cannot opts */ NULL, NULL, 945 /* option proc */ NULL, 946 /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name, 947 /* disablement strs */ NULL, NULL }, 948 949 { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS, 950 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS, 951 /* equivalenced to */ NO_EQUIVALENT, 952 /* min, max, act ct */ 0, NOLIMIT, 0, 953 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 954 | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS, 955 /* last opt argumnt */ { NULL }, 956 /* arg list/cookie */ NULL, 957 /* must/cannot opts */ NULL, NULL, 958 /* option proc */ optionLoadOpt, 959 /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name, 960 /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx } 961}; 962 963 964/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 965/** Reference to the upper cased version of ntp-keygen. */ 966#define zPROGNAME (ntp_keygen_opt_strs+2239) 967/** Reference to the title line for ntp-keygen usage. */ 968#define zUsageTitle (ntp_keygen_opt_strs+2250) 969/** ntp-keygen configuration file name. */ 970#define zRcName (ntp_keygen_opt_strs+2373) 971/** Directories to search for ntp-keygen config files. */ 972static char const * const apzHomeList[3] = { 973 ntp_keygen_opt_strs+2365, 974 ntp_keygen_opt_strs+2371, 975 NULL }; 976/** The ntp-keygen program bug email address. */ 977#define zBugsAddr (ntp_keygen_opt_strs+2380) 978/** Clarification/explanation of what ntp-keygen does. */ 979#define zExplain (ntp_keygen_opt_strs+2414) 980/** Extra detail explaining what ntp-keygen does. */ 981#define zDetail (NULL) 982/** The full version string for ntp-keygen. */ 983#define zFullVersion (ntp_keygen_opt_strs+2416) 984/* extracted from optcode.tlib near line 364 */ 985 986#if defined(ENABLE_NLS) 987# define OPTPROC_BASE OPTPROC_TRANSLATE 988 static tOptionXlateProc translate_option_strings; 989#else 990# define OPTPROC_BASE OPTPROC_NONE 991# define translate_option_strings NULL 992#endif /* ENABLE_NLS */ 993 994#define ntp_keygen_full_usage (NULL) 995#define ntp_keygen_short_usage (NULL) 996 997#endif /* not defined __doxygen__ */ 998 999/* 1000 * Create the static procedure(s) declared above. 1001 */ 1002/** 1003 * The callout function that invokes the optionUsage function. 1004 * 1005 * @param[in] opts the AutoOpts option description structure 1006 * @param[in] od the descriptor for the "help" (usage) option. 1007 * @noreturn 1008 */ 1009static void 1010doUsageOpt(tOptions * opts, tOptDesc * od) 1011{ 1012 int ex_code; 1013 ex_code = NTP_KEYGEN_EXIT_SUCCESS; 1014 optionUsage(&ntp_keygenOptions, ex_code); 1015 /* NOTREACHED */ 1016 exit(1); 1017 (void)opts; 1018 (void)od; 1019} 1020 1021/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1022/** 1023 * Code to handle the imbits option, when AUTOKEY is #define-d. 1024 * The number of bits in the identity modulus. The default is 256. 1025 * @param[in] pOptions the ntp-keygen options data structure 1026 * @param[in,out] pOptDesc the option descriptor for this option. 1027 */ 1028#ifdef AUTOKEY 1029static void 1030doOptImbits(tOptions* pOptions, tOptDesc* pOptDesc) 1031{ 1032 static struct {long rmin, rmax;} const rng[1] = { 1033 { 256, 2048 } }; 1034 int ix; 1035 1036 if (pOptions <= OPTPROC_EMIT_LIMIT) 1037 goto emit_ranges; 1038 optionNumericVal(pOptions, pOptDesc); 1039 1040 for (ix = 0; ix < 1; ix++) { 1041 if (pOptDesc->optArg.argInt < rng[ix].rmin) 1042 continue; /* ranges need not be ordered. */ 1043 if (pOptDesc->optArg.argInt == rng[ix].rmin) 1044 return; 1045 if (rng[ix].rmax == LONG_MIN) 1046 continue; 1047 if (pOptDesc->optArg.argInt <= rng[ix].rmax) 1048 return; 1049 } 1050 1051 option_usage_fp = stderr; 1052 1053 emit_ranges: 1054optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1055} 1056#endif /* defined AUTOKEY */ 1057 1058/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1059/** 1060 * Code to handle the debug-level option. 1061 * 1062 * @param[in] pOptions the ntp-keygen options data structure 1063 * @param[in,out] pOptDesc the option descriptor for this option. 1064 */ 1065static void 1066doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc) 1067{ 1068 /* 1069 * Be sure the flag-code[0] handles special values for the options pointer 1070 * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit 1071 * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to 1072 * reset its state. 1073 */ 1074 /* extracted from debug-opt.def, line 15 */ 1075OPT_VALUE_SET_DEBUG_LEVEL++; 1076 (void)pOptDesc; 1077 (void)pOptions; 1078} 1079 1080/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1081/** 1082 * Code to handle the modulus option, when AUTOKEY is #define-d. 1083 * The number of bits in the prime modulus. The default is 512. 1084 * @param[in] pOptions the ntp-keygen options data structure 1085 * @param[in,out] pOptDesc the option descriptor for this option. 1086 */ 1087#ifdef AUTOKEY 1088static void 1089doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc) 1090{ 1091 static struct {long rmin, rmax;} const rng[1] = { 1092 { 256, 2048 } }; 1093 int ix; 1094 1095 if (pOptions <= OPTPROC_EMIT_LIMIT) 1096 goto emit_ranges; 1097 optionNumericVal(pOptions, pOptDesc); 1098 1099 for (ix = 0; ix < 1; ix++) { 1100 if (pOptDesc->optArg.argInt < rng[ix].rmin) 1101 continue; /* ranges need not be ordered. */ 1102 if (pOptDesc->optArg.argInt == rng[ix].rmin) 1103 return; 1104 if (rng[ix].rmax == LONG_MIN) 1105 continue; 1106 if (pOptDesc->optArg.argInt <= rng[ix].rmax) 1107 return; 1108 } 1109 1110 option_usage_fp = stderr; 1111 1112 emit_ranges: 1113optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1114} 1115#endif /* defined AUTOKEY */ 1116/* extracted from optmain.tlib near line 1250 */ 1117 1118/** 1119 * The directory containing the data associated with ntp-keygen. 1120 */ 1121#ifndef PKGDATADIR 1122# define PKGDATADIR "" 1123#endif 1124 1125/** 1126 * Information about the person or institution that packaged ntp-keygen 1127 * for the current distribution. 1128 */ 1129#ifndef WITH_PACKAGER 1130# define ntp_keygen_packager_info NULL 1131#else 1132/** Packager information for ntp-keygen. */ 1133static char const ntp_keygen_packager_info[] = 1134 "Packaged by " WITH_PACKAGER 1135 1136# ifdef WITH_PACKAGER_VERSION 1137 " ("WITH_PACKAGER_VERSION")" 1138# endif 1139 1140# ifdef WITH_PACKAGER_BUG_REPORTS 1141 "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS 1142# endif 1143 "\n"; 1144#endif 1145#ifndef __doxygen__ 1146 1147#endif /* __doxygen__ */ 1148/** 1149 * The option definitions for ntp-keygen. The one structure that 1150 * binds them all. 1151 */ 1152tOptions ntp_keygenOptions = { 1153 OPTIONS_STRUCT_VERSION, 1154 0, NULL, /* original argc + argv */ 1155 ( OPTPROC_BASE 1156 + OPTPROC_ERRSTOP 1157 + OPTPROC_SHORTOPT 1158 + OPTPROC_LONGOPT 1159 + OPTPROC_NO_REQ_OPT 1160 + OPTPROC_ENVIRON 1161 + OPTPROC_NO_ARGS 1162 + OPTPROC_MISUSE ), 1163 0, NULL, /* current option index, current option */ 1164 NULL, NULL, zPROGNAME, 1165 zRcName, zCopyright, zLicenseDescrip, 1166 zFullVersion, apzHomeList, zUsageTitle, 1167 zExplain, zDetail, optDesc, 1168 zBugsAddr, /* address to send bugs to */ 1169 NULL, NULL, /* extensions/saved state */ 1170 optionUsage, /* usage procedure */ 1171 translate_option_strings, /* translation procedure */ 1172 /* 1173 * Indexes to special options 1174 */ 1175 { INDEX_OPT_MORE_HELP, /* more-help option index */ 1176 INDEX_OPT_SAVE_OPTS, /* save option index */ 1177 NO_EQUIVALENT, /* '-#' option index */ 1178 NO_EQUIVALENT /* index of default opt */ 1179 }, 1180 26 /* full option count */, 21 /* user option count */, 1181 ntp_keygen_full_usage, ntp_keygen_short_usage, 1182 NULL, NULL, 1183 PKGDATADIR, ntp_keygen_packager_info 1184}; 1185 1186#if ENABLE_NLS 1187/** 1188 * This code is designed to translate translatable option text for the 1189 * ntp-keygen program. These translations happen upon entry 1190 * to optionProcess(). 1191 */ 1192#include <stdio.h> 1193#include <stdlib.h> 1194#include <string.h> 1195#include <unistd.h> 1196#ifdef HAVE_DCGETTEXT 1197# include <gettext.h> 1198#endif 1199#include <autoopts/usage-txt.h> 1200 1201static char * AO_gettext(char const * pz); 1202static void coerce_it(void ** s); 1203 1204/** 1205 * AutoGen specific wrapper function for gettext. It relies on the macro _() 1206 * to convert from English to the target language, then strdup-duplicates the 1207 * result string. It tries the "libopts" domain first, then whatever has been 1208 * set via the \a textdomain(3) call. 1209 * 1210 * @param[in] pz the input text used as a lookup key. 1211 * @returns the translated text (if there is one), 1212 * or the original text (if not). 1213 */ 1214static char * 1215AO_gettext(char const * pz) 1216{ 1217 char * res; 1218 if (pz == NULL) 1219 return NULL; 1220#ifdef HAVE_DCGETTEXT 1221 /* 1222 * While processing the option_xlateable_txt data, try to use the 1223 * "libopts" domain. Once we switch to the option descriptor data, 1224 * do *not* use that domain. 1225 */ 1226 if (option_xlateable_txt.field_ct != 0) { 1227 res = dgettext("libopts", pz); 1228 if (res == pz) 1229 res = (char *)VOIDP(_(pz)); 1230 } else 1231 res = (char *)VOIDP(_(pz)); 1232#else 1233 res = (char *)VOIDP(_(pz)); 1234#endif 1235 if (res == pz) 1236 return res; 1237 res = strdup(res); 1238 if (res == NULL) { 1239 fputs(_("No memory for duping translated strings\n"), stderr); 1240 exit(NTP_KEYGEN_EXIT_FAILURE); 1241 } 1242 return res; 1243} 1244 1245/** 1246 * All the pointers we use are marked "* const", but they are stored in 1247 * writable memory. Coerce the mutability and set the pointer. 1248 */ 1249static void coerce_it(void ** s) { *s = AO_gettext(*s); 1250} 1251 1252/** 1253 * Translate all the translatable strings in the ntp_keygenOptions 1254 * structure defined above. This is done only once. 1255 */ 1256static void 1257translate_option_strings(void) 1258{ 1259 tOptions * const opts = &ntp_keygenOptions; 1260 1261 /* 1262 * Guard against re-translation. It won't work. The strings will have 1263 * been changed by the first pass through this code. One shot only. 1264 */ 1265 if (option_xlateable_txt.field_ct != 0) { 1266 /* 1267 * Do the translations. The first pointer follows the field count 1268 * field. The field count field is the size of a pointer. 1269 */ 1270 char ** ppz = (char**)VOIDP(&(option_xlateable_txt)); 1271 int ix = option_xlateable_txt.field_ct; 1272 1273 do { 1274 ppz++; /* skip over field_ct */ 1275 *ppz = AO_gettext(*ppz); 1276 } while (--ix > 0); 1277 /* prevent re-translation and disable "libopts" domain lookup */ 1278 option_xlateable_txt.field_ct = 0; 1279 1280 coerce_it(VOIDP(&(opts->pzCopyright))); 1281 coerce_it(VOIDP(&(opts->pzCopyNotice))); 1282 coerce_it(VOIDP(&(opts->pzFullVersion))); 1283 coerce_it(VOIDP(&(opts->pzUsageTitle))); 1284 coerce_it(VOIDP(&(opts->pzExplain))); 1285 coerce_it(VOIDP(&(opts->pzDetail))); 1286 { 1287 tOptDesc * od = opts->pOptDesc; 1288 for (ix = opts->optCt; ix > 0; ix--, od++) 1289 coerce_it(VOIDP(&(od->pzText))); 1290 } 1291 } 1292} 1293#endif /* ENABLE_NLS */ 1294 1295#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 1296/** I18N function strictly for xgettext. Do not compile. */ 1297static void bogus_function(void) { 1298 /* TRANSLATORS: 1299 1300 The following dummy function was crated solely so that xgettext can 1301 extract the correct strings. These strings are actually referenced 1302 by a field name in the ntp_keygenOptions structure noted in the 1303 comments below. The literal text is defined in ntp_keygen_opt_strs. 1304 1305 NOTE: the strings below are segmented with respect to the source string 1306 ntp_keygen_opt_strs. The strings above are handed off for translation 1307 at run time a paragraph at a time. Consequently, they are presented here 1308 for translation a paragraph at a time. 1309 1310 ALSO: often the description for an option will reference another option 1311 by name. These are set off with apostrophe quotes (I hope). Do not 1312 translate option names. 1313 */ 1314 /* referenced via ntp_keygenOptions.pzCopyright */ 1315 puts(_("ntp-keygen (ntp) 4.2.8p15\n\ 1316Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\ 1317This is free software. It is licensed for use, modification and\n\ 1318redistribution under the terms of the NTP License, copies of which\n\ 1319can be seen at:\n")); 1320 puts(_(" <http://ntp.org/license>\n\ 1321 <http://opensource.org/licenses/ntp-license.php>\n")); 1322 1323 /* referenced via ntp_keygenOptions.pzCopyNotice */ 1324 puts(_("Permission to use, copy, modify, and distribute this software and its\n\ 1325documentation for any purpose with or without fee is hereby granted,\n\ 1326provided that the above copyright notice appears in all copies and that\n\ 1327both the copyright notice and this permission notice appear in supporting\n\ 1328documentation, and that the name The University of Delaware not be used in\n\ 1329advertising or publicity pertaining to distribution of the software without\n\ 1330specific, written prior permission. The University of Delaware and Network\n\ 1331Time Foundation makes no representations about the suitability this\n\ 1332software for any purpose. It is provided \"as is\" without express or\n\ 1333implied warranty.\n")); 1334 1335 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1336 puts(_("identity modulus bits")); 1337 1338 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1339 puts(_("certificate scheme")); 1340 1341 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1342 puts(_("privatekey cipher")); 1343 1344 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1345 puts(_("Increase debug verbosity level")); 1346 1347 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1348 puts(_("Set the debug verbosity level")); 1349 1350 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1351 puts(_("Write IFF or GQ identity keys")); 1352 1353 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1354 puts(_("Generate GQ parameters and keys")); 1355 1356 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1357 puts(_("generate RSA host key")); 1358 1359 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1360 puts(_("generate IFF parameters")); 1361 1362 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1363 puts(_("set Autokey group name")); 1364 1365 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1366 puts(_("set certificate lifetime")); 1367 1368 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1369 puts(_("prime modulus")); 1370 1371 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1372 puts(_("generate symmetric keys")); 1373 1374 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1375 puts(_("generate PC private certificate")); 1376 1377 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1378 puts(_("local private password")); 1379 1380 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1381 puts(_("export IFF or GQ group keys with password")); 1382 1383 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1384 puts(_("set host and optionally group name")); 1385 1386 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1387 puts(_("generate sign key (RSA or DSA)")); 1388 1389 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1390 puts(_("trusted certificate (TC scheme)")); 1391 1392 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1393 puts(_("generate <num> MV parameters")); 1394 1395 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1396 puts(_("update <num> MV keys")); 1397 1398 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1399 puts(_("display extended usage information and exit")); 1400 1401 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1402 puts(_("extended usage information passed thru pager")); 1403 1404 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1405 puts(_("output version information and exit")); 1406 1407 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1408 puts(_("save the option state to a config file")); 1409 1410 /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1411 puts(_("load options from a config file")); 1412 1413 /* referenced via ntp_keygenOptions.pzUsageTitle */ 1414 puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p15\n\ 1415Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); 1416 1417 /* referenced via ntp_keygenOptions.pzExplain */ 1418 puts(_("\n")); 1419 1420 /* referenced via ntp_keygenOptions.pzFullVersion */ 1421 puts(_("ntp-keygen (ntp) 4.2.8p15")); 1422 1423 /* referenced via ntp_keygenOptions.pzFullUsage */ 1424 puts(_("<<<NOT-FOUND>>>")); 1425 1426 /* referenced via ntp_keygenOptions.pzShortUsage */ 1427 puts(_("<<<NOT-FOUND>>>")); 1428 /* LIBOPTS-MESSAGES: */ 1429#line 67 "../autoopts.c" 1430 puts(_("allocation of %d bytes failed\n")); 1431#line 93 "../autoopts.c" 1432 puts(_("allocation of %d bytes failed\n")); 1433#line 53 "../init.c" 1434 puts(_("AutoOpts function called without option descriptor\n")); 1435#line 86 "../init.c" 1436 puts(_("\tThis exceeds the compiled library version: ")); 1437#line 84 "../init.c" 1438 puts(_("Automated Options Processing Error!\n" 1439 "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 1440#line 80 "../autoopts.c" 1441 puts(_("realloc of %d bytes at 0x%p failed\n")); 1442#line 88 "../init.c" 1443 puts(_("\tThis is less than the minimum library version: ")); 1444#line 121 "../version.c" 1445 puts(_("Automated Options version %s\n" 1446 "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); 1447#line 87 "../makeshell.c" 1448 puts(_("(AutoOpts bug): %s.\n")); 1449#line 90 "../reset.c" 1450 puts(_("optionResetOpt() called, but reset-option not configured")); 1451#line 292 "../usage.c" 1452 puts(_("could not locate the 'help' option")); 1453#line 336 "../autoopts.c" 1454 puts(_("optionProcess() was called with invalid data")); 1455#line 748 "../usage.c" 1456 puts(_("invalid argument type specified")); 1457#line 598 "../find.c" 1458 puts(_("defaulted to option with optional arg")); 1459#line 76 "../alias.c" 1460 puts(_("aliasing option is out of range.")); 1461#line 234 "../enum.c" 1462 puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 1463#line 108 "../find.c" 1464 puts(_(" The following options match:\n")); 1465#line 293 "../find.c" 1466 puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 1467#line 161 "../check.c" 1468 puts(_("%s: Command line arguments required\n")); 1469#line 43 "../alias.c" 1470 puts(_("%d %s%s options allowed\n")); 1471#line 94 "../makeshell.c" 1472 puts(_("%s error %d (%s) calling %s for '%s'\n")); 1473#line 306 "../makeshell.c" 1474 puts(_("interprocess pipe")); 1475#line 168 "../version.c" 1476 puts(_("error: version option argument '%c' invalid. Use:\n" 1477 "\t'v' - version only\n" 1478 "\t'c' - version and copyright\n" 1479 "\t'n' - version and full copyright notice\n")); 1480#line 58 "../check.c" 1481 puts(_("%s error: the '%s' and '%s' options conflict\n")); 1482#line 217 "../find.c" 1483 puts(_("%s: The '%s' option has been disabled.")); 1484#line 430 "../find.c" 1485 puts(_("%s: The '%s' option has been disabled.")); 1486#line 38 "../alias.c" 1487 puts(_("-equivalence")); 1488#line 469 "../find.c" 1489 puts(_("%s: illegal option -- %c\n")); 1490#line 110 "../reset.c" 1491 puts(_("%s: illegal option -- %c\n")); 1492#line 271 "../find.c" 1493 puts(_("%s: illegal option -- %s\n")); 1494#line 755 "../find.c" 1495 puts(_("%s: illegal option -- %s\n")); 1496#line 118 "../reset.c" 1497 puts(_("%s: illegal option -- %s\n")); 1498#line 335 "../find.c" 1499 puts(_("%s: unknown vendor extension option -- %s\n")); 1500#line 159 "../enum.c" 1501 puts(_(" or an integer from %d through %d\n")); 1502#line 169 "../enum.c" 1503 puts(_(" or an integer from %d through %d\n")); 1504#line 747 "../usage.c" 1505 puts(_("%s error: invalid option descriptor for %s\n")); 1506#line 1081 "../usage.c" 1507 puts(_("%s error: invalid option descriptor for %s\n")); 1508#line 385 "../find.c" 1509 puts(_("%s: invalid option name: %s\n")); 1510#line 527 "../find.c" 1511 puts(_("%s: The '%s' option requires an argument.\n")); 1512#line 156 "../autoopts.c" 1513 puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 1514 "\t'%s' and '%s'.")); 1515#line 94 "../check.c" 1516 puts(_("%s error: The %s option is required\n")); 1517#line 632 "../find.c" 1518 puts(_("%s: The '%s' option cannot have an argument.\n")); 1519#line 151 "../check.c" 1520 puts(_("%s: Command line arguments are not allowed.\n")); 1521#line 535 "../save.c" 1522 puts(_("error %d (%s) creating %s\n")); 1523#line 234 "../enum.c" 1524 puts(_("%s error: '%s' does not match any %s keywords.\n")); 1525#line 93 "../reset.c" 1526 puts(_("%s error: The '%s' option requires an argument.\n")); 1527#line 184 "../save.c" 1528 puts(_("error %d (%s) stat-ing %s\n")); 1529#line 238 "../save.c" 1530 puts(_("error %d (%s) stat-ing %s\n")); 1531#line 143 "../restore.c" 1532 puts(_("%s error: no saved option state\n")); 1533#line 231 "../autoopts.c" 1534 puts(_("'%s' is not a command line option.\n")); 1535#line 111 "../time.c" 1536 puts(_("%s error: '%s' is not a recognizable date/time.\n")); 1537#line 132 "../save.c" 1538 puts(_("'%s' not defined\n")); 1539#line 50 "../time.c" 1540 puts(_("%s error: '%s' is not a recognizable time duration.\n")); 1541#line 92 "../check.c" 1542 puts(_("%s error: The %s option must appear %d times.\n")); 1543#line 164 "../numeric.c" 1544 puts(_("%s error: '%s' is not a recognizable number.\n")); 1545#line 200 "../enum.c" 1546 puts(_("%s error: %s exceeds %s keyword count\n")); 1547#line 330 "../usage.c" 1548 puts(_("Try '%s %s' for more information.\n")); 1549#line 45 "../alias.c" 1550 puts(_("one %s%s option allowed\n")); 1551#line 208 "../makeshell.c" 1552 puts(_("standard output")); 1553#line 943 "../makeshell.c" 1554 puts(_("standard output")); 1555#line 274 "../usage.c" 1556 puts(_("standard output")); 1557#line 415 "../usage.c" 1558 puts(_("standard output")); 1559#line 625 "../usage.c" 1560 puts(_("standard output")); 1561#line 175 "../version.c" 1562 puts(_("standard output")); 1563#line 274 "../usage.c" 1564 puts(_("standard error")); 1565#line 415 "../usage.c" 1566 puts(_("standard error")); 1567#line 625 "../usage.c" 1568 puts(_("standard error")); 1569#line 175 "../version.c" 1570 puts(_("standard error")); 1571#line 208 "../makeshell.c" 1572 puts(_("write")); 1573#line 943 "../makeshell.c" 1574 puts(_("write")); 1575#line 273 "../usage.c" 1576 puts(_("write")); 1577#line 414 "../usage.c" 1578 puts(_("write")); 1579#line 624 "../usage.c" 1580 puts(_("write")); 1581#line 174 "../version.c" 1582 puts(_("write")); 1583#line 60 "../numeric.c" 1584 puts(_("%s error: %s option value %ld is out of range.\n")); 1585#line 44 "../check.c" 1586 puts(_("%s error: %s option requires the %s option\n")); 1587#line 131 "../save.c" 1588 puts(_("%s warning: cannot save options - %s not regular file\n")); 1589#line 183 "../save.c" 1590 puts(_("%s warning: cannot save options - %s not regular file\n")); 1591#line 237 "../save.c" 1592 puts(_("%s warning: cannot save options - %s not regular file\n")); 1593#line 256 "../save.c" 1594 puts(_("%s warning: cannot save options - %s not regular file\n")); 1595#line 534 "../save.c" 1596 puts(_("%s warning: cannot save options - %s not regular file\n")); 1597 /* END-LIBOPTS-MESSAGES */ 1598 1599 /* USAGE-TEXT: */ 1600#line 873 "../usage.c" 1601 puts(_("\t\t\t\t- an alternate for '%s'\n")); 1602#line 1148 "../usage.c" 1603 puts(_("Version, usage and configuration options:")); 1604#line 924 "../usage.c" 1605 puts(_("\t\t\t\t- default option for unnamed options\n")); 1606#line 837 "../usage.c" 1607 puts(_("\t\t\t\t- disabled as '--%s'\n")); 1608#line 1117 "../usage.c" 1609 puts(_(" --- %-14s %s\n")); 1610#line 1115 "../usage.c" 1611 puts(_("This option has been disabled")); 1612#line 864 "../usage.c" 1613 puts(_("\t\t\t\t- enabled by default\n")); 1614#line 40 "../alias.c" 1615 puts(_("%s error: only ")); 1616#line 1194 "../usage.c" 1617 puts(_(" - examining environment variables named %s_*\n")); 1618#line 168 "../file.c" 1619 puts(_("\t\t\t\t- file must not pre-exist\n")); 1620#line 172 "../file.c" 1621 puts(_("\t\t\t\t- file must pre-exist\n")); 1622#line 380 "../usage.c" 1623 puts(_("Options are specified by doubled hyphens and their name or by a single\n" 1624 "hyphen and the flag character.\n")); 1625#line 921 "../makeshell.c" 1626 puts(_("\n" 1627 "= = = = = = = =\n\n" 1628 "This incarnation of genshell will produce\n" 1629 "a shell script to parse the options for %s:\n\n")); 1630#line 166 "../enum.c" 1631 puts(_(" or an integer mask with any of the lower %d bits set\n")); 1632#line 897 "../usage.c" 1633 puts(_("\t\t\t\t- is a set membership option\n")); 1634#line 918 "../usage.c" 1635 puts(_("\t\t\t\t- must appear between %d and %d times\n")); 1636#line 382 "../usage.c" 1637 puts(_("Options are specified by single or double hyphens and their name.\n")); 1638#line 904 "../usage.c" 1639 puts(_("\t\t\t\t- may appear multiple times\n")); 1640#line 891 "../usage.c" 1641 puts(_("\t\t\t\t- may not be preset\n")); 1642#line 1309 "../usage.c" 1643 puts(_(" Arg Option-Name Description\n")); 1644#line 1245 "../usage.c" 1645 puts(_(" Flg Arg Option-Name Description\n")); 1646#line 1303 "../usage.c" 1647 puts(_(" Flg Arg Option-Name Description\n")); 1648#line 1304 "../usage.c" 1649 puts(_(" %3s %s")); 1650#line 1310 "../usage.c" 1651 puts(_(" %3s %s")); 1652#line 387 "../usage.c" 1653 puts(_("The '-#<number>' option may omit the hash char\n")); 1654#line 383 "../usage.c" 1655 puts(_("All arguments are named options.\n")); 1656#line 971 "../usage.c" 1657 puts(_(" - reading file %s")); 1658#line 409 "../usage.c" 1659 puts(_("\n" 1660 "Please send bug reports to: <%s>\n")); 1661#line 100 "../version.c" 1662 puts(_("\n" 1663 "Please send bug reports to: <%s>\n")); 1664#line 129 "../version.c" 1665 puts(_("\n" 1666 "Please send bug reports to: <%s>\n")); 1667#line 903 "../usage.c" 1668 puts(_("\t\t\t\t- may NOT appear - preset only\n")); 1669#line 944 "../usage.c" 1670 puts(_("\n" 1671 "The following option preset mechanisms are supported:\n")); 1672#line 1192 "../usage.c" 1673 puts(_("\n" 1674 "The following option preset mechanisms are supported:\n")); 1675#line 682 "../usage.c" 1676 puts(_("prohibits these options:\n")); 1677#line 677 "../usage.c" 1678 puts(_("prohibits the option '%s'\n")); 1679#line 81 "../numeric.c" 1680 puts(_("%s%ld to %ld")); 1681#line 79 "../numeric.c" 1682 puts(_("%sgreater than or equal to %ld")); 1683#line 75 "../numeric.c" 1684 puts(_("%s%ld exactly")); 1685#line 68 "../numeric.c" 1686 puts(_("%sit must lie in one of the ranges:\n")); 1687#line 68 "../numeric.c" 1688 puts(_("%sit must be in the range:\n")); 1689#line 88 "../numeric.c" 1690 puts(_(", or\n")); 1691#line 66 "../numeric.c" 1692 puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 1693#line 77 "../numeric.c" 1694 puts(_("%sless than or equal to %ld")); 1695#line 390 "../usage.c" 1696 puts(_("Operands and options may be intermixed. They will be reordered.\n")); 1697#line 652 "../usage.c" 1698 puts(_("requires the option '%s'\n")); 1699#line 655 "../usage.c" 1700 puts(_("requires these options:\n")); 1701#line 1321 "../usage.c" 1702 puts(_(" Arg Option-Name Req? Description\n")); 1703#line 1315 "../usage.c" 1704 puts(_(" Flg Arg Option-Name Req? Description\n")); 1705#line 167 "../enum.c" 1706 puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 1707 "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 1708 "will set them all. Multiple entries may be passed as an option\n" 1709 "argument list.\n")); 1710#line 910 "../usage.c" 1711 puts(_("\t\t\t\t- may appear up to %d times\n")); 1712#line 77 "../enum.c" 1713 puts(_("The valid \"%s\" option keywords are:\n")); 1714#line 1152 "../usage.c" 1715 puts(_("The next option supports vendor supported extra options:")); 1716#line 773 "../usage.c" 1717 puts(_("These additional options are:")); 1718 /* END-USAGE-TEXT */ 1719} 1720#endif /* uncompilable code */ 1721#ifdef __cplusplus 1722} 1723#endif 1724/* ntp-keygen-opts.c ends here */ 1725