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