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