1*eabc0478Schristos /* $NetBSD: ntp-keygen-opts.c,v 1.20 2024/08/18 20:47:27 christos Exp $ */ 2abb0f93cSkardel 3abb0f93cSkardel /* 4abb0f93cSkardel * EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c) 5abb0f93cSkardel * 6*eabc0478Schristos * It has been AutoGen-ed May 25, 2024 at 12:04:43 AM by AutoGen 5.18.16 7abb0f93cSkardel * From the definitions ntp-keygen-opts.def 8abb0f93cSkardel * and the template file options 9abb0f93cSkardel * 10*eabc0478Schristos * Generated from AutoOpts 42:1:17 templates. 113123f114Skardel * 123123f114Skardel * AutoOpts is a copyrighted work. This source file is not encumbered 133123f114Skardel * by AutoOpts licensing, but is provided under the licensing terms chosen 143123f114Skardel * by the ntp-keygen author or copyright holder. AutoOpts is 153123f114Skardel * licensed under the terms of the LGPL. The redistributable library 163123f114Skardel * (``libopts'') is licensed under the terms of either the LGPL or, at the 173123f114Skardel * users discretion, the BSD license. See the AutoOpts and/or libopts sources 183123f114Skardel * for details. 19abb0f93cSkardel * 202950cc38Schristos * The ntp-keygen program is copyrighted and licensed 212950cc38Schristos * under the following terms: 22abb0f93cSkardel * 23*eabc0478Schristos * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved. 242950cc38Schristos * This is free software. It is licensed for use, modification and 252950cc38Schristos * redistribution under the terms of the NTP License, copies of which 262950cc38Schristos * can be seen at: 272950cc38Schristos * <http://ntp.org/license> 282950cc38Schristos * <http://opensource.org/licenses/ntp-license.php> 293123f114Skardel * 302950cc38Schristos * Permission to use, copy, modify, and distribute this software and its 312950cc38Schristos * documentation for any purpose with or without fee is hereby granted, 322950cc38Schristos * provided that the above copyright notice appears in all copies and that 332950cc38Schristos * both the copyright notice and this permission notice appear in 342950cc38Schristos * supporting documentation, and that the name The University of Delaware not be used in 352950cc38Schristos * advertising or publicity pertaining to distribution of the software 367476e6e4Schristos * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no 372950cc38Schristos * representations about the suitability this software for any purpose. It 382950cc38Schristos * is provided "as is" without express or implied warranty. 39abb0f93cSkardel */ 40abb0f93cSkardel 412950cc38Schristos #ifndef __doxygen__ 422950cc38Schristos #define OPTION_CODE_COMPILE 1 432950cc38Schristos #include "ntp-keygen-opts.h" 44abb0f93cSkardel #include <sys/types.h> 45*eabc0478Schristos #include <sys/stat.h> 463123f114Skardel 47*eabc0478Schristos #include <errno.h> 48*eabc0478Schristos #include <fcntl.h> 49abb0f93cSkardel #include <limits.h> 50abb0f93cSkardel #include <stdio.h> 51abb0f93cSkardel #include <stdlib.h> 52*eabc0478Schristos #include <string.h> 53*eabc0478Schristos #include <unistd.h> 54abb0f93cSkardel 55abb0f93cSkardel #ifdef __cplusplus 56abb0f93cSkardel extern "C" { 57abb0f93cSkardel #endif 583123f114Skardel extern FILE * option_usage_fp; 592950cc38Schristos #define zCopyright (ntp_keygen_opt_strs+0) 60ccc794f0Schristos #define zLicenseDescrip (ntp_keygen_opt_strs+353) 61abb0f93cSkardel 62abb0f93cSkardel /* 63abb0f93cSkardel * global included definitions 64abb0f93cSkardel */ 65abb0f93cSkardel #include <stdlib.h> 662950cc38Schristos 67abb0f93cSkardel #ifdef __windows 68abb0f93cSkardel extern int atoi(const char*); 69abb0f93cSkardel #else 70abb0f93cSkardel # include <stdlib.h> 71abb0f93cSkardel #endif 72abb0f93cSkardel 73abb0f93cSkardel #ifndef NULL 74abb0f93cSkardel # define NULL 0 75abb0f93cSkardel #endif 76abb0f93cSkardel 772950cc38Schristos /** 782950cc38Schristos * static const strings for ntp-keygen options 79abb0f93cSkardel */ 80*eabc0478Schristos static char const ntp_keygen_opt_strs[2443] = 81*eabc0478Schristos /* 0 */ "ntp-keygen (ntp) 4.2.8p18\n" 82*eabc0478Schristos "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n" 832950cc38Schristos "This is free software. It is licensed for use, modification and\n" 842950cc38Schristos "redistribution under the terms of the NTP License, copies of which\n" 852950cc38Schristos "can be seen at:\n" 862950cc38Schristos " <http://ntp.org/license>\n" 872950cc38Schristos " <http://opensource.org/licenses/ntp-license.php>\n\0" 88ccc794f0Schristos /* 353 */ "Permission to use, copy, modify, and distribute this software and its\n" 892950cc38Schristos "documentation for any purpose with or without fee is hereby granted,\n" 902950cc38Schristos "provided that the above copyright notice appears in all copies and that\n" 912950cc38Schristos "both the copyright notice and this permission notice appear in supporting\n" 922950cc38Schristos "documentation, and that the name The University of Delaware not be used in\n" 932950cc38Schristos "advertising or publicity pertaining to distribution of the software without\n" 947476e6e4Schristos "specific, written prior permission. The University of Delaware and Network\n" 957476e6e4Schristos "Time Foundation makes no representations about the suitability this\n" 967476e6e4Schristos "software for any purpose. It is provided \"as is\" without express or\n" 977476e6e4Schristos "implied warranty.\n\0" 98ccc794f0Schristos /* 1021 */ "identity modulus bits\0" 99ccc794f0Schristos /* 1043 */ "IMBITS\0" 100ccc794f0Schristos /* 1050 */ "imbits\0" 101ccc794f0Schristos /* 1057 */ "certificate scheme\0" 102ccc794f0Schristos /* 1076 */ "CERTIFICATE\0" 103ccc794f0Schristos /* 1088 */ "certificate\0" 104ccc794f0Schristos /* 1100 */ "privatekey cipher\0" 105ccc794f0Schristos /* 1118 */ "CIPHER\0" 106ccc794f0Schristos /* 1125 */ "cipher\0" 107ccc794f0Schristos /* 1132 */ "Increase debug verbosity level\0" 108ccc794f0Schristos /* 1163 */ "DEBUG_LEVEL\0" 109ccc794f0Schristos /* 1175 */ "debug-level\0" 110ccc794f0Schristos /* 1187 */ "Set the debug verbosity level\0" 111ccc794f0Schristos /* 1217 */ "SET_DEBUG_LEVEL\0" 112ccc794f0Schristos /* 1233 */ "set-debug-level\0" 113ccc794f0Schristos /* 1249 */ "Write IFF or GQ identity keys\0" 114ccc794f0Schristos /* 1279 */ "ID_KEY\0" 115ccc794f0Schristos /* 1286 */ "id-key\0" 116ccc794f0Schristos /* 1293 */ "Generate GQ parameters and keys\0" 117ccc794f0Schristos /* 1325 */ "GQ_PARAMS\0" 118ccc794f0Schristos /* 1335 */ "gq-params\0" 119ccc794f0Schristos /* 1345 */ "generate RSA host key\0" 120ccc794f0Schristos /* 1367 */ "HOST_KEY\0" 121ccc794f0Schristos /* 1376 */ "host-key\0" 122ccc794f0Schristos /* 1385 */ "generate IFF parameters\0" 123ccc794f0Schristos /* 1409 */ "IFFKEY\0" 124ccc794f0Schristos /* 1416 */ "iffkey\0" 125ccc794f0Schristos /* 1423 */ "set Autokey group name\0" 126ccc794f0Schristos /* 1446 */ "IDENT\0" 127ccc794f0Schristos /* 1452 */ "ident\0" 128ccc794f0Schristos /* 1458 */ "set certificate lifetime\0" 129ccc794f0Schristos /* 1483 */ "LIFETIME\0" 130ccc794f0Schristos /* 1492 */ "lifetime\0" 1314eea345dSchristos /* 1501 */ "prime modulus\0" 1324eea345dSchristos /* 1515 */ "MODULUS\0" 1334eea345dSchristos /* 1523 */ "modulus\0" 1344eea345dSchristos /* 1531 */ "generate symmetric keys\0" 1354eea345dSchristos /* 1555 */ "MD5KEY\0" 1364eea345dSchristos /* 1562 */ "md5key\0" 1374eea345dSchristos /* 1569 */ "generate PC private certificate\0" 1384eea345dSchristos /* 1601 */ "PVT_CERT\0" 1394eea345dSchristos /* 1610 */ "pvt-cert\0" 1404eea345dSchristos /* 1619 */ "local private password\0" 1414eea345dSchristos /* 1642 */ "PASSWORD\0" 1424eea345dSchristos /* 1651 */ "password\0" 1434eea345dSchristos /* 1660 */ "export IFF or GQ group keys with password\0" 1444eea345dSchristos /* 1702 */ "EXPORT_PASSWD\0" 1454eea345dSchristos /* 1716 */ "export-passwd\0" 1464eea345dSchristos /* 1730 */ "set host and optionally group name\0" 1474eea345dSchristos /* 1765 */ "SUBJECT_NAME\0" 1484eea345dSchristos /* 1778 */ "subject-name\0" 1494eea345dSchristos /* 1791 */ "generate sign key (RSA or DSA)\0" 1504eea345dSchristos /* 1822 */ "SIGN_KEY\0" 1514eea345dSchristos /* 1831 */ "sign-key\0" 1524eea345dSchristos /* 1840 */ "trusted certificate (TC scheme)\0" 1534eea345dSchristos /* 1872 */ "TRUSTED_CERT\0" 1544eea345dSchristos /* 1885 */ "trusted-cert\0" 1554eea345dSchristos /* 1898 */ "generate <num> MV parameters\0" 1564eea345dSchristos /* 1927 */ "MV_PARAMS\0" 1574eea345dSchristos /* 1937 */ "mv-params\0" 1584eea345dSchristos /* 1947 */ "update <num> MV keys\0" 1594eea345dSchristos /* 1968 */ "MV_KEYS\0" 1604eea345dSchristos /* 1976 */ "mv-keys\0" 1614eea345dSchristos /* 1984 */ "display extended usage information and exit\0" 1624eea345dSchristos /* 2028 */ "help\0" 1634eea345dSchristos /* 2033 */ "extended usage information passed thru pager\0" 1644eea345dSchristos /* 2078 */ "more-help\0" 1654eea345dSchristos /* 2088 */ "output version information and exit\0" 1664eea345dSchristos /* 2124 */ "version\0" 1674eea345dSchristos /* 2132 */ "save the option state to a config file\0" 1684eea345dSchristos /* 2171 */ "save-opts\0" 1694eea345dSchristos /* 2181 */ "load options from a config file\0" 1704eea345dSchristos /* 2213 */ "LOAD_OPTS\0" 1714eea345dSchristos /* 2223 */ "no-load-opts\0" 1724eea345dSchristos /* 2236 */ "no\0" 1734eea345dSchristos /* 2239 */ "NTP_KEYGEN\0" 174*eabc0478Schristos /* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p18\n" 1752950cc38Schristos "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" 1764eea345dSchristos /* 2365 */ "$HOME\0" 1774eea345dSchristos /* 2371 */ ".\0" 1784eea345dSchristos /* 2373 */ ".ntprc\0" 179*eabc0478Schristos /* 2380 */ "https://bugs.ntp.org, bugs@ntp.org\0" 180*eabc0478Schristos /* 2415 */ "\n\0" 181*eabc0478Schristos /* 2417 */ "ntp-keygen (ntp) 4.2.8p18"; 1822950cc38Schristos 1832950cc38Schristos /** 1842950cc38Schristos * imbits option description: 1852950cc38Schristos */ 1862950cc38Schristos #ifdef AUTOKEY 1872950cc38Schristos /** Descriptive text for the imbits option */ 188ccc794f0Schristos #define IMBITS_DESC (ntp_keygen_opt_strs+1021) 1892950cc38Schristos /** Upper-cased name for the imbits option */ 190ccc794f0Schristos #define IMBITS_NAME (ntp_keygen_opt_strs+1043) 1912950cc38Schristos /** Name string for the imbits option */ 192ccc794f0Schristos #define IMBITS_name (ntp_keygen_opt_strs+1050) 1932950cc38Schristos /** Compiled in flag settings for the imbits option */ 1942950cc38Schristos #define IMBITS_FLAGS (OPTST_DISABLED \ 1952950cc38Schristos | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 1962950cc38Schristos 1972950cc38Schristos #else /* disable imbits */ 1982950cc38Schristos #define IMBITS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 1992950cc38Schristos #define IMBITS_NAME NULL 2002950cc38Schristos #define IMBITS_DESC NULL 2012950cc38Schristos #define IMBITS_name NULL 2022950cc38Schristos #endif /* AUTOKEY */ 2032950cc38Schristos 2042950cc38Schristos /** 2052950cc38Schristos * certificate option description: 2062950cc38Schristos */ 2072950cc38Schristos #ifdef AUTOKEY 2082950cc38Schristos /** Descriptive text for the certificate option */ 209ccc794f0Schristos #define CERTIFICATE_DESC (ntp_keygen_opt_strs+1057) 2102950cc38Schristos /** Upper-cased name for the certificate option */ 211ccc794f0Schristos #define CERTIFICATE_NAME (ntp_keygen_opt_strs+1076) 2122950cc38Schristos /** Name string for the certificate option */ 213ccc794f0Schristos #define CERTIFICATE_name (ntp_keygen_opt_strs+1088) 2142950cc38Schristos /** Compiled in flag settings for the certificate option */ 215abb0f93cSkardel #define CERTIFICATE_FLAGS (OPTST_DISABLED \ 216abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 217abb0f93cSkardel 2182950cc38Schristos #else /* disable certificate */ 219abb0f93cSkardel #define CERTIFICATE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 2202950cc38Schristos #define CERTIFICATE_NAME NULL 2212950cc38Schristos #define CERTIFICATE_DESC NULL 2222950cc38Schristos #define CERTIFICATE_name NULL 2232950cc38Schristos #endif /* AUTOKEY */ 224abb0f93cSkardel 2252950cc38Schristos /** 2262950cc38Schristos * cipher option description: 227abb0f93cSkardel */ 2282950cc38Schristos #ifdef AUTOKEY 2292950cc38Schristos /** Descriptive text for the cipher option */ 230ccc794f0Schristos #define CIPHER_DESC (ntp_keygen_opt_strs+1100) 2312950cc38Schristos /** Upper-cased name for the cipher option */ 232ccc794f0Schristos #define CIPHER_NAME (ntp_keygen_opt_strs+1118) 2332950cc38Schristos /** Name string for the cipher option */ 234ccc794f0Schristos #define CIPHER_name (ntp_keygen_opt_strs+1125) 2352950cc38Schristos /** Compiled in flag settings for the cipher option */ 2362950cc38Schristos #define CIPHER_FLAGS (OPTST_DISABLED \ 2372950cc38Schristos | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 2382950cc38Schristos 2392950cc38Schristos #else /* disable cipher */ 2402950cc38Schristos #define CIPHER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 2412950cc38Schristos #define CIPHER_NAME NULL 2422950cc38Schristos #define CIPHER_DESC NULL 2432950cc38Schristos #define CIPHER_name NULL 2442950cc38Schristos #endif /* AUTOKEY */ 2452950cc38Schristos 2462950cc38Schristos /** 2472950cc38Schristos * debug-level option description: 2482950cc38Schristos */ 2492950cc38Schristos /** Descriptive text for the debug-level option */ 250ccc794f0Schristos #define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1132) 2512950cc38Schristos /** Upper-cased name for the debug-level option */ 252ccc794f0Schristos #define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1163) 2532950cc38Schristos /** Name string for the debug-level option */ 254ccc794f0Schristos #define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1175) 2552950cc38Schristos /** Compiled in flag settings for the debug-level option */ 256abb0f93cSkardel #define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) 257abb0f93cSkardel 2582950cc38Schristos /** 2592950cc38Schristos * set-debug-level option description: 260abb0f93cSkardel */ 2612950cc38Schristos /** Descriptive text for the set-debug-level option */ 262ccc794f0Schristos #define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1187) 2632950cc38Schristos /** Upper-cased name for the set-debug-level option */ 264ccc794f0Schristos #define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1217) 2652950cc38Schristos /** Name string for the set-debug-level option */ 266ccc794f0Schristos #define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1233) 2672950cc38Schristos /** Compiled in flag settings for the set-debug-level option */ 268abb0f93cSkardel #define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ 2692950cc38Schristos | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 270abb0f93cSkardel 2712950cc38Schristos /** 2722950cc38Schristos * id-key option description: 273abb0f93cSkardel */ 2742950cc38Schristos #ifdef AUTOKEY 2752950cc38Schristos /** Descriptive text for the id-key option */ 276ccc794f0Schristos #define ID_KEY_DESC (ntp_keygen_opt_strs+1249) 2772950cc38Schristos /** Upper-cased name for the id-key option */ 278ccc794f0Schristos #define ID_KEY_NAME (ntp_keygen_opt_strs+1279) 2792950cc38Schristos /** Name string for the id-key option */ 280ccc794f0Schristos #define ID_KEY_name (ntp_keygen_opt_strs+1286) 2812950cc38Schristos /** Compiled in flag settings for the id-key option */ 282abb0f93cSkardel #define ID_KEY_FLAGS (OPTST_DISABLED) 283abb0f93cSkardel 2842950cc38Schristos #else /* disable id-key */ 285abb0f93cSkardel #define ID_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 2862950cc38Schristos #define ID_KEY_NAME NULL 2872950cc38Schristos #define ID_KEY_DESC NULL 2882950cc38Schristos #define ID_KEY_name NULL 2892950cc38Schristos #endif /* AUTOKEY */ 290abb0f93cSkardel 2912950cc38Schristos /** 2922950cc38Schristos * gq-params option description: 293abb0f93cSkardel */ 2942950cc38Schristos #ifdef AUTOKEY 2952950cc38Schristos /** Descriptive text for the gq-params option */ 296ccc794f0Schristos #define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1293) 2972950cc38Schristos /** Upper-cased name for the gq-params option */ 298ccc794f0Schristos #define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1325) 2992950cc38Schristos /** Name string for the gq-params option */ 300ccc794f0Schristos #define GQ_PARAMS_name (ntp_keygen_opt_strs+1335) 3012950cc38Schristos /** Compiled in flag settings for the gq-params option */ 302abb0f93cSkardel #define GQ_PARAMS_FLAGS (OPTST_DISABLED) 303abb0f93cSkardel 3042950cc38Schristos #else /* disable gq-params */ 305abb0f93cSkardel #define GQ_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 3062950cc38Schristos #define GQ_PARAMS_NAME NULL 3072950cc38Schristos #define GQ_PARAMS_DESC NULL 3082950cc38Schristos #define GQ_PARAMS_name NULL 3092950cc38Schristos #endif /* AUTOKEY */ 310abb0f93cSkardel 3112950cc38Schristos /** 3122950cc38Schristos * host-key option description: 313abb0f93cSkardel */ 3142950cc38Schristos #ifdef AUTOKEY 3152950cc38Schristos /** Descriptive text for the host-key option */ 316ccc794f0Schristos #define HOST_KEY_DESC (ntp_keygen_opt_strs+1345) 3172950cc38Schristos /** Upper-cased name for the host-key option */ 318ccc794f0Schristos #define HOST_KEY_NAME (ntp_keygen_opt_strs+1367) 3192950cc38Schristos /** Name string for the host-key option */ 320ccc794f0Schristos #define HOST_KEY_name (ntp_keygen_opt_strs+1376) 3212950cc38Schristos /** Compiled in flag settings for the host-key option */ 322abb0f93cSkardel #define HOST_KEY_FLAGS (OPTST_DISABLED) 323abb0f93cSkardel 3242950cc38Schristos #else /* disable host-key */ 325abb0f93cSkardel #define HOST_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 3262950cc38Schristos #define HOST_KEY_NAME NULL 3272950cc38Schristos #define HOST_KEY_DESC NULL 3282950cc38Schristos #define HOST_KEY_name NULL 3292950cc38Schristos #endif /* AUTOKEY */ 330abb0f93cSkardel 3312950cc38Schristos /** 3322950cc38Schristos * iffkey option description: 333abb0f93cSkardel */ 3342950cc38Schristos #ifdef AUTOKEY 3352950cc38Schristos /** Descriptive text for the iffkey option */ 336ccc794f0Schristos #define IFFKEY_DESC (ntp_keygen_opt_strs+1385) 3372950cc38Schristos /** Upper-cased name for the iffkey option */ 338ccc794f0Schristos #define IFFKEY_NAME (ntp_keygen_opt_strs+1409) 3392950cc38Schristos /** Name string for the iffkey option */ 340ccc794f0Schristos #define IFFKEY_name (ntp_keygen_opt_strs+1416) 3412950cc38Schristos /** Compiled in flag settings for the iffkey option */ 342abb0f93cSkardel #define IFFKEY_FLAGS (OPTST_DISABLED) 343abb0f93cSkardel 3442950cc38Schristos #else /* disable iffkey */ 345abb0f93cSkardel #define IFFKEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 3462950cc38Schristos #define IFFKEY_NAME NULL 3472950cc38Schristos #define IFFKEY_DESC NULL 3482950cc38Schristos #define IFFKEY_name NULL 3492950cc38Schristos #endif /* AUTOKEY */ 350abb0f93cSkardel 3512950cc38Schristos /** 3522950cc38Schristos * ident option description: 353abb0f93cSkardel */ 3542950cc38Schristos #ifdef AUTOKEY 3552950cc38Schristos /** Descriptive text for the ident option */ 356ccc794f0Schristos #define IDENT_DESC (ntp_keygen_opt_strs+1423) 3572950cc38Schristos /** Upper-cased name for the ident option */ 358ccc794f0Schristos #define IDENT_NAME (ntp_keygen_opt_strs+1446) 3592950cc38Schristos /** Name string for the ident option */ 360ccc794f0Schristos #define IDENT_name (ntp_keygen_opt_strs+1452) 3612950cc38Schristos /** Compiled in flag settings for the ident option */ 3622950cc38Schristos #define IDENT_FLAGS (OPTST_DISABLED \ 363abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 364abb0f93cSkardel 3652950cc38Schristos #else /* disable ident */ 3662950cc38Schristos #define IDENT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 3672950cc38Schristos #define IDENT_NAME NULL 3682950cc38Schristos #define IDENT_DESC NULL 3692950cc38Schristos #define IDENT_name NULL 3702950cc38Schristos #endif /* AUTOKEY */ 371abb0f93cSkardel 3722950cc38Schristos /** 3732950cc38Schristos * lifetime option description: 374abb0f93cSkardel */ 3752950cc38Schristos #ifdef AUTOKEY 3762950cc38Schristos /** Descriptive text for the lifetime option */ 377ccc794f0Schristos #define LIFETIME_DESC (ntp_keygen_opt_strs+1458) 3782950cc38Schristos /** Upper-cased name for the lifetime option */ 379ccc794f0Schristos #define LIFETIME_NAME (ntp_keygen_opt_strs+1483) 3802950cc38Schristos /** Name string for the lifetime option */ 381ccc794f0Schristos #define LIFETIME_name (ntp_keygen_opt_strs+1492) 3822950cc38Schristos /** Compiled in flag settings for the lifetime option */ 3832950cc38Schristos #define LIFETIME_FLAGS (OPTST_DISABLED \ 3842950cc38Schristos | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 3852950cc38Schristos 3862950cc38Schristos #else /* disable lifetime */ 3872950cc38Schristos #define LIFETIME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 3882950cc38Schristos #define LIFETIME_NAME NULL 3892950cc38Schristos #define LIFETIME_DESC NULL 3902950cc38Schristos #define LIFETIME_name NULL 3912950cc38Schristos #endif /* AUTOKEY */ 3922950cc38Schristos 3932950cc38Schristos /** 3942950cc38Schristos * modulus option description: 395abb0f93cSkardel */ 3962950cc38Schristos #ifdef AUTOKEY 3972950cc38Schristos /** Descriptive text for the modulus option */ 3984eea345dSchristos #define MODULUS_DESC (ntp_keygen_opt_strs+1501) 3992950cc38Schristos /** Upper-cased name for the modulus option */ 4004eea345dSchristos #define MODULUS_NAME (ntp_keygen_opt_strs+1515) 4012950cc38Schristos /** Name string for the modulus option */ 4024eea345dSchristos #define MODULUS_name (ntp_keygen_opt_strs+1523) 4032950cc38Schristos /** Compiled in flag settings for the modulus option */ 404abb0f93cSkardel #define MODULUS_FLAGS (OPTST_DISABLED \ 405abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 406abb0f93cSkardel 4072950cc38Schristos #else /* disable modulus */ 408abb0f93cSkardel #define MODULUS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 4092950cc38Schristos #define MODULUS_NAME NULL 4102950cc38Schristos #define MODULUS_DESC NULL 4112950cc38Schristos #define MODULUS_name NULL 4122950cc38Schristos #endif /* AUTOKEY */ 413abb0f93cSkardel 4142950cc38Schristos /** 4154eea345dSchristos * md5key option description: 4164eea345dSchristos */ 4174eea345dSchristos /** Descriptive text for the md5key option */ 4184eea345dSchristos #define MD5KEY_DESC (ntp_keygen_opt_strs+1531) 4194eea345dSchristos /** Upper-cased name for the md5key option */ 4204eea345dSchristos #define MD5KEY_NAME (ntp_keygen_opt_strs+1555) 4214eea345dSchristos /** Name string for the md5key option */ 4224eea345dSchristos #define MD5KEY_name (ntp_keygen_opt_strs+1562) 4234eea345dSchristos /** Compiled in flag settings for the md5key option */ 4244eea345dSchristos #define MD5KEY_FLAGS (OPTST_DISABLED) 4254eea345dSchristos 4264eea345dSchristos /** 4272950cc38Schristos * pvt-cert option description: 428abb0f93cSkardel */ 4292950cc38Schristos #ifdef AUTOKEY 4302950cc38Schristos /** Descriptive text for the pvt-cert option */ 4314eea345dSchristos #define PVT_CERT_DESC (ntp_keygen_opt_strs+1569) 4322950cc38Schristos /** Upper-cased name for the pvt-cert option */ 4334eea345dSchristos #define PVT_CERT_NAME (ntp_keygen_opt_strs+1601) 4342950cc38Schristos /** Name string for the pvt-cert option */ 4354eea345dSchristos #define PVT_CERT_name (ntp_keygen_opt_strs+1610) 4362950cc38Schristos /** Compiled in flag settings for the pvt-cert option */ 437abb0f93cSkardel #define PVT_CERT_FLAGS (OPTST_DISABLED) 438abb0f93cSkardel 4392950cc38Schristos #else /* disable pvt-cert */ 440abb0f93cSkardel #define PVT_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 4412950cc38Schristos #define PVT_CERT_NAME NULL 4422950cc38Schristos #define PVT_CERT_DESC NULL 4432950cc38Schristos #define PVT_CERT_name NULL 4442950cc38Schristos #endif /* AUTOKEY */ 445abb0f93cSkardel 4462950cc38Schristos /** 447ea66d795Schristos * password option description: 448abb0f93cSkardel */ 4492950cc38Schristos #ifdef AUTOKEY 450ea66d795Schristos /** Descriptive text for the password option */ 4514eea345dSchristos #define PASSWORD_DESC (ntp_keygen_opt_strs+1619) 452ea66d795Schristos /** Upper-cased name for the password option */ 4534eea345dSchristos #define PASSWORD_NAME (ntp_keygen_opt_strs+1642) 454ea66d795Schristos /** Name string for the password option */ 4554eea345dSchristos #define PASSWORD_name (ntp_keygen_opt_strs+1651) 456ea66d795Schristos /** Compiled in flag settings for the password option */ 457ea66d795Schristos #define PASSWORD_FLAGS (OPTST_DISABLED \ 458abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 459abb0f93cSkardel 460ea66d795Schristos #else /* disable password */ 461ea66d795Schristos #define PASSWORD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 462ea66d795Schristos #define PASSWORD_NAME NULL 463ea66d795Schristos #define PASSWORD_DESC NULL 464ea66d795Schristos #define PASSWORD_name NULL 4652950cc38Schristos #endif /* AUTOKEY */ 466abb0f93cSkardel 4672950cc38Schristos /** 468ea66d795Schristos * export-passwd option description: 469abb0f93cSkardel */ 4702950cc38Schristos #ifdef AUTOKEY 471ea66d795Schristos /** Descriptive text for the export-passwd option */ 4724eea345dSchristos #define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1660) 473ea66d795Schristos /** Upper-cased name for the export-passwd option */ 4744eea345dSchristos #define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1702) 475ea66d795Schristos /** Name string for the export-passwd option */ 4764eea345dSchristos #define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1716) 477ea66d795Schristos /** Compiled in flag settings for the export-passwd option */ 478ea66d795Schristos #define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \ 479abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 480abb0f93cSkardel 481ea66d795Schristos #else /* disable export-passwd */ 482ea66d795Schristos #define EXPORT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 483ea66d795Schristos #define EXPORT_PASSWD_NAME NULL 484ea66d795Schristos #define EXPORT_PASSWD_DESC NULL 485ea66d795Schristos #define EXPORT_PASSWD_name NULL 4862950cc38Schristos #endif /* AUTOKEY */ 487abb0f93cSkardel 4882950cc38Schristos /** 4892950cc38Schristos * subject-name option description: 490abb0f93cSkardel */ 4912950cc38Schristos #ifdef AUTOKEY 4922950cc38Schristos /** Descriptive text for the subject-name option */ 4934eea345dSchristos #define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1730) 4942950cc38Schristos /** Upper-cased name for the subject-name option */ 4954eea345dSchristos #define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1765) 4962950cc38Schristos /** Name string for the subject-name option */ 4974eea345dSchristos #define SUBJECT_NAME_name (ntp_keygen_opt_strs+1778) 4982950cc38Schristos /** Compiled in flag settings for the subject-name option */ 499abb0f93cSkardel #define SUBJECT_NAME_FLAGS (OPTST_DISABLED \ 500abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 501abb0f93cSkardel 5022950cc38Schristos #else /* disable subject-name */ 503abb0f93cSkardel #define SUBJECT_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 5042950cc38Schristos #define SUBJECT_NAME_NAME NULL 5052950cc38Schristos #define SUBJECT_NAME_DESC NULL 5062950cc38Schristos #define SUBJECT_NAME_name NULL 5072950cc38Schristos #endif /* AUTOKEY */ 508abb0f93cSkardel 5092950cc38Schristos /** 5104eea345dSchristos * sign-key option description: 5114eea345dSchristos */ 5124eea345dSchristos #ifdef AUTOKEY 5134eea345dSchristos /** Descriptive text for the sign-key option */ 5144eea345dSchristos #define SIGN_KEY_DESC (ntp_keygen_opt_strs+1791) 5154eea345dSchristos /** Upper-cased name for the sign-key option */ 5164eea345dSchristos #define SIGN_KEY_NAME (ntp_keygen_opt_strs+1822) 5174eea345dSchristos /** Name string for the sign-key option */ 5184eea345dSchristos #define SIGN_KEY_name (ntp_keygen_opt_strs+1831) 5194eea345dSchristos /** Compiled in flag settings for the sign-key option */ 5204eea345dSchristos #define SIGN_KEY_FLAGS (OPTST_DISABLED \ 5214eea345dSchristos | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 5224eea345dSchristos 5234eea345dSchristos #else /* disable sign-key */ 5244eea345dSchristos #define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 5254eea345dSchristos #define SIGN_KEY_NAME NULL 5264eea345dSchristos #define SIGN_KEY_DESC NULL 5274eea345dSchristos #define SIGN_KEY_name NULL 5284eea345dSchristos #endif /* AUTOKEY */ 5294eea345dSchristos 5304eea345dSchristos /** 5312950cc38Schristos * trusted-cert option description: 532abb0f93cSkardel */ 5332950cc38Schristos #ifdef AUTOKEY 5342950cc38Schristos /** Descriptive text for the trusted-cert option */ 5354eea345dSchristos #define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1840) 5362950cc38Schristos /** Upper-cased name for the trusted-cert option */ 5374eea345dSchristos #define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1872) 5382950cc38Schristos /** Name string for the trusted-cert option */ 5394eea345dSchristos #define TRUSTED_CERT_name (ntp_keygen_opt_strs+1885) 5402950cc38Schristos /** Compiled in flag settings for the trusted-cert option */ 541abb0f93cSkardel #define TRUSTED_CERT_FLAGS (OPTST_DISABLED) 542abb0f93cSkardel 5432950cc38Schristos #else /* disable trusted-cert */ 544abb0f93cSkardel #define TRUSTED_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 5452950cc38Schristos #define TRUSTED_CERT_NAME NULL 5462950cc38Schristos #define TRUSTED_CERT_DESC NULL 5472950cc38Schristos #define TRUSTED_CERT_name NULL 5482950cc38Schristos #endif /* AUTOKEY */ 549abb0f93cSkardel 5502950cc38Schristos /** 5512950cc38Schristos * mv-params option description: 552abb0f93cSkardel */ 5532950cc38Schristos #ifdef AUTOKEY 5542950cc38Schristos /** Descriptive text for the mv-params option */ 5554eea345dSchristos #define MV_PARAMS_DESC (ntp_keygen_opt_strs+1898) 5562950cc38Schristos /** Upper-cased name for the mv-params option */ 5574eea345dSchristos #define MV_PARAMS_NAME (ntp_keygen_opt_strs+1927) 5582950cc38Schristos /** Name string for the mv-params option */ 5594eea345dSchristos #define MV_PARAMS_name (ntp_keygen_opt_strs+1937) 5602950cc38Schristos /** Compiled in flag settings for the mv-params option */ 561abb0f93cSkardel #define MV_PARAMS_FLAGS (OPTST_DISABLED \ 562abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 563abb0f93cSkardel 5642950cc38Schristos #else /* disable mv-params */ 565abb0f93cSkardel #define MV_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 5662950cc38Schristos #define MV_PARAMS_NAME NULL 5672950cc38Schristos #define MV_PARAMS_DESC NULL 5682950cc38Schristos #define MV_PARAMS_name NULL 5692950cc38Schristos #endif /* AUTOKEY */ 570abb0f93cSkardel 5712950cc38Schristos /** 5722950cc38Schristos * mv-keys option description: 573abb0f93cSkardel */ 5742950cc38Schristos #ifdef AUTOKEY 5752950cc38Schristos /** Descriptive text for the mv-keys option */ 5764eea345dSchristos #define MV_KEYS_DESC (ntp_keygen_opt_strs+1947) 5772950cc38Schristos /** Upper-cased name for the mv-keys option */ 5784eea345dSchristos #define MV_KEYS_NAME (ntp_keygen_opt_strs+1968) 5792950cc38Schristos /** Name string for the mv-keys option */ 5804eea345dSchristos #define MV_KEYS_name (ntp_keygen_opt_strs+1976) 5812950cc38Schristos /** Compiled in flag settings for the mv-keys option */ 582abb0f93cSkardel #define MV_KEYS_FLAGS (OPTST_DISABLED \ 583abb0f93cSkardel | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 584abb0f93cSkardel 5852950cc38Schristos #else /* disable mv-keys */ 586abb0f93cSkardel #define MV_KEYS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 5872950cc38Schristos #define MV_KEYS_NAME NULL 5882950cc38Schristos #define MV_KEYS_DESC NULL 5892950cc38Schristos #define MV_KEYS_name NULL 5902950cc38Schristos #endif /* AUTOKEY */ 591abb0f93cSkardel 592abb0f93cSkardel /* 593abb0f93cSkardel * Help/More_Help/Version option descriptions: 594abb0f93cSkardel */ 5954eea345dSchristos #define HELP_DESC (ntp_keygen_opt_strs+1984) 5964eea345dSchristos #define HELP_name (ntp_keygen_opt_strs+2028) 597abb0f93cSkardel #ifdef HAVE_WORKING_FORK 5984eea345dSchristos #define MORE_HELP_DESC (ntp_keygen_opt_strs+2033) 5994eea345dSchristos #define MORE_HELP_name (ntp_keygen_opt_strs+2078) 6002950cc38Schristos #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 601abb0f93cSkardel #else 6022950cc38Schristos #define MORE_HELP_DESC HELP_DESC 6032950cc38Schristos #define MORE_HELP_name HELP_name 6042950cc38Schristos #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 605abb0f93cSkardel #endif 606abb0f93cSkardel #ifdef NO_OPTIONAL_OPT_ARGS 6072950cc38Schristos # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 608abb0f93cSkardel #else 6092950cc38Schristos # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 6102950cc38Schristos OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 611abb0f93cSkardel #endif 6124eea345dSchristos #define VER_DESC (ntp_keygen_opt_strs+2088) 6134eea345dSchristos #define VER_name (ntp_keygen_opt_strs+2124) 6144eea345dSchristos #define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2132) 6154eea345dSchristos #define SAVE_OPTS_name (ntp_keygen_opt_strs+2171) 6164eea345dSchristos #define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2181) 6174eea345dSchristos #define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2213) 6184eea345dSchristos #define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2223) 6194eea345dSchristos #define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2236) 6202950cc38Schristos #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) 6212950cc38Schristos /** 622abb0f93cSkardel * Declare option callback procedures 623abb0f93cSkardel */ 6242950cc38Schristos #ifdef AUTOKEY 6252950cc38Schristos static tOptProc doOptImbits; 6262950cc38Schristos #else /* not AUTOKEY */ 6272950cc38Schristos # define doOptImbits NULL 6282950cc38Schristos #endif /* def/not AUTOKEY */ 6292950cc38Schristos #ifdef AUTOKEY 630abb0f93cSkardel static tOptProc doOptModulus; 6312950cc38Schristos #else /* not AUTOKEY */ 632abb0f93cSkardel # define doOptModulus NULL 6332950cc38Schristos #endif /* def/not AUTOKEY */ 634abb0f93cSkardel extern tOptProc 6352950cc38Schristos ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, 6362950cc38Schristos optionNumericVal, optionPagedUsage, optionResetOpt, 6373123f114Skardel optionStackArg, optionTimeDate, optionTimeVal, 638ea66d795Schristos optionUnstackArg, optionVendorOption; 639abb0f93cSkardel static tOptProc 6402950cc38Schristos doOptDebug_Level, doUsageOpt; 6412950cc38Schristos #define VER_PROC ntpOptionPrintVersion 642abb0f93cSkardel 6432950cc38Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 6442950cc38Schristos /** 6452950cc38Schristos * Define the ntp-keygen Option Descriptions. 6462950cc38Schristos * This is an array of OPTION_CT entries, one for each 6472950cc38Schristos * option that the ntp-keygen program responds to. 648abb0f93cSkardel */ 649abb0f93cSkardel static tOptDesc optDesc[OPTION_CT] = { 6502950cc38Schristos { /* entry idx, value */ 0, VALUE_OPT_IMBITS, 6512950cc38Schristos /* equiv idx, value */ 0, VALUE_OPT_IMBITS, 6522950cc38Schristos /* equivalenced to */ NO_EQUIVALENT, 6532950cc38Schristos /* min, max, act ct */ 0, 1, 0, 6542950cc38Schristos /* opt state flags */ IMBITS_FLAGS, 0, 6552950cc38Schristos /* last opt argumnt */ { NULL }, /* --imbits */ 6562950cc38Schristos /* arg list/cookie */ NULL, 6572950cc38Schristos /* must/cannot opts */ NULL, NULL, 6582950cc38Schristos /* option proc */ doOptImbits, 6592950cc38Schristos /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name, 6602950cc38Schristos /* disablement strs */ NULL, NULL }, 6612950cc38Schristos 6622950cc38Schristos { /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE, 6632950cc38Schristos /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE, 664abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 665abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 666abb0f93cSkardel /* opt state flags */ CERTIFICATE_FLAGS, 0, 6672950cc38Schristos /* last opt argumnt */ { NULL }, /* --certificate */ 668abb0f93cSkardel /* arg list/cookie */ NULL, 669abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 670abb0f93cSkardel /* option proc */ NULL, 6712950cc38Schristos /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name, 672abb0f93cSkardel /* disablement strs */ NULL, NULL }, 673abb0f93cSkardel 6742950cc38Schristos { /* entry idx, value */ 2, VALUE_OPT_CIPHER, 6752950cc38Schristos /* equiv idx, value */ 2, VALUE_OPT_CIPHER, 6762950cc38Schristos /* equivalenced to */ NO_EQUIVALENT, 6772950cc38Schristos /* min, max, act ct */ 0, 1, 0, 6782950cc38Schristos /* opt state flags */ CIPHER_FLAGS, 0, 6792950cc38Schristos /* last opt argumnt */ { NULL }, /* --cipher */ 6802950cc38Schristos /* arg list/cookie */ NULL, 6812950cc38Schristos /* must/cannot opts */ NULL, NULL, 6822950cc38Schristos /* option proc */ NULL, 6832950cc38Schristos /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name, 6842950cc38Schristos /* disablement strs */ NULL, NULL }, 6852950cc38Schristos 6862950cc38Schristos { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 6872950cc38Schristos /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 688abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 689abb0f93cSkardel /* min, max, act ct */ 0, NOLIMIT, 0, 690abb0f93cSkardel /* opt state flags */ DEBUG_LEVEL_FLAGS, 0, 6912950cc38Schristos /* last opt argumnt */ { NULL }, /* --debug-level */ 692abb0f93cSkardel /* arg list/cookie */ NULL, 693abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 694ea66d795Schristos /* option proc */ doOptDebug_Level, 6952950cc38Schristos /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, 696abb0f93cSkardel /* disablement strs */ NULL, NULL }, 697abb0f93cSkardel 6982950cc38Schristos { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 6992950cc38Schristos /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 700abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 701abb0f93cSkardel /* min, max, act ct */ 0, NOLIMIT, 0, 702abb0f93cSkardel /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0, 7032950cc38Schristos /* last opt argumnt */ { NULL }, /* --set-debug-level */ 704abb0f93cSkardel /* arg list/cookie */ NULL, 705abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 7062950cc38Schristos /* option proc */ optionNumericVal, 7072950cc38Schristos /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name, 708abb0f93cSkardel /* disablement strs */ NULL, NULL }, 709abb0f93cSkardel 7102950cc38Schristos { /* entry idx, value */ 5, VALUE_OPT_ID_KEY, 7112950cc38Schristos /* equiv idx, value */ 5, VALUE_OPT_ID_KEY, 712abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 713abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 714abb0f93cSkardel /* opt state flags */ ID_KEY_FLAGS, 0, 7152950cc38Schristos /* last opt argumnt */ { NULL }, /* --id-key */ 716abb0f93cSkardel /* arg list/cookie */ NULL, 717abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 718abb0f93cSkardel /* option proc */ NULL, 7192950cc38Schristos /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name, 720abb0f93cSkardel /* disablement strs */ NULL, NULL }, 721abb0f93cSkardel 7222950cc38Schristos { /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS, 7232950cc38Schristos /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS, 724abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 725abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 726abb0f93cSkardel /* opt state flags */ GQ_PARAMS_FLAGS, 0, 7272950cc38Schristos /* last opt argumnt */ { NULL }, /* --gq-params */ 728abb0f93cSkardel /* arg list/cookie */ NULL, 729abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 730abb0f93cSkardel /* option proc */ NULL, 7312950cc38Schristos /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name, 732abb0f93cSkardel /* disablement strs */ NULL, NULL }, 733abb0f93cSkardel 7342950cc38Schristos { /* entry idx, value */ 7, VALUE_OPT_HOST_KEY, 7352950cc38Schristos /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY, 736abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 737abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 738abb0f93cSkardel /* opt state flags */ HOST_KEY_FLAGS, 0, 7392950cc38Schristos /* last opt argumnt */ { NULL }, /* --host-key */ 740abb0f93cSkardel /* arg list/cookie */ NULL, 741abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 742abb0f93cSkardel /* option proc */ NULL, 7432950cc38Schristos /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name, 744abb0f93cSkardel /* disablement strs */ NULL, NULL }, 745abb0f93cSkardel 7462950cc38Schristos { /* entry idx, value */ 8, VALUE_OPT_IFFKEY, 7472950cc38Schristos /* equiv idx, value */ 8, VALUE_OPT_IFFKEY, 748abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 749abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 750abb0f93cSkardel /* opt state flags */ IFFKEY_FLAGS, 0, 7512950cc38Schristos /* last opt argumnt */ { NULL }, /* --iffkey */ 752abb0f93cSkardel /* arg list/cookie */ NULL, 753abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 754abb0f93cSkardel /* option proc */ NULL, 7552950cc38Schristos /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name, 756abb0f93cSkardel /* disablement strs */ NULL, NULL }, 757abb0f93cSkardel 7582950cc38Schristos { /* entry idx, value */ 9, VALUE_OPT_IDENT, 7592950cc38Schristos /* equiv idx, value */ 9, VALUE_OPT_IDENT, 760abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 761abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 7622950cc38Schristos /* opt state flags */ IDENT_FLAGS, 0, 7632950cc38Schristos /* last opt argumnt */ { NULL }, /* --ident */ 764abb0f93cSkardel /* arg list/cookie */ NULL, 765abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 766abb0f93cSkardel /* option proc */ NULL, 7672950cc38Schristos /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name, 768abb0f93cSkardel /* disablement strs */ NULL, NULL }, 769abb0f93cSkardel 7702950cc38Schristos { /* entry idx, value */ 10, VALUE_OPT_LIFETIME, 7712950cc38Schristos /* equiv idx, value */ 10, VALUE_OPT_LIFETIME, 7722950cc38Schristos /* equivalenced to */ NO_EQUIVALENT, 7732950cc38Schristos /* min, max, act ct */ 0, 1, 0, 7742950cc38Schristos /* opt state flags */ LIFETIME_FLAGS, 0, 7752950cc38Schristos /* last opt argumnt */ { NULL }, /* --lifetime */ 7762950cc38Schristos /* arg list/cookie */ NULL, 7772950cc38Schristos /* must/cannot opts */ NULL, NULL, 7782950cc38Schristos /* option proc */ optionNumericVal, 7792950cc38Schristos /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name, 7802950cc38Schristos /* disablement strs */ NULL, NULL }, 7812950cc38Schristos 7824eea345dSchristos { /* entry idx, value */ 11, VALUE_OPT_MODULUS, 7834eea345dSchristos /* equiv idx, value */ 11, VALUE_OPT_MODULUS, 784abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 785abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 786abb0f93cSkardel /* opt state flags */ MODULUS_FLAGS, 0, 7872950cc38Schristos /* last opt argumnt */ { NULL }, /* --modulus */ 788abb0f93cSkardel /* arg list/cookie */ NULL, 789abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 790abb0f93cSkardel /* option proc */ doOptModulus, 7912950cc38Schristos /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name, 792abb0f93cSkardel /* disablement strs */ NULL, NULL }, 793abb0f93cSkardel 7944eea345dSchristos { /* entry idx, value */ 12, VALUE_OPT_MD5KEY, 7954eea345dSchristos /* equiv idx, value */ 12, VALUE_OPT_MD5KEY, 7964eea345dSchristos /* equivalenced to */ NO_EQUIVALENT, 7974eea345dSchristos /* min, max, act ct */ 0, 1, 0, 7984eea345dSchristos /* opt state flags */ MD5KEY_FLAGS, 0, 7994eea345dSchristos /* last opt argumnt */ { NULL }, /* --md5key */ 8004eea345dSchristos /* arg list/cookie */ NULL, 8014eea345dSchristos /* must/cannot opts */ NULL, NULL, 8024eea345dSchristos /* option proc */ NULL, 8034eea345dSchristos /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name, 8044eea345dSchristos /* disablement strs */ NULL, NULL }, 8054eea345dSchristos 8062950cc38Schristos { /* entry idx, value */ 13, VALUE_OPT_PVT_CERT, 8072950cc38Schristos /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT, 808abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 809abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 810abb0f93cSkardel /* opt state flags */ PVT_CERT_FLAGS, 0, 8112950cc38Schristos /* last opt argumnt */ { NULL }, /* --pvt-cert */ 812abb0f93cSkardel /* arg list/cookie */ NULL, 813abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 814abb0f93cSkardel /* option proc */ NULL, 8152950cc38Schristos /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name, 816abb0f93cSkardel /* disablement strs */ NULL, NULL }, 817abb0f93cSkardel 818ea66d795Schristos { /* entry idx, value */ 14, VALUE_OPT_PASSWORD, 819ea66d795Schristos /* equiv idx, value */ 14, VALUE_OPT_PASSWORD, 820abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 821abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 822ea66d795Schristos /* opt state flags */ PASSWORD_FLAGS, 0, 823ea66d795Schristos /* last opt argumnt */ { NULL }, /* --password */ 824abb0f93cSkardel /* arg list/cookie */ NULL, 825abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 826abb0f93cSkardel /* option proc */ NULL, 827ea66d795Schristos /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name, 828abb0f93cSkardel /* disablement strs */ NULL, NULL }, 829abb0f93cSkardel 830ea66d795Schristos { /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 831ea66d795Schristos /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 832abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 833abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 834ea66d795Schristos /* opt state flags */ EXPORT_PASSWD_FLAGS, 0, 835ea66d795Schristos /* last opt argumnt */ { NULL }, /* --export-passwd */ 836abb0f93cSkardel /* arg list/cookie */ NULL, 837abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 838abb0f93cSkardel /* option proc */ NULL, 839ea66d795Schristos /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name, 840abb0f93cSkardel /* disablement strs */ NULL, NULL }, 841abb0f93cSkardel 8424eea345dSchristos { /* entry idx, value */ 16, VALUE_OPT_SUBJECT_NAME, 8434eea345dSchristos /* equiv idx, value */ 16, VALUE_OPT_SUBJECT_NAME, 844abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 845abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 846abb0f93cSkardel /* opt state flags */ SUBJECT_NAME_FLAGS, 0, 8472950cc38Schristos /* last opt argumnt */ { NULL }, /* --subject-name */ 848abb0f93cSkardel /* arg list/cookie */ NULL, 849abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 850abb0f93cSkardel /* option proc */ NULL, 8512950cc38Schristos /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name, 852abb0f93cSkardel /* disablement strs */ NULL, NULL }, 853abb0f93cSkardel 8544eea345dSchristos { /* entry idx, value */ 17, VALUE_OPT_SIGN_KEY, 8554eea345dSchristos /* equiv idx, value */ 17, VALUE_OPT_SIGN_KEY, 8564eea345dSchristos /* equivalenced to */ NO_EQUIVALENT, 8574eea345dSchristos /* min, max, act ct */ 0, 1, 0, 8584eea345dSchristos /* opt state flags */ SIGN_KEY_FLAGS, 0, 8594eea345dSchristos /* last opt argumnt */ { NULL }, /* --sign-key */ 8604eea345dSchristos /* arg list/cookie */ NULL, 8614eea345dSchristos /* must/cannot opts */ NULL, NULL, 8624eea345dSchristos /* option proc */ NULL, 8634eea345dSchristos /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name, 8644eea345dSchristos /* disablement strs */ NULL, NULL }, 8654eea345dSchristos 8662950cc38Schristos { /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 8672950cc38Schristos /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 868abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 869abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 870abb0f93cSkardel /* opt state flags */ TRUSTED_CERT_FLAGS, 0, 8712950cc38Schristos /* last opt argumnt */ { NULL }, /* --trusted-cert */ 872abb0f93cSkardel /* arg list/cookie */ NULL, 873abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 874abb0f93cSkardel /* option proc */ NULL, 8752950cc38Schristos /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name, 876abb0f93cSkardel /* disablement strs */ NULL, NULL }, 877abb0f93cSkardel 8782950cc38Schristos { /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS, 8792950cc38Schristos /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS, 880abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 881abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 882abb0f93cSkardel /* opt state flags */ MV_PARAMS_FLAGS, 0, 8832950cc38Schristos /* last opt argumnt */ { NULL }, /* --mv-params */ 884abb0f93cSkardel /* arg list/cookie */ NULL, 885abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 886abb0f93cSkardel /* option proc */ optionNumericVal, 8872950cc38Schristos /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name, 888abb0f93cSkardel /* disablement strs */ NULL, NULL }, 889abb0f93cSkardel 8902950cc38Schristos { /* entry idx, value */ 20, VALUE_OPT_MV_KEYS, 8912950cc38Schristos /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS, 892abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 893abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 894abb0f93cSkardel /* opt state flags */ MV_KEYS_FLAGS, 0, 8952950cc38Schristos /* last opt argumnt */ { NULL }, /* --mv-keys */ 896abb0f93cSkardel /* arg list/cookie */ NULL, 897abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 898abb0f93cSkardel /* option proc */ optionNumericVal, 8992950cc38Schristos /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name, 900abb0f93cSkardel /* disablement strs */ NULL, NULL }, 901abb0f93cSkardel 902abb0f93cSkardel { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, 9032950cc38Schristos /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, 904abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 905abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 9062950cc38Schristos /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 907abb0f93cSkardel /* last opt argumnt */ { NULL }, 908abb0f93cSkardel /* arg list/cookie */ NULL, 909abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 9102950cc38Schristos /* option proc */ VER_PROC, 9112950cc38Schristos /* desc, NAME, name */ VER_DESC, NULL, VER_name, 912abb0f93cSkardel /* disablement strs */ NULL, NULL }, 913abb0f93cSkardel 914abb0f93cSkardel 915abb0f93cSkardel 916abb0f93cSkardel { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, 9172950cc38Schristos /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, 918abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 919abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 9202950cc38Schristos /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 921abb0f93cSkardel /* last opt argumnt */ { NULL }, 922abb0f93cSkardel /* arg list/cookie */ NULL, 923abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 924abb0f93cSkardel /* option proc */ doUsageOpt, 9252950cc38Schristos /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 926abb0f93cSkardel /* disablement strs */ NULL, NULL }, 927abb0f93cSkardel 928abb0f93cSkardel { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, 9292950cc38Schristos /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, 930abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 931abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 9322950cc38Schristos /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 933abb0f93cSkardel /* last opt argumnt */ { NULL }, 934abb0f93cSkardel /* arg list/cookie */ NULL, 935abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 936abb0f93cSkardel /* option proc */ optionPagedUsage, 9372950cc38Schristos /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 938abb0f93cSkardel /* disablement strs */ NULL, NULL }, 939abb0f93cSkardel 940abb0f93cSkardel { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS, 9412950cc38Schristos /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS, 942abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 943abb0f93cSkardel /* min, max, act ct */ 0, 1, 0, 944abb0f93cSkardel /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 9452950cc38Schristos | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS, 946abb0f93cSkardel /* last opt argumnt */ { NULL }, 947abb0f93cSkardel /* arg list/cookie */ NULL, 948abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 949abb0f93cSkardel /* option proc */ NULL, 9502950cc38Schristos /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name, 951abb0f93cSkardel /* disablement strs */ NULL, NULL }, 952abb0f93cSkardel 953abb0f93cSkardel { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS, 9542950cc38Schristos /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS, 955abb0f93cSkardel /* equivalenced to */ NO_EQUIVALENT, 956abb0f93cSkardel /* min, max, act ct */ 0, NOLIMIT, 0, 957abb0f93cSkardel /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 9582950cc38Schristos | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS, 959abb0f93cSkardel /* last opt argumnt */ { NULL }, 960abb0f93cSkardel /* arg list/cookie */ NULL, 961abb0f93cSkardel /* must/cannot opts */ NULL, NULL, 962abb0f93cSkardel /* option proc */ optionLoadOpt, 9632950cc38Schristos /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name, 9642950cc38Schristos /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx } 965abb0f93cSkardel }; 966abb0f93cSkardel 967abb0f93cSkardel 9682950cc38Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 9692950cc38Schristos /** Reference to the upper cased version of ntp-keygen. */ 9704eea345dSchristos #define zPROGNAME (ntp_keygen_opt_strs+2239) 9712950cc38Schristos /** Reference to the title line for ntp-keygen usage. */ 9724eea345dSchristos #define zUsageTitle (ntp_keygen_opt_strs+2250) 9732950cc38Schristos /** ntp-keygen configuration file name. */ 9744eea345dSchristos #define zRcName (ntp_keygen_opt_strs+2373) 9752950cc38Schristos /** Directories to search for ntp-keygen config files. */ 9762950cc38Schristos static char const * const apzHomeList[3] = { 9774eea345dSchristos ntp_keygen_opt_strs+2365, 9784eea345dSchristos ntp_keygen_opt_strs+2371, 9792950cc38Schristos NULL }; 9802950cc38Schristos /** The ntp-keygen program bug email address. */ 9814eea345dSchristos #define zBugsAddr (ntp_keygen_opt_strs+2380) 9822950cc38Schristos /** Clarification/explanation of what ntp-keygen does. */ 983*eabc0478Schristos #define zExplain (ntp_keygen_opt_strs+2415) 9842950cc38Schristos /** Extra detail explaining what ntp-keygen does. */ 9852950cc38Schristos #define zDetail (NULL) 9862950cc38Schristos /** The full version string for ntp-keygen. */ 987*eabc0478Schristos #define zFullVersion (ntp_keygen_opt_strs+2417) 988*eabc0478Schristos /* extracted from optcode.tlib near line 342 */ 989abb0f93cSkardel 990abb0f93cSkardel #if defined(ENABLE_NLS) 991abb0f93cSkardel # define OPTPROC_BASE OPTPROC_TRANSLATE 992abb0f93cSkardel static tOptionXlateProc translate_option_strings; 993abb0f93cSkardel #else 994abb0f93cSkardel # define OPTPROC_BASE OPTPROC_NONE 995abb0f93cSkardel # define translate_option_strings NULL 996abb0f93cSkardel #endif /* ENABLE_NLS */ 997abb0f93cSkardel 9982950cc38Schristos #define ntp_keygen_full_usage (NULL) 9992950cc38Schristos #define ntp_keygen_short_usage (NULL) 1000abb0f93cSkardel 10012950cc38Schristos #endif /* not defined __doxygen__ */ 1002abb0f93cSkardel 1003abb0f93cSkardel /* 1004abb0f93cSkardel * Create the static procedure(s) declared above. 1005abb0f93cSkardel */ 10062950cc38Schristos /** 10072950cc38Schristos * The callout function that invokes the optionUsage function. 1008abb0f93cSkardel * 10092950cc38Schristos * @param[in] opts the AutoOpts option description structure 10102950cc38Schristos * @param[in] od the descriptor for the "help" (usage) option. 10112950cc38Schristos * @noreturn 1012abb0f93cSkardel */ 1013abb0f93cSkardel static void 10142950cc38Schristos doUsageOpt(tOptions * opts, tOptDesc * od) 1015abb0f93cSkardel { 10162950cc38Schristos int ex_code; 10172950cc38Schristos ex_code = NTP_KEYGEN_EXIT_SUCCESS; 10182950cc38Schristos optionUsage(&ntp_keygenOptions, ex_code); 10192950cc38Schristos /* NOTREACHED */ 1020*eabc0478Schristos exit(NTP_KEYGEN_EXIT_FAILURE); 10212950cc38Schristos (void)opts; 10222950cc38Schristos (void)od; 1023abb0f93cSkardel } 1024abb0f93cSkardel 10252950cc38Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 10262950cc38Schristos /** 10272950cc38Schristos * Code to handle the imbits option, when AUTOKEY is #define-d. 1028*eabc0478Schristos * The number of bits in the identity modulus. The default is 512. 10292950cc38Schristos * @param[in] pOptions the ntp-keygen options data structure 10302950cc38Schristos * @param[in,out] pOptDesc the option descriptor for this option. 1031abb0f93cSkardel */ 10322950cc38Schristos #ifdef AUTOKEY 1033abb0f93cSkardel static void 10342950cc38Schristos doOptImbits(tOptions* pOptions, tOptDesc* pOptDesc) 1035abb0f93cSkardel { 10362950cc38Schristos static struct {long rmin, rmax;} const rng[1] = { 1037abb0f93cSkardel { 256, 2048 } }; 1038abb0f93cSkardel int ix; 1039abb0f93cSkardel 1040abb0f93cSkardel if (pOptions <= OPTPROC_EMIT_LIMIT) 1041abb0f93cSkardel goto emit_ranges; 10423123f114Skardel optionNumericVal(pOptions, pOptDesc); 1043abb0f93cSkardel 1044abb0f93cSkardel for (ix = 0; ix < 1; ix++) { 10453123f114Skardel if (pOptDesc->optArg.argInt < rng[ix].rmin) 1046abb0f93cSkardel continue; /* ranges need not be ordered. */ 10473123f114Skardel if (pOptDesc->optArg.argInt == rng[ix].rmin) 10483123f114Skardel return; 1049abb0f93cSkardel if (rng[ix].rmax == LONG_MIN) 1050abb0f93cSkardel continue; 10513123f114Skardel if (pOptDesc->optArg.argInt <= rng[ix].rmax) 10523123f114Skardel return; 1053abb0f93cSkardel } 1054abb0f93cSkardel 1055abb0f93cSkardel option_usage_fp = stderr; 1056abb0f93cSkardel 1057abb0f93cSkardel emit_ranges: 10585d681e99Schristos optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1059abb0f93cSkardel } 10602950cc38Schristos #endif /* defined AUTOKEY */ 1061abb0f93cSkardel 10622950cc38Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 10632950cc38Schristos /** 10642950cc38Schristos * Code to handle the debug-level option. 10652950cc38Schristos * 10662950cc38Schristos * @param[in] pOptions the ntp-keygen options data structure 10672950cc38Schristos * @param[in,out] pOptDesc the option descriptor for this option. 10682950cc38Schristos */ 10692950cc38Schristos static void 10702950cc38Schristos doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc) 10712950cc38Schristos { 10722950cc38Schristos /* 10732950cc38Schristos * Be sure the flag-code[0] handles special values for the options pointer 10742950cc38Schristos * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit 10752950cc38Schristos * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to 10762950cc38Schristos * reset its state. 10772950cc38Schristos */ 10782950cc38Schristos /* extracted from debug-opt.def, line 15 */ 10792950cc38Schristos OPT_VALUE_SET_DEBUG_LEVEL++; 10802950cc38Schristos (void)pOptDesc; 10812950cc38Schristos (void)pOptions; 10822950cc38Schristos } 10832950cc38Schristos 10842950cc38Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 10852950cc38Schristos /** 10862950cc38Schristos * Code to handle the modulus option, when AUTOKEY is #define-d. 10872950cc38Schristos * The number of bits in the prime modulus. The default is 512. 10882950cc38Schristos * @param[in] pOptions the ntp-keygen options data structure 10892950cc38Schristos * @param[in,out] pOptDesc the option descriptor for this option. 10902950cc38Schristos */ 10912950cc38Schristos #ifdef AUTOKEY 10922950cc38Schristos static void 10932950cc38Schristos doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc) 10942950cc38Schristos { 10952950cc38Schristos static struct {long rmin, rmax;} const rng[1] = { 10962950cc38Schristos { 256, 2048 } }; 10972950cc38Schristos int ix; 10982950cc38Schristos 10992950cc38Schristos if (pOptions <= OPTPROC_EMIT_LIMIT) 11002950cc38Schristos goto emit_ranges; 11012950cc38Schristos optionNumericVal(pOptions, pOptDesc); 11022950cc38Schristos 11032950cc38Schristos for (ix = 0; ix < 1; ix++) { 11042950cc38Schristos if (pOptDesc->optArg.argInt < rng[ix].rmin) 11052950cc38Schristos continue; /* ranges need not be ordered. */ 11062950cc38Schristos if (pOptDesc->optArg.argInt == rng[ix].rmin) 11072950cc38Schristos return; 11082950cc38Schristos if (rng[ix].rmax == LONG_MIN) 11092950cc38Schristos continue; 11102950cc38Schristos if (pOptDesc->optArg.argInt <= rng[ix].rmax) 11112950cc38Schristos return; 11122950cc38Schristos } 11132950cc38Schristos 11142950cc38Schristos option_usage_fp = stderr; 11152950cc38Schristos 11162950cc38Schristos emit_ranges: 11175d681e99Schristos optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 11182950cc38Schristos } 11192950cc38Schristos #endif /* defined AUTOKEY */ 11205d681e99Schristos /* extracted from optmain.tlib near line 1250 */ 11212950cc38Schristos 11222950cc38Schristos /** 11232950cc38Schristos * The directory containing the data associated with ntp-keygen. 11242950cc38Schristos */ 11252950cc38Schristos #ifndef PKGDATADIR 11262950cc38Schristos # define PKGDATADIR "" 11272950cc38Schristos #endif 11282950cc38Schristos 11292950cc38Schristos /** 11302950cc38Schristos * Information about the person or institution that packaged ntp-keygen 11312950cc38Schristos * for the current distribution. 11322950cc38Schristos */ 11332950cc38Schristos #ifndef WITH_PACKAGER 11342950cc38Schristos # define ntp_keygen_packager_info NULL 11352950cc38Schristos #else 11362950cc38Schristos /** Packager information for ntp-keygen. */ 11372950cc38Schristos static char const ntp_keygen_packager_info[] = 11382950cc38Schristos "Packaged by " WITH_PACKAGER 11392950cc38Schristos 11402950cc38Schristos # ifdef WITH_PACKAGER_VERSION 11412950cc38Schristos " ("WITH_PACKAGER_VERSION")" 11422950cc38Schristos # endif 11432950cc38Schristos 11442950cc38Schristos # ifdef WITH_PACKAGER_BUG_REPORTS 11452950cc38Schristos "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS 11462950cc38Schristos # endif 11472950cc38Schristos "\n"; 11482950cc38Schristos #endif 11492950cc38Schristos #ifndef __doxygen__ 11502950cc38Schristos 11512950cc38Schristos #endif /* __doxygen__ */ 11522950cc38Schristos /** 11532950cc38Schristos * The option definitions for ntp-keygen. The one structure that 11542950cc38Schristos * binds them all. 11552950cc38Schristos */ 11562950cc38Schristos tOptions ntp_keygenOptions = { 11572950cc38Schristos OPTIONS_STRUCT_VERSION, 11582950cc38Schristos 0, NULL, /* original argc + argv */ 11592950cc38Schristos ( OPTPROC_BASE 11602950cc38Schristos + OPTPROC_ERRSTOP 11612950cc38Schristos + OPTPROC_SHORTOPT 11622950cc38Schristos + OPTPROC_LONGOPT 11632950cc38Schristos + OPTPROC_NO_REQ_OPT 11642950cc38Schristos + OPTPROC_ENVIRON 11652950cc38Schristos + OPTPROC_NO_ARGS 1166ea66d795Schristos + OPTPROC_MISUSE ), 11672950cc38Schristos 0, NULL, /* current option index, current option */ 11682950cc38Schristos NULL, NULL, zPROGNAME, 11692950cc38Schristos zRcName, zCopyright, zLicenseDescrip, 11702950cc38Schristos zFullVersion, apzHomeList, zUsageTitle, 11712950cc38Schristos zExplain, zDetail, optDesc, 11722950cc38Schristos zBugsAddr, /* address to send bugs to */ 11732950cc38Schristos NULL, NULL, /* extensions/saved state */ 11742950cc38Schristos optionUsage, /* usage procedure */ 11752950cc38Schristos translate_option_strings, /* translation procedure */ 11762950cc38Schristos /* 11772950cc38Schristos * Indexes to special options 11782950cc38Schristos */ 11792950cc38Schristos { INDEX_OPT_MORE_HELP, /* more-help option index */ 11802950cc38Schristos INDEX_OPT_SAVE_OPTS, /* save option index */ 11812950cc38Schristos NO_EQUIVALENT, /* '-#' option index */ 11822950cc38Schristos NO_EQUIVALENT /* index of default opt */ 11832950cc38Schristos }, 11842950cc38Schristos 26 /* full option count */, 21 /* user option count */, 11852950cc38Schristos ntp_keygen_full_usage, ntp_keygen_short_usage, 11862950cc38Schristos NULL, NULL, 11872950cc38Schristos PKGDATADIR, ntp_keygen_packager_info 11882950cc38Schristos }; 1189abb0f93cSkardel 1190abb0f93cSkardel #if ENABLE_NLS 11912950cc38Schristos /** 11922950cc38Schristos * This code is designed to translate translatable option text for the 11932950cc38Schristos * ntp-keygen program. These translations happen upon entry 11942950cc38Schristos * to optionProcess(). 11952950cc38Schristos */ 1196abb0f93cSkardel #include <stdio.h> 1197abb0f93cSkardel #include <stdlib.h> 1198abb0f93cSkardel #include <string.h> 1199abb0f93cSkardel #include <unistd.h> 12002950cc38Schristos #ifdef HAVE_DCGETTEXT 12012950cc38Schristos # include <gettext.h> 12022950cc38Schristos #endif 1203abb0f93cSkardel #include <autoopts/usage-txt.h> 1204abb0f93cSkardel 1205abb0f93cSkardel static char * AO_gettext(char const * pz); 1206abb0f93cSkardel static void coerce_it(void ** s); 1207abb0f93cSkardel 12082950cc38Schristos /** 12092950cc38Schristos * AutoGen specific wrapper function for gettext. It relies on the macro _() 12102950cc38Schristos * to convert from English to the target language, then strdup-duplicates the 12112950cc38Schristos * result string. It tries the "libopts" domain first, then whatever has been 12122950cc38Schristos * set via the \a textdomain(3) call. 12132950cc38Schristos * 12142950cc38Schristos * @param[in] pz the input text used as a lookup key. 12152950cc38Schristos * @returns the translated text (if there is one), 12162950cc38Schristos * or the original text (if not). 12172950cc38Schristos */ 1218abb0f93cSkardel static char * 1219abb0f93cSkardel AO_gettext(char const * pz) 1220abb0f93cSkardel { 12212950cc38Schristos char * res; 1222abb0f93cSkardel if (pz == NULL) 1223abb0f93cSkardel return NULL; 12242950cc38Schristos #ifdef HAVE_DCGETTEXT 12252950cc38Schristos /* 12262950cc38Schristos * While processing the option_xlateable_txt data, try to use the 12272950cc38Schristos * "libopts" domain. Once we switch to the option descriptor data, 12282950cc38Schristos * do *not* use that domain. 12292950cc38Schristos */ 12302950cc38Schristos if (option_xlateable_txt.field_ct != 0) { 12312950cc38Schristos res = dgettext("libopts", pz); 12322950cc38Schristos if (res == pz) 12335d681e99Schristos res = (char *)VOIDP(_(pz)); 12342950cc38Schristos } else 12355d681e99Schristos res = (char *)VOIDP(_(pz)); 12362950cc38Schristos #else 12375d681e99Schristos res = (char *)VOIDP(_(pz)); 12382950cc38Schristos #endif 12392950cc38Schristos if (res == pz) 12402950cc38Schristos return res; 12412950cc38Schristos res = strdup(res); 12422950cc38Schristos if (res == NULL) { 1243abb0f93cSkardel fputs(_("No memory for duping translated strings\n"), stderr); 12443123f114Skardel exit(NTP_KEYGEN_EXIT_FAILURE); 1245abb0f93cSkardel } 12462950cc38Schristos return res; 1247abb0f93cSkardel } 1248abb0f93cSkardel 12492950cc38Schristos /** 12502950cc38Schristos * All the pointers we use are marked "* const", but they are stored in 12512950cc38Schristos * writable memory. Coerce the mutability and set the pointer. 12522950cc38Schristos */ 12533123f114Skardel static void coerce_it(void ** s) { *s = AO_gettext(*s); 12543123f114Skardel } 1255abb0f93cSkardel 12562950cc38Schristos /** 12572950cc38Schristos * Translate all the translatable strings in the ntp_keygenOptions 12582950cc38Schristos * structure defined above. This is done only once. 1259abb0f93cSkardel */ 1260abb0f93cSkardel static void 1261abb0f93cSkardel translate_option_strings(void) 1262abb0f93cSkardel { 12632950cc38Schristos tOptions * const opts = &ntp_keygenOptions; 12643123f114Skardel 1265abb0f93cSkardel /* 1266abb0f93cSkardel * Guard against re-translation. It won't work. The strings will have 1267abb0f93cSkardel * been changed by the first pass through this code. One shot only. 1268abb0f93cSkardel */ 12692950cc38Schristos if (option_xlateable_txt.field_ct != 0) { 1270abb0f93cSkardel /* 1271abb0f93cSkardel * Do the translations. The first pointer follows the field count 1272abb0f93cSkardel * field. The field count field is the size of a pointer. 1273abb0f93cSkardel */ 12745d681e99Schristos char ** ppz = (char**)VOIDP(&(option_xlateable_txt)); 12752950cc38Schristos int ix = option_xlateable_txt.field_ct; 1276abb0f93cSkardel 1277abb0f93cSkardel do { 12782950cc38Schristos ppz++; /* skip over field_ct */ 1279abb0f93cSkardel *ppz = AO_gettext(*ppz); 1280abb0f93cSkardel } while (--ix > 0); 12812950cc38Schristos /* prevent re-translation and disable "libopts" domain lookup */ 12822950cc38Schristos option_xlateable_txt.field_ct = 0; 1283abb0f93cSkardel 12845d681e99Schristos coerce_it(VOIDP(&(opts->pzCopyright))); 12855d681e99Schristos coerce_it(VOIDP(&(opts->pzCopyNotice))); 12865d681e99Schristos coerce_it(VOIDP(&(opts->pzFullVersion))); 12875d681e99Schristos coerce_it(VOIDP(&(opts->pzUsageTitle))); 12885d681e99Schristos coerce_it(VOIDP(&(opts->pzExplain))); 12895d681e99Schristos coerce_it(VOIDP(&(opts->pzDetail))); 12902950cc38Schristos { 12912950cc38Schristos tOptDesc * od = opts->pOptDesc; 12922950cc38Schristos for (ix = opts->optCt; ix > 0; ix--, od++) 12935d681e99Schristos coerce_it(VOIDP(&(od->pzText))); 1294abb0f93cSkardel } 1295abb0f93cSkardel } 12962950cc38Schristos } 1297abb0f93cSkardel #endif /* ENABLE_NLS */ 1298abb0f93cSkardel 12992950cc38Schristos #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 13002950cc38Schristos /** I18N function strictly for xgettext. Do not compile. */ 13012950cc38Schristos static void bogus_function(void) { 13022950cc38Schristos /* TRANSLATORS: 13032950cc38Schristos 13042950cc38Schristos The following dummy function was crated solely so that xgettext can 13052950cc38Schristos extract the correct strings. These strings are actually referenced 13062950cc38Schristos by a field name in the ntp_keygenOptions structure noted in the 13072950cc38Schristos comments below. The literal text is defined in ntp_keygen_opt_strs. 13082950cc38Schristos 13092950cc38Schristos NOTE: the strings below are segmented with respect to the source string 13102950cc38Schristos ntp_keygen_opt_strs. The strings above are handed off for translation 13112950cc38Schristos at run time a paragraph at a time. Consequently, they are presented here 13122950cc38Schristos for translation a paragraph at a time. 13132950cc38Schristos 13142950cc38Schristos ALSO: often the description for an option will reference another option 13152950cc38Schristos by name. These are set off with apostrophe quotes (I hope). Do not 13162950cc38Schristos translate option names. 13172950cc38Schristos */ 13182950cc38Schristos /* referenced via ntp_keygenOptions.pzCopyright */ 1319*eabc0478Schristos puts(_("ntp-keygen (ntp) 4.2.8p18\n\ 1320*eabc0478Schristos Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\ 13212950cc38Schristos This is free software. It is licensed for use, modification and\n\ 13222950cc38Schristos redistribution under the terms of the NTP License, copies of which\n\ 13232950cc38Schristos can be seen at:\n")); 13242950cc38Schristos puts(_(" <http://ntp.org/license>\n\ 13252950cc38Schristos <http://opensource.org/licenses/ntp-license.php>\n")); 13262950cc38Schristos 13272950cc38Schristos /* referenced via ntp_keygenOptions.pzCopyNotice */ 13282950cc38Schristos puts(_("Permission to use, copy, modify, and distribute this software and its\n\ 13292950cc38Schristos documentation for any purpose with or without fee is hereby granted,\n\ 13302950cc38Schristos provided that the above copyright notice appears in all copies and that\n\ 13312950cc38Schristos both the copyright notice and this permission notice appear in supporting\n\ 13322950cc38Schristos documentation, and that the name The University of Delaware not be used in\n\ 13332950cc38Schristos advertising or publicity pertaining to distribution of the software without\n\ 13347476e6e4Schristos specific, written prior permission. The University of Delaware and Network\n\ 13357476e6e4Schristos Time Foundation makes no representations about the suitability this\n\ 13367476e6e4Schristos software for any purpose. It is provided \"as is\" without express or\n\ 13377476e6e4Schristos implied warranty.\n")); 13382950cc38Schristos 13392950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13402950cc38Schristos puts(_("identity modulus bits")); 13412950cc38Schristos 13422950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13432950cc38Schristos puts(_("certificate scheme")); 13442950cc38Schristos 13452950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13462950cc38Schristos puts(_("privatekey cipher")); 13472950cc38Schristos 13482950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13492950cc38Schristos puts(_("Increase debug verbosity level")); 13502950cc38Schristos 13512950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13522950cc38Schristos puts(_("Set the debug verbosity level")); 13532950cc38Schristos 13542950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13552950cc38Schristos puts(_("Write IFF or GQ identity keys")); 13562950cc38Schristos 13572950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13582950cc38Schristos puts(_("Generate GQ parameters and keys")); 13592950cc38Schristos 13602950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13612950cc38Schristos puts(_("generate RSA host key")); 13622950cc38Schristos 13632950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13642950cc38Schristos puts(_("generate IFF parameters")); 13652950cc38Schristos 13662950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13672950cc38Schristos puts(_("set Autokey group name")); 13682950cc38Schristos 13692950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13702950cc38Schristos puts(_("set certificate lifetime")); 13712950cc38Schristos 13722950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13734eea345dSchristos puts(_("prime modulus")); 13742950cc38Schristos 13752950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13764eea345dSchristos puts(_("generate symmetric keys")); 13772950cc38Schristos 13782950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13792950cc38Schristos puts(_("generate PC private certificate")); 13802950cc38Schristos 13812950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1382ea66d795Schristos puts(_("local private password")); 13832950cc38Schristos 13842950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1385ea66d795Schristos puts(_("export IFF or GQ group keys with password")); 13862950cc38Schristos 13872950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13884eea345dSchristos puts(_("set host and optionally group name")); 13892950cc38Schristos 13902950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13914eea345dSchristos puts(_("generate sign key (RSA or DSA)")); 13922950cc38Schristos 13932950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13942950cc38Schristos puts(_("trusted certificate (TC scheme)")); 13952950cc38Schristos 13962950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 13972950cc38Schristos puts(_("generate <num> MV parameters")); 13982950cc38Schristos 13992950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 14002950cc38Schristos puts(_("update <num> MV keys")); 14012950cc38Schristos 14022950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 14032950cc38Schristos puts(_("display extended usage information and exit")); 14042950cc38Schristos 14052950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 14062950cc38Schristos puts(_("extended usage information passed thru pager")); 14072950cc38Schristos 14082950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 14092950cc38Schristos puts(_("output version information and exit")); 14102950cc38Schristos 14112950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 14122950cc38Schristos puts(_("save the option state to a config file")); 14132950cc38Schristos 14142950cc38Schristos /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 14152950cc38Schristos puts(_("load options from a config file")); 14162950cc38Schristos 14172950cc38Schristos /* referenced via ntp_keygenOptions.pzUsageTitle */ 1418*eabc0478Schristos puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p18\n\ 14192950cc38Schristos Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); 14202950cc38Schristos 14212950cc38Schristos /* referenced via ntp_keygenOptions.pzExplain */ 14222950cc38Schristos puts(_("\n")); 14232950cc38Schristos 14242950cc38Schristos /* referenced via ntp_keygenOptions.pzFullVersion */ 1425*eabc0478Schristos puts(_("ntp-keygen (ntp) 4.2.8p18")); 14262950cc38Schristos 14272950cc38Schristos /* referenced via ntp_keygenOptions.pzFullUsage */ 14282950cc38Schristos puts(_("<<<NOT-FOUND>>>")); 14292950cc38Schristos 14302950cc38Schristos /* referenced via ntp_keygenOptions.pzShortUsage */ 14312950cc38Schristos puts(_("<<<NOT-FOUND>>>")); 14322950cc38Schristos /* LIBOPTS-MESSAGES: */ 14332950cc38Schristos #line 67 "../autoopts.c" 14342950cc38Schristos puts(_("allocation of %d bytes failed\n")); 1435*eabc0478Schristos #line 89 "../autoopts.c" 14362950cc38Schristos puts(_("allocation of %d bytes failed\n")); 1437*eabc0478Schristos #line 48 "../init.c" 14382950cc38Schristos puts(_("AutoOpts function called without option descriptor\n")); 1439*eabc0478Schristos #line 81 "../init.c" 14402950cc38Schristos puts(_("\tThis exceeds the compiled library version: ")); 1441*eabc0478Schristos #line 79 "../init.c" 14422950cc38Schristos puts(_("Automated Options Processing Error!\n" 14432950cc38Schristos "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 1444*eabc0478Schristos #line 78 "../autoopts.c" 14452950cc38Schristos puts(_("realloc of %d bytes at 0x%p failed\n")); 1446*eabc0478Schristos #line 83 "../init.c" 14472950cc38Schristos puts(_("\tThis is less than the minimum library version: ")); 14482950cc38Schristos #line 121 "../version.c" 14492950cc38Schristos puts(_("Automated Options version %s\n" 1450*eabc0478Schristos "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n")); 1451*eabc0478Schristos #line 49 "../makeshell.c" 14522950cc38Schristos puts(_("(AutoOpts bug): %s.\n")); 14532950cc38Schristos #line 90 "../reset.c" 14542950cc38Schristos puts(_("optionResetOpt() called, but reset-option not configured")); 1455*eabc0478Schristos #line 241 "../usage.c" 14562950cc38Schristos puts(_("could not locate the 'help' option")); 1457*eabc0478Schristos #line 330 "../autoopts.c" 14582950cc38Schristos puts(_("optionProcess() was called with invalid data")); 1459*eabc0478Schristos #line 697 "../usage.c" 14602950cc38Schristos puts(_("invalid argument type specified")); 1461*eabc0478Schristos #line 568 "../find.c" 14622950cc38Schristos puts(_("defaulted to option with optional arg")); 14632950cc38Schristos #line 76 "../alias.c" 14642950cc38Schristos puts(_("aliasing option is out of range.")); 1465*eabc0478Schristos #line 210 "../enum.c" 14662950cc38Schristos puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 1467*eabc0478Schristos #line 78 "../find.c" 14682950cc38Schristos puts(_(" The following options match:\n")); 1469*eabc0478Schristos #line 263 "../find.c" 14702950cc38Schristos puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 14712950cc38Schristos #line 161 "../check.c" 14722950cc38Schristos puts(_("%s: Command line arguments required\n")); 14732950cc38Schristos #line 43 "../alias.c" 14742950cc38Schristos puts(_("%d %s%s options allowed\n")); 1475*eabc0478Schristos #line 56 "../makeshell.c" 14762950cc38Schristos puts(_("%s error %d (%s) calling %s for '%s'\n")); 1477*eabc0478Schristos #line 268 "../makeshell.c" 14782950cc38Schristos puts(_("interprocess pipe")); 1479*eabc0478Schristos #line 171 "../version.c" 14802950cc38Schristos puts(_("error: version option argument '%c' invalid. Use:\n" 14812950cc38Schristos "\t'v' - version only\n" 14822950cc38Schristos "\t'c' - version and copyright\n" 14832950cc38Schristos "\t'n' - version and full copyright notice\n")); 14842950cc38Schristos #line 58 "../check.c" 14852950cc38Schristos puts(_("%s error: the '%s' and '%s' options conflict\n")); 1486*eabc0478Schristos #line 187 "../find.c" 14872950cc38Schristos puts(_("%s: The '%s' option has been disabled.")); 1488*eabc0478Schristos #line 400 "../find.c" 14892950cc38Schristos puts(_("%s: The '%s' option has been disabled.")); 14902950cc38Schristos #line 38 "../alias.c" 14912950cc38Schristos puts(_("-equivalence")); 1492*eabc0478Schristos #line 439 "../find.c" 14932950cc38Schristos puts(_("%s: illegal option -- %c\n")); 14942950cc38Schristos #line 110 "../reset.c" 14952950cc38Schristos puts(_("%s: illegal option -- %c\n")); 1496*eabc0478Schristos #line 241 "../find.c" 14972950cc38Schristos puts(_("%s: illegal option -- %s\n")); 1498*eabc0478Schristos #line 740 "../find.c" 14992950cc38Schristos puts(_("%s: illegal option -- %s\n")); 15002950cc38Schristos #line 118 "../reset.c" 15012950cc38Schristos puts(_("%s: illegal option -- %s\n")); 1502*eabc0478Schristos #line 305 "../find.c" 15032950cc38Schristos puts(_("%s: unknown vendor extension option -- %s\n")); 1504*eabc0478Schristos #line 135 "../enum.c" 15052950cc38Schristos puts(_(" or an integer from %d through %d\n")); 1506*eabc0478Schristos #line 145 "../enum.c" 15072950cc38Schristos puts(_(" or an integer from %d through %d\n")); 1508*eabc0478Schristos #line 696 "../usage.c" 15092950cc38Schristos puts(_("%s error: invalid option descriptor for %s\n")); 1510*eabc0478Schristos #line 1030 "../usage.c" 15112950cc38Schristos puts(_("%s error: invalid option descriptor for %s\n")); 1512*eabc0478Schristos #line 355 "../find.c" 15132950cc38Schristos puts(_("%s: invalid option name: %s\n")); 1514*eabc0478Schristos #line 497 "../find.c" 15152950cc38Schristos puts(_("%s: The '%s' option requires an argument.\n")); 1516*eabc0478Schristos #line 150 "../autoopts.c" 15172950cc38Schristos puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 15182950cc38Schristos "\t'%s' and '%s'.")); 15192950cc38Schristos #line 94 "../check.c" 15202950cc38Schristos puts(_("%s error: The %s option is required\n")); 1521*eabc0478Schristos #line 602 "../find.c" 15222950cc38Schristos puts(_("%s: The '%s' option cannot have an argument.\n")); 15232950cc38Schristos #line 151 "../check.c" 15242950cc38Schristos puts(_("%s: Command line arguments are not allowed.\n")); 1525*eabc0478Schristos #line 568 "../save.c" 15262950cc38Schristos puts(_("error %d (%s) creating %s\n")); 1527*eabc0478Schristos #line 210 "../enum.c" 15282950cc38Schristos puts(_("%s error: '%s' does not match any %s keywords.\n")); 15292950cc38Schristos #line 93 "../reset.c" 15302950cc38Schristos puts(_("%s error: The '%s' option requires an argument.\n")); 1531*eabc0478Schristos #line 122 "../save.c" 15322950cc38Schristos puts(_("error %d (%s) stat-ing %s\n")); 1533*eabc0478Schristos #line 175 "../save.c" 15342950cc38Schristos puts(_("error %d (%s) stat-ing %s\n")); 15352950cc38Schristos #line 143 "../restore.c" 15362950cc38Schristos puts(_("%s error: no saved option state\n")); 1537*eabc0478Schristos #line 225 "../autoopts.c" 15382950cc38Schristos puts(_("'%s' is not a command line option.\n")); 1539*eabc0478Schristos #line 113 "../time.c" 15402950cc38Schristos puts(_("%s error: '%s' is not a recognizable date/time.\n")); 1541ea66d795Schristos #line 50 "../time.c" 15422950cc38Schristos puts(_("%s error: '%s' is not a recognizable time duration.\n")); 15432950cc38Schristos #line 92 "../check.c" 15442950cc38Schristos puts(_("%s error: The %s option must appear %d times.\n")); 1545*eabc0478Schristos #line 165 "../numeric.c" 15462950cc38Schristos puts(_("%s error: '%s' is not a recognizable number.\n")); 1547*eabc0478Schristos #line 176 "../enum.c" 15482950cc38Schristos puts(_("%s error: %s exceeds %s keyword count\n")); 1549*eabc0478Schristos #line 279 "../usage.c" 15502950cc38Schristos puts(_("Try '%s %s' for more information.\n")); 15512950cc38Schristos #line 45 "../alias.c" 15522950cc38Schristos puts(_("one %s%s option allowed\n")); 1553*eabc0478Schristos #line 170 "../makeshell.c" 15542950cc38Schristos puts(_("standard output")); 1555*eabc0478Schristos #line 905 "../makeshell.c" 15562950cc38Schristos puts(_("standard output")); 1557*eabc0478Schristos #line 223 "../usage.c" 15582950cc38Schristos puts(_("standard output")); 1559*eabc0478Schristos #line 364 "../usage.c" 15602950cc38Schristos puts(_("standard output")); 1561*eabc0478Schristos #line 574 "../usage.c" 15622950cc38Schristos puts(_("standard output")); 1563*eabc0478Schristos #line 178 "../version.c" 15642950cc38Schristos puts(_("standard output")); 1565*eabc0478Schristos #line 223 "../usage.c" 15662950cc38Schristos puts(_("standard error")); 1567*eabc0478Schristos #line 364 "../usage.c" 15682950cc38Schristos puts(_("standard error")); 1569*eabc0478Schristos #line 574 "../usage.c" 15702950cc38Schristos puts(_("standard error")); 1571*eabc0478Schristos #line 178 "../version.c" 15722950cc38Schristos puts(_("standard error")); 1573*eabc0478Schristos #line 170 "../makeshell.c" 15742950cc38Schristos puts(_("write")); 1575*eabc0478Schristos #line 905 "../makeshell.c" 15762950cc38Schristos puts(_("write")); 1577*eabc0478Schristos #line 222 "../usage.c" 15782950cc38Schristos puts(_("write")); 1579*eabc0478Schristos #line 363 "../usage.c" 15802950cc38Schristos puts(_("write")); 1581*eabc0478Schristos #line 573 "../usage.c" 15822950cc38Schristos puts(_("write")); 1583*eabc0478Schristos #line 177 "../version.c" 15842950cc38Schristos puts(_("write")); 15852950cc38Schristos #line 60 "../numeric.c" 15862950cc38Schristos puts(_("%s error: %s option value %ld is out of range.\n")); 15872950cc38Schristos #line 44 "../check.c" 15882950cc38Schristos puts(_("%s error: %s option requires the %s option\n")); 1589*eabc0478Schristos #line 121 "../save.c" 15902950cc38Schristos puts(_("%s warning: cannot save options - %s not regular file\n")); 1591*eabc0478Schristos #line 174 "../save.c" 15922950cc38Schristos puts(_("%s warning: cannot save options - %s not regular file\n")); 1593*eabc0478Schristos #line 193 "../save.c" 15942950cc38Schristos puts(_("%s warning: cannot save options - %s not regular file\n")); 1595*eabc0478Schristos #line 567 "../save.c" 15962950cc38Schristos puts(_("%s warning: cannot save options - %s not regular file\n")); 15972950cc38Schristos /* END-LIBOPTS-MESSAGES */ 15982950cc38Schristos 15992950cc38Schristos /* USAGE-TEXT: */ 1600*eabc0478Schristos #line 822 "../usage.c" 16012950cc38Schristos puts(_("\t\t\t\t- an alternate for '%s'\n")); 1602*eabc0478Schristos #line 1097 "../usage.c" 16032950cc38Schristos puts(_("Version, usage and configuration options:")); 1604*eabc0478Schristos #line 873 "../usage.c" 16052950cc38Schristos puts(_("\t\t\t\t- default option for unnamed options\n")); 1606*eabc0478Schristos #line 786 "../usage.c" 16072950cc38Schristos puts(_("\t\t\t\t- disabled as '--%s'\n")); 1608*eabc0478Schristos #line 1066 "../usage.c" 16092950cc38Schristos puts(_(" --- %-14s %s\n")); 1610*eabc0478Schristos #line 1064 "../usage.c" 16112950cc38Schristos puts(_("This option has been disabled")); 1612*eabc0478Schristos #line 813 "../usage.c" 16132950cc38Schristos puts(_("\t\t\t\t- enabled by default\n")); 16142950cc38Schristos #line 40 "../alias.c" 16152950cc38Schristos puts(_("%s error: only ")); 1616*eabc0478Schristos #line 1143 "../usage.c" 16172950cc38Schristos puts(_(" - examining environment variables named %s_*\n")); 16182950cc38Schristos #line 168 "../file.c" 16192950cc38Schristos puts(_("\t\t\t\t- file must not pre-exist\n")); 16202950cc38Schristos #line 172 "../file.c" 16212950cc38Schristos puts(_("\t\t\t\t- file must pre-exist\n")); 1622*eabc0478Schristos #line 329 "../usage.c" 16232950cc38Schristos puts(_("Options are specified by doubled hyphens and their name or by a single\n" 16242950cc38Schristos "hyphen and the flag character.\n")); 1625*eabc0478Schristos #line 882 "../makeshell.c" 16262950cc38Schristos puts(_("\n" 16272950cc38Schristos "= = = = = = = =\n\n" 16282950cc38Schristos "This incarnation of genshell will produce\n" 16292950cc38Schristos "a shell script to parse the options for %s:\n\n")); 1630*eabc0478Schristos #line 142 "../enum.c" 16312950cc38Schristos puts(_(" or an integer mask with any of the lower %d bits set\n")); 1632*eabc0478Schristos #line 846 "../usage.c" 16332950cc38Schristos puts(_("\t\t\t\t- is a set membership option\n")); 1634*eabc0478Schristos #line 867 "../usage.c" 16352950cc38Schristos puts(_("\t\t\t\t- must appear between %d and %d times\n")); 1636*eabc0478Schristos #line 331 "../usage.c" 16372950cc38Schristos puts(_("Options are specified by single or double hyphens and their name.\n")); 1638*eabc0478Schristos #line 853 "../usage.c" 16392950cc38Schristos puts(_("\t\t\t\t- may appear multiple times\n")); 1640*eabc0478Schristos #line 840 "../usage.c" 16412950cc38Schristos puts(_("\t\t\t\t- may not be preset\n")); 1642*eabc0478Schristos #line 1258 "../usage.c" 16432950cc38Schristos puts(_(" Arg Option-Name Description\n")); 1644*eabc0478Schristos #line 1194 "../usage.c" 16452950cc38Schristos puts(_(" Flg Arg Option-Name Description\n")); 1646*eabc0478Schristos #line 1252 "../usage.c" 16472950cc38Schristos puts(_(" Flg Arg Option-Name Description\n")); 1648*eabc0478Schristos #line 1253 "../usage.c" 16492950cc38Schristos puts(_(" %3s %s")); 1650*eabc0478Schristos #line 1259 "../usage.c" 16512950cc38Schristos puts(_(" %3s %s")); 1652*eabc0478Schristos #line 336 "../usage.c" 16532950cc38Schristos puts(_("The '-#<number>' option may omit the hash char\n")); 1654*eabc0478Schristos #line 332 "../usage.c" 16552950cc38Schristos puts(_("All arguments are named options.\n")); 1656*eabc0478Schristos #line 920 "../usage.c" 16572950cc38Schristos puts(_(" - reading file %s")); 1658*eabc0478Schristos #line 358 "../usage.c" 16592950cc38Schristos puts(_("\n" 16602950cc38Schristos "Please send bug reports to: <%s>\n")); 16612950cc38Schristos #line 100 "../version.c" 16622950cc38Schristos puts(_("\n" 16632950cc38Schristos "Please send bug reports to: <%s>\n")); 16642950cc38Schristos #line 129 "../version.c" 16652950cc38Schristos puts(_("\n" 16662950cc38Schristos "Please send bug reports to: <%s>\n")); 1667*eabc0478Schristos #line 852 "../usage.c" 16682950cc38Schristos puts(_("\t\t\t\t- may NOT appear - preset only\n")); 1669*eabc0478Schristos #line 893 "../usage.c" 16702950cc38Schristos puts(_("\n" 16712950cc38Schristos "The following option preset mechanisms are supported:\n")); 1672*eabc0478Schristos #line 1141 "../usage.c" 16732950cc38Schristos puts(_("\n" 16742950cc38Schristos "The following option preset mechanisms are supported:\n")); 1675*eabc0478Schristos #line 631 "../usage.c" 16762950cc38Schristos puts(_("prohibits these options:\n")); 1677*eabc0478Schristos #line 626 "../usage.c" 16782950cc38Schristos puts(_("prohibits the option '%s'\n")); 16792950cc38Schristos #line 81 "../numeric.c" 16802950cc38Schristos puts(_("%s%ld to %ld")); 16812950cc38Schristos #line 79 "../numeric.c" 16822950cc38Schristos puts(_("%sgreater than or equal to %ld")); 16832950cc38Schristos #line 75 "../numeric.c" 16842950cc38Schristos puts(_("%s%ld exactly")); 16852950cc38Schristos #line 68 "../numeric.c" 16862950cc38Schristos puts(_("%sit must lie in one of the ranges:\n")); 16872950cc38Schristos #line 68 "../numeric.c" 16882950cc38Schristos puts(_("%sit must be in the range:\n")); 16892950cc38Schristos #line 88 "../numeric.c" 16902950cc38Schristos puts(_(", or\n")); 16912950cc38Schristos #line 66 "../numeric.c" 16922950cc38Schristos puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 16932950cc38Schristos #line 77 "../numeric.c" 16942950cc38Schristos puts(_("%sless than or equal to %ld")); 1695*eabc0478Schristos #line 339 "../usage.c" 16962950cc38Schristos puts(_("Operands and options may be intermixed. They will be reordered.\n")); 1697*eabc0478Schristos #line 601 "../usage.c" 16982950cc38Schristos puts(_("requires the option '%s'\n")); 1699*eabc0478Schristos #line 604 "../usage.c" 17002950cc38Schristos puts(_("requires these options:\n")); 1701*eabc0478Schristos #line 1270 "../usage.c" 17022950cc38Schristos puts(_(" Arg Option-Name Req? Description\n")); 1703*eabc0478Schristos #line 1264 "../usage.c" 17042950cc38Schristos puts(_(" Flg Arg Option-Name Req? Description\n")); 1705*eabc0478Schristos #line 143 "../enum.c" 17062950cc38Schristos puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 17072950cc38Schristos "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 17082950cc38Schristos "will set them all. Multiple entries may be passed as an option\n" 17092950cc38Schristos "argument list.\n")); 1710*eabc0478Schristos #line 859 "../usage.c" 17112950cc38Schristos puts(_("\t\t\t\t- may appear up to %d times\n")); 1712*eabc0478Schristos #line 52 "../enum.c" 17132950cc38Schristos puts(_("The valid \"%s\" option keywords are:\n")); 1714*eabc0478Schristos #line 1101 "../usage.c" 17152950cc38Schristos puts(_("The next option supports vendor supported extra options:")); 1716*eabc0478Schristos #line 722 "../usage.c" 17172950cc38Schristos puts(_("These additional options are:")); 17182950cc38Schristos /* END-USAGE-TEXT */ 17192950cc38Schristos } 17202950cc38Schristos #endif /* uncompilable code */ 1721abb0f93cSkardel #ifdef __cplusplus 1722abb0f93cSkardel } 1723abb0f93cSkardel #endif 1724abb0f93cSkardel /* ntp-keygen-opts.c ends here */ 1725