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