1285612Sdelphij/* 2181834Sroberto * EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c) 3285612Sdelphij * 4330567Sgordon * It has been AutoGen-ed February 27, 2018 at 05:15:44 PM by AutoGen 5.18.5 5181834Sroberto * From the definitions ntp-keygen-opts.def 6181834Sroberto * and the template file options 7181834Sroberto * 8285612Sdelphij * Generated from AutoOpts 41:0:16 templates. 9181834Sroberto * 10285612Sdelphij * AutoOpts is a copyrighted work. This source file is not encumbered 11285612Sdelphij * by AutoOpts licensing, but is provided under the licensing terms chosen 12285612Sdelphij * by the ntp-keygen author or copyright holder. AutoOpts is 13285612Sdelphij * licensed under the terms of the LGPL. The redistributable library 14285612Sdelphij * (``libopts'') is licensed under the terms of either the LGPL or, at the 15285612Sdelphij * users discretion, the BSD license. See the AutoOpts and/or libopts sources 16285612Sdelphij * for details. 17181834Sroberto * 18285612Sdelphij * The ntp-keygen program is copyrighted and licensed 19285612Sdelphij * under the following terms: 20181834Sroberto * 21316722Sdelphij * Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved. 22285612Sdelphij * This is free software. It is licensed for use, modification and 23285612Sdelphij * redistribution under the terms of the NTP License, copies of which 24285612Sdelphij * can be seen at: 25285612Sdelphij * <http://ntp.org/license> 26285612Sdelphij * <http://opensource.org/licenses/ntp-license.php> 27285612Sdelphij * 28285612Sdelphij * Permission to use, copy, modify, and distribute this software and its 29285612Sdelphij * documentation for any purpose with or without fee is hereby granted, 30285612Sdelphij * provided that the above copyright notice appears in all copies and that 31285612Sdelphij * both the copyright notice and this permission notice appear in 32285612Sdelphij * supporting documentation, and that the name The University of Delaware not be used in 33285612Sdelphij * advertising or publicity pertaining to distribution of the software 34285612Sdelphij * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no 35285612Sdelphij * representations about the suitability this software for any purpose. It 36285612Sdelphij * is provided "as is" without express or implied warranty. 37181834Sroberto */ 38181834Sroberto 39285612Sdelphij#ifndef __doxygen__ 40285612Sdelphij#define OPTION_CODE_COMPILE 1 41285612Sdelphij#include "ntp-keygen-opts.h" 42285612Sdelphij#include <sys/types.h> 43181834Sroberto 44181834Sroberto#include <limits.h> 45181834Sroberto#include <stdio.h> 46285612Sdelphij#include <stdlib.h> 47285612Sdelphij#include <errno.h> 48181834Sroberto 49181834Sroberto#ifdef __cplusplus 50181834Srobertoextern "C" { 51181834Sroberto#endif 52285612Sdelphijextern FILE * option_usage_fp; 53285612Sdelphij#define zCopyright (ntp_keygen_opt_strs+0) 54316722Sdelphij#define zLicenseDescrip (ntp_keygen_opt_strs+353) 55181834Sroberto 56181834Sroberto/* 57181834Sroberto * global included definitions 58181834Sroberto */ 59181834Sroberto#include <stdlib.h> 60285612Sdelphij 61181834Sroberto#ifdef __windows 62181834Sroberto extern int atoi(const char*); 63181834Sroberto#else 64181834Sroberto# include <stdlib.h> 65181834Sroberto#endif 66181834Sroberto 67181834Sroberto#ifndef NULL 68181834Sroberto# define NULL 0 69181834Sroberto#endif 70285612Sdelphij 71285612Sdelphij/** 72285612Sdelphij * static const strings for ntp-keygen options 73181834Sroberto */ 74330567Sgordonstatic char const ntp_keygen_opt_strs[2442] = 75330567Sgordon/* 0 */ "ntp-keygen (ntp) 4.2.8p11\n" 76316722Sdelphij "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n" 77285612Sdelphij "This is free software. It is licensed for use, modification and\n" 78285612Sdelphij "redistribution under the terms of the NTP License, copies of which\n" 79285612Sdelphij "can be seen at:\n" 80285612Sdelphij " <http://ntp.org/license>\n" 81285612Sdelphij " <http://opensource.org/licenses/ntp-license.php>\n\0" 82316722Sdelphij/* 353 */ "Permission to use, copy, modify, and distribute this software and its\n" 83285612Sdelphij "documentation for any purpose with or without fee is hereby granted,\n" 84285612Sdelphij "provided that the above copyright notice appears in all copies and that\n" 85285612Sdelphij "both the copyright notice and this permission notice appear in supporting\n" 86285612Sdelphij "documentation, and that the name The University of Delaware not be used in\n" 87285612Sdelphij "advertising or publicity pertaining to distribution of the software without\n" 88285612Sdelphij "specific, written prior permission. The University of Delaware and Network\n" 89285612Sdelphij "Time Foundation makes no representations about the suitability this\n" 90285612Sdelphij "software for any purpose. It is provided \"as is\" without express or\n" 91285612Sdelphij "implied warranty.\n\0" 92316722Sdelphij/* 1021 */ "identity modulus bits\0" 93316722Sdelphij/* 1043 */ "IMBITS\0" 94316722Sdelphij/* 1050 */ "imbits\0" 95316722Sdelphij/* 1057 */ "certificate scheme\0" 96316722Sdelphij/* 1076 */ "CERTIFICATE\0" 97316722Sdelphij/* 1088 */ "certificate\0" 98316722Sdelphij/* 1100 */ "privatekey cipher\0" 99316722Sdelphij/* 1118 */ "CIPHER\0" 100316722Sdelphij/* 1125 */ "cipher\0" 101316722Sdelphij/* 1132 */ "Increase debug verbosity level\0" 102316722Sdelphij/* 1163 */ "DEBUG_LEVEL\0" 103316722Sdelphij/* 1175 */ "debug-level\0" 104316722Sdelphij/* 1187 */ "Set the debug verbosity level\0" 105316722Sdelphij/* 1217 */ "SET_DEBUG_LEVEL\0" 106316722Sdelphij/* 1233 */ "set-debug-level\0" 107316722Sdelphij/* 1249 */ "Write IFF or GQ identity keys\0" 108316722Sdelphij/* 1279 */ "ID_KEY\0" 109316722Sdelphij/* 1286 */ "id-key\0" 110316722Sdelphij/* 1293 */ "Generate GQ parameters and keys\0" 111316722Sdelphij/* 1325 */ "GQ_PARAMS\0" 112316722Sdelphij/* 1335 */ "gq-params\0" 113316722Sdelphij/* 1345 */ "generate RSA host key\0" 114316722Sdelphij/* 1367 */ "HOST_KEY\0" 115316722Sdelphij/* 1376 */ "host-key\0" 116316722Sdelphij/* 1385 */ "generate IFF parameters\0" 117316722Sdelphij/* 1409 */ "IFFKEY\0" 118316722Sdelphij/* 1416 */ "iffkey\0" 119316722Sdelphij/* 1423 */ "set Autokey group name\0" 120316722Sdelphij/* 1446 */ "IDENT\0" 121316722Sdelphij/* 1452 */ "ident\0" 122316722Sdelphij/* 1458 */ "set certificate lifetime\0" 123316722Sdelphij/* 1483 */ "LIFETIME\0" 124316722Sdelphij/* 1492 */ "lifetime\0" 125330567Sgordon/* 1501 */ "prime modulus\0" 126330567Sgordon/* 1515 */ "MODULUS\0" 127330567Sgordon/* 1523 */ "modulus\0" 128330567Sgordon/* 1531 */ "generate symmetric keys\0" 129330567Sgordon/* 1555 */ "MD5KEY\0" 130330567Sgordon/* 1562 */ "md5key\0" 131330567Sgordon/* 1569 */ "generate PC private certificate\0" 132330567Sgordon/* 1601 */ "PVT_CERT\0" 133330567Sgordon/* 1610 */ "pvt-cert\0" 134330567Sgordon/* 1619 */ "local private password\0" 135330567Sgordon/* 1642 */ "PASSWORD\0" 136330567Sgordon/* 1651 */ "password\0" 137330567Sgordon/* 1660 */ "export IFF or GQ group keys with password\0" 138330567Sgordon/* 1702 */ "EXPORT_PASSWD\0" 139330567Sgordon/* 1716 */ "export-passwd\0" 140330567Sgordon/* 1730 */ "set host and optionally group name\0" 141330567Sgordon/* 1765 */ "SUBJECT_NAME\0" 142330567Sgordon/* 1778 */ "subject-name\0" 143330567Sgordon/* 1791 */ "generate sign key (RSA or DSA)\0" 144330567Sgordon/* 1822 */ "SIGN_KEY\0" 145330567Sgordon/* 1831 */ "sign-key\0" 146330567Sgordon/* 1840 */ "trusted certificate (TC scheme)\0" 147330567Sgordon/* 1872 */ "TRUSTED_CERT\0" 148330567Sgordon/* 1885 */ "trusted-cert\0" 149330567Sgordon/* 1898 */ "generate <num> MV parameters\0" 150330567Sgordon/* 1927 */ "MV_PARAMS\0" 151330567Sgordon/* 1937 */ "mv-params\0" 152330567Sgordon/* 1947 */ "update <num> MV keys\0" 153330567Sgordon/* 1968 */ "MV_KEYS\0" 154330567Sgordon/* 1976 */ "mv-keys\0" 155330567Sgordon/* 1984 */ "display extended usage information and exit\0" 156330567Sgordon/* 2028 */ "help\0" 157330567Sgordon/* 2033 */ "extended usage information passed thru pager\0" 158330567Sgordon/* 2078 */ "more-help\0" 159330567Sgordon/* 2088 */ "output version information and exit\0" 160330567Sgordon/* 2124 */ "version\0" 161330567Sgordon/* 2132 */ "save the option state to a config file\0" 162330567Sgordon/* 2171 */ "save-opts\0" 163330567Sgordon/* 2181 */ "load options from a config file\0" 164330567Sgordon/* 2213 */ "LOAD_OPTS\0" 165330567Sgordon/* 2223 */ "no-load-opts\0" 166330567Sgordon/* 2236 */ "no\0" 167330567Sgordon/* 2239 */ "NTP_KEYGEN\0" 168330567Sgordon/* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p11\n" 169285612Sdelphij "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" 170330567Sgordon/* 2365 */ "$HOME\0" 171330567Sgordon/* 2371 */ ".\0" 172330567Sgordon/* 2373 */ ".ntprc\0" 173330567Sgordon/* 2380 */ "http://bugs.ntp.org, bugs@ntp.org\0" 174330567Sgordon/* 2414 */ "\n\0" 175330567Sgordon/* 2416 */ "ntp-keygen (ntp) 4.2.8p11"; 176181834Sroberto 177285612Sdelphij/** 178285612Sdelphij * imbits option description: 179285612Sdelphij */ 180285612Sdelphij#ifdef AUTOKEY 181285612Sdelphij/** Descriptive text for the imbits option */ 182316722Sdelphij#define IMBITS_DESC (ntp_keygen_opt_strs+1021) 183285612Sdelphij/** Upper-cased name for the imbits option */ 184316722Sdelphij#define IMBITS_NAME (ntp_keygen_opt_strs+1043) 185285612Sdelphij/** Name string for the imbits option */ 186316722Sdelphij#define IMBITS_name (ntp_keygen_opt_strs+1050) 187285612Sdelphij/** Compiled in flag settings for the imbits option */ 188285612Sdelphij#define IMBITS_FLAGS (OPTST_DISABLED \ 189285612Sdelphij | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 190181834Sroberto 191285612Sdelphij#else /* disable imbits */ 192285612Sdelphij#define IMBITS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 193285612Sdelphij#define IMBITS_NAME NULL 194285612Sdelphij#define IMBITS_DESC NULL 195285612Sdelphij#define IMBITS_name NULL 196285612Sdelphij#endif /* AUTOKEY */ 197285612Sdelphij 198285612Sdelphij/** 199285612Sdelphij * certificate option description: 200181834Sroberto */ 201285612Sdelphij#ifdef AUTOKEY 202285612Sdelphij/** Descriptive text for the certificate option */ 203316722Sdelphij#define CERTIFICATE_DESC (ntp_keygen_opt_strs+1057) 204285612Sdelphij/** Upper-cased name for the certificate option */ 205316722Sdelphij#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1076) 206285612Sdelphij/** Name string for the certificate option */ 207316722Sdelphij#define CERTIFICATE_name (ntp_keygen_opt_strs+1088) 208285612Sdelphij/** Compiled in flag settings for the certificate option */ 209285612Sdelphij#define CERTIFICATE_FLAGS (OPTST_DISABLED \ 210285612Sdelphij | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 211181834Sroberto 212285612Sdelphij#else /* disable certificate */ 213285612Sdelphij#define CERTIFICATE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 214285612Sdelphij#define CERTIFICATE_NAME NULL 215285612Sdelphij#define CERTIFICATE_DESC NULL 216285612Sdelphij#define CERTIFICATE_name NULL 217285612Sdelphij#endif /* AUTOKEY */ 218181834Sroberto 219285612Sdelphij/** 220285612Sdelphij * cipher option description: 221181834Sroberto */ 222285612Sdelphij#ifdef AUTOKEY 223285612Sdelphij/** Descriptive text for the cipher option */ 224316722Sdelphij#define CIPHER_DESC (ntp_keygen_opt_strs+1100) 225285612Sdelphij/** Upper-cased name for the cipher option */ 226316722Sdelphij#define CIPHER_NAME (ntp_keygen_opt_strs+1118) 227285612Sdelphij/** Name string for the cipher option */ 228316722Sdelphij#define CIPHER_name (ntp_keygen_opt_strs+1125) 229285612Sdelphij/** Compiled in flag settings for the cipher option */ 230285612Sdelphij#define CIPHER_FLAGS (OPTST_DISABLED \ 231181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 232181834Sroberto 233285612Sdelphij#else /* disable cipher */ 234285612Sdelphij#define CIPHER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 235285612Sdelphij#define CIPHER_NAME NULL 236285612Sdelphij#define CIPHER_DESC NULL 237285612Sdelphij#define CIPHER_name NULL 238285612Sdelphij#endif /* AUTOKEY */ 239181834Sroberto 240285612Sdelphij/** 241285612Sdelphij * debug-level option description: 242181834Sroberto */ 243285612Sdelphij/** Descriptive text for the debug-level option */ 244316722Sdelphij#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1132) 245285612Sdelphij/** Upper-cased name for the debug-level option */ 246316722Sdelphij#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1163) 247285612Sdelphij/** Name string for the debug-level option */ 248316722Sdelphij#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1175) 249285612Sdelphij/** Compiled in flag settings for the debug-level option */ 250285612Sdelphij#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) 251181834Sroberto 252285612Sdelphij/** 253285612Sdelphij * set-debug-level option description: 254285612Sdelphij */ 255285612Sdelphij/** Descriptive text for the set-debug-level option */ 256316722Sdelphij#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1187) 257285612Sdelphij/** Upper-cased name for the set-debug-level option */ 258316722Sdelphij#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1217) 259285612Sdelphij/** Name string for the set-debug-level option */ 260316722Sdelphij#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1233) 261285612Sdelphij/** Compiled in flag settings for the set-debug-level option */ 262285612Sdelphij#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ 263285612Sdelphij | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 264181834Sroberto 265285612Sdelphij/** 266285612Sdelphij * id-key option description: 267181834Sroberto */ 268285612Sdelphij#ifdef AUTOKEY 269285612Sdelphij/** Descriptive text for the id-key option */ 270316722Sdelphij#define ID_KEY_DESC (ntp_keygen_opt_strs+1249) 271285612Sdelphij/** Upper-cased name for the id-key option */ 272316722Sdelphij#define ID_KEY_NAME (ntp_keygen_opt_strs+1279) 273285612Sdelphij/** Name string for the id-key option */ 274316722Sdelphij#define ID_KEY_name (ntp_keygen_opt_strs+1286) 275285612Sdelphij/** Compiled in flag settings for the id-key option */ 276285612Sdelphij#define ID_KEY_FLAGS (OPTST_DISABLED) 277181834Sroberto 278285612Sdelphij#else /* disable id-key */ 279285612Sdelphij#define ID_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 280285612Sdelphij#define ID_KEY_NAME NULL 281285612Sdelphij#define ID_KEY_DESC NULL 282285612Sdelphij#define ID_KEY_name NULL 283285612Sdelphij#endif /* AUTOKEY */ 284181834Sroberto 285285612Sdelphij/** 286285612Sdelphij * gq-params option description: 287181834Sroberto */ 288285612Sdelphij#ifdef AUTOKEY 289285612Sdelphij/** Descriptive text for the gq-params option */ 290316722Sdelphij#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1293) 291285612Sdelphij/** Upper-cased name for the gq-params option */ 292316722Sdelphij#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1325) 293285612Sdelphij/** Name string for the gq-params option */ 294316722Sdelphij#define GQ_PARAMS_name (ntp_keygen_opt_strs+1335) 295285612Sdelphij/** Compiled in flag settings for the gq-params option */ 296285612Sdelphij#define GQ_PARAMS_FLAGS (OPTST_DISABLED) 297181834Sroberto 298285612Sdelphij#else /* disable gq-params */ 299285612Sdelphij#define GQ_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 300285612Sdelphij#define GQ_PARAMS_NAME NULL 301285612Sdelphij#define GQ_PARAMS_DESC NULL 302285612Sdelphij#define GQ_PARAMS_name NULL 303285612Sdelphij#endif /* AUTOKEY */ 304181834Sroberto 305285612Sdelphij/** 306285612Sdelphij * host-key option description: 307181834Sroberto */ 308285612Sdelphij#ifdef AUTOKEY 309285612Sdelphij/** Descriptive text for the host-key option */ 310316722Sdelphij#define HOST_KEY_DESC (ntp_keygen_opt_strs+1345) 311285612Sdelphij/** Upper-cased name for the host-key option */ 312316722Sdelphij#define HOST_KEY_NAME (ntp_keygen_opt_strs+1367) 313285612Sdelphij/** Name string for the host-key option */ 314316722Sdelphij#define HOST_KEY_name (ntp_keygen_opt_strs+1376) 315285612Sdelphij/** Compiled in flag settings for the host-key option */ 316285612Sdelphij#define HOST_KEY_FLAGS (OPTST_DISABLED) 317181834Sroberto 318285612Sdelphij#else /* disable host-key */ 319285612Sdelphij#define HOST_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 320285612Sdelphij#define HOST_KEY_NAME NULL 321285612Sdelphij#define HOST_KEY_DESC NULL 322285612Sdelphij#define HOST_KEY_name NULL 323285612Sdelphij#endif /* AUTOKEY */ 324181834Sroberto 325285612Sdelphij/** 326285612Sdelphij * iffkey option description: 327181834Sroberto */ 328285612Sdelphij#ifdef AUTOKEY 329285612Sdelphij/** Descriptive text for the iffkey option */ 330316722Sdelphij#define IFFKEY_DESC (ntp_keygen_opt_strs+1385) 331285612Sdelphij/** Upper-cased name for the iffkey option */ 332316722Sdelphij#define IFFKEY_NAME (ntp_keygen_opt_strs+1409) 333285612Sdelphij/** Name string for the iffkey option */ 334316722Sdelphij#define IFFKEY_name (ntp_keygen_opt_strs+1416) 335285612Sdelphij/** Compiled in flag settings for the iffkey option */ 336285612Sdelphij#define IFFKEY_FLAGS (OPTST_DISABLED) 337181834Sroberto 338285612Sdelphij#else /* disable iffkey */ 339285612Sdelphij#define IFFKEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 340285612Sdelphij#define IFFKEY_NAME NULL 341285612Sdelphij#define IFFKEY_DESC NULL 342285612Sdelphij#define IFFKEY_name NULL 343285612Sdelphij#endif /* AUTOKEY */ 344181834Sroberto 345285612Sdelphij/** 346285612Sdelphij * ident option description: 347181834Sroberto */ 348285612Sdelphij#ifdef AUTOKEY 349285612Sdelphij/** Descriptive text for the ident option */ 350316722Sdelphij#define IDENT_DESC (ntp_keygen_opt_strs+1423) 351285612Sdelphij/** Upper-cased name for the ident option */ 352316722Sdelphij#define IDENT_NAME (ntp_keygen_opt_strs+1446) 353285612Sdelphij/** Name string for the ident option */ 354316722Sdelphij#define IDENT_name (ntp_keygen_opt_strs+1452) 355285612Sdelphij/** Compiled in flag settings for the ident option */ 356285612Sdelphij#define IDENT_FLAGS (OPTST_DISABLED \ 357285612Sdelphij | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 358181834Sroberto 359285612Sdelphij#else /* disable ident */ 360285612Sdelphij#define IDENT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 361285612Sdelphij#define IDENT_NAME NULL 362285612Sdelphij#define IDENT_DESC NULL 363285612Sdelphij#define IDENT_name NULL 364285612Sdelphij#endif /* AUTOKEY */ 365181834Sroberto 366285612Sdelphij/** 367285612Sdelphij * lifetime option description: 368181834Sroberto */ 369285612Sdelphij#ifdef AUTOKEY 370285612Sdelphij/** Descriptive text for the lifetime option */ 371316722Sdelphij#define LIFETIME_DESC (ntp_keygen_opt_strs+1458) 372285612Sdelphij/** Upper-cased name for the lifetime option */ 373316722Sdelphij#define LIFETIME_NAME (ntp_keygen_opt_strs+1483) 374285612Sdelphij/** Name string for the lifetime option */ 375316722Sdelphij#define LIFETIME_name (ntp_keygen_opt_strs+1492) 376285612Sdelphij/** Compiled in flag settings for the lifetime option */ 377285612Sdelphij#define LIFETIME_FLAGS (OPTST_DISABLED \ 378285612Sdelphij | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 379181834Sroberto 380285612Sdelphij#else /* disable lifetime */ 381285612Sdelphij#define LIFETIME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 382285612Sdelphij#define LIFETIME_NAME NULL 383285612Sdelphij#define LIFETIME_DESC NULL 384285612Sdelphij#define LIFETIME_name NULL 385285612Sdelphij#endif /* AUTOKEY */ 386285612Sdelphij 387285612Sdelphij/** 388285612Sdelphij * modulus option description: 389285612Sdelphij */ 390285612Sdelphij#ifdef AUTOKEY 391285612Sdelphij/** Descriptive text for the modulus option */ 392330567Sgordon#define MODULUS_DESC (ntp_keygen_opt_strs+1501) 393285612Sdelphij/** Upper-cased name for the modulus option */ 394330567Sgordon#define MODULUS_NAME (ntp_keygen_opt_strs+1515) 395285612Sdelphij/** Name string for the modulus option */ 396330567Sgordon#define MODULUS_name (ntp_keygen_opt_strs+1523) 397285612Sdelphij/** Compiled in flag settings for the modulus option */ 398285612Sdelphij#define MODULUS_FLAGS (OPTST_DISABLED \ 399181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 400181834Sroberto 401285612Sdelphij#else /* disable modulus */ 402285612Sdelphij#define MODULUS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 403285612Sdelphij#define MODULUS_NAME NULL 404285612Sdelphij#define MODULUS_DESC NULL 405285612Sdelphij#define MODULUS_name NULL 406285612Sdelphij#endif /* AUTOKEY */ 407181834Sroberto 408285612Sdelphij/** 409330567Sgordon * md5key option description: 410330567Sgordon */ 411330567Sgordon/** Descriptive text for the md5key option */ 412330567Sgordon#define MD5KEY_DESC (ntp_keygen_opt_strs+1531) 413330567Sgordon/** Upper-cased name for the md5key option */ 414330567Sgordon#define MD5KEY_NAME (ntp_keygen_opt_strs+1555) 415330567Sgordon/** Name string for the md5key option */ 416330567Sgordon#define MD5KEY_name (ntp_keygen_opt_strs+1562) 417330567Sgordon/** Compiled in flag settings for the md5key option */ 418330567Sgordon#define MD5KEY_FLAGS (OPTST_DISABLED) 419330567Sgordon 420330567Sgordon/** 421285612Sdelphij * pvt-cert option description: 422181834Sroberto */ 423285612Sdelphij#ifdef AUTOKEY 424285612Sdelphij/** Descriptive text for the pvt-cert option */ 425330567Sgordon#define PVT_CERT_DESC (ntp_keygen_opt_strs+1569) 426285612Sdelphij/** Upper-cased name for the pvt-cert option */ 427330567Sgordon#define PVT_CERT_NAME (ntp_keygen_opt_strs+1601) 428285612Sdelphij/** Name string for the pvt-cert option */ 429330567Sgordon#define PVT_CERT_name (ntp_keygen_opt_strs+1610) 430285612Sdelphij/** Compiled in flag settings for the pvt-cert option */ 431285612Sdelphij#define PVT_CERT_FLAGS (OPTST_DISABLED) 432181834Sroberto 433285612Sdelphij#else /* disable pvt-cert */ 434285612Sdelphij#define PVT_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 435285612Sdelphij#define PVT_CERT_NAME NULL 436285612Sdelphij#define PVT_CERT_DESC NULL 437285612Sdelphij#define PVT_CERT_name NULL 438285612Sdelphij#endif /* AUTOKEY */ 439181834Sroberto 440285612Sdelphij/** 441285612Sdelphij * password option description: 442181834Sroberto */ 443285612Sdelphij#ifdef AUTOKEY 444285612Sdelphij/** Descriptive text for the password option */ 445330567Sgordon#define PASSWORD_DESC (ntp_keygen_opt_strs+1619) 446285612Sdelphij/** Upper-cased name for the password option */ 447330567Sgordon#define PASSWORD_NAME (ntp_keygen_opt_strs+1642) 448285612Sdelphij/** Name string for the password option */ 449330567Sgordon#define PASSWORD_name (ntp_keygen_opt_strs+1651) 450285612Sdelphij/** Compiled in flag settings for the password option */ 451285612Sdelphij#define PASSWORD_FLAGS (OPTST_DISABLED \ 452181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 453181834Sroberto 454285612Sdelphij#else /* disable password */ 455285612Sdelphij#define PASSWORD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 456285612Sdelphij#define PASSWORD_NAME NULL 457285612Sdelphij#define PASSWORD_DESC NULL 458285612Sdelphij#define PASSWORD_name NULL 459285612Sdelphij#endif /* AUTOKEY */ 460181834Sroberto 461285612Sdelphij/** 462285612Sdelphij * export-passwd option description: 463181834Sroberto */ 464285612Sdelphij#ifdef AUTOKEY 465285612Sdelphij/** Descriptive text for the export-passwd option */ 466330567Sgordon#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1660) 467285612Sdelphij/** Upper-cased name for the export-passwd option */ 468330567Sgordon#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1702) 469285612Sdelphij/** Name string for the export-passwd option */ 470330567Sgordon#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1716) 471285612Sdelphij/** Compiled in flag settings for the export-passwd option */ 472285612Sdelphij#define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \ 473181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 474181834Sroberto 475285612Sdelphij#else /* disable export-passwd */ 476285612Sdelphij#define EXPORT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 477285612Sdelphij#define EXPORT_PASSWD_NAME NULL 478285612Sdelphij#define EXPORT_PASSWD_DESC NULL 479285612Sdelphij#define EXPORT_PASSWD_name NULL 480285612Sdelphij#endif /* AUTOKEY */ 481181834Sroberto 482285612Sdelphij/** 483330567Sgordon * subject-name option description: 484330567Sgordon */ 485330567Sgordon#ifdef AUTOKEY 486330567Sgordon/** Descriptive text for the subject-name option */ 487330567Sgordon#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1730) 488330567Sgordon/** Upper-cased name for the subject-name option */ 489330567Sgordon#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1765) 490330567Sgordon/** Name string for the subject-name option */ 491330567Sgordon#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1778) 492330567Sgordon/** Compiled in flag settings for the subject-name option */ 493330567Sgordon#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \ 494330567Sgordon | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 495330567Sgordon 496330567Sgordon#else /* disable subject-name */ 497330567Sgordon#define SUBJECT_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 498330567Sgordon#define SUBJECT_NAME_NAME NULL 499330567Sgordon#define SUBJECT_NAME_DESC NULL 500330567Sgordon#define SUBJECT_NAME_name NULL 501330567Sgordon#endif /* AUTOKEY */ 502330567Sgordon 503330567Sgordon/** 504285612Sdelphij * sign-key option description: 505181834Sroberto */ 506285612Sdelphij#ifdef AUTOKEY 507285612Sdelphij/** Descriptive text for the sign-key option */ 508330567Sgordon#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1791) 509285612Sdelphij/** Upper-cased name for the sign-key option */ 510330567Sgordon#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1822) 511285612Sdelphij/** Name string for the sign-key option */ 512330567Sgordon#define SIGN_KEY_name (ntp_keygen_opt_strs+1831) 513285612Sdelphij/** Compiled in flag settings for the sign-key option */ 514285612Sdelphij#define SIGN_KEY_FLAGS (OPTST_DISABLED \ 515181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 516181834Sroberto 517285612Sdelphij#else /* disable sign-key */ 518285612Sdelphij#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 519285612Sdelphij#define SIGN_KEY_NAME NULL 520285612Sdelphij#define SIGN_KEY_DESC NULL 521285612Sdelphij#define SIGN_KEY_name NULL 522285612Sdelphij#endif /* AUTOKEY */ 523181834Sroberto 524285612Sdelphij/** 525285612Sdelphij * trusted-cert option description: 526181834Sroberto */ 527285612Sdelphij#ifdef AUTOKEY 528285612Sdelphij/** Descriptive text for the trusted-cert option */ 529330567Sgordon#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1840) 530285612Sdelphij/** Upper-cased name for the trusted-cert option */ 531330567Sgordon#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1872) 532285612Sdelphij/** Name string for the trusted-cert option */ 533330567Sgordon#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1885) 534285612Sdelphij/** Compiled in flag settings for the trusted-cert option */ 535285612Sdelphij#define TRUSTED_CERT_FLAGS (OPTST_DISABLED) 536181834Sroberto 537285612Sdelphij#else /* disable trusted-cert */ 538285612Sdelphij#define TRUSTED_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 539285612Sdelphij#define TRUSTED_CERT_NAME NULL 540285612Sdelphij#define TRUSTED_CERT_DESC NULL 541285612Sdelphij#define TRUSTED_CERT_name NULL 542285612Sdelphij#endif /* AUTOKEY */ 543181834Sroberto 544285612Sdelphij/** 545285612Sdelphij * mv-params option description: 546181834Sroberto */ 547285612Sdelphij#ifdef AUTOKEY 548285612Sdelphij/** Descriptive text for the mv-params option */ 549330567Sgordon#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1898) 550285612Sdelphij/** Upper-cased name for the mv-params option */ 551330567Sgordon#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1927) 552285612Sdelphij/** Name string for the mv-params option */ 553330567Sgordon#define MV_PARAMS_name (ntp_keygen_opt_strs+1937) 554285612Sdelphij/** Compiled in flag settings for the mv-params option */ 555285612Sdelphij#define MV_PARAMS_FLAGS (OPTST_DISABLED \ 556181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 557181834Sroberto 558285612Sdelphij#else /* disable mv-params */ 559285612Sdelphij#define MV_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 560285612Sdelphij#define MV_PARAMS_NAME NULL 561285612Sdelphij#define MV_PARAMS_DESC NULL 562285612Sdelphij#define MV_PARAMS_name NULL 563285612Sdelphij#endif /* AUTOKEY */ 564181834Sroberto 565285612Sdelphij/** 566285612Sdelphij * mv-keys option description: 567181834Sroberto */ 568285612Sdelphij#ifdef AUTOKEY 569285612Sdelphij/** Descriptive text for the mv-keys option */ 570330567Sgordon#define MV_KEYS_DESC (ntp_keygen_opt_strs+1947) 571285612Sdelphij/** Upper-cased name for the mv-keys option */ 572330567Sgordon#define MV_KEYS_NAME (ntp_keygen_opt_strs+1968) 573285612Sdelphij/** Name string for the mv-keys option */ 574330567Sgordon#define MV_KEYS_name (ntp_keygen_opt_strs+1976) 575285612Sdelphij/** Compiled in flag settings for the mv-keys option */ 576285612Sdelphij#define MV_KEYS_FLAGS (OPTST_DISABLED \ 577181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 578181834Sroberto 579285612Sdelphij#else /* disable mv-keys */ 580285612Sdelphij#define MV_KEYS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 581285612Sdelphij#define MV_KEYS_NAME NULL 582285612Sdelphij#define MV_KEYS_DESC NULL 583285612Sdelphij#define MV_KEYS_name NULL 584285612Sdelphij#endif /* AUTOKEY */ 585181834Sroberto 586181834Sroberto/* 587181834Sroberto * Help/More_Help/Version option descriptions: 588181834Sroberto */ 589330567Sgordon#define HELP_DESC (ntp_keygen_opt_strs+1984) 590330567Sgordon#define HELP_name (ntp_keygen_opt_strs+2028) 591285612Sdelphij#ifdef HAVE_WORKING_FORK 592330567Sgordon#define MORE_HELP_DESC (ntp_keygen_opt_strs+2033) 593330567Sgordon#define MORE_HELP_name (ntp_keygen_opt_strs+2078) 594285612Sdelphij#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 595285612Sdelphij#else 596285612Sdelphij#define MORE_HELP_DESC HELP_DESC 597285612Sdelphij#define MORE_HELP_name HELP_name 598285612Sdelphij#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 599285612Sdelphij#endif 600285612Sdelphij#ifdef NO_OPTIONAL_OPT_ARGS 601285612Sdelphij# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 602285612Sdelphij#else 603285612Sdelphij# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 604285612Sdelphij OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 605285612Sdelphij#endif 606330567Sgordon#define VER_DESC (ntp_keygen_opt_strs+2088) 607330567Sgordon#define VER_name (ntp_keygen_opt_strs+2124) 608330567Sgordon#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2132) 609330567Sgordon#define SAVE_OPTS_name (ntp_keygen_opt_strs+2171) 610330567Sgordon#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2181) 611330567Sgordon#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2213) 612330567Sgordon#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2223) 613330567Sgordon#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2236) 614285612Sdelphij#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) 615285612Sdelphij/** 616181834Sroberto * Declare option callback procedures 617181834Sroberto */ 618285612Sdelphij#ifdef AUTOKEY 619285612Sdelphij static tOptProc doOptImbits; 620285612Sdelphij#else /* not AUTOKEY */ 621285612Sdelphij# define doOptImbits NULL 622285612Sdelphij#endif /* def/not AUTOKEY */ 623285612Sdelphij#ifdef AUTOKEY 624181834Sroberto static tOptProc doOptModulus; 625285612Sdelphij#else /* not AUTOKEY */ 626181834Sroberto# define doOptModulus NULL 627285612Sdelphij#endif /* def/not AUTOKEY */ 628181834Srobertoextern tOptProc 629285612Sdelphij ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, 630285612Sdelphij optionNumericVal, optionPagedUsage, optionResetOpt, 631285612Sdelphij optionStackArg, optionTimeDate, optionTimeVal, 632285612Sdelphij optionUnstackArg, optionVendorOption; 633181834Srobertostatic tOptProc 634285612Sdelphij doOptDebug_Level, doUsageOpt; 635285612Sdelphij#define VER_PROC ntpOptionPrintVersion 636181834Sroberto 637285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 638285612Sdelphij/** 639285612Sdelphij * Define the ntp-keygen Option Descriptions. 640285612Sdelphij * This is an array of OPTION_CT entries, one for each 641285612Sdelphij * option that the ntp-keygen program responds to. 642181834Sroberto */ 643285612Sdelphijstatic tOptDesc optDesc[OPTION_CT] = { 644285612Sdelphij { /* entry idx, value */ 0, VALUE_OPT_IMBITS, 645285612Sdelphij /* equiv idx, value */ 0, VALUE_OPT_IMBITS, 646285612Sdelphij /* equivalenced to */ NO_EQUIVALENT, 647285612Sdelphij /* min, max, act ct */ 0, 1, 0, 648285612Sdelphij /* opt state flags */ IMBITS_FLAGS, 0, 649285612Sdelphij /* last opt argumnt */ { NULL }, /* --imbits */ 650285612Sdelphij /* arg list/cookie */ NULL, 651285612Sdelphij /* must/cannot opts */ NULL, NULL, 652285612Sdelphij /* option proc */ doOptImbits, 653285612Sdelphij /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name, 654285612Sdelphij /* disablement strs */ NULL, NULL }, 655181834Sroberto 656285612Sdelphij { /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE, 657285612Sdelphij /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE, 658181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 659181834Sroberto /* min, max, act ct */ 0, 1, 0, 660181834Sroberto /* opt state flags */ CERTIFICATE_FLAGS, 0, 661285612Sdelphij /* last opt argumnt */ { NULL }, /* --certificate */ 662181834Sroberto /* arg list/cookie */ NULL, 663181834Sroberto /* must/cannot opts */ NULL, NULL, 664181834Sroberto /* option proc */ NULL, 665285612Sdelphij /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name, 666181834Sroberto /* disablement strs */ NULL, NULL }, 667181834Sroberto 668285612Sdelphij { /* entry idx, value */ 2, VALUE_OPT_CIPHER, 669285612Sdelphij /* equiv idx, value */ 2, VALUE_OPT_CIPHER, 670181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 671285612Sdelphij /* min, max, act ct */ 0, 1, 0, 672285612Sdelphij /* opt state flags */ CIPHER_FLAGS, 0, 673285612Sdelphij /* last opt argumnt */ { NULL }, /* --cipher */ 674285612Sdelphij /* arg list/cookie */ NULL, 675285612Sdelphij /* must/cannot opts */ NULL, NULL, 676285612Sdelphij /* option proc */ NULL, 677285612Sdelphij /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name, 678285612Sdelphij /* disablement strs */ NULL, NULL }, 679285612Sdelphij 680285612Sdelphij { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 681285612Sdelphij /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 682285612Sdelphij /* equivalenced to */ NO_EQUIVALENT, 683181834Sroberto /* min, max, act ct */ 0, NOLIMIT, 0, 684181834Sroberto /* opt state flags */ DEBUG_LEVEL_FLAGS, 0, 685285612Sdelphij /* last opt argumnt */ { NULL }, /* --debug-level */ 686181834Sroberto /* arg list/cookie */ NULL, 687181834Sroberto /* must/cannot opts */ NULL, NULL, 688285612Sdelphij /* option proc */ doOptDebug_Level, 689285612Sdelphij /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, 690181834Sroberto /* disablement strs */ NULL, NULL }, 691181834Sroberto 692285612Sdelphij { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 693285612Sdelphij /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 694181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 695181834Sroberto /* min, max, act ct */ 0, NOLIMIT, 0, 696181834Sroberto /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0, 697285612Sdelphij /* last opt argumnt */ { NULL }, /* --set-debug-level */ 698181834Sroberto /* arg list/cookie */ NULL, 699181834Sroberto /* must/cannot opts */ NULL, NULL, 700285612Sdelphij /* option proc */ optionNumericVal, 701285612Sdelphij /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name, 702181834Sroberto /* disablement strs */ NULL, NULL }, 703181834Sroberto 704285612Sdelphij { /* entry idx, value */ 5, VALUE_OPT_ID_KEY, 705285612Sdelphij /* equiv idx, value */ 5, VALUE_OPT_ID_KEY, 706181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 707181834Sroberto /* min, max, act ct */ 0, 1, 0, 708181834Sroberto /* opt state flags */ ID_KEY_FLAGS, 0, 709285612Sdelphij /* last opt argumnt */ { NULL }, /* --id-key */ 710181834Sroberto /* arg list/cookie */ NULL, 711181834Sroberto /* must/cannot opts */ NULL, NULL, 712181834Sroberto /* option proc */ NULL, 713285612Sdelphij /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name, 714181834Sroberto /* disablement strs */ NULL, NULL }, 715181834Sroberto 716285612Sdelphij { /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS, 717285612Sdelphij /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS, 718181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 719181834Sroberto /* min, max, act ct */ 0, 1, 0, 720181834Sroberto /* opt state flags */ GQ_PARAMS_FLAGS, 0, 721285612Sdelphij /* last opt argumnt */ { NULL }, /* --gq-params */ 722181834Sroberto /* arg list/cookie */ NULL, 723181834Sroberto /* must/cannot opts */ NULL, NULL, 724181834Sroberto /* option proc */ NULL, 725285612Sdelphij /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name, 726181834Sroberto /* disablement strs */ NULL, NULL }, 727181834Sroberto 728285612Sdelphij { /* entry idx, value */ 7, VALUE_OPT_HOST_KEY, 729285612Sdelphij /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY, 730181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 731181834Sroberto /* min, max, act ct */ 0, 1, 0, 732285612Sdelphij /* opt state flags */ HOST_KEY_FLAGS, 0, 733285612Sdelphij /* last opt argumnt */ { NULL }, /* --host-key */ 734181834Sroberto /* arg list/cookie */ NULL, 735181834Sroberto /* must/cannot opts */ NULL, NULL, 736181834Sroberto /* option proc */ NULL, 737285612Sdelphij /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name, 738181834Sroberto /* disablement strs */ NULL, NULL }, 739181834Sroberto 740285612Sdelphij { /* entry idx, value */ 8, VALUE_OPT_IFFKEY, 741285612Sdelphij /* equiv idx, value */ 8, VALUE_OPT_IFFKEY, 742181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 743181834Sroberto /* min, max, act ct */ 0, 1, 0, 744285612Sdelphij /* opt state flags */ IFFKEY_FLAGS, 0, 745285612Sdelphij /* last opt argumnt */ { NULL }, /* --iffkey */ 746181834Sroberto /* arg list/cookie */ NULL, 747181834Sroberto /* must/cannot opts */ NULL, NULL, 748181834Sroberto /* option proc */ NULL, 749285612Sdelphij /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name, 750181834Sroberto /* disablement strs */ NULL, NULL }, 751181834Sroberto 752285612Sdelphij { /* entry idx, value */ 9, VALUE_OPT_IDENT, 753285612Sdelphij /* equiv idx, value */ 9, VALUE_OPT_IDENT, 754181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 755181834Sroberto /* min, max, act ct */ 0, 1, 0, 756285612Sdelphij /* opt state flags */ IDENT_FLAGS, 0, 757285612Sdelphij /* last opt argumnt */ { NULL }, /* --ident */ 758181834Sroberto /* arg list/cookie */ NULL, 759181834Sroberto /* must/cannot opts */ NULL, NULL, 760181834Sroberto /* option proc */ NULL, 761285612Sdelphij /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name, 762181834Sroberto /* disablement strs */ NULL, NULL }, 763181834Sroberto 764285612Sdelphij { /* entry idx, value */ 10, VALUE_OPT_LIFETIME, 765285612Sdelphij /* equiv idx, value */ 10, VALUE_OPT_LIFETIME, 766181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 767181834Sroberto /* min, max, act ct */ 0, 1, 0, 768285612Sdelphij /* opt state flags */ LIFETIME_FLAGS, 0, 769285612Sdelphij /* last opt argumnt */ { NULL }, /* --lifetime */ 770181834Sroberto /* arg list/cookie */ NULL, 771181834Sroberto /* must/cannot opts */ NULL, NULL, 772285612Sdelphij /* option proc */ optionNumericVal, 773285612Sdelphij /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name, 774181834Sroberto /* disablement strs */ NULL, NULL }, 775181834Sroberto 776330567Sgordon { /* entry idx, value */ 11, VALUE_OPT_MODULUS, 777330567Sgordon /* equiv idx, value */ 11, VALUE_OPT_MODULUS, 778181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 779181834Sroberto /* min, max, act ct */ 0, 1, 0, 780330567Sgordon /* opt state flags */ MODULUS_FLAGS, 0, 781330567Sgordon /* last opt argumnt */ { NULL }, /* --modulus */ 782181834Sroberto /* arg list/cookie */ NULL, 783181834Sroberto /* must/cannot opts */ NULL, NULL, 784330567Sgordon /* option proc */ doOptModulus, 785330567Sgordon /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name, 786181834Sroberto /* disablement strs */ NULL, NULL }, 787181834Sroberto 788330567Sgordon { /* entry idx, value */ 12, VALUE_OPT_MD5KEY, 789330567Sgordon /* equiv idx, value */ 12, VALUE_OPT_MD5KEY, 790181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 791181834Sroberto /* min, max, act ct */ 0, 1, 0, 792330567Sgordon /* opt state flags */ MD5KEY_FLAGS, 0, 793330567Sgordon /* last opt argumnt */ { NULL }, /* --md5key */ 794181834Sroberto /* arg list/cookie */ NULL, 795181834Sroberto /* must/cannot opts */ NULL, NULL, 796330567Sgordon /* option proc */ NULL, 797330567Sgordon /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name, 798181834Sroberto /* disablement strs */ NULL, NULL }, 799181834Sroberto 800285612Sdelphij { /* entry idx, value */ 13, VALUE_OPT_PVT_CERT, 801285612Sdelphij /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT, 802181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 803181834Sroberto /* min, max, act ct */ 0, 1, 0, 804181834Sroberto /* opt state flags */ PVT_CERT_FLAGS, 0, 805285612Sdelphij /* last opt argumnt */ { NULL }, /* --pvt-cert */ 806181834Sroberto /* arg list/cookie */ NULL, 807181834Sroberto /* must/cannot opts */ NULL, NULL, 808181834Sroberto /* option proc */ NULL, 809285612Sdelphij /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name, 810181834Sroberto /* disablement strs */ NULL, NULL }, 811181834Sroberto 812285612Sdelphij { /* entry idx, value */ 14, VALUE_OPT_PASSWORD, 813285612Sdelphij /* equiv idx, value */ 14, VALUE_OPT_PASSWORD, 814181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 815181834Sroberto /* min, max, act ct */ 0, 1, 0, 816285612Sdelphij /* opt state flags */ PASSWORD_FLAGS, 0, 817285612Sdelphij /* last opt argumnt */ { NULL }, /* --password */ 818181834Sroberto /* arg list/cookie */ NULL, 819181834Sroberto /* must/cannot opts */ NULL, NULL, 820181834Sroberto /* option proc */ NULL, 821285612Sdelphij /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name, 822181834Sroberto /* disablement strs */ NULL, NULL }, 823181834Sroberto 824285612Sdelphij { /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 825285612Sdelphij /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 826181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 827181834Sroberto /* min, max, act ct */ 0, 1, 0, 828285612Sdelphij /* opt state flags */ EXPORT_PASSWD_FLAGS, 0, 829285612Sdelphij /* last opt argumnt */ { NULL }, /* --export-passwd */ 830181834Sroberto /* arg list/cookie */ NULL, 831181834Sroberto /* must/cannot opts */ NULL, NULL, 832181834Sroberto /* option proc */ NULL, 833285612Sdelphij /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name, 834181834Sroberto /* disablement strs */ NULL, NULL }, 835181834Sroberto 836330567Sgordon { /* entry idx, value */ 16, VALUE_OPT_SUBJECT_NAME, 837330567Sgordon /* equiv idx, value */ 16, VALUE_OPT_SUBJECT_NAME, 838181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 839181834Sroberto /* min, max, act ct */ 0, 1, 0, 840330567Sgordon /* opt state flags */ SUBJECT_NAME_FLAGS, 0, 841330567Sgordon /* last opt argumnt */ { NULL }, /* --subject-name */ 842181834Sroberto /* arg list/cookie */ NULL, 843181834Sroberto /* must/cannot opts */ NULL, NULL, 844181834Sroberto /* option proc */ NULL, 845330567Sgordon /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name, 846181834Sroberto /* disablement strs */ NULL, NULL }, 847181834Sroberto 848330567Sgordon { /* entry idx, value */ 17, VALUE_OPT_SIGN_KEY, 849330567Sgordon /* equiv idx, value */ 17, VALUE_OPT_SIGN_KEY, 850181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 851181834Sroberto /* min, max, act ct */ 0, 1, 0, 852330567Sgordon /* opt state flags */ SIGN_KEY_FLAGS, 0, 853330567Sgordon /* last opt argumnt */ { NULL }, /* --sign-key */ 854181834Sroberto /* arg list/cookie */ NULL, 855181834Sroberto /* must/cannot opts */ NULL, NULL, 856181834Sroberto /* option proc */ NULL, 857330567Sgordon /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name, 858181834Sroberto /* disablement strs */ NULL, NULL }, 859181834Sroberto 860285612Sdelphij { /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 861285612Sdelphij /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 862181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 863181834Sroberto /* min, max, act ct */ 0, 1, 0, 864181834Sroberto /* opt state flags */ TRUSTED_CERT_FLAGS, 0, 865285612Sdelphij /* last opt argumnt */ { NULL }, /* --trusted-cert */ 866181834Sroberto /* arg list/cookie */ NULL, 867181834Sroberto /* must/cannot opts */ NULL, NULL, 868181834Sroberto /* option proc */ NULL, 869285612Sdelphij /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name, 870181834Sroberto /* disablement strs */ NULL, NULL }, 871181834Sroberto 872285612Sdelphij { /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS, 873285612Sdelphij /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS, 874181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 875181834Sroberto /* min, max, act ct */ 0, 1, 0, 876181834Sroberto /* opt state flags */ MV_PARAMS_FLAGS, 0, 877285612Sdelphij /* last opt argumnt */ { NULL }, /* --mv-params */ 878181834Sroberto /* arg list/cookie */ NULL, 879181834Sroberto /* must/cannot opts */ NULL, NULL, 880181834Sroberto /* option proc */ optionNumericVal, 881285612Sdelphij /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name, 882181834Sroberto /* disablement strs */ NULL, NULL }, 883181834Sroberto 884285612Sdelphij { /* entry idx, value */ 20, VALUE_OPT_MV_KEYS, 885285612Sdelphij /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS, 886181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 887181834Sroberto /* min, max, act ct */ 0, 1, 0, 888181834Sroberto /* opt state flags */ MV_KEYS_FLAGS, 0, 889285612Sdelphij /* last opt argumnt */ { NULL }, /* --mv-keys */ 890181834Sroberto /* arg list/cookie */ NULL, 891181834Sroberto /* must/cannot opts */ NULL, NULL, 892181834Sroberto /* option proc */ optionNumericVal, 893285612Sdelphij /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name, 894181834Sroberto /* disablement strs */ NULL, NULL }, 895181834Sroberto 896181834Sroberto { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, 897285612Sdelphij /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, 898181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 899181834Sroberto /* min, max, act ct */ 0, 1, 0, 900285612Sdelphij /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 901181834Sroberto /* last opt argumnt */ { NULL }, 902181834Sroberto /* arg list/cookie */ NULL, 903181834Sroberto /* must/cannot opts */ NULL, NULL, 904285612Sdelphij /* option proc */ VER_PROC, 905285612Sdelphij /* desc, NAME, name */ VER_DESC, NULL, VER_name, 906181834Sroberto /* disablement strs */ NULL, NULL }, 907181834Sroberto 908181834Sroberto 909181834Sroberto 910181834Sroberto { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, 911285612Sdelphij /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, 912181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 913181834Sroberto /* min, max, act ct */ 0, 1, 0, 914285612Sdelphij /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 915181834Sroberto /* last opt argumnt */ { NULL }, 916181834Sroberto /* arg list/cookie */ NULL, 917181834Sroberto /* must/cannot opts */ NULL, NULL, 918181834Sroberto /* option proc */ doUsageOpt, 919285612Sdelphij /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 920181834Sroberto /* disablement strs */ NULL, NULL }, 921181834Sroberto 922181834Sroberto { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, 923285612Sdelphij /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, 924181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 925181834Sroberto /* min, max, act ct */ 0, 1, 0, 926285612Sdelphij /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 927181834Sroberto /* last opt argumnt */ { NULL }, 928181834Sroberto /* arg list/cookie */ NULL, 929181834Sroberto /* must/cannot opts */ NULL, NULL, 930181834Sroberto /* option proc */ optionPagedUsage, 931285612Sdelphij /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 932181834Sroberto /* disablement strs */ NULL, NULL }, 933181834Sroberto 934181834Sroberto { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS, 935285612Sdelphij /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS, 936181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 937181834Sroberto /* min, max, act ct */ 0, 1, 0, 938181834Sroberto /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 939285612Sdelphij | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS, 940181834Sroberto /* last opt argumnt */ { NULL }, 941181834Sroberto /* arg list/cookie */ NULL, 942181834Sroberto /* must/cannot opts */ NULL, NULL, 943181834Sroberto /* option proc */ NULL, 944285612Sdelphij /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name, 945181834Sroberto /* disablement strs */ NULL, NULL }, 946181834Sroberto 947181834Sroberto { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS, 948285612Sdelphij /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS, 949181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 950181834Sroberto /* min, max, act ct */ 0, NOLIMIT, 0, 951285612Sdelphij /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 952285612Sdelphij | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS, 953181834Sroberto /* last opt argumnt */ { NULL }, 954181834Sroberto /* arg list/cookie */ NULL, 955181834Sroberto /* must/cannot opts */ NULL, NULL, 956181834Sroberto /* option proc */ optionLoadOpt, 957285612Sdelphij /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name, 958285612Sdelphij /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx } 959181834Sroberto}; 960181834Sroberto 961181834Sroberto 962285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 963285612Sdelphij/** Reference to the upper cased version of ntp-keygen. */ 964330567Sgordon#define zPROGNAME (ntp_keygen_opt_strs+2239) 965285612Sdelphij/** Reference to the title line for ntp-keygen usage. */ 966330567Sgordon#define zUsageTitle (ntp_keygen_opt_strs+2250) 967285612Sdelphij/** ntp-keygen configuration file name. */ 968330567Sgordon#define zRcName (ntp_keygen_opt_strs+2373) 969285612Sdelphij/** Directories to search for ntp-keygen config files. */ 970285612Sdelphijstatic char const * const apzHomeList[3] = { 971330567Sgordon ntp_keygen_opt_strs+2365, 972330567Sgordon ntp_keygen_opt_strs+2371, 973285612Sdelphij NULL }; 974285612Sdelphij/** The ntp-keygen program bug email address. */ 975330567Sgordon#define zBugsAddr (ntp_keygen_opt_strs+2380) 976285612Sdelphij/** Clarification/explanation of what ntp-keygen does. */ 977330567Sgordon#define zExplain (ntp_keygen_opt_strs+2414) 978285612Sdelphij/** Extra detail explaining what ntp-keygen does. */ 979285612Sdelphij#define zDetail (NULL) 980285612Sdelphij/** The full version string for ntp-keygen. */ 981330567Sgordon#define zFullVersion (ntp_keygen_opt_strs+2416) 982285612Sdelphij/* extracted from optcode.tlib near line 364 */ 983181834Sroberto 984181834Sroberto#if defined(ENABLE_NLS) 985181834Sroberto# define OPTPROC_BASE OPTPROC_TRANSLATE 986181834Sroberto static tOptionXlateProc translate_option_strings; 987181834Sroberto#else 988181834Sroberto# define OPTPROC_BASE OPTPROC_NONE 989181834Sroberto# define translate_option_strings NULL 990181834Sroberto#endif /* ENABLE_NLS */ 991181834Sroberto 992285612Sdelphij#define ntp_keygen_full_usage (NULL) 993285612Sdelphij#define ntp_keygen_short_usage (NULL) 994181834Sroberto 995285612Sdelphij#endif /* not defined __doxygen__ */ 996285612Sdelphij 997181834Sroberto/* 998181834Sroberto * Create the static procedure(s) declared above. 999181834Sroberto */ 1000285612Sdelphij/** 1001285612Sdelphij * The callout function that invokes the optionUsage function. 1002285612Sdelphij * 1003285612Sdelphij * @param[in] opts the AutoOpts option description structure 1004285612Sdelphij * @param[in] od the descriptor for the "help" (usage) option. 1005285612Sdelphij * @noreturn 1006285612Sdelphij */ 1007181834Srobertostatic void 1008285612SdelphijdoUsageOpt(tOptions * opts, tOptDesc * od) 1009181834Sroberto{ 1010285612Sdelphij int ex_code; 1011285612Sdelphij ex_code = NTP_KEYGEN_EXIT_SUCCESS; 1012285612Sdelphij optionUsage(&ntp_keygenOptions, ex_code); 1013285612Sdelphij /* NOTREACHED */ 1014285612Sdelphij exit(1); 1015285612Sdelphij (void)opts; 1016285612Sdelphij (void)od; 1017181834Sroberto} 1018181834Sroberto 1019285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1020285612Sdelphij/** 1021285612Sdelphij * Code to handle the imbits option, when AUTOKEY is #define-d. 1022285612Sdelphij * The number of bits in the identity modulus. The default is 256. 1023285612Sdelphij * @param[in] pOptions the ntp-keygen options data structure 1024285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option. 1025285612Sdelphij */ 1026285612Sdelphij#ifdef AUTOKEY 1027285612Sdelphijstatic void 1028285612SdelphijdoOptImbits(tOptions* pOptions, tOptDesc* pOptDesc) 1029285612Sdelphij{ 1030285612Sdelphij static struct {long rmin, rmax;} const rng[1] = { 1031285612Sdelphij { 256, 2048 } }; 1032285612Sdelphij int ix; 1033181834Sroberto 1034285612Sdelphij if (pOptions <= OPTPROC_EMIT_LIMIT) 1035285612Sdelphij goto emit_ranges; 1036285612Sdelphij optionNumericVal(pOptions, pOptDesc); 1037285612Sdelphij 1038285612Sdelphij for (ix = 0; ix < 1; ix++) { 1039285612Sdelphij if (pOptDesc->optArg.argInt < rng[ix].rmin) 1040285612Sdelphij continue; /* ranges need not be ordered. */ 1041285612Sdelphij if (pOptDesc->optArg.argInt == rng[ix].rmin) 1042285612Sdelphij return; 1043285612Sdelphij if (rng[ix].rmax == LONG_MIN) 1044285612Sdelphij continue; 1045285612Sdelphij if (pOptDesc->optArg.argInt <= rng[ix].rmax) 1046285612Sdelphij return; 1047285612Sdelphij } 1048285612Sdelphij 1049285612Sdelphij option_usage_fp = stderr; 1050285612Sdelphij 1051285612Sdelphij emit_ranges: 1052285612SdelphijoptionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1053285612Sdelphij} 1054285612Sdelphij#endif /* defined AUTOKEY */ 1055285612Sdelphij 1056285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1057285612Sdelphij/** 1058285612Sdelphij * Code to handle the debug-level option. 1059181834Sroberto * 1060285612Sdelphij * @param[in] pOptions the ntp-keygen options data structure 1061285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option. 1062181834Sroberto */ 1063181834Srobertostatic void 1064285612SdelphijdoOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc) 1065181834Sroberto{ 1066285612Sdelphij /* 1067285612Sdelphij * Be sure the flag-code[0] handles special values for the options pointer 1068285612Sdelphij * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit 1069285612Sdelphij * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to 1070285612Sdelphij * reset its state. 1071285612Sdelphij */ 1072285612Sdelphij /* extracted from debug-opt.def, line 15 */ 1073285612SdelphijOPT_VALUE_SET_DEBUG_LEVEL++; 1074285612Sdelphij (void)pOptDesc; 1075285612Sdelphij (void)pOptions; 1076181834Sroberto} 1077181834Sroberto 1078285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1079285612Sdelphij/** 1080285612Sdelphij * Code to handle the modulus option, when AUTOKEY is #define-d. 1081285612Sdelphij * The number of bits in the prime modulus. The default is 512. 1082285612Sdelphij * @param[in] pOptions the ntp-keygen options data structure 1083285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option. 1084181834Sroberto */ 1085285612Sdelphij#ifdef AUTOKEY 1086181834Srobertostatic void 1087285612SdelphijdoOptModulus(tOptions* pOptions, tOptDesc* pOptDesc) 1088181834Sroberto{ 1089285612Sdelphij static struct {long rmin, rmax;} const rng[1] = { 1090181834Sroberto { 256, 2048 } }; 1091285612Sdelphij int ix; 1092181834Sroberto 1093285612Sdelphij if (pOptions <= OPTPROC_EMIT_LIMIT) 1094181834Sroberto goto emit_ranges; 1095285612Sdelphij optionNumericVal(pOptions, pOptDesc); 1096181834Sroberto 1097181834Sroberto for (ix = 0; ix < 1; ix++) { 1098285612Sdelphij if (pOptDesc->optArg.argInt < rng[ix].rmin) 1099181834Sroberto continue; /* ranges need not be ordered. */ 1100285612Sdelphij if (pOptDesc->optArg.argInt == rng[ix].rmin) 1101285612Sdelphij return; 1102285612Sdelphij if (rng[ix].rmax == LONG_MIN) 1103181834Sroberto continue; 1104285612Sdelphij if (pOptDesc->optArg.argInt <= rng[ix].rmax) 1105285612Sdelphij return; 1106181834Sroberto } 1107181834Sroberto 1108181834Sroberto option_usage_fp = stderr; 1109181834Sroberto 1110285612Sdelphij emit_ranges: 1111285612SdelphijoptionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1112285612Sdelphij} 1113285612Sdelphij#endif /* defined AUTOKEY */ 1114285612Sdelphij/* extracted from optmain.tlib near line 1250 */ 1115181834Sroberto 1116285612Sdelphij/** 1117285612Sdelphij * The directory containing the data associated with ntp-keygen. 1118285612Sdelphij */ 1119285612Sdelphij#ifndef PKGDATADIR 1120285612Sdelphij# define PKGDATADIR "" 1121285612Sdelphij#endif 1122181834Sroberto 1123285612Sdelphij/** 1124285612Sdelphij * Information about the person or institution that packaged ntp-keygen 1125285612Sdelphij * for the current distribution. 1126285612Sdelphij */ 1127285612Sdelphij#ifndef WITH_PACKAGER 1128285612Sdelphij# define ntp_keygen_packager_info NULL 1129285612Sdelphij#else 1130285612Sdelphij/** Packager information for ntp-keygen. */ 1131285612Sdelphijstatic char const ntp_keygen_packager_info[] = 1132285612Sdelphij "Packaged by " WITH_PACKAGER 1133181834Sroberto 1134285612Sdelphij# ifdef WITH_PACKAGER_VERSION 1135285612Sdelphij " ("WITH_PACKAGER_VERSION")" 1136285612Sdelphij# endif 1137181834Sroberto 1138285612Sdelphij# ifdef WITH_PACKAGER_BUG_REPORTS 1139285612Sdelphij "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS 1140285612Sdelphij# endif 1141285612Sdelphij "\n"; 1142285612Sdelphij#endif 1143285612Sdelphij#ifndef __doxygen__ 1144181834Sroberto 1145285612Sdelphij#endif /* __doxygen__ */ 1146285612Sdelphij/** 1147285612Sdelphij * The option definitions for ntp-keygen. The one structure that 1148285612Sdelphij * binds them all. 1149285612Sdelphij */ 1150285612SdelphijtOptions ntp_keygenOptions = { 1151285612Sdelphij OPTIONS_STRUCT_VERSION, 1152285612Sdelphij 0, NULL, /* original argc + argv */ 1153285612Sdelphij ( OPTPROC_BASE 1154285612Sdelphij + OPTPROC_ERRSTOP 1155285612Sdelphij + OPTPROC_SHORTOPT 1156285612Sdelphij + OPTPROC_LONGOPT 1157285612Sdelphij + OPTPROC_NO_REQ_OPT 1158285612Sdelphij + OPTPROC_ENVIRON 1159285612Sdelphij + OPTPROC_NO_ARGS 1160285612Sdelphij + OPTPROC_MISUSE ), 1161285612Sdelphij 0, NULL, /* current option index, current option */ 1162285612Sdelphij NULL, NULL, zPROGNAME, 1163285612Sdelphij zRcName, zCopyright, zLicenseDescrip, 1164285612Sdelphij zFullVersion, apzHomeList, zUsageTitle, 1165285612Sdelphij zExplain, zDetail, optDesc, 1166285612Sdelphij zBugsAddr, /* address to send bugs to */ 1167285612Sdelphij NULL, NULL, /* extensions/saved state */ 1168285612Sdelphij optionUsage, /* usage procedure */ 1169285612Sdelphij translate_option_strings, /* translation procedure */ 1170285612Sdelphij /* 1171285612Sdelphij * Indexes to special options 1172285612Sdelphij */ 1173285612Sdelphij { INDEX_OPT_MORE_HELP, /* more-help option index */ 1174285612Sdelphij INDEX_OPT_SAVE_OPTS, /* save option index */ 1175285612Sdelphij NO_EQUIVALENT, /* '-#' option index */ 1176285612Sdelphij NO_EQUIVALENT /* index of default opt */ 1177285612Sdelphij }, 1178285612Sdelphij 26 /* full option count */, 21 /* user option count */, 1179285612Sdelphij ntp_keygen_full_usage, ntp_keygen_short_usage, 1180285612Sdelphij NULL, NULL, 1181285612Sdelphij PKGDATADIR, ntp_keygen_packager_info 1182285612Sdelphij}; 1183181834Sroberto 1184181834Sroberto#if ENABLE_NLS 1185285612Sdelphij/** 1186285612Sdelphij * This code is designed to translate translatable option text for the 1187285612Sdelphij * ntp-keygen program. These translations happen upon entry 1188285612Sdelphij * to optionProcess(). 1189285612Sdelphij */ 1190181834Sroberto#include <stdio.h> 1191181834Sroberto#include <stdlib.h> 1192181834Sroberto#include <string.h> 1193181834Sroberto#include <unistd.h> 1194285612Sdelphij#ifdef HAVE_DCGETTEXT 1195285612Sdelphij# include <gettext.h> 1196285612Sdelphij#endif 1197181834Sroberto#include <autoopts/usage-txt.h> 1198181834Sroberto 1199285612Sdelphijstatic char * AO_gettext(char const * pz); 1200285612Sdelphijstatic void coerce_it(void ** s); 1201181834Sroberto 1202285612Sdelphij/** 1203285612Sdelphij * AutoGen specific wrapper function for gettext. It relies on the macro _() 1204285612Sdelphij * to convert from English to the target language, then strdup-duplicates the 1205285612Sdelphij * result string. It tries the "libopts" domain first, then whatever has been 1206285612Sdelphij * set via the \a textdomain(3) call. 1207285612Sdelphij * 1208285612Sdelphij * @param[in] pz the input text used as a lookup key. 1209285612Sdelphij * @returns the translated text (if there is one), 1210285612Sdelphij * or the original text (if not). 1211285612Sdelphij */ 1212285612Sdelphijstatic char * 1213285612SdelphijAO_gettext(char const * pz) 1214181834Sroberto{ 1215285612Sdelphij char * res; 1216181834Sroberto if (pz == NULL) 1217181834Sroberto return NULL; 1218285612Sdelphij#ifdef HAVE_DCGETTEXT 1219285612Sdelphij /* 1220285612Sdelphij * While processing the option_xlateable_txt data, try to use the 1221285612Sdelphij * "libopts" domain. Once we switch to the option descriptor data, 1222285612Sdelphij * do *not* use that domain. 1223285612Sdelphij */ 1224285612Sdelphij if (option_xlateable_txt.field_ct != 0) { 1225285612Sdelphij res = dgettext("libopts", pz); 1226285612Sdelphij if (res == pz) 1227285612Sdelphij res = (char *)VOIDP(_(pz)); 1228285612Sdelphij } else 1229285612Sdelphij res = (char *)VOIDP(_(pz)); 1230285612Sdelphij#else 1231285612Sdelphij res = (char *)VOIDP(_(pz)); 1232285612Sdelphij#endif 1233285612Sdelphij if (res == pz) 1234285612Sdelphij return res; 1235285612Sdelphij res = strdup(res); 1236285612Sdelphij if (res == NULL) { 1237285612Sdelphij fputs(_("No memory for duping translated strings\n"), stderr); 1238285612Sdelphij exit(NTP_KEYGEN_EXIT_FAILURE); 1239181834Sroberto } 1240285612Sdelphij return res; 1241181834Sroberto} 1242181834Sroberto 1243285612Sdelphij/** 1244285612Sdelphij * All the pointers we use are marked "* const", but they are stored in 1245285612Sdelphij * writable memory. Coerce the mutability and set the pointer. 1246285612Sdelphij */ 1247285612Sdelphijstatic void coerce_it(void ** s) { *s = AO_gettext(*s); 1248285612Sdelphij} 1249181834Sroberto 1250285612Sdelphij/** 1251285612Sdelphij * Translate all the translatable strings in the ntp_keygenOptions 1252285612Sdelphij * structure defined above. This is done only once. 1253181834Sroberto */ 1254181834Srobertostatic void 1255285612Sdelphijtranslate_option_strings(void) 1256181834Sroberto{ 1257285612Sdelphij tOptions * const opts = &ntp_keygenOptions; 1258285612Sdelphij 1259181834Sroberto /* 1260181834Sroberto * Guard against re-translation. It won't work. The strings will have 1261181834Sroberto * been changed by the first pass through this code. One shot only. 1262181834Sroberto */ 1263285612Sdelphij if (option_xlateable_txt.field_ct != 0) { 1264285612Sdelphij /* 1265285612Sdelphij * Do the translations. The first pointer follows the field count 1266285612Sdelphij * field. The field count field is the size of a pointer. 1267285612Sdelphij */ 1268285612Sdelphij char ** ppz = (char**)VOIDP(&(option_xlateable_txt)); 1269285612Sdelphij int ix = option_xlateable_txt.field_ct; 1270181834Sroberto 1271181834Sroberto do { 1272285612Sdelphij ppz++; /* skip over field_ct */ 1273181834Sroberto *ppz = AO_gettext(*ppz); 1274181834Sroberto } while (--ix > 0); 1275285612Sdelphij /* prevent re-translation and disable "libopts" domain lookup */ 1276285612Sdelphij option_xlateable_txt.field_ct = 0; 1277181834Sroberto 1278285612Sdelphij coerce_it(VOIDP(&(opts->pzCopyright))); 1279285612Sdelphij coerce_it(VOIDP(&(opts->pzCopyNotice))); 1280285612Sdelphij coerce_it(VOIDP(&(opts->pzFullVersion))); 1281285612Sdelphij coerce_it(VOIDP(&(opts->pzUsageTitle))); 1282285612Sdelphij coerce_it(VOIDP(&(opts->pzExplain))); 1283285612Sdelphij coerce_it(VOIDP(&(opts->pzDetail))); 1284285612Sdelphij { 1285285612Sdelphij tOptDesc * od = opts->pOptDesc; 1286285612Sdelphij for (ix = opts->optCt; ix > 0; ix--, od++) 1287285612Sdelphij coerce_it(VOIDP(&(od->pzText))); 1288181834Sroberto } 1289181834Sroberto } 1290181834Sroberto} 1291181834Sroberto#endif /* ENABLE_NLS */ 1292181834Sroberto 1293285612Sdelphij#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 1294285612Sdelphij/** I18N function strictly for xgettext. Do not compile. */ 1295285612Sdelphijstatic void bogus_function(void) { 1296285612Sdelphij /* TRANSLATORS: 1297285612Sdelphij 1298285612Sdelphij The following dummy function was crated solely so that xgettext can 1299285612Sdelphij extract the correct strings. These strings are actually referenced 1300285612Sdelphij by a field name in the ntp_keygenOptions structure noted in the 1301285612Sdelphij comments below. The literal text is defined in ntp_keygen_opt_strs. 1302285612Sdelphij 1303285612Sdelphij NOTE: the strings below are segmented with respect to the source string 1304285612Sdelphij ntp_keygen_opt_strs. The strings above are handed off for translation 1305285612Sdelphij at run time a paragraph at a time. Consequently, they are presented here 1306285612Sdelphij for translation a paragraph at a time. 1307285612Sdelphij 1308285612Sdelphij ALSO: often the description for an option will reference another option 1309285612Sdelphij by name. These are set off with apostrophe quotes (I hope). Do not 1310285612Sdelphij translate option names. 1311285612Sdelphij */ 1312285612Sdelphij /* referenced via ntp_keygenOptions.pzCopyright */ 1313330567Sgordon puts(_("ntp-keygen (ntp) 4.2.8p11\n\ 1314316722SdelphijCopyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\ 1315285612SdelphijThis is free software. It is licensed for use, modification and\n\ 1316285612Sdelphijredistribution under the terms of the NTP License, copies of which\n\ 1317285612Sdelphijcan be seen at:\n")); 1318285612Sdelphij puts(_(" <http://ntp.org/license>\n\ 1319285612Sdelphij <http://opensource.org/licenses/ntp-license.php>\n")); 1320285612Sdelphij 1321285612Sdelphij /* referenced via ntp_keygenOptions.pzCopyNotice */ 1322285612Sdelphij puts(_("Permission to use, copy, modify, and distribute this software and its\n\ 1323285612Sdelphijdocumentation for any purpose with or without fee is hereby granted,\n\ 1324285612Sdelphijprovided that the above copyright notice appears in all copies and that\n\ 1325285612Sdelphijboth the copyright notice and this permission notice appear in supporting\n\ 1326285612Sdelphijdocumentation, and that the name The University of Delaware not be used in\n\ 1327285612Sdelphijadvertising or publicity pertaining to distribution of the software without\n\ 1328285612Sdelphijspecific, written prior permission. The University of Delaware and Network\n\ 1329285612SdelphijTime Foundation makes no representations about the suitability this\n\ 1330285612Sdelphijsoftware for any purpose. It is provided \"as is\" without express or\n\ 1331285612Sdelphijimplied warranty.\n")); 1332285612Sdelphij 1333285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1334285612Sdelphij puts(_("identity modulus bits")); 1335285612Sdelphij 1336285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1337285612Sdelphij puts(_("certificate scheme")); 1338285612Sdelphij 1339285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1340285612Sdelphij puts(_("privatekey cipher")); 1341285612Sdelphij 1342285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1343285612Sdelphij puts(_("Increase debug verbosity level")); 1344285612Sdelphij 1345285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1346285612Sdelphij puts(_("Set the debug verbosity level")); 1347285612Sdelphij 1348285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1349285612Sdelphij puts(_("Write IFF or GQ identity keys")); 1350285612Sdelphij 1351285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1352285612Sdelphij puts(_("Generate GQ parameters and keys")); 1353285612Sdelphij 1354285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1355285612Sdelphij puts(_("generate RSA host key")); 1356285612Sdelphij 1357285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1358285612Sdelphij puts(_("generate IFF parameters")); 1359285612Sdelphij 1360285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1361285612Sdelphij puts(_("set Autokey group name")); 1362285612Sdelphij 1363285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1364285612Sdelphij puts(_("set certificate lifetime")); 1365285612Sdelphij 1366285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1367330567Sgordon puts(_("prime modulus")); 1368285612Sdelphij 1369285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1370330567Sgordon puts(_("generate symmetric keys")); 1371285612Sdelphij 1372285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1373285612Sdelphij puts(_("generate PC private certificate")); 1374285612Sdelphij 1375285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1376285612Sdelphij puts(_("local private password")); 1377285612Sdelphij 1378285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1379285612Sdelphij puts(_("export IFF or GQ group keys with password")); 1380285612Sdelphij 1381285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1382330567Sgordon puts(_("set host and optionally group name")); 1383285612Sdelphij 1384285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1385330567Sgordon puts(_("generate sign key (RSA or DSA)")); 1386285612Sdelphij 1387285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1388285612Sdelphij puts(_("trusted certificate (TC scheme)")); 1389285612Sdelphij 1390285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1391285612Sdelphij puts(_("generate <num> MV parameters")); 1392285612Sdelphij 1393285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1394285612Sdelphij puts(_("update <num> MV keys")); 1395285612Sdelphij 1396285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1397285612Sdelphij puts(_("display extended usage information and exit")); 1398285612Sdelphij 1399285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1400285612Sdelphij puts(_("extended usage information passed thru pager")); 1401285612Sdelphij 1402285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1403285612Sdelphij puts(_("output version information and exit")); 1404285612Sdelphij 1405285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1406285612Sdelphij puts(_("save the option state to a config file")); 1407285612Sdelphij 1408285612Sdelphij /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1409285612Sdelphij puts(_("load options from a config file")); 1410285612Sdelphij 1411285612Sdelphij /* referenced via ntp_keygenOptions.pzUsageTitle */ 1412330567Sgordon puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p11\n\ 1413285612SdelphijUsage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); 1414285612Sdelphij 1415285612Sdelphij /* referenced via ntp_keygenOptions.pzExplain */ 1416285612Sdelphij puts(_("\n")); 1417285612Sdelphij 1418285612Sdelphij /* referenced via ntp_keygenOptions.pzFullVersion */ 1419330567Sgordon puts(_("ntp-keygen (ntp) 4.2.8p11")); 1420285612Sdelphij 1421285612Sdelphij /* referenced via ntp_keygenOptions.pzFullUsage */ 1422285612Sdelphij puts(_("<<<NOT-FOUND>>>")); 1423285612Sdelphij 1424285612Sdelphij /* referenced via ntp_keygenOptions.pzShortUsage */ 1425285612Sdelphij puts(_("<<<NOT-FOUND>>>")); 1426285612Sdelphij /* LIBOPTS-MESSAGES: */ 1427285612Sdelphij#line 67 "../autoopts.c" 1428285612Sdelphij puts(_("allocation of %d bytes failed\n")); 1429285612Sdelphij#line 93 "../autoopts.c" 1430285612Sdelphij puts(_("allocation of %d bytes failed\n")); 1431285612Sdelphij#line 53 "../init.c" 1432285612Sdelphij puts(_("AutoOpts function called without option descriptor\n")); 1433285612Sdelphij#line 86 "../init.c" 1434285612Sdelphij puts(_("\tThis exceeds the compiled library version: ")); 1435285612Sdelphij#line 84 "../init.c" 1436285612Sdelphij puts(_("Automated Options Processing Error!\n" 1437285612Sdelphij "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 1438285612Sdelphij#line 80 "../autoopts.c" 1439285612Sdelphij puts(_("realloc of %d bytes at 0x%p failed\n")); 1440285612Sdelphij#line 88 "../init.c" 1441285612Sdelphij puts(_("\tThis is less than the minimum library version: ")); 1442285612Sdelphij#line 121 "../version.c" 1443285612Sdelphij puts(_("Automated Options version %s\n" 1444285612Sdelphij "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); 1445285612Sdelphij#line 87 "../makeshell.c" 1446285612Sdelphij puts(_("(AutoOpts bug): %s.\n")); 1447285612Sdelphij#line 90 "../reset.c" 1448285612Sdelphij puts(_("optionResetOpt() called, but reset-option not configured")); 1449285612Sdelphij#line 292 "../usage.c" 1450285612Sdelphij puts(_("could not locate the 'help' option")); 1451285612Sdelphij#line 336 "../autoopts.c" 1452285612Sdelphij puts(_("optionProcess() was called with invalid data")); 1453285612Sdelphij#line 748 "../usage.c" 1454285612Sdelphij puts(_("invalid argument type specified")); 1455285612Sdelphij#line 598 "../find.c" 1456285612Sdelphij puts(_("defaulted to option with optional arg")); 1457285612Sdelphij#line 76 "../alias.c" 1458285612Sdelphij puts(_("aliasing option is out of range.")); 1459285612Sdelphij#line 234 "../enum.c" 1460285612Sdelphij puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 1461285612Sdelphij#line 108 "../find.c" 1462285612Sdelphij puts(_(" The following options match:\n")); 1463285612Sdelphij#line 293 "../find.c" 1464285612Sdelphij puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 1465285612Sdelphij#line 161 "../check.c" 1466285612Sdelphij puts(_("%s: Command line arguments required\n")); 1467285612Sdelphij#line 43 "../alias.c" 1468285612Sdelphij puts(_("%d %s%s options allowed\n")); 1469285612Sdelphij#line 94 "../makeshell.c" 1470285612Sdelphij puts(_("%s error %d (%s) calling %s for '%s'\n")); 1471285612Sdelphij#line 306 "../makeshell.c" 1472285612Sdelphij puts(_("interprocess pipe")); 1473285612Sdelphij#line 168 "../version.c" 1474285612Sdelphij puts(_("error: version option argument '%c' invalid. Use:\n" 1475285612Sdelphij "\t'v' - version only\n" 1476285612Sdelphij "\t'c' - version and copyright\n" 1477285612Sdelphij "\t'n' - version and full copyright notice\n")); 1478285612Sdelphij#line 58 "../check.c" 1479285612Sdelphij puts(_("%s error: the '%s' and '%s' options conflict\n")); 1480285612Sdelphij#line 217 "../find.c" 1481285612Sdelphij puts(_("%s: The '%s' option has been disabled.")); 1482285612Sdelphij#line 430 "../find.c" 1483285612Sdelphij puts(_("%s: The '%s' option has been disabled.")); 1484285612Sdelphij#line 38 "../alias.c" 1485285612Sdelphij puts(_("-equivalence")); 1486285612Sdelphij#line 469 "../find.c" 1487285612Sdelphij puts(_("%s: illegal option -- %c\n")); 1488285612Sdelphij#line 110 "../reset.c" 1489285612Sdelphij puts(_("%s: illegal option -- %c\n")); 1490285612Sdelphij#line 271 "../find.c" 1491285612Sdelphij puts(_("%s: illegal option -- %s\n")); 1492285612Sdelphij#line 755 "../find.c" 1493285612Sdelphij puts(_("%s: illegal option -- %s\n")); 1494285612Sdelphij#line 118 "../reset.c" 1495285612Sdelphij puts(_("%s: illegal option -- %s\n")); 1496285612Sdelphij#line 335 "../find.c" 1497285612Sdelphij puts(_("%s: unknown vendor extension option -- %s\n")); 1498285612Sdelphij#line 159 "../enum.c" 1499285612Sdelphij puts(_(" or an integer from %d through %d\n")); 1500285612Sdelphij#line 169 "../enum.c" 1501285612Sdelphij puts(_(" or an integer from %d through %d\n")); 1502285612Sdelphij#line 747 "../usage.c" 1503285612Sdelphij puts(_("%s error: invalid option descriptor for %s\n")); 1504285612Sdelphij#line 1081 "../usage.c" 1505285612Sdelphij puts(_("%s error: invalid option descriptor for %s\n")); 1506285612Sdelphij#line 385 "../find.c" 1507285612Sdelphij puts(_("%s: invalid option name: %s\n")); 1508285612Sdelphij#line 527 "../find.c" 1509285612Sdelphij puts(_("%s: The '%s' option requires an argument.\n")); 1510285612Sdelphij#line 156 "../autoopts.c" 1511285612Sdelphij puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 1512285612Sdelphij "\t'%s' and '%s'.")); 1513285612Sdelphij#line 94 "../check.c" 1514285612Sdelphij puts(_("%s error: The %s option is required\n")); 1515285612Sdelphij#line 632 "../find.c" 1516285612Sdelphij puts(_("%s: The '%s' option cannot have an argument.\n")); 1517285612Sdelphij#line 151 "../check.c" 1518285612Sdelphij puts(_("%s: Command line arguments are not allowed.\n")); 1519285612Sdelphij#line 535 "../save.c" 1520285612Sdelphij puts(_("error %d (%s) creating %s\n")); 1521285612Sdelphij#line 234 "../enum.c" 1522285612Sdelphij puts(_("%s error: '%s' does not match any %s keywords.\n")); 1523285612Sdelphij#line 93 "../reset.c" 1524285612Sdelphij puts(_("%s error: The '%s' option requires an argument.\n")); 1525285612Sdelphij#line 184 "../save.c" 1526285612Sdelphij puts(_("error %d (%s) stat-ing %s\n")); 1527285612Sdelphij#line 238 "../save.c" 1528285612Sdelphij puts(_("error %d (%s) stat-ing %s\n")); 1529285612Sdelphij#line 143 "../restore.c" 1530285612Sdelphij puts(_("%s error: no saved option state\n")); 1531285612Sdelphij#line 231 "../autoopts.c" 1532285612Sdelphij puts(_("'%s' is not a command line option.\n")); 1533285612Sdelphij#line 111 "../time.c" 1534285612Sdelphij puts(_("%s error: '%s' is not a recognizable date/time.\n")); 1535285612Sdelphij#line 132 "../save.c" 1536285612Sdelphij puts(_("'%s' not defined\n")); 1537285612Sdelphij#line 50 "../time.c" 1538285612Sdelphij puts(_("%s error: '%s' is not a recognizable time duration.\n")); 1539285612Sdelphij#line 92 "../check.c" 1540285612Sdelphij puts(_("%s error: The %s option must appear %d times.\n")); 1541285612Sdelphij#line 164 "../numeric.c" 1542285612Sdelphij puts(_("%s error: '%s' is not a recognizable number.\n")); 1543285612Sdelphij#line 200 "../enum.c" 1544285612Sdelphij puts(_("%s error: %s exceeds %s keyword count\n")); 1545285612Sdelphij#line 330 "../usage.c" 1546285612Sdelphij puts(_("Try '%s %s' for more information.\n")); 1547285612Sdelphij#line 45 "../alias.c" 1548285612Sdelphij puts(_("one %s%s option allowed\n")); 1549285612Sdelphij#line 208 "../makeshell.c" 1550285612Sdelphij puts(_("standard output")); 1551285612Sdelphij#line 943 "../makeshell.c" 1552285612Sdelphij puts(_("standard output")); 1553285612Sdelphij#line 274 "../usage.c" 1554285612Sdelphij puts(_("standard output")); 1555285612Sdelphij#line 415 "../usage.c" 1556285612Sdelphij puts(_("standard output")); 1557285612Sdelphij#line 625 "../usage.c" 1558285612Sdelphij puts(_("standard output")); 1559285612Sdelphij#line 175 "../version.c" 1560285612Sdelphij puts(_("standard output")); 1561285612Sdelphij#line 274 "../usage.c" 1562285612Sdelphij puts(_("standard error")); 1563285612Sdelphij#line 415 "../usage.c" 1564285612Sdelphij puts(_("standard error")); 1565285612Sdelphij#line 625 "../usage.c" 1566285612Sdelphij puts(_("standard error")); 1567285612Sdelphij#line 175 "../version.c" 1568285612Sdelphij puts(_("standard error")); 1569285612Sdelphij#line 208 "../makeshell.c" 1570285612Sdelphij puts(_("write")); 1571285612Sdelphij#line 943 "../makeshell.c" 1572285612Sdelphij puts(_("write")); 1573285612Sdelphij#line 273 "../usage.c" 1574285612Sdelphij puts(_("write")); 1575285612Sdelphij#line 414 "../usage.c" 1576285612Sdelphij puts(_("write")); 1577285612Sdelphij#line 624 "../usage.c" 1578285612Sdelphij puts(_("write")); 1579285612Sdelphij#line 174 "../version.c" 1580285612Sdelphij puts(_("write")); 1581285612Sdelphij#line 60 "../numeric.c" 1582285612Sdelphij puts(_("%s error: %s option value %ld is out of range.\n")); 1583285612Sdelphij#line 44 "../check.c" 1584285612Sdelphij puts(_("%s error: %s option requires the %s option\n")); 1585285612Sdelphij#line 131 "../save.c" 1586285612Sdelphij puts(_("%s warning: cannot save options - %s not regular file\n")); 1587285612Sdelphij#line 183 "../save.c" 1588285612Sdelphij puts(_("%s warning: cannot save options - %s not regular file\n")); 1589285612Sdelphij#line 237 "../save.c" 1590285612Sdelphij puts(_("%s warning: cannot save options - %s not regular file\n")); 1591285612Sdelphij#line 256 "../save.c" 1592285612Sdelphij puts(_("%s warning: cannot save options - %s not regular file\n")); 1593285612Sdelphij#line 534 "../save.c" 1594285612Sdelphij puts(_("%s warning: cannot save options - %s not regular file\n")); 1595285612Sdelphij /* END-LIBOPTS-MESSAGES */ 1596285612Sdelphij 1597285612Sdelphij /* USAGE-TEXT: */ 1598285612Sdelphij#line 873 "../usage.c" 1599285612Sdelphij puts(_("\t\t\t\t- an alternate for '%s'\n")); 1600285612Sdelphij#line 1148 "../usage.c" 1601285612Sdelphij puts(_("Version, usage and configuration options:")); 1602285612Sdelphij#line 924 "../usage.c" 1603285612Sdelphij puts(_("\t\t\t\t- default option for unnamed options\n")); 1604285612Sdelphij#line 837 "../usage.c" 1605285612Sdelphij puts(_("\t\t\t\t- disabled as '--%s'\n")); 1606285612Sdelphij#line 1117 "../usage.c" 1607285612Sdelphij puts(_(" --- %-14s %s\n")); 1608285612Sdelphij#line 1115 "../usage.c" 1609285612Sdelphij puts(_("This option has been disabled")); 1610285612Sdelphij#line 864 "../usage.c" 1611285612Sdelphij puts(_("\t\t\t\t- enabled by default\n")); 1612285612Sdelphij#line 40 "../alias.c" 1613285612Sdelphij puts(_("%s error: only ")); 1614285612Sdelphij#line 1194 "../usage.c" 1615285612Sdelphij puts(_(" - examining environment variables named %s_*\n")); 1616285612Sdelphij#line 168 "../file.c" 1617285612Sdelphij puts(_("\t\t\t\t- file must not pre-exist\n")); 1618285612Sdelphij#line 172 "../file.c" 1619285612Sdelphij puts(_("\t\t\t\t- file must pre-exist\n")); 1620285612Sdelphij#line 380 "../usage.c" 1621285612Sdelphij puts(_("Options are specified by doubled hyphens and their name or by a single\n" 1622285612Sdelphij "hyphen and the flag character.\n")); 1623285612Sdelphij#line 921 "../makeshell.c" 1624285612Sdelphij puts(_("\n" 1625285612Sdelphij "= = = = = = = =\n\n" 1626285612Sdelphij "This incarnation of genshell will produce\n" 1627285612Sdelphij "a shell script to parse the options for %s:\n\n")); 1628285612Sdelphij#line 166 "../enum.c" 1629285612Sdelphij puts(_(" or an integer mask with any of the lower %d bits set\n")); 1630285612Sdelphij#line 897 "../usage.c" 1631285612Sdelphij puts(_("\t\t\t\t- is a set membership option\n")); 1632285612Sdelphij#line 918 "../usage.c" 1633285612Sdelphij puts(_("\t\t\t\t- must appear between %d and %d times\n")); 1634285612Sdelphij#line 382 "../usage.c" 1635285612Sdelphij puts(_("Options are specified by single or double hyphens and their name.\n")); 1636285612Sdelphij#line 904 "../usage.c" 1637285612Sdelphij puts(_("\t\t\t\t- may appear multiple times\n")); 1638285612Sdelphij#line 891 "../usage.c" 1639285612Sdelphij puts(_("\t\t\t\t- may not be preset\n")); 1640285612Sdelphij#line 1309 "../usage.c" 1641285612Sdelphij puts(_(" Arg Option-Name Description\n")); 1642285612Sdelphij#line 1245 "../usage.c" 1643285612Sdelphij puts(_(" Flg Arg Option-Name Description\n")); 1644285612Sdelphij#line 1303 "../usage.c" 1645285612Sdelphij puts(_(" Flg Arg Option-Name Description\n")); 1646285612Sdelphij#line 1304 "../usage.c" 1647285612Sdelphij puts(_(" %3s %s")); 1648285612Sdelphij#line 1310 "../usage.c" 1649285612Sdelphij puts(_(" %3s %s")); 1650285612Sdelphij#line 387 "../usage.c" 1651285612Sdelphij puts(_("The '-#<number>' option may omit the hash char\n")); 1652285612Sdelphij#line 383 "../usage.c" 1653285612Sdelphij puts(_("All arguments are named options.\n")); 1654285612Sdelphij#line 971 "../usage.c" 1655285612Sdelphij puts(_(" - reading file %s")); 1656285612Sdelphij#line 409 "../usage.c" 1657285612Sdelphij puts(_("\n" 1658285612Sdelphij "Please send bug reports to: <%s>\n")); 1659285612Sdelphij#line 100 "../version.c" 1660285612Sdelphij puts(_("\n" 1661285612Sdelphij "Please send bug reports to: <%s>\n")); 1662285612Sdelphij#line 129 "../version.c" 1663285612Sdelphij puts(_("\n" 1664285612Sdelphij "Please send bug reports to: <%s>\n")); 1665285612Sdelphij#line 903 "../usage.c" 1666285612Sdelphij puts(_("\t\t\t\t- may NOT appear - preset only\n")); 1667285612Sdelphij#line 944 "../usage.c" 1668285612Sdelphij puts(_("\n" 1669285612Sdelphij "The following option preset mechanisms are supported:\n")); 1670285612Sdelphij#line 1192 "../usage.c" 1671285612Sdelphij puts(_("\n" 1672285612Sdelphij "The following option preset mechanisms are supported:\n")); 1673285612Sdelphij#line 682 "../usage.c" 1674285612Sdelphij puts(_("prohibits these options:\n")); 1675285612Sdelphij#line 677 "../usage.c" 1676285612Sdelphij puts(_("prohibits the option '%s'\n")); 1677285612Sdelphij#line 81 "../numeric.c" 1678285612Sdelphij puts(_("%s%ld to %ld")); 1679285612Sdelphij#line 79 "../numeric.c" 1680285612Sdelphij puts(_("%sgreater than or equal to %ld")); 1681285612Sdelphij#line 75 "../numeric.c" 1682285612Sdelphij puts(_("%s%ld exactly")); 1683285612Sdelphij#line 68 "../numeric.c" 1684285612Sdelphij puts(_("%sit must lie in one of the ranges:\n")); 1685285612Sdelphij#line 68 "../numeric.c" 1686285612Sdelphij puts(_("%sit must be in the range:\n")); 1687285612Sdelphij#line 88 "../numeric.c" 1688285612Sdelphij puts(_(", or\n")); 1689285612Sdelphij#line 66 "../numeric.c" 1690285612Sdelphij puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 1691285612Sdelphij#line 77 "../numeric.c" 1692285612Sdelphij puts(_("%sless than or equal to %ld")); 1693285612Sdelphij#line 390 "../usage.c" 1694285612Sdelphij puts(_("Operands and options may be intermixed. They will be reordered.\n")); 1695285612Sdelphij#line 652 "../usage.c" 1696285612Sdelphij puts(_("requires the option '%s'\n")); 1697285612Sdelphij#line 655 "../usage.c" 1698285612Sdelphij puts(_("requires these options:\n")); 1699285612Sdelphij#line 1321 "../usage.c" 1700285612Sdelphij puts(_(" Arg Option-Name Req? Description\n")); 1701285612Sdelphij#line 1315 "../usage.c" 1702285612Sdelphij puts(_(" Flg Arg Option-Name Req? Description\n")); 1703285612Sdelphij#line 167 "../enum.c" 1704285612Sdelphij puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 1705285612Sdelphij "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 1706285612Sdelphij "will set them all. Multiple entries may be passed as an option\n" 1707285612Sdelphij "argument list.\n")); 1708285612Sdelphij#line 910 "../usage.c" 1709285612Sdelphij puts(_("\t\t\t\t- may appear up to %d times\n")); 1710285612Sdelphij#line 77 "../enum.c" 1711285612Sdelphij puts(_("The valid \"%s\" option keywords are:\n")); 1712285612Sdelphij#line 1152 "../usage.c" 1713285612Sdelphij puts(_("The next option supports vendor supported extra options:")); 1714285612Sdelphij#line 773 "../usage.c" 1715285612Sdelphij puts(_("These additional options are:")); 1716285612Sdelphij /* END-USAGE-TEXT */ 1717285612Sdelphij} 1718285612Sdelphij#endif /* uncompilable code */ 1719181834Sroberto#ifdef __cplusplus 1720181834Sroberto} 1721181834Sroberto#endif 1722181834Sroberto/* ntp-keygen-opts.c ends here */ 1723