1290001Sglebius/* 2181834Sroberto * EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c) 3290001Sglebius * 4310419Sdelphij * It has been AutoGen-ed November 21, 2016 at 08:03:30 AM by AutoGen 5.18.5 5181834Sroberto * From the definitions ntp-keygen-opts.def 6181834Sroberto * and the template file options 7181834Sroberto * 8290001Sglebius * Generated from AutoOpts 41:0:16 templates. 9181834Sroberto * 10290001Sglebius * AutoOpts is a copyrighted work. This source file is not encumbered 11290001Sglebius * by AutoOpts licensing, but is provided under the licensing terms chosen 12290001Sglebius * by the ntp-keygen author or copyright holder. AutoOpts is 13290001Sglebius * licensed under the terms of the LGPL. The redistributable library 14290001Sglebius * (``libopts'') is licensed under the terms of either the LGPL or, at the 15290001Sglebius * users discretion, the BSD license. See the AutoOpts and/or libopts sources 16290001Sglebius * for details. 17181834Sroberto * 18290001Sglebius * The ntp-keygen program is copyrighted and licensed 19290001Sglebius * under the following terms: 20181834Sroberto * 21294905Sdelphij * Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved. 22290001Sglebius * This is free software. It is licensed for use, modification and 23290001Sglebius * redistribution under the terms of the NTP License, copies of which 24290001Sglebius * can be seen at: 25290001Sglebius * <http://ntp.org/license> 26290001Sglebius * <http://opensource.org/licenses/ntp-license.php> 27290001Sglebius * 28290001Sglebius * Permission to use, copy, modify, and distribute this software and its 29290001Sglebius * documentation for any purpose with or without fee is hereby granted, 30290001Sglebius * provided that the above copyright notice appears in all copies and that 31290001Sglebius * both the copyright notice and this permission notice appear in 32290001Sglebius * supporting documentation, and that the name The University of Delaware not be used in 33290001Sglebius * advertising or publicity pertaining to distribution of the software 34290001Sglebius * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no 35290001Sglebius * representations about the suitability this software for any purpose. It 36290001Sglebius * is provided "as is" without express or implied warranty. 37181834Sroberto */ 38181834Sroberto 39290001Sglebius#ifndef __doxygen__ 40290001Sglebius#define OPTION_CODE_COMPILE 1 41290001Sglebius#include "ntp-keygen-opts.h" 42290001Sglebius#include <sys/types.h> 43181834Sroberto 44181834Sroberto#include <limits.h> 45181834Sroberto#include <stdio.h> 46290001Sglebius#include <stdlib.h> 47290001Sglebius#include <errno.h> 48181834Sroberto 49181834Sroberto#ifdef __cplusplus 50181834Srobertoextern "C" { 51181834Sroberto#endif 52290001Sglebiusextern FILE * option_usage_fp; 53290001Sglebius#define zCopyright (ntp_keygen_opt_strs+0) 54290001Sglebius#define zLicenseDescrip (ntp_keygen_opt_strs+352) 55181834Sroberto 56181834Sroberto/* 57181834Sroberto * global included definitions 58181834Sroberto */ 59181834Sroberto#include <stdlib.h> 60290001Sglebius 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 70290001Sglebius 71290001Sglebius/** 72290001Sglebius * static const strings for ntp-keygen options 73181834Sroberto */ 74290001Sglebiusstatic char const ntp_keygen_opt_strs[2419] = 75310419Sdelphij/* 0 */ "ntp-keygen (ntp) 4.2.8p9\n" 76294905Sdelphij "Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n" 77290001Sglebius "This is free software. It is licensed for use, modification and\n" 78290001Sglebius "redistribution under the terms of the NTP License, copies of which\n" 79290001Sglebius "can be seen at:\n" 80290001Sglebius " <http://ntp.org/license>\n" 81290001Sglebius " <http://opensource.org/licenses/ntp-license.php>\n\0" 82290001Sglebius/* 352 */ "Permission to use, copy, modify, and distribute this software and its\n" 83290001Sglebius "documentation for any purpose with or without fee is hereby granted,\n" 84290001Sglebius "provided that the above copyright notice appears in all copies and that\n" 85290001Sglebius "both the copyright notice and this permission notice appear in supporting\n" 86290001Sglebius "documentation, and that the name The University of Delaware not be used in\n" 87290001Sglebius "advertising or publicity pertaining to distribution of the software without\n" 88290001Sglebius "specific, written prior permission. The University of Delaware and Network\n" 89290001Sglebius "Time Foundation makes no representations about the suitability this\n" 90290001Sglebius "software for any purpose. It is provided \"as is\" without express or\n" 91290001Sglebius "implied warranty.\n\0" 92290001Sglebius/* 1020 */ "identity modulus bits\0" 93290001Sglebius/* 1042 */ "IMBITS\0" 94290001Sglebius/* 1049 */ "imbits\0" 95290001Sglebius/* 1056 */ "certificate scheme\0" 96290001Sglebius/* 1075 */ "CERTIFICATE\0" 97290001Sglebius/* 1087 */ "certificate\0" 98290001Sglebius/* 1099 */ "privatekey cipher\0" 99290001Sglebius/* 1117 */ "CIPHER\0" 100290001Sglebius/* 1124 */ "cipher\0" 101290001Sglebius/* 1131 */ "Increase debug verbosity level\0" 102290001Sglebius/* 1162 */ "DEBUG_LEVEL\0" 103290001Sglebius/* 1174 */ "debug-level\0" 104290001Sglebius/* 1186 */ "Set the debug verbosity level\0" 105290001Sglebius/* 1216 */ "SET_DEBUG_LEVEL\0" 106290001Sglebius/* 1232 */ "set-debug-level\0" 107290001Sglebius/* 1248 */ "Write IFF or GQ identity keys\0" 108290001Sglebius/* 1278 */ "ID_KEY\0" 109290001Sglebius/* 1285 */ "id-key\0" 110290001Sglebius/* 1292 */ "Generate GQ parameters and keys\0" 111290001Sglebius/* 1324 */ "GQ_PARAMS\0" 112290001Sglebius/* 1334 */ "gq-params\0" 113290001Sglebius/* 1344 */ "generate RSA host key\0" 114290001Sglebius/* 1366 */ "HOST_KEY\0" 115290001Sglebius/* 1375 */ "host-key\0" 116290001Sglebius/* 1384 */ "generate IFF parameters\0" 117290001Sglebius/* 1408 */ "IFFKEY\0" 118290001Sglebius/* 1415 */ "iffkey\0" 119290001Sglebius/* 1422 */ "set Autokey group name\0" 120290001Sglebius/* 1445 */ "IDENT\0" 121290001Sglebius/* 1451 */ "ident\0" 122290001Sglebius/* 1457 */ "set certificate lifetime\0" 123290001Sglebius/* 1482 */ "LIFETIME\0" 124290001Sglebius/* 1491 */ "lifetime\0" 125290001Sglebius/* 1500 */ "generate MD5 keys\0" 126290001Sglebius/* 1518 */ "MD5KEY\0" 127290001Sglebius/* 1525 */ "md5key\0" 128290001Sglebius/* 1532 */ "modulus\0" 129290001Sglebius/* 1540 */ "MODULUS\0" 130290001Sglebius/* 1548 */ "generate PC private certificate\0" 131290001Sglebius/* 1580 */ "PVT_CERT\0" 132290001Sglebius/* 1589 */ "pvt-cert\0" 133290001Sglebius/* 1598 */ "local private password\0" 134290001Sglebius/* 1621 */ "PASSWORD\0" 135290001Sglebius/* 1630 */ "password\0" 136290001Sglebius/* 1639 */ "export IFF or GQ group keys with password\0" 137290001Sglebius/* 1681 */ "EXPORT_PASSWD\0" 138290001Sglebius/* 1695 */ "export-passwd\0" 139290001Sglebius/* 1709 */ "generate sign key (RSA or DSA)\0" 140290001Sglebius/* 1740 */ "SIGN_KEY\0" 141290001Sglebius/* 1749 */ "sign-key\0" 142290001Sglebius/* 1758 */ "set host and optionally group name\0" 143290001Sglebius/* 1793 */ "SUBJECT_NAME\0" 144290001Sglebius/* 1806 */ "subject-name\0" 145290001Sglebius/* 1819 */ "trusted certificate (TC scheme)\0" 146290001Sglebius/* 1851 */ "TRUSTED_CERT\0" 147290001Sglebius/* 1864 */ "trusted-cert\0" 148290001Sglebius/* 1877 */ "generate <num> MV parameters\0" 149290001Sglebius/* 1906 */ "MV_PARAMS\0" 150290001Sglebius/* 1916 */ "mv-params\0" 151290001Sglebius/* 1926 */ "update <num> MV keys\0" 152290001Sglebius/* 1947 */ "MV_KEYS\0" 153290001Sglebius/* 1955 */ "mv-keys\0" 154290001Sglebius/* 1963 */ "display extended usage information and exit\0" 155290001Sglebius/* 2007 */ "help\0" 156290001Sglebius/* 2012 */ "extended usage information passed thru pager\0" 157290001Sglebius/* 2057 */ "more-help\0" 158290001Sglebius/* 2067 */ "output version information and exit\0" 159290001Sglebius/* 2103 */ "version\0" 160290001Sglebius/* 2111 */ "save the option state to a config file\0" 161290001Sglebius/* 2150 */ "save-opts\0" 162290001Sglebius/* 2160 */ "load options from a config file\0" 163290001Sglebius/* 2192 */ "LOAD_OPTS\0" 164290001Sglebius/* 2202 */ "no-load-opts\0" 165290001Sglebius/* 2215 */ "no\0" 166290001Sglebius/* 2218 */ "NTP_KEYGEN\0" 167310419Sdelphij/* 2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p9\n" 168290001Sglebius "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" 169290001Sglebius/* 2343 */ "$HOME\0" 170290001Sglebius/* 2349 */ ".\0" 171290001Sglebius/* 2351 */ ".ntprc\0" 172290001Sglebius/* 2358 */ "http://bugs.ntp.org, bugs@ntp.org\0" 173290001Sglebius/* 2392 */ "\n\0" 174310419Sdelphij/* 2394 */ "ntp-keygen (ntp) 4.2.8p9"; 175181834Sroberto 176290001Sglebius/** 177290001Sglebius * imbits option description: 178290001Sglebius */ 179290001Sglebius#ifdef AUTOKEY 180290001Sglebius/** Descriptive text for the imbits option */ 181290001Sglebius#define IMBITS_DESC (ntp_keygen_opt_strs+1020) 182290001Sglebius/** Upper-cased name for the imbits option */ 183290001Sglebius#define IMBITS_NAME (ntp_keygen_opt_strs+1042) 184290001Sglebius/** Name string for the imbits option */ 185290001Sglebius#define IMBITS_name (ntp_keygen_opt_strs+1049) 186290001Sglebius/** Compiled in flag settings for the imbits option */ 187290001Sglebius#define IMBITS_FLAGS (OPTST_DISABLED \ 188290001Sglebius | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 189181834Sroberto 190290001Sglebius#else /* disable imbits */ 191290001Sglebius#define IMBITS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 192290001Sglebius#define IMBITS_NAME NULL 193290001Sglebius#define IMBITS_DESC NULL 194290001Sglebius#define IMBITS_name NULL 195290001Sglebius#endif /* AUTOKEY */ 196290001Sglebius 197290001Sglebius/** 198290001Sglebius * certificate option description: 199181834Sroberto */ 200290001Sglebius#ifdef AUTOKEY 201290001Sglebius/** Descriptive text for the certificate option */ 202290001Sglebius#define CERTIFICATE_DESC (ntp_keygen_opt_strs+1056) 203290001Sglebius/** Upper-cased name for the certificate option */ 204290001Sglebius#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1075) 205290001Sglebius/** Name string for the certificate option */ 206290001Sglebius#define CERTIFICATE_name (ntp_keygen_opt_strs+1087) 207290001Sglebius/** Compiled in flag settings for the certificate option */ 208290001Sglebius#define CERTIFICATE_FLAGS (OPTST_DISABLED \ 209290001Sglebius | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 210181834Sroberto 211290001Sglebius#else /* disable certificate */ 212290001Sglebius#define CERTIFICATE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 213290001Sglebius#define CERTIFICATE_NAME NULL 214290001Sglebius#define CERTIFICATE_DESC NULL 215290001Sglebius#define CERTIFICATE_name NULL 216290001Sglebius#endif /* AUTOKEY */ 217181834Sroberto 218290001Sglebius/** 219290001Sglebius * cipher option description: 220181834Sroberto */ 221290001Sglebius#ifdef AUTOKEY 222290001Sglebius/** Descriptive text for the cipher option */ 223290001Sglebius#define CIPHER_DESC (ntp_keygen_opt_strs+1099) 224290001Sglebius/** Upper-cased name for the cipher option */ 225290001Sglebius#define CIPHER_NAME (ntp_keygen_opt_strs+1117) 226290001Sglebius/** Name string for the cipher option */ 227290001Sglebius#define CIPHER_name (ntp_keygen_opt_strs+1124) 228290001Sglebius/** Compiled in flag settings for the cipher option */ 229290001Sglebius#define CIPHER_FLAGS (OPTST_DISABLED \ 230181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 231181834Sroberto 232290001Sglebius#else /* disable cipher */ 233290001Sglebius#define CIPHER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 234290001Sglebius#define CIPHER_NAME NULL 235290001Sglebius#define CIPHER_DESC NULL 236290001Sglebius#define CIPHER_name NULL 237290001Sglebius#endif /* AUTOKEY */ 238181834Sroberto 239290001Sglebius/** 240290001Sglebius * debug-level option description: 241181834Sroberto */ 242290001Sglebius/** Descriptive text for the debug-level option */ 243290001Sglebius#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1131) 244290001Sglebius/** Upper-cased name for the debug-level option */ 245290001Sglebius#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1162) 246290001Sglebius/** Name string for the debug-level option */ 247290001Sglebius#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1174) 248290001Sglebius/** Compiled in flag settings for the debug-level option */ 249290001Sglebius#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) 250181834Sroberto 251290001Sglebius/** 252290001Sglebius * set-debug-level option description: 253290001Sglebius */ 254290001Sglebius/** Descriptive text for the set-debug-level option */ 255290001Sglebius#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1186) 256290001Sglebius/** Upper-cased name for the set-debug-level option */ 257290001Sglebius#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1216) 258290001Sglebius/** Name string for the set-debug-level option */ 259290001Sglebius#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1232) 260290001Sglebius/** Compiled in flag settings for the set-debug-level option */ 261290001Sglebius#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ 262290001Sglebius | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 263181834Sroberto 264290001Sglebius/** 265290001Sglebius * id-key option description: 266181834Sroberto */ 267290001Sglebius#ifdef AUTOKEY 268290001Sglebius/** Descriptive text for the id-key option */ 269290001Sglebius#define ID_KEY_DESC (ntp_keygen_opt_strs+1248) 270290001Sglebius/** Upper-cased name for the id-key option */ 271290001Sglebius#define ID_KEY_NAME (ntp_keygen_opt_strs+1278) 272290001Sglebius/** Name string for the id-key option */ 273290001Sglebius#define ID_KEY_name (ntp_keygen_opt_strs+1285) 274290001Sglebius/** Compiled in flag settings for the id-key option */ 275290001Sglebius#define ID_KEY_FLAGS (OPTST_DISABLED) 276181834Sroberto 277290001Sglebius#else /* disable id-key */ 278290001Sglebius#define ID_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 279290001Sglebius#define ID_KEY_NAME NULL 280290001Sglebius#define ID_KEY_DESC NULL 281290001Sglebius#define ID_KEY_name NULL 282290001Sglebius#endif /* AUTOKEY */ 283181834Sroberto 284290001Sglebius/** 285290001Sglebius * gq-params option description: 286181834Sroberto */ 287290001Sglebius#ifdef AUTOKEY 288290001Sglebius/** Descriptive text for the gq-params option */ 289290001Sglebius#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1292) 290290001Sglebius/** Upper-cased name for the gq-params option */ 291290001Sglebius#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1324) 292290001Sglebius/** Name string for the gq-params option */ 293290001Sglebius#define GQ_PARAMS_name (ntp_keygen_opt_strs+1334) 294290001Sglebius/** Compiled in flag settings for the gq-params option */ 295290001Sglebius#define GQ_PARAMS_FLAGS (OPTST_DISABLED) 296181834Sroberto 297290001Sglebius#else /* disable gq-params */ 298290001Sglebius#define GQ_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 299290001Sglebius#define GQ_PARAMS_NAME NULL 300290001Sglebius#define GQ_PARAMS_DESC NULL 301290001Sglebius#define GQ_PARAMS_name NULL 302290001Sglebius#endif /* AUTOKEY */ 303181834Sroberto 304290001Sglebius/** 305290001Sglebius * host-key option description: 306181834Sroberto */ 307290001Sglebius#ifdef AUTOKEY 308290001Sglebius/** Descriptive text for the host-key option */ 309290001Sglebius#define HOST_KEY_DESC (ntp_keygen_opt_strs+1344) 310290001Sglebius/** Upper-cased name for the host-key option */ 311290001Sglebius#define HOST_KEY_NAME (ntp_keygen_opt_strs+1366) 312290001Sglebius/** Name string for the host-key option */ 313290001Sglebius#define HOST_KEY_name (ntp_keygen_opt_strs+1375) 314290001Sglebius/** Compiled in flag settings for the host-key option */ 315290001Sglebius#define HOST_KEY_FLAGS (OPTST_DISABLED) 316181834Sroberto 317290001Sglebius#else /* disable host-key */ 318290001Sglebius#define HOST_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 319290001Sglebius#define HOST_KEY_NAME NULL 320290001Sglebius#define HOST_KEY_DESC NULL 321290001Sglebius#define HOST_KEY_name NULL 322290001Sglebius#endif /* AUTOKEY */ 323181834Sroberto 324290001Sglebius/** 325290001Sglebius * iffkey option description: 326181834Sroberto */ 327290001Sglebius#ifdef AUTOKEY 328290001Sglebius/** Descriptive text for the iffkey option */ 329290001Sglebius#define IFFKEY_DESC (ntp_keygen_opt_strs+1384) 330290001Sglebius/** Upper-cased name for the iffkey option */ 331290001Sglebius#define IFFKEY_NAME (ntp_keygen_opt_strs+1408) 332290001Sglebius/** Name string for the iffkey option */ 333290001Sglebius#define IFFKEY_name (ntp_keygen_opt_strs+1415) 334290001Sglebius/** Compiled in flag settings for the iffkey option */ 335290001Sglebius#define IFFKEY_FLAGS (OPTST_DISABLED) 336181834Sroberto 337290001Sglebius#else /* disable iffkey */ 338290001Sglebius#define IFFKEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 339290001Sglebius#define IFFKEY_NAME NULL 340290001Sglebius#define IFFKEY_DESC NULL 341290001Sglebius#define IFFKEY_name NULL 342290001Sglebius#endif /* AUTOKEY */ 343181834Sroberto 344290001Sglebius/** 345290001Sglebius * ident option description: 346181834Sroberto */ 347290001Sglebius#ifdef AUTOKEY 348290001Sglebius/** Descriptive text for the ident option */ 349290001Sglebius#define IDENT_DESC (ntp_keygen_opt_strs+1422) 350290001Sglebius/** Upper-cased name for the ident option */ 351290001Sglebius#define IDENT_NAME (ntp_keygen_opt_strs+1445) 352290001Sglebius/** Name string for the ident option */ 353290001Sglebius#define IDENT_name (ntp_keygen_opt_strs+1451) 354290001Sglebius/** Compiled in flag settings for the ident option */ 355290001Sglebius#define IDENT_FLAGS (OPTST_DISABLED \ 356290001Sglebius | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 357181834Sroberto 358290001Sglebius#else /* disable ident */ 359290001Sglebius#define IDENT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 360290001Sglebius#define IDENT_NAME NULL 361290001Sglebius#define IDENT_DESC NULL 362290001Sglebius#define IDENT_name NULL 363290001Sglebius#endif /* AUTOKEY */ 364181834Sroberto 365290001Sglebius/** 366290001Sglebius * lifetime option description: 367181834Sroberto */ 368290001Sglebius#ifdef AUTOKEY 369290001Sglebius/** Descriptive text for the lifetime option */ 370290001Sglebius#define LIFETIME_DESC (ntp_keygen_opt_strs+1457) 371290001Sglebius/** Upper-cased name for the lifetime option */ 372290001Sglebius#define LIFETIME_NAME (ntp_keygen_opt_strs+1482) 373290001Sglebius/** Name string for the lifetime option */ 374290001Sglebius#define LIFETIME_name (ntp_keygen_opt_strs+1491) 375290001Sglebius/** Compiled in flag settings for the lifetime option */ 376290001Sglebius#define LIFETIME_FLAGS (OPTST_DISABLED \ 377290001Sglebius | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 378181834Sroberto 379290001Sglebius#else /* disable lifetime */ 380290001Sglebius#define LIFETIME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 381290001Sglebius#define LIFETIME_NAME NULL 382290001Sglebius#define LIFETIME_DESC NULL 383290001Sglebius#define LIFETIME_name NULL 384290001Sglebius#endif /* AUTOKEY */ 385290001Sglebius 386290001Sglebius/** 387290001Sglebius * md5key option description: 388181834Sroberto */ 389290001Sglebius/** Descriptive text for the md5key option */ 390290001Sglebius#define MD5KEY_DESC (ntp_keygen_opt_strs+1500) 391290001Sglebius/** Upper-cased name for the md5key option */ 392290001Sglebius#define MD5KEY_NAME (ntp_keygen_opt_strs+1518) 393290001Sglebius/** Name string for the md5key option */ 394290001Sglebius#define MD5KEY_name (ntp_keygen_opt_strs+1525) 395290001Sglebius/** Compiled in flag settings for the md5key option */ 396290001Sglebius#define MD5KEY_FLAGS (OPTST_DISABLED) 397290001Sglebius 398290001Sglebius/** 399290001Sglebius * modulus option description: 400290001Sglebius */ 401290001Sglebius#ifdef AUTOKEY 402290001Sglebius/** Descriptive text for the modulus option */ 403290001Sglebius#define MODULUS_DESC (ntp_keygen_opt_strs+1532) 404290001Sglebius/** Upper-cased name for the modulus option */ 405290001Sglebius#define MODULUS_NAME (ntp_keygen_opt_strs+1540) 406290001Sglebius/** Name string for the modulus option */ 407290001Sglebius#define MODULUS_name (ntp_keygen_opt_strs+1532) 408290001Sglebius/** Compiled in flag settings for the modulus option */ 409290001Sglebius#define MODULUS_FLAGS (OPTST_DISABLED \ 410181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 411181834Sroberto 412290001Sglebius#else /* disable modulus */ 413290001Sglebius#define MODULUS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 414290001Sglebius#define MODULUS_NAME NULL 415290001Sglebius#define MODULUS_DESC NULL 416290001Sglebius#define MODULUS_name NULL 417290001Sglebius#endif /* AUTOKEY */ 418181834Sroberto 419290001Sglebius/** 420290001Sglebius * pvt-cert option description: 421181834Sroberto */ 422290001Sglebius#ifdef AUTOKEY 423290001Sglebius/** Descriptive text for the pvt-cert option */ 424290001Sglebius#define PVT_CERT_DESC (ntp_keygen_opt_strs+1548) 425290001Sglebius/** Upper-cased name for the pvt-cert option */ 426290001Sglebius#define PVT_CERT_NAME (ntp_keygen_opt_strs+1580) 427290001Sglebius/** Name string for the pvt-cert option */ 428290001Sglebius#define PVT_CERT_name (ntp_keygen_opt_strs+1589) 429290001Sglebius/** Compiled in flag settings for the pvt-cert option */ 430290001Sglebius#define PVT_CERT_FLAGS (OPTST_DISABLED) 431181834Sroberto 432290001Sglebius#else /* disable pvt-cert */ 433290001Sglebius#define PVT_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 434290001Sglebius#define PVT_CERT_NAME NULL 435290001Sglebius#define PVT_CERT_DESC NULL 436290001Sglebius#define PVT_CERT_name NULL 437290001Sglebius#endif /* AUTOKEY */ 438181834Sroberto 439290001Sglebius/** 440290001Sglebius * password option description: 441181834Sroberto */ 442290001Sglebius#ifdef AUTOKEY 443290001Sglebius/** Descriptive text for the password option */ 444290001Sglebius#define PASSWORD_DESC (ntp_keygen_opt_strs+1598) 445290001Sglebius/** Upper-cased name for the password option */ 446290001Sglebius#define PASSWORD_NAME (ntp_keygen_opt_strs+1621) 447290001Sglebius/** Name string for the password option */ 448290001Sglebius#define PASSWORD_name (ntp_keygen_opt_strs+1630) 449290001Sglebius/** Compiled in flag settings for the password option */ 450290001Sglebius#define PASSWORD_FLAGS (OPTST_DISABLED \ 451181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 452181834Sroberto 453290001Sglebius#else /* disable password */ 454290001Sglebius#define PASSWORD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 455290001Sglebius#define PASSWORD_NAME NULL 456290001Sglebius#define PASSWORD_DESC NULL 457290001Sglebius#define PASSWORD_name NULL 458290001Sglebius#endif /* AUTOKEY */ 459181834Sroberto 460290001Sglebius/** 461290001Sglebius * export-passwd option description: 462181834Sroberto */ 463290001Sglebius#ifdef AUTOKEY 464290001Sglebius/** Descriptive text for the export-passwd option */ 465290001Sglebius#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1639) 466290001Sglebius/** Upper-cased name for the export-passwd option */ 467290001Sglebius#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1681) 468290001Sglebius/** Name string for the export-passwd option */ 469290001Sglebius#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1695) 470290001Sglebius/** Compiled in flag settings for the export-passwd option */ 471290001Sglebius#define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \ 472181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 473181834Sroberto 474290001Sglebius#else /* disable export-passwd */ 475290001Sglebius#define EXPORT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 476290001Sglebius#define EXPORT_PASSWD_NAME NULL 477290001Sglebius#define EXPORT_PASSWD_DESC NULL 478290001Sglebius#define EXPORT_PASSWD_name NULL 479290001Sglebius#endif /* AUTOKEY */ 480181834Sroberto 481290001Sglebius/** 482290001Sglebius * sign-key option description: 483181834Sroberto */ 484290001Sglebius#ifdef AUTOKEY 485290001Sglebius/** Descriptive text for the sign-key option */ 486290001Sglebius#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1709) 487290001Sglebius/** Upper-cased name for the sign-key option */ 488290001Sglebius#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1740) 489290001Sglebius/** Name string for the sign-key option */ 490290001Sglebius#define SIGN_KEY_name (ntp_keygen_opt_strs+1749) 491290001Sglebius/** Compiled in flag settings for the sign-key option */ 492290001Sglebius#define SIGN_KEY_FLAGS (OPTST_DISABLED \ 493181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 494181834Sroberto 495290001Sglebius#else /* disable sign-key */ 496290001Sglebius#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 497290001Sglebius#define SIGN_KEY_NAME NULL 498290001Sglebius#define SIGN_KEY_DESC NULL 499290001Sglebius#define SIGN_KEY_name NULL 500290001Sglebius#endif /* AUTOKEY */ 501181834Sroberto 502290001Sglebius/** 503290001Sglebius * subject-name option description: 504181834Sroberto */ 505290001Sglebius#ifdef AUTOKEY 506290001Sglebius/** Descriptive text for the subject-name option */ 507290001Sglebius#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1758) 508290001Sglebius/** Upper-cased name for the subject-name option */ 509290001Sglebius#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1793) 510290001Sglebius/** Name string for the subject-name option */ 511290001Sglebius#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1806) 512290001Sglebius/** Compiled in flag settings for the subject-name option */ 513290001Sglebius#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \ 514181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 515181834Sroberto 516290001Sglebius#else /* disable subject-name */ 517290001Sglebius#define SUBJECT_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 518290001Sglebius#define SUBJECT_NAME_NAME NULL 519290001Sglebius#define SUBJECT_NAME_DESC NULL 520290001Sglebius#define SUBJECT_NAME_name NULL 521290001Sglebius#endif /* AUTOKEY */ 522181834Sroberto 523290001Sglebius/** 524290001Sglebius * trusted-cert option description: 525181834Sroberto */ 526290001Sglebius#ifdef AUTOKEY 527290001Sglebius/** Descriptive text for the trusted-cert option */ 528290001Sglebius#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1819) 529290001Sglebius/** Upper-cased name for the trusted-cert option */ 530290001Sglebius#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1851) 531290001Sglebius/** Name string for the trusted-cert option */ 532290001Sglebius#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1864) 533290001Sglebius/** Compiled in flag settings for the trusted-cert option */ 534290001Sglebius#define TRUSTED_CERT_FLAGS (OPTST_DISABLED) 535181834Sroberto 536290001Sglebius#else /* disable trusted-cert */ 537290001Sglebius#define TRUSTED_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 538290001Sglebius#define TRUSTED_CERT_NAME NULL 539290001Sglebius#define TRUSTED_CERT_DESC NULL 540290001Sglebius#define TRUSTED_CERT_name NULL 541290001Sglebius#endif /* AUTOKEY */ 542181834Sroberto 543290001Sglebius/** 544290001Sglebius * mv-params option description: 545181834Sroberto */ 546290001Sglebius#ifdef AUTOKEY 547290001Sglebius/** Descriptive text for the mv-params option */ 548290001Sglebius#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1877) 549290001Sglebius/** Upper-cased name for the mv-params option */ 550290001Sglebius#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1906) 551290001Sglebius/** Name string for the mv-params option */ 552290001Sglebius#define MV_PARAMS_name (ntp_keygen_opt_strs+1916) 553290001Sglebius/** Compiled in flag settings for the mv-params option */ 554290001Sglebius#define MV_PARAMS_FLAGS (OPTST_DISABLED \ 555181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 556181834Sroberto 557290001Sglebius#else /* disable mv-params */ 558290001Sglebius#define MV_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 559290001Sglebius#define MV_PARAMS_NAME NULL 560290001Sglebius#define MV_PARAMS_DESC NULL 561290001Sglebius#define MV_PARAMS_name NULL 562290001Sglebius#endif /* AUTOKEY */ 563181834Sroberto 564290001Sglebius/** 565290001Sglebius * mv-keys option description: 566181834Sroberto */ 567290001Sglebius#ifdef AUTOKEY 568290001Sglebius/** Descriptive text for the mv-keys option */ 569290001Sglebius#define MV_KEYS_DESC (ntp_keygen_opt_strs+1926) 570290001Sglebius/** Upper-cased name for the mv-keys option */ 571290001Sglebius#define MV_KEYS_NAME (ntp_keygen_opt_strs+1947) 572290001Sglebius/** Name string for the mv-keys option */ 573290001Sglebius#define MV_KEYS_name (ntp_keygen_opt_strs+1955) 574290001Sglebius/** Compiled in flag settings for the mv-keys option */ 575290001Sglebius#define MV_KEYS_FLAGS (OPTST_DISABLED \ 576181834Sroberto | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 577181834Sroberto 578290001Sglebius#else /* disable mv-keys */ 579290001Sglebius#define MV_KEYS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 580290001Sglebius#define MV_KEYS_NAME NULL 581290001Sglebius#define MV_KEYS_DESC NULL 582290001Sglebius#define MV_KEYS_name NULL 583290001Sglebius#endif /* AUTOKEY */ 584181834Sroberto 585181834Sroberto/* 586181834Sroberto * Help/More_Help/Version option descriptions: 587181834Sroberto */ 588290001Sglebius#define HELP_DESC (ntp_keygen_opt_strs+1963) 589290001Sglebius#define HELP_name (ntp_keygen_opt_strs+2007) 590290001Sglebius#ifdef HAVE_WORKING_FORK 591290001Sglebius#define MORE_HELP_DESC (ntp_keygen_opt_strs+2012) 592290001Sglebius#define MORE_HELP_name (ntp_keygen_opt_strs+2057) 593290001Sglebius#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 594290001Sglebius#else 595290001Sglebius#define MORE_HELP_DESC HELP_DESC 596290001Sglebius#define MORE_HELP_name HELP_name 597290001Sglebius#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 598290001Sglebius#endif 599290001Sglebius#ifdef NO_OPTIONAL_OPT_ARGS 600290001Sglebius# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 601290001Sglebius#else 602290001Sglebius# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 603290001Sglebius OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 604290001Sglebius#endif 605290001Sglebius#define VER_DESC (ntp_keygen_opt_strs+2067) 606290001Sglebius#define VER_name (ntp_keygen_opt_strs+2103) 607290001Sglebius#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2111) 608290001Sglebius#define SAVE_OPTS_name (ntp_keygen_opt_strs+2150) 609290001Sglebius#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2160) 610290001Sglebius#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2192) 611290001Sglebius#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2202) 612290001Sglebius#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2215) 613290001Sglebius#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) 614290001Sglebius/** 615181834Sroberto * Declare option callback procedures 616181834Sroberto */ 617290001Sglebius#ifdef AUTOKEY 618290001Sglebius static tOptProc doOptImbits; 619290001Sglebius#else /* not AUTOKEY */ 620290001Sglebius# define doOptImbits NULL 621290001Sglebius#endif /* def/not AUTOKEY */ 622290001Sglebius#ifdef AUTOKEY 623181834Sroberto static tOptProc doOptModulus; 624290001Sglebius#else /* not AUTOKEY */ 625181834Sroberto# define doOptModulus NULL 626290001Sglebius#endif /* def/not AUTOKEY */ 627181834Srobertoextern tOptProc 628290001Sglebius ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, 629290001Sglebius optionNumericVal, optionPagedUsage, optionResetOpt, 630290001Sglebius optionStackArg, optionTimeDate, optionTimeVal, 631290001Sglebius optionUnstackArg, optionVendorOption; 632181834Srobertostatic tOptProc 633290001Sglebius doOptDebug_Level, doUsageOpt; 634290001Sglebius#define VER_PROC ntpOptionPrintVersion 635181834Sroberto 636290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 637290001Sglebius/** 638290001Sglebius * Define the ntp-keygen Option Descriptions. 639290001Sglebius * This is an array of OPTION_CT entries, one for each 640290001Sglebius * option that the ntp-keygen program responds to. 641181834Sroberto */ 642290001Sglebiusstatic tOptDesc optDesc[OPTION_CT] = { 643290001Sglebius { /* entry idx, value */ 0, VALUE_OPT_IMBITS, 644290001Sglebius /* equiv idx, value */ 0, VALUE_OPT_IMBITS, 645290001Sglebius /* equivalenced to */ NO_EQUIVALENT, 646290001Sglebius /* min, max, act ct */ 0, 1, 0, 647290001Sglebius /* opt state flags */ IMBITS_FLAGS, 0, 648290001Sglebius /* last opt argumnt */ { NULL }, /* --imbits */ 649290001Sglebius /* arg list/cookie */ NULL, 650290001Sglebius /* must/cannot opts */ NULL, NULL, 651290001Sglebius /* option proc */ doOptImbits, 652290001Sglebius /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name, 653290001Sglebius /* disablement strs */ NULL, NULL }, 654181834Sroberto 655290001Sglebius { /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE, 656290001Sglebius /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE, 657181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 658181834Sroberto /* min, max, act ct */ 0, 1, 0, 659181834Sroberto /* opt state flags */ CERTIFICATE_FLAGS, 0, 660290001Sglebius /* last opt argumnt */ { NULL }, /* --certificate */ 661181834Sroberto /* arg list/cookie */ NULL, 662181834Sroberto /* must/cannot opts */ NULL, NULL, 663181834Sroberto /* option proc */ NULL, 664290001Sglebius /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name, 665181834Sroberto /* disablement strs */ NULL, NULL }, 666181834Sroberto 667290001Sglebius { /* entry idx, value */ 2, VALUE_OPT_CIPHER, 668290001Sglebius /* equiv idx, value */ 2, VALUE_OPT_CIPHER, 669181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 670290001Sglebius /* min, max, act ct */ 0, 1, 0, 671290001Sglebius /* opt state flags */ CIPHER_FLAGS, 0, 672290001Sglebius /* last opt argumnt */ { NULL }, /* --cipher */ 673290001Sglebius /* arg list/cookie */ NULL, 674290001Sglebius /* must/cannot opts */ NULL, NULL, 675290001Sglebius /* option proc */ NULL, 676290001Sglebius /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name, 677290001Sglebius /* disablement strs */ NULL, NULL }, 678290001Sglebius 679290001Sglebius { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 680290001Sglebius /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 681290001Sglebius /* equivalenced to */ NO_EQUIVALENT, 682181834Sroberto /* min, max, act ct */ 0, NOLIMIT, 0, 683181834Sroberto /* opt state flags */ DEBUG_LEVEL_FLAGS, 0, 684290001Sglebius /* last opt argumnt */ { NULL }, /* --debug-level */ 685181834Sroberto /* arg list/cookie */ NULL, 686181834Sroberto /* must/cannot opts */ NULL, NULL, 687290001Sglebius /* option proc */ doOptDebug_Level, 688290001Sglebius /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, 689181834Sroberto /* disablement strs */ NULL, NULL }, 690181834Sroberto 691290001Sglebius { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 692290001Sglebius /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 693181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 694181834Sroberto /* min, max, act ct */ 0, NOLIMIT, 0, 695181834Sroberto /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0, 696290001Sglebius /* last opt argumnt */ { NULL }, /* --set-debug-level */ 697181834Sroberto /* arg list/cookie */ NULL, 698181834Sroberto /* must/cannot opts */ NULL, NULL, 699290001Sglebius /* option proc */ optionNumericVal, 700290001Sglebius /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name, 701181834Sroberto /* disablement strs */ NULL, NULL }, 702181834Sroberto 703290001Sglebius { /* entry idx, value */ 5, VALUE_OPT_ID_KEY, 704290001Sglebius /* equiv idx, value */ 5, VALUE_OPT_ID_KEY, 705181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 706181834Sroberto /* min, max, act ct */ 0, 1, 0, 707181834Sroberto /* opt state flags */ ID_KEY_FLAGS, 0, 708290001Sglebius /* last opt argumnt */ { NULL }, /* --id-key */ 709181834Sroberto /* arg list/cookie */ NULL, 710181834Sroberto /* must/cannot opts */ NULL, NULL, 711181834Sroberto /* option proc */ NULL, 712290001Sglebius /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name, 713181834Sroberto /* disablement strs */ NULL, NULL }, 714181834Sroberto 715290001Sglebius { /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS, 716290001Sglebius /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS, 717181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 718181834Sroberto /* min, max, act ct */ 0, 1, 0, 719181834Sroberto /* opt state flags */ GQ_PARAMS_FLAGS, 0, 720290001Sglebius /* last opt argumnt */ { NULL }, /* --gq-params */ 721181834Sroberto /* arg list/cookie */ NULL, 722181834Sroberto /* must/cannot opts */ NULL, NULL, 723181834Sroberto /* option proc */ NULL, 724290001Sglebius /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name, 725181834Sroberto /* disablement strs */ NULL, NULL }, 726181834Sroberto 727290001Sglebius { /* entry idx, value */ 7, VALUE_OPT_HOST_KEY, 728290001Sglebius /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY, 729181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 730181834Sroberto /* min, max, act ct */ 0, 1, 0, 731290001Sglebius /* opt state flags */ HOST_KEY_FLAGS, 0, 732290001Sglebius /* last opt argumnt */ { NULL }, /* --host-key */ 733181834Sroberto /* arg list/cookie */ NULL, 734181834Sroberto /* must/cannot opts */ NULL, NULL, 735181834Sroberto /* option proc */ NULL, 736290001Sglebius /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name, 737181834Sroberto /* disablement strs */ NULL, NULL }, 738181834Sroberto 739290001Sglebius { /* entry idx, value */ 8, VALUE_OPT_IFFKEY, 740290001Sglebius /* equiv idx, value */ 8, VALUE_OPT_IFFKEY, 741181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 742181834Sroberto /* min, max, act ct */ 0, 1, 0, 743290001Sglebius /* opt state flags */ IFFKEY_FLAGS, 0, 744290001Sglebius /* last opt argumnt */ { NULL }, /* --iffkey */ 745181834Sroberto /* arg list/cookie */ NULL, 746181834Sroberto /* must/cannot opts */ NULL, NULL, 747181834Sroberto /* option proc */ NULL, 748290001Sglebius /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name, 749181834Sroberto /* disablement strs */ NULL, NULL }, 750181834Sroberto 751290001Sglebius { /* entry idx, value */ 9, VALUE_OPT_IDENT, 752290001Sglebius /* equiv idx, value */ 9, VALUE_OPT_IDENT, 753181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 754181834Sroberto /* min, max, act ct */ 0, 1, 0, 755290001Sglebius /* opt state flags */ IDENT_FLAGS, 0, 756290001Sglebius /* last opt argumnt */ { NULL }, /* --ident */ 757181834Sroberto /* arg list/cookie */ NULL, 758181834Sroberto /* must/cannot opts */ NULL, NULL, 759181834Sroberto /* option proc */ NULL, 760290001Sglebius /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name, 761181834Sroberto /* disablement strs */ NULL, NULL }, 762181834Sroberto 763290001Sglebius { /* entry idx, value */ 10, VALUE_OPT_LIFETIME, 764290001Sglebius /* equiv idx, value */ 10, VALUE_OPT_LIFETIME, 765181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 766181834Sroberto /* min, max, act ct */ 0, 1, 0, 767290001Sglebius /* opt state flags */ LIFETIME_FLAGS, 0, 768290001Sglebius /* last opt argumnt */ { NULL }, /* --lifetime */ 769181834Sroberto /* arg list/cookie */ NULL, 770181834Sroberto /* must/cannot opts */ NULL, NULL, 771290001Sglebius /* option proc */ optionNumericVal, 772290001Sglebius /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name, 773181834Sroberto /* disablement strs */ NULL, NULL }, 774181834Sroberto 775290001Sglebius { /* entry idx, value */ 11, VALUE_OPT_MD5KEY, 776290001Sglebius /* equiv idx, value */ 11, VALUE_OPT_MD5KEY, 777181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 778181834Sroberto /* min, max, act ct */ 0, 1, 0, 779181834Sroberto /* opt state flags */ MD5KEY_FLAGS, 0, 780290001Sglebius /* last opt argumnt */ { NULL }, /* --md5key */ 781181834Sroberto /* arg list/cookie */ NULL, 782181834Sroberto /* must/cannot opts */ NULL, NULL, 783181834Sroberto /* option proc */ NULL, 784290001Sglebius /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name, 785181834Sroberto /* disablement strs */ NULL, NULL }, 786181834Sroberto 787290001Sglebius { /* entry idx, value */ 12, VALUE_OPT_MODULUS, 788290001Sglebius /* equiv idx, value */ 12, VALUE_OPT_MODULUS, 789181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 790181834Sroberto /* min, max, act ct */ 0, 1, 0, 791181834Sroberto /* opt state flags */ MODULUS_FLAGS, 0, 792290001Sglebius /* last opt argumnt */ { NULL }, /* --modulus */ 793181834Sroberto /* arg list/cookie */ NULL, 794181834Sroberto /* must/cannot opts */ NULL, NULL, 795181834Sroberto /* option proc */ doOptModulus, 796290001Sglebius /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name, 797181834Sroberto /* disablement strs */ NULL, NULL }, 798181834Sroberto 799290001Sglebius { /* entry idx, value */ 13, VALUE_OPT_PVT_CERT, 800290001Sglebius /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT, 801181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 802181834Sroberto /* min, max, act ct */ 0, 1, 0, 803181834Sroberto /* opt state flags */ PVT_CERT_FLAGS, 0, 804290001Sglebius /* last opt argumnt */ { NULL }, /* --pvt-cert */ 805181834Sroberto /* arg list/cookie */ NULL, 806181834Sroberto /* must/cannot opts */ NULL, NULL, 807181834Sroberto /* option proc */ NULL, 808290001Sglebius /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name, 809181834Sroberto /* disablement strs */ NULL, NULL }, 810181834Sroberto 811290001Sglebius { /* entry idx, value */ 14, VALUE_OPT_PASSWORD, 812290001Sglebius /* equiv idx, value */ 14, VALUE_OPT_PASSWORD, 813181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 814181834Sroberto /* min, max, act ct */ 0, 1, 0, 815290001Sglebius /* opt state flags */ PASSWORD_FLAGS, 0, 816290001Sglebius /* last opt argumnt */ { NULL }, /* --password */ 817181834Sroberto /* arg list/cookie */ NULL, 818181834Sroberto /* must/cannot opts */ NULL, NULL, 819181834Sroberto /* option proc */ NULL, 820290001Sglebius /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name, 821181834Sroberto /* disablement strs */ NULL, NULL }, 822181834Sroberto 823290001Sglebius { /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 824290001Sglebius /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD, 825181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 826181834Sroberto /* min, max, act ct */ 0, 1, 0, 827290001Sglebius /* opt state flags */ EXPORT_PASSWD_FLAGS, 0, 828290001Sglebius /* last opt argumnt */ { NULL }, /* --export-passwd */ 829181834Sroberto /* arg list/cookie */ NULL, 830181834Sroberto /* must/cannot opts */ NULL, NULL, 831181834Sroberto /* option proc */ NULL, 832290001Sglebius /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name, 833181834Sroberto /* disablement strs */ NULL, NULL }, 834181834Sroberto 835290001Sglebius { /* entry idx, value */ 16, VALUE_OPT_SIGN_KEY, 836290001Sglebius /* equiv idx, value */ 16, VALUE_OPT_SIGN_KEY, 837181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 838181834Sroberto /* min, max, act ct */ 0, 1, 0, 839181834Sroberto /* opt state flags */ SIGN_KEY_FLAGS, 0, 840290001Sglebius /* last opt argumnt */ { NULL }, /* --sign-key */ 841181834Sroberto /* arg list/cookie */ NULL, 842181834Sroberto /* must/cannot opts */ NULL, NULL, 843181834Sroberto /* option proc */ NULL, 844290001Sglebius /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name, 845181834Sroberto /* disablement strs */ NULL, NULL }, 846181834Sroberto 847290001Sglebius { /* entry idx, value */ 17, VALUE_OPT_SUBJECT_NAME, 848290001Sglebius /* equiv idx, value */ 17, VALUE_OPT_SUBJECT_NAME, 849181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 850181834Sroberto /* min, max, act ct */ 0, 1, 0, 851181834Sroberto /* opt state flags */ SUBJECT_NAME_FLAGS, 0, 852290001Sglebius /* last opt argumnt */ { NULL }, /* --subject-name */ 853181834Sroberto /* arg list/cookie */ NULL, 854181834Sroberto /* must/cannot opts */ NULL, NULL, 855181834Sroberto /* option proc */ NULL, 856290001Sglebius /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name, 857181834Sroberto /* disablement strs */ NULL, NULL }, 858181834Sroberto 859290001Sglebius { /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 860290001Sglebius /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT, 861181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 862181834Sroberto /* min, max, act ct */ 0, 1, 0, 863181834Sroberto /* opt state flags */ TRUSTED_CERT_FLAGS, 0, 864290001Sglebius /* last opt argumnt */ { NULL }, /* --trusted-cert */ 865181834Sroberto /* arg list/cookie */ NULL, 866181834Sroberto /* must/cannot opts */ NULL, NULL, 867181834Sroberto /* option proc */ NULL, 868290001Sglebius /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name, 869181834Sroberto /* disablement strs */ NULL, NULL }, 870181834Sroberto 871290001Sglebius { /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS, 872290001Sglebius /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS, 873181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 874181834Sroberto /* min, max, act ct */ 0, 1, 0, 875181834Sroberto /* opt state flags */ MV_PARAMS_FLAGS, 0, 876290001Sglebius /* last opt argumnt */ { NULL }, /* --mv-params */ 877181834Sroberto /* arg list/cookie */ NULL, 878181834Sroberto /* must/cannot opts */ NULL, NULL, 879181834Sroberto /* option proc */ optionNumericVal, 880290001Sglebius /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name, 881181834Sroberto /* disablement strs */ NULL, NULL }, 882181834Sroberto 883290001Sglebius { /* entry idx, value */ 20, VALUE_OPT_MV_KEYS, 884290001Sglebius /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS, 885181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 886181834Sroberto /* min, max, act ct */ 0, 1, 0, 887181834Sroberto /* opt state flags */ MV_KEYS_FLAGS, 0, 888290001Sglebius /* last opt argumnt */ { NULL }, /* --mv-keys */ 889181834Sroberto /* arg list/cookie */ NULL, 890181834Sroberto /* must/cannot opts */ NULL, NULL, 891181834Sroberto /* option proc */ optionNumericVal, 892290001Sglebius /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name, 893181834Sroberto /* disablement strs */ NULL, NULL }, 894181834Sroberto 895181834Sroberto { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, 896290001Sglebius /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, 897181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 898181834Sroberto /* min, max, act ct */ 0, 1, 0, 899290001Sglebius /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 900181834Sroberto /* last opt argumnt */ { NULL }, 901181834Sroberto /* arg list/cookie */ NULL, 902181834Sroberto /* must/cannot opts */ NULL, NULL, 903290001Sglebius /* option proc */ VER_PROC, 904290001Sglebius /* desc, NAME, name */ VER_DESC, NULL, VER_name, 905181834Sroberto /* disablement strs */ NULL, NULL }, 906181834Sroberto 907181834Sroberto 908181834Sroberto 909181834Sroberto { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, 910290001Sglebius /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, 911181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 912181834Sroberto /* min, max, act ct */ 0, 1, 0, 913290001Sglebius /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 914181834Sroberto /* last opt argumnt */ { NULL }, 915181834Sroberto /* arg list/cookie */ NULL, 916181834Sroberto /* must/cannot opts */ NULL, NULL, 917181834Sroberto /* option proc */ doUsageOpt, 918290001Sglebius /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 919181834Sroberto /* disablement strs */ NULL, NULL }, 920181834Sroberto 921181834Sroberto { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, 922290001Sglebius /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, 923181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 924181834Sroberto /* min, max, act ct */ 0, 1, 0, 925290001Sglebius /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 926181834Sroberto /* last opt argumnt */ { NULL }, 927181834Sroberto /* arg list/cookie */ NULL, 928181834Sroberto /* must/cannot opts */ NULL, NULL, 929181834Sroberto /* option proc */ optionPagedUsage, 930290001Sglebius /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 931181834Sroberto /* disablement strs */ NULL, NULL }, 932181834Sroberto 933181834Sroberto { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS, 934290001Sglebius /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS, 935181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 936181834Sroberto /* min, max, act ct */ 0, 1, 0, 937181834Sroberto /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 938290001Sglebius | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS, 939181834Sroberto /* last opt argumnt */ { NULL }, 940181834Sroberto /* arg list/cookie */ NULL, 941181834Sroberto /* must/cannot opts */ NULL, NULL, 942181834Sroberto /* option proc */ NULL, 943290001Sglebius /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name, 944181834Sroberto /* disablement strs */ NULL, NULL }, 945181834Sroberto 946181834Sroberto { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS, 947290001Sglebius /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS, 948181834Sroberto /* equivalenced to */ NO_EQUIVALENT, 949181834Sroberto /* min, max, act ct */ 0, NOLIMIT, 0, 950290001Sglebius /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 951290001Sglebius | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS, 952181834Sroberto /* last opt argumnt */ { NULL }, 953181834Sroberto /* arg list/cookie */ NULL, 954181834Sroberto /* must/cannot opts */ NULL, NULL, 955181834Sroberto /* option proc */ optionLoadOpt, 956290001Sglebius /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name, 957290001Sglebius /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx } 958181834Sroberto}; 959181834Sroberto 960181834Sroberto 961290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 962290001Sglebius/** Reference to the upper cased version of ntp-keygen. */ 963290001Sglebius#define zPROGNAME (ntp_keygen_opt_strs+2218) 964290001Sglebius/** Reference to the title line for ntp-keygen usage. */ 965290001Sglebius#define zUsageTitle (ntp_keygen_opt_strs+2229) 966290001Sglebius/** ntp-keygen configuration file name. */ 967290001Sglebius#define zRcName (ntp_keygen_opt_strs+2351) 968290001Sglebius/** Directories to search for ntp-keygen config files. */ 969290001Sglebiusstatic char const * const apzHomeList[3] = { 970290001Sglebius ntp_keygen_opt_strs+2343, 971290001Sglebius ntp_keygen_opt_strs+2349, 972290001Sglebius NULL }; 973290001Sglebius/** The ntp-keygen program bug email address. */ 974290001Sglebius#define zBugsAddr (ntp_keygen_opt_strs+2358) 975290001Sglebius/** Clarification/explanation of what ntp-keygen does. */ 976290001Sglebius#define zExplain (ntp_keygen_opt_strs+2392) 977290001Sglebius/** Extra detail explaining what ntp-keygen does. */ 978290001Sglebius#define zDetail (NULL) 979290001Sglebius/** The full version string for ntp-keygen. */ 980290001Sglebius#define zFullVersion (ntp_keygen_opt_strs+2394) 981290001Sglebius/* extracted from optcode.tlib near line 364 */ 982181834Sroberto 983181834Sroberto#if defined(ENABLE_NLS) 984181834Sroberto# define OPTPROC_BASE OPTPROC_TRANSLATE 985181834Sroberto static tOptionXlateProc translate_option_strings; 986181834Sroberto#else 987181834Sroberto# define OPTPROC_BASE OPTPROC_NONE 988181834Sroberto# define translate_option_strings NULL 989181834Sroberto#endif /* ENABLE_NLS */ 990181834Sroberto 991290001Sglebius#define ntp_keygen_full_usage (NULL) 992290001Sglebius#define ntp_keygen_short_usage (NULL) 993181834Sroberto 994290001Sglebius#endif /* not defined __doxygen__ */ 995290001Sglebius 996181834Sroberto/* 997181834Sroberto * Create the static procedure(s) declared above. 998181834Sroberto */ 999290001Sglebius/** 1000290001Sglebius * The callout function that invokes the optionUsage function. 1001290001Sglebius * 1002290001Sglebius * @param[in] opts the AutoOpts option description structure 1003290001Sglebius * @param[in] od the descriptor for the "help" (usage) option. 1004290001Sglebius * @noreturn 1005290001Sglebius */ 1006181834Srobertostatic void 1007290001SglebiusdoUsageOpt(tOptions * opts, tOptDesc * od) 1008181834Sroberto{ 1009290001Sglebius int ex_code; 1010290001Sglebius ex_code = NTP_KEYGEN_EXIT_SUCCESS; 1011290001Sglebius optionUsage(&ntp_keygenOptions, ex_code); 1012290001Sglebius /* NOTREACHED */ 1013290001Sglebius exit(1); 1014290001Sglebius (void)opts; 1015290001Sglebius (void)od; 1016181834Sroberto} 1017181834Sroberto 1018290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1019290001Sglebius/** 1020290001Sglebius * Code to handle the imbits option, when AUTOKEY is #define-d. 1021290001Sglebius * The number of bits in the identity modulus. The default is 256. 1022290001Sglebius * @param[in] pOptions the ntp-keygen options data structure 1023290001Sglebius * @param[in,out] pOptDesc the option descriptor for this option. 1024290001Sglebius */ 1025290001Sglebius#ifdef AUTOKEY 1026290001Sglebiusstatic void 1027290001SglebiusdoOptImbits(tOptions* pOptions, tOptDesc* pOptDesc) 1028290001Sglebius{ 1029290001Sglebius static struct {long rmin, rmax;} const rng[1] = { 1030290001Sglebius { 256, 2048 } }; 1031290001Sglebius int ix; 1032181834Sroberto 1033290001Sglebius if (pOptions <= OPTPROC_EMIT_LIMIT) 1034290001Sglebius goto emit_ranges; 1035290001Sglebius optionNumericVal(pOptions, pOptDesc); 1036290001Sglebius 1037290001Sglebius for (ix = 0; ix < 1; ix++) { 1038290001Sglebius if (pOptDesc->optArg.argInt < rng[ix].rmin) 1039290001Sglebius continue; /* ranges need not be ordered. */ 1040290001Sglebius if (pOptDesc->optArg.argInt == rng[ix].rmin) 1041290001Sglebius return; 1042290001Sglebius if (rng[ix].rmax == LONG_MIN) 1043290001Sglebius continue; 1044290001Sglebius if (pOptDesc->optArg.argInt <= rng[ix].rmax) 1045290001Sglebius return; 1046290001Sglebius } 1047290001Sglebius 1048290001Sglebius option_usage_fp = stderr; 1049290001Sglebius 1050290001Sglebius emit_ranges: 1051290001SglebiusoptionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1052290001Sglebius} 1053290001Sglebius#endif /* defined AUTOKEY */ 1054290001Sglebius 1055290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1056290001Sglebius/** 1057290001Sglebius * Code to handle the debug-level option. 1058181834Sroberto * 1059290001Sglebius * @param[in] pOptions the ntp-keygen options data structure 1060290001Sglebius * @param[in,out] pOptDesc the option descriptor for this option. 1061181834Sroberto */ 1062181834Srobertostatic void 1063290001SglebiusdoOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc) 1064181834Sroberto{ 1065290001Sglebius /* 1066290001Sglebius * Be sure the flag-code[0] handles special values for the options pointer 1067290001Sglebius * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit 1068290001Sglebius * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to 1069290001Sglebius * reset its state. 1070290001Sglebius */ 1071290001Sglebius /* extracted from debug-opt.def, line 15 */ 1072290001SglebiusOPT_VALUE_SET_DEBUG_LEVEL++; 1073290001Sglebius (void)pOptDesc; 1074290001Sglebius (void)pOptions; 1075181834Sroberto} 1076181834Sroberto 1077290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1078290001Sglebius/** 1079290001Sglebius * Code to handle the modulus option, when AUTOKEY is #define-d. 1080290001Sglebius * The number of bits in the prime modulus. The default is 512. 1081290001Sglebius * @param[in] pOptions the ntp-keygen options data structure 1082290001Sglebius * @param[in,out] pOptDesc the option descriptor for this option. 1083181834Sroberto */ 1084290001Sglebius#ifdef AUTOKEY 1085181834Srobertostatic void 1086290001SglebiusdoOptModulus(tOptions* pOptions, tOptDesc* pOptDesc) 1087181834Sroberto{ 1088290001Sglebius static struct {long rmin, rmax;} const rng[1] = { 1089181834Sroberto { 256, 2048 } }; 1090290001Sglebius int ix; 1091181834Sroberto 1092290001Sglebius if (pOptions <= OPTPROC_EMIT_LIMIT) 1093181834Sroberto goto emit_ranges; 1094290001Sglebius optionNumericVal(pOptions, pOptDesc); 1095181834Sroberto 1096181834Sroberto for (ix = 0; ix < 1; ix++) { 1097290001Sglebius if (pOptDesc->optArg.argInt < rng[ix].rmin) 1098181834Sroberto continue; /* ranges need not be ordered. */ 1099290001Sglebius if (pOptDesc->optArg.argInt == rng[ix].rmin) 1100290001Sglebius return; 1101290001Sglebius if (rng[ix].rmax == LONG_MIN) 1102181834Sroberto continue; 1103290001Sglebius if (pOptDesc->optArg.argInt <= rng[ix].rmax) 1104290001Sglebius return; 1105181834Sroberto } 1106181834Sroberto 1107181834Sroberto option_usage_fp = stderr; 1108181834Sroberto 1109290001Sglebius emit_ranges: 1110290001SglebiusoptionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); 1111290001Sglebius} 1112290001Sglebius#endif /* defined AUTOKEY */ 1113290001Sglebius/* extracted from optmain.tlib near line 1250 */ 1114181834Sroberto 1115290001Sglebius/** 1116290001Sglebius * The directory containing the data associated with ntp-keygen. 1117290001Sglebius */ 1118290001Sglebius#ifndef PKGDATADIR 1119290001Sglebius# define PKGDATADIR "" 1120290001Sglebius#endif 1121181834Sroberto 1122290001Sglebius/** 1123290001Sglebius * Information about the person or institution that packaged ntp-keygen 1124290001Sglebius * for the current distribution. 1125290001Sglebius */ 1126290001Sglebius#ifndef WITH_PACKAGER 1127290001Sglebius# define ntp_keygen_packager_info NULL 1128290001Sglebius#else 1129290001Sglebius/** Packager information for ntp-keygen. */ 1130290001Sglebiusstatic char const ntp_keygen_packager_info[] = 1131290001Sglebius "Packaged by " WITH_PACKAGER 1132181834Sroberto 1133290001Sglebius# ifdef WITH_PACKAGER_VERSION 1134290001Sglebius " ("WITH_PACKAGER_VERSION")" 1135290001Sglebius# endif 1136181834Sroberto 1137290001Sglebius# ifdef WITH_PACKAGER_BUG_REPORTS 1138290001Sglebius "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS 1139290001Sglebius# endif 1140290001Sglebius "\n"; 1141290001Sglebius#endif 1142290001Sglebius#ifndef __doxygen__ 1143181834Sroberto 1144290001Sglebius#endif /* __doxygen__ */ 1145290001Sglebius/** 1146290001Sglebius * The option definitions for ntp-keygen. The one structure that 1147290001Sglebius * binds them all. 1148290001Sglebius */ 1149290001SglebiustOptions ntp_keygenOptions = { 1150290001Sglebius OPTIONS_STRUCT_VERSION, 1151290001Sglebius 0, NULL, /* original argc + argv */ 1152290001Sglebius ( OPTPROC_BASE 1153290001Sglebius + OPTPROC_ERRSTOP 1154290001Sglebius + OPTPROC_SHORTOPT 1155290001Sglebius + OPTPROC_LONGOPT 1156290001Sglebius + OPTPROC_NO_REQ_OPT 1157290001Sglebius + OPTPROC_ENVIRON 1158290001Sglebius + OPTPROC_NO_ARGS 1159290001Sglebius + OPTPROC_MISUSE ), 1160290001Sglebius 0, NULL, /* current option index, current option */ 1161290001Sglebius NULL, NULL, zPROGNAME, 1162290001Sglebius zRcName, zCopyright, zLicenseDescrip, 1163290001Sglebius zFullVersion, apzHomeList, zUsageTitle, 1164290001Sglebius zExplain, zDetail, optDesc, 1165290001Sglebius zBugsAddr, /* address to send bugs to */ 1166290001Sglebius NULL, NULL, /* extensions/saved state */ 1167290001Sglebius optionUsage, /* usage procedure */ 1168290001Sglebius translate_option_strings, /* translation procedure */ 1169290001Sglebius /* 1170290001Sglebius * Indexes to special options 1171290001Sglebius */ 1172290001Sglebius { INDEX_OPT_MORE_HELP, /* more-help option index */ 1173290001Sglebius INDEX_OPT_SAVE_OPTS, /* save option index */ 1174290001Sglebius NO_EQUIVALENT, /* '-#' option index */ 1175290001Sglebius NO_EQUIVALENT /* index of default opt */ 1176290001Sglebius }, 1177290001Sglebius 26 /* full option count */, 21 /* user option count */, 1178290001Sglebius ntp_keygen_full_usage, ntp_keygen_short_usage, 1179290001Sglebius NULL, NULL, 1180290001Sglebius PKGDATADIR, ntp_keygen_packager_info 1181290001Sglebius}; 1182181834Sroberto 1183181834Sroberto#if ENABLE_NLS 1184290001Sglebius/** 1185290001Sglebius * This code is designed to translate translatable option text for the 1186290001Sglebius * ntp-keygen program. These translations happen upon entry 1187290001Sglebius * to optionProcess(). 1188290001Sglebius */ 1189181834Sroberto#include <stdio.h> 1190181834Sroberto#include <stdlib.h> 1191181834Sroberto#include <string.h> 1192181834Sroberto#include <unistd.h> 1193290001Sglebius#ifdef HAVE_DCGETTEXT 1194290001Sglebius# include <gettext.h> 1195290001Sglebius#endif 1196181834Sroberto#include <autoopts/usage-txt.h> 1197181834Sroberto 1198290001Sglebiusstatic char * AO_gettext(char const * pz); 1199290001Sglebiusstatic void coerce_it(void ** s); 1200181834Sroberto 1201290001Sglebius/** 1202290001Sglebius * AutoGen specific wrapper function for gettext. It relies on the macro _() 1203290001Sglebius * to convert from English to the target language, then strdup-duplicates the 1204290001Sglebius * result string. It tries the "libopts" domain first, then whatever has been 1205290001Sglebius * set via the \a textdomain(3) call. 1206290001Sglebius * 1207290001Sglebius * @param[in] pz the input text used as a lookup key. 1208290001Sglebius * @returns the translated text (if there is one), 1209290001Sglebius * or the original text (if not). 1210290001Sglebius */ 1211290001Sglebiusstatic char * 1212290001SglebiusAO_gettext(char const * pz) 1213181834Sroberto{ 1214290001Sglebius char * res; 1215181834Sroberto if (pz == NULL) 1216181834Sroberto return NULL; 1217290001Sglebius#ifdef HAVE_DCGETTEXT 1218290001Sglebius /* 1219290001Sglebius * While processing the option_xlateable_txt data, try to use the 1220290001Sglebius * "libopts" domain. Once we switch to the option descriptor data, 1221290001Sglebius * do *not* use that domain. 1222290001Sglebius */ 1223290001Sglebius if (option_xlateable_txt.field_ct != 0) { 1224290001Sglebius res = dgettext("libopts", pz); 1225290001Sglebius if (res == pz) 1226290001Sglebius res = (char *)VOIDP(_(pz)); 1227290001Sglebius } else 1228290001Sglebius res = (char *)VOIDP(_(pz)); 1229290001Sglebius#else 1230290001Sglebius res = (char *)VOIDP(_(pz)); 1231290001Sglebius#endif 1232290001Sglebius if (res == pz) 1233290001Sglebius return res; 1234290001Sglebius res = strdup(res); 1235290001Sglebius if (res == NULL) { 1236290001Sglebius fputs(_("No memory for duping translated strings\n"), stderr); 1237290001Sglebius exit(NTP_KEYGEN_EXIT_FAILURE); 1238181834Sroberto } 1239290001Sglebius return res; 1240181834Sroberto} 1241181834Sroberto 1242290001Sglebius/** 1243290001Sglebius * All the pointers we use are marked "* const", but they are stored in 1244290001Sglebius * writable memory. Coerce the mutability and set the pointer. 1245290001Sglebius */ 1246290001Sglebiusstatic void coerce_it(void ** s) { *s = AO_gettext(*s); 1247290001Sglebius} 1248181834Sroberto 1249290001Sglebius/** 1250290001Sglebius * Translate all the translatable strings in the ntp_keygenOptions 1251290001Sglebius * structure defined above. This is done only once. 1252181834Sroberto */ 1253181834Srobertostatic void 1254290001Sglebiustranslate_option_strings(void) 1255181834Sroberto{ 1256290001Sglebius tOptions * const opts = &ntp_keygenOptions; 1257290001Sglebius 1258181834Sroberto /* 1259181834Sroberto * Guard against re-translation. It won't work. The strings will have 1260181834Sroberto * been changed by the first pass through this code. One shot only. 1261181834Sroberto */ 1262290001Sglebius if (option_xlateable_txt.field_ct != 0) { 1263290001Sglebius /* 1264290001Sglebius * Do the translations. The first pointer follows the field count 1265290001Sglebius * field. The field count field is the size of a pointer. 1266290001Sglebius */ 1267290001Sglebius char ** ppz = (char**)VOIDP(&(option_xlateable_txt)); 1268290001Sglebius int ix = option_xlateable_txt.field_ct; 1269181834Sroberto 1270181834Sroberto do { 1271290001Sglebius ppz++; /* skip over field_ct */ 1272181834Sroberto *ppz = AO_gettext(*ppz); 1273181834Sroberto } while (--ix > 0); 1274290001Sglebius /* prevent re-translation and disable "libopts" domain lookup */ 1275290001Sglebius option_xlateable_txt.field_ct = 0; 1276181834Sroberto 1277290001Sglebius coerce_it(VOIDP(&(opts->pzCopyright))); 1278290001Sglebius coerce_it(VOIDP(&(opts->pzCopyNotice))); 1279290001Sglebius coerce_it(VOIDP(&(opts->pzFullVersion))); 1280290001Sglebius coerce_it(VOIDP(&(opts->pzUsageTitle))); 1281290001Sglebius coerce_it(VOIDP(&(opts->pzExplain))); 1282290001Sglebius coerce_it(VOIDP(&(opts->pzDetail))); 1283290001Sglebius { 1284290001Sglebius tOptDesc * od = opts->pOptDesc; 1285290001Sglebius for (ix = opts->optCt; ix > 0; ix--, od++) 1286290001Sglebius coerce_it(VOIDP(&(od->pzText))); 1287181834Sroberto } 1288181834Sroberto } 1289181834Sroberto} 1290181834Sroberto#endif /* ENABLE_NLS */ 1291181834Sroberto 1292290001Sglebius#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 1293290001Sglebius/** I18N function strictly for xgettext. Do not compile. */ 1294290001Sglebiusstatic void bogus_function(void) { 1295290001Sglebius /* TRANSLATORS: 1296290001Sglebius 1297290001Sglebius The following dummy function was crated solely so that xgettext can 1298290001Sglebius extract the correct strings. These strings are actually referenced 1299290001Sglebius by a field name in the ntp_keygenOptions structure noted in the 1300290001Sglebius comments below. The literal text is defined in ntp_keygen_opt_strs. 1301290001Sglebius 1302290001Sglebius NOTE: the strings below are segmented with respect to the source string 1303290001Sglebius ntp_keygen_opt_strs. The strings above are handed off for translation 1304290001Sglebius at run time a paragraph at a time. Consequently, they are presented here 1305290001Sglebius for translation a paragraph at a time. 1306290001Sglebius 1307290001Sglebius ALSO: often the description for an option will reference another option 1308290001Sglebius by name. These are set off with apostrophe quotes (I hope). Do not 1309290001Sglebius translate option names. 1310290001Sglebius */ 1311290001Sglebius /* referenced via ntp_keygenOptions.pzCopyright */ 1312310419Sdelphij puts(_("ntp-keygen (ntp) 4.2.8p9\n\ 1313294905SdelphijCopyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n\ 1314290001SglebiusThis is free software. It is licensed for use, modification and\n\ 1315290001Sglebiusredistribution under the terms of the NTP License, copies of which\n\ 1316290001Sglebiuscan be seen at:\n")); 1317290001Sglebius puts(_(" <http://ntp.org/license>\n\ 1318290001Sglebius <http://opensource.org/licenses/ntp-license.php>\n")); 1319290001Sglebius 1320290001Sglebius /* referenced via ntp_keygenOptions.pzCopyNotice */ 1321290001Sglebius puts(_("Permission to use, copy, modify, and distribute this software and its\n\ 1322290001Sglebiusdocumentation for any purpose with or without fee is hereby granted,\n\ 1323290001Sglebiusprovided that the above copyright notice appears in all copies and that\n\ 1324290001Sglebiusboth the copyright notice and this permission notice appear in supporting\n\ 1325290001Sglebiusdocumentation, and that the name The University of Delaware not be used in\n\ 1326290001Sglebiusadvertising or publicity pertaining to distribution of the software without\n\ 1327290001Sglebiusspecific, written prior permission. The University of Delaware and Network\n\ 1328290001SglebiusTime Foundation makes no representations about the suitability this\n\ 1329290001Sglebiussoftware for any purpose. It is provided \"as is\" without express or\n\ 1330290001Sglebiusimplied warranty.\n")); 1331290001Sglebius 1332290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1333290001Sglebius puts(_("identity modulus bits")); 1334290001Sglebius 1335290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1336290001Sglebius puts(_("certificate scheme")); 1337290001Sglebius 1338290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1339290001Sglebius puts(_("privatekey cipher")); 1340290001Sglebius 1341290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1342290001Sglebius puts(_("Increase debug verbosity level")); 1343290001Sglebius 1344290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1345290001Sglebius puts(_("Set the debug verbosity level")); 1346290001Sglebius 1347290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1348290001Sglebius puts(_("Write IFF or GQ identity keys")); 1349290001Sglebius 1350290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1351290001Sglebius puts(_("Generate GQ parameters and keys")); 1352290001Sglebius 1353290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1354290001Sglebius puts(_("generate RSA host key")); 1355290001Sglebius 1356290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1357290001Sglebius puts(_("generate IFF parameters")); 1358290001Sglebius 1359290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1360290001Sglebius puts(_("set Autokey group name")); 1361290001Sglebius 1362290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1363290001Sglebius puts(_("set certificate lifetime")); 1364290001Sglebius 1365290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1366290001Sglebius puts(_("generate MD5 keys")); 1367290001Sglebius 1368290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1369290001Sglebius puts(_("modulus")); 1370290001Sglebius 1371290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1372290001Sglebius puts(_("generate PC private certificate")); 1373290001Sglebius 1374290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1375290001Sglebius puts(_("local private password")); 1376290001Sglebius 1377290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1378290001Sglebius puts(_("export IFF or GQ group keys with password")); 1379290001Sglebius 1380290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1381290001Sglebius puts(_("generate sign key (RSA or DSA)")); 1382290001Sglebius 1383290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1384290001Sglebius puts(_("set host and optionally group name")); 1385290001Sglebius 1386290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1387290001Sglebius puts(_("trusted certificate (TC scheme)")); 1388290001Sglebius 1389290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1390290001Sglebius puts(_("generate <num> MV parameters")); 1391290001Sglebius 1392290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1393290001Sglebius puts(_("update <num> MV keys")); 1394290001Sglebius 1395290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1396290001Sglebius puts(_("display extended usage information and exit")); 1397290001Sglebius 1398290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1399290001Sglebius puts(_("extended usage information passed thru pager")); 1400290001Sglebius 1401290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1402290001Sglebius puts(_("output version information and exit")); 1403290001Sglebius 1404290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1405290001Sglebius puts(_("save the option state to a config file")); 1406290001Sglebius 1407290001Sglebius /* referenced via ntp_keygenOptions.pOptDesc->pzText */ 1408290001Sglebius puts(_("load options from a config file")); 1409290001Sglebius 1410290001Sglebius /* referenced via ntp_keygenOptions.pzUsageTitle */ 1411310419Sdelphij puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p9\n\ 1412290001SglebiusUsage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); 1413290001Sglebius 1414290001Sglebius /* referenced via ntp_keygenOptions.pzExplain */ 1415290001Sglebius puts(_("\n")); 1416290001Sglebius 1417290001Sglebius /* referenced via ntp_keygenOptions.pzFullVersion */ 1418310419Sdelphij puts(_("ntp-keygen (ntp) 4.2.8p9")); 1419290001Sglebius 1420290001Sglebius /* referenced via ntp_keygenOptions.pzFullUsage */ 1421290001Sglebius puts(_("<<<NOT-FOUND>>>")); 1422290001Sglebius 1423290001Sglebius /* referenced via ntp_keygenOptions.pzShortUsage */ 1424290001Sglebius puts(_("<<<NOT-FOUND>>>")); 1425290001Sglebius /* LIBOPTS-MESSAGES: */ 1426290001Sglebius#line 67 "../autoopts.c" 1427290001Sglebius puts(_("allocation of %d bytes failed\n")); 1428290001Sglebius#line 93 "../autoopts.c" 1429290001Sglebius puts(_("allocation of %d bytes failed\n")); 1430290001Sglebius#line 53 "../init.c" 1431290001Sglebius puts(_("AutoOpts function called without option descriptor\n")); 1432290001Sglebius#line 86 "../init.c" 1433290001Sglebius puts(_("\tThis exceeds the compiled library version: ")); 1434290001Sglebius#line 84 "../init.c" 1435290001Sglebius puts(_("Automated Options Processing Error!\n" 1436290001Sglebius "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 1437290001Sglebius#line 80 "../autoopts.c" 1438290001Sglebius puts(_("realloc of %d bytes at 0x%p failed\n")); 1439290001Sglebius#line 88 "../init.c" 1440290001Sglebius puts(_("\tThis is less than the minimum library version: ")); 1441290001Sglebius#line 121 "../version.c" 1442290001Sglebius puts(_("Automated Options version %s\n" 1443290001Sglebius "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); 1444290001Sglebius#line 87 "../makeshell.c" 1445290001Sglebius puts(_("(AutoOpts bug): %s.\n")); 1446290001Sglebius#line 90 "../reset.c" 1447290001Sglebius puts(_("optionResetOpt() called, but reset-option not configured")); 1448290001Sglebius#line 292 "../usage.c" 1449290001Sglebius puts(_("could not locate the 'help' option")); 1450290001Sglebius#line 336 "../autoopts.c" 1451290001Sglebius puts(_("optionProcess() was called with invalid data")); 1452290001Sglebius#line 748 "../usage.c" 1453290001Sglebius puts(_("invalid argument type specified")); 1454290001Sglebius#line 598 "../find.c" 1455290001Sglebius puts(_("defaulted to option with optional arg")); 1456290001Sglebius#line 76 "../alias.c" 1457290001Sglebius puts(_("aliasing option is out of range.")); 1458290001Sglebius#line 234 "../enum.c" 1459290001Sglebius puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 1460290001Sglebius#line 108 "../find.c" 1461290001Sglebius puts(_(" The following options match:\n")); 1462290001Sglebius#line 293 "../find.c" 1463290001Sglebius puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 1464290001Sglebius#line 161 "../check.c" 1465290001Sglebius puts(_("%s: Command line arguments required\n")); 1466290001Sglebius#line 43 "../alias.c" 1467290001Sglebius puts(_("%d %s%s options allowed\n")); 1468290001Sglebius#line 94 "../makeshell.c" 1469290001Sglebius puts(_("%s error %d (%s) calling %s for '%s'\n")); 1470290001Sglebius#line 306 "../makeshell.c" 1471290001Sglebius puts(_("interprocess pipe")); 1472290001Sglebius#line 168 "../version.c" 1473290001Sglebius puts(_("error: version option argument '%c' invalid. Use:\n" 1474290001Sglebius "\t'v' - version only\n" 1475290001Sglebius "\t'c' - version and copyright\n" 1476290001Sglebius "\t'n' - version and full copyright notice\n")); 1477290001Sglebius#line 58 "../check.c" 1478290001Sglebius puts(_("%s error: the '%s' and '%s' options conflict\n")); 1479290001Sglebius#line 217 "../find.c" 1480290001Sglebius puts(_("%s: The '%s' option has been disabled.")); 1481290001Sglebius#line 430 "../find.c" 1482290001Sglebius puts(_("%s: The '%s' option has been disabled.")); 1483290001Sglebius#line 38 "../alias.c" 1484290001Sglebius puts(_("-equivalence")); 1485290001Sglebius#line 469 "../find.c" 1486290001Sglebius puts(_("%s: illegal option -- %c\n")); 1487290001Sglebius#line 110 "../reset.c" 1488290001Sglebius puts(_("%s: illegal option -- %c\n")); 1489290001Sglebius#line 271 "../find.c" 1490290001Sglebius puts(_("%s: illegal option -- %s\n")); 1491290001Sglebius#line 755 "../find.c" 1492290001Sglebius puts(_("%s: illegal option -- %s\n")); 1493290001Sglebius#line 118 "../reset.c" 1494290001Sglebius puts(_("%s: illegal option -- %s\n")); 1495290001Sglebius#line 335 "../find.c" 1496290001Sglebius puts(_("%s: unknown vendor extension option -- %s\n")); 1497290001Sglebius#line 159 "../enum.c" 1498290001Sglebius puts(_(" or an integer from %d through %d\n")); 1499290001Sglebius#line 169 "../enum.c" 1500290001Sglebius puts(_(" or an integer from %d through %d\n")); 1501290001Sglebius#line 747 "../usage.c" 1502290001Sglebius puts(_("%s error: invalid option descriptor for %s\n")); 1503290001Sglebius#line 1081 "../usage.c" 1504290001Sglebius puts(_("%s error: invalid option descriptor for %s\n")); 1505290001Sglebius#line 385 "../find.c" 1506290001Sglebius puts(_("%s: invalid option name: %s\n")); 1507290001Sglebius#line 527 "../find.c" 1508290001Sglebius puts(_("%s: The '%s' option requires an argument.\n")); 1509290001Sglebius#line 156 "../autoopts.c" 1510290001Sglebius puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 1511290001Sglebius "\t'%s' and '%s'.")); 1512290001Sglebius#line 94 "../check.c" 1513290001Sglebius puts(_("%s error: The %s option is required\n")); 1514290001Sglebius#line 632 "../find.c" 1515290001Sglebius puts(_("%s: The '%s' option cannot have an argument.\n")); 1516290001Sglebius#line 151 "../check.c" 1517290001Sglebius puts(_("%s: Command line arguments are not allowed.\n")); 1518290001Sglebius#line 535 "../save.c" 1519290001Sglebius puts(_("error %d (%s) creating %s\n")); 1520290001Sglebius#line 234 "../enum.c" 1521290001Sglebius puts(_("%s error: '%s' does not match any %s keywords.\n")); 1522290001Sglebius#line 93 "../reset.c" 1523290001Sglebius puts(_("%s error: The '%s' option requires an argument.\n")); 1524290001Sglebius#line 184 "../save.c" 1525290001Sglebius puts(_("error %d (%s) stat-ing %s\n")); 1526290001Sglebius#line 238 "../save.c" 1527290001Sglebius puts(_("error %d (%s) stat-ing %s\n")); 1528290001Sglebius#line 143 "../restore.c" 1529290001Sglebius puts(_("%s error: no saved option state\n")); 1530290001Sglebius#line 231 "../autoopts.c" 1531290001Sglebius puts(_("'%s' is not a command line option.\n")); 1532290001Sglebius#line 111 "../time.c" 1533290001Sglebius puts(_("%s error: '%s' is not a recognizable date/time.\n")); 1534290001Sglebius#line 132 "../save.c" 1535290001Sglebius puts(_("'%s' not defined\n")); 1536290001Sglebius#line 50 "../time.c" 1537290001Sglebius puts(_("%s error: '%s' is not a recognizable time duration.\n")); 1538290001Sglebius#line 92 "../check.c" 1539290001Sglebius puts(_("%s error: The %s option must appear %d times.\n")); 1540290001Sglebius#line 164 "../numeric.c" 1541290001Sglebius puts(_("%s error: '%s' is not a recognizable number.\n")); 1542290001Sglebius#line 200 "../enum.c" 1543290001Sglebius puts(_("%s error: %s exceeds %s keyword count\n")); 1544290001Sglebius#line 330 "../usage.c" 1545290001Sglebius puts(_("Try '%s %s' for more information.\n")); 1546290001Sglebius#line 45 "../alias.c" 1547290001Sglebius puts(_("one %s%s option allowed\n")); 1548290001Sglebius#line 208 "../makeshell.c" 1549290001Sglebius puts(_("standard output")); 1550290001Sglebius#line 943 "../makeshell.c" 1551290001Sglebius puts(_("standard output")); 1552290001Sglebius#line 274 "../usage.c" 1553290001Sglebius puts(_("standard output")); 1554290001Sglebius#line 415 "../usage.c" 1555290001Sglebius puts(_("standard output")); 1556290001Sglebius#line 625 "../usage.c" 1557290001Sglebius puts(_("standard output")); 1558290001Sglebius#line 175 "../version.c" 1559290001Sglebius puts(_("standard output")); 1560290001Sglebius#line 274 "../usage.c" 1561290001Sglebius puts(_("standard error")); 1562290001Sglebius#line 415 "../usage.c" 1563290001Sglebius puts(_("standard error")); 1564290001Sglebius#line 625 "../usage.c" 1565290001Sglebius puts(_("standard error")); 1566290001Sglebius#line 175 "../version.c" 1567290001Sglebius puts(_("standard error")); 1568290001Sglebius#line 208 "../makeshell.c" 1569290001Sglebius puts(_("write")); 1570290001Sglebius#line 943 "../makeshell.c" 1571290001Sglebius puts(_("write")); 1572290001Sglebius#line 273 "../usage.c" 1573290001Sglebius puts(_("write")); 1574290001Sglebius#line 414 "../usage.c" 1575290001Sglebius puts(_("write")); 1576290001Sglebius#line 624 "../usage.c" 1577290001Sglebius puts(_("write")); 1578290001Sglebius#line 174 "../version.c" 1579290001Sglebius puts(_("write")); 1580290001Sglebius#line 60 "../numeric.c" 1581290001Sglebius puts(_("%s error: %s option value %ld is out of range.\n")); 1582290001Sglebius#line 44 "../check.c" 1583290001Sglebius puts(_("%s error: %s option requires the %s option\n")); 1584290001Sglebius#line 131 "../save.c" 1585290001Sglebius puts(_("%s warning: cannot save options - %s not regular file\n")); 1586290001Sglebius#line 183 "../save.c" 1587290001Sglebius puts(_("%s warning: cannot save options - %s not regular file\n")); 1588290001Sglebius#line 237 "../save.c" 1589290001Sglebius puts(_("%s warning: cannot save options - %s not regular file\n")); 1590290001Sglebius#line 256 "../save.c" 1591290001Sglebius puts(_("%s warning: cannot save options - %s not regular file\n")); 1592290001Sglebius#line 534 "../save.c" 1593290001Sglebius puts(_("%s warning: cannot save options - %s not regular file\n")); 1594290001Sglebius /* END-LIBOPTS-MESSAGES */ 1595290001Sglebius 1596290001Sglebius /* USAGE-TEXT: */ 1597290001Sglebius#line 873 "../usage.c" 1598290001Sglebius puts(_("\t\t\t\t- an alternate for '%s'\n")); 1599290001Sglebius#line 1148 "../usage.c" 1600290001Sglebius puts(_("Version, usage and configuration options:")); 1601290001Sglebius#line 924 "../usage.c" 1602290001Sglebius puts(_("\t\t\t\t- default option for unnamed options\n")); 1603290001Sglebius#line 837 "../usage.c" 1604290001Sglebius puts(_("\t\t\t\t- disabled as '--%s'\n")); 1605290001Sglebius#line 1117 "../usage.c" 1606290001Sglebius puts(_(" --- %-14s %s\n")); 1607290001Sglebius#line 1115 "../usage.c" 1608290001Sglebius puts(_("This option has been disabled")); 1609290001Sglebius#line 864 "../usage.c" 1610290001Sglebius puts(_("\t\t\t\t- enabled by default\n")); 1611290001Sglebius#line 40 "../alias.c" 1612290001Sglebius puts(_("%s error: only ")); 1613290001Sglebius#line 1194 "../usage.c" 1614290001Sglebius puts(_(" - examining environment variables named %s_*\n")); 1615290001Sglebius#line 168 "../file.c" 1616290001Sglebius puts(_("\t\t\t\t- file must not pre-exist\n")); 1617290001Sglebius#line 172 "../file.c" 1618290001Sglebius puts(_("\t\t\t\t- file must pre-exist\n")); 1619290001Sglebius#line 380 "../usage.c" 1620290001Sglebius puts(_("Options are specified by doubled hyphens and their name or by a single\n" 1621290001Sglebius "hyphen and the flag character.\n")); 1622290001Sglebius#line 921 "../makeshell.c" 1623290001Sglebius puts(_("\n" 1624290001Sglebius "= = = = = = = =\n\n" 1625290001Sglebius "This incarnation of genshell will produce\n" 1626290001Sglebius "a shell script to parse the options for %s:\n\n")); 1627290001Sglebius#line 166 "../enum.c" 1628290001Sglebius puts(_(" or an integer mask with any of the lower %d bits set\n")); 1629290001Sglebius#line 897 "../usage.c" 1630290001Sglebius puts(_("\t\t\t\t- is a set membership option\n")); 1631290001Sglebius#line 918 "../usage.c" 1632290001Sglebius puts(_("\t\t\t\t- must appear between %d and %d times\n")); 1633290001Sglebius#line 382 "../usage.c" 1634290001Sglebius puts(_("Options are specified by single or double hyphens and their name.\n")); 1635290001Sglebius#line 904 "../usage.c" 1636290001Sglebius puts(_("\t\t\t\t- may appear multiple times\n")); 1637290001Sglebius#line 891 "../usage.c" 1638290001Sglebius puts(_("\t\t\t\t- may not be preset\n")); 1639290001Sglebius#line 1309 "../usage.c" 1640290001Sglebius puts(_(" Arg Option-Name Description\n")); 1641290001Sglebius#line 1245 "../usage.c" 1642290001Sglebius puts(_(" Flg Arg Option-Name Description\n")); 1643290001Sglebius#line 1303 "../usage.c" 1644290001Sglebius puts(_(" Flg Arg Option-Name Description\n")); 1645290001Sglebius#line 1304 "../usage.c" 1646290001Sglebius puts(_(" %3s %s")); 1647290001Sglebius#line 1310 "../usage.c" 1648290001Sglebius puts(_(" %3s %s")); 1649290001Sglebius#line 387 "../usage.c" 1650290001Sglebius puts(_("The '-#<number>' option may omit the hash char\n")); 1651290001Sglebius#line 383 "../usage.c" 1652290001Sglebius puts(_("All arguments are named options.\n")); 1653290001Sglebius#line 971 "../usage.c" 1654290001Sglebius puts(_(" - reading file %s")); 1655290001Sglebius#line 409 "../usage.c" 1656290001Sglebius puts(_("\n" 1657290001Sglebius "Please send bug reports to: <%s>\n")); 1658290001Sglebius#line 100 "../version.c" 1659290001Sglebius puts(_("\n" 1660290001Sglebius "Please send bug reports to: <%s>\n")); 1661290001Sglebius#line 129 "../version.c" 1662290001Sglebius puts(_("\n" 1663290001Sglebius "Please send bug reports to: <%s>\n")); 1664290001Sglebius#line 903 "../usage.c" 1665290001Sglebius puts(_("\t\t\t\t- may NOT appear - preset only\n")); 1666290001Sglebius#line 944 "../usage.c" 1667290001Sglebius puts(_("\n" 1668290001Sglebius "The following option preset mechanisms are supported:\n")); 1669290001Sglebius#line 1192 "../usage.c" 1670290001Sglebius puts(_("\n" 1671290001Sglebius "The following option preset mechanisms are supported:\n")); 1672290001Sglebius#line 682 "../usage.c" 1673290001Sglebius puts(_("prohibits these options:\n")); 1674290001Sglebius#line 677 "../usage.c" 1675290001Sglebius puts(_("prohibits the option '%s'\n")); 1676290001Sglebius#line 81 "../numeric.c" 1677290001Sglebius puts(_("%s%ld to %ld")); 1678290001Sglebius#line 79 "../numeric.c" 1679290001Sglebius puts(_("%sgreater than or equal to %ld")); 1680290001Sglebius#line 75 "../numeric.c" 1681290001Sglebius puts(_("%s%ld exactly")); 1682290001Sglebius#line 68 "../numeric.c" 1683290001Sglebius puts(_("%sit must lie in one of the ranges:\n")); 1684290001Sglebius#line 68 "../numeric.c" 1685290001Sglebius puts(_("%sit must be in the range:\n")); 1686290001Sglebius#line 88 "../numeric.c" 1687290001Sglebius puts(_(", or\n")); 1688290001Sglebius#line 66 "../numeric.c" 1689290001Sglebius puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 1690290001Sglebius#line 77 "../numeric.c" 1691290001Sglebius puts(_("%sless than or equal to %ld")); 1692290001Sglebius#line 390 "../usage.c" 1693290001Sglebius puts(_("Operands and options may be intermixed. They will be reordered.\n")); 1694290001Sglebius#line 652 "../usage.c" 1695290001Sglebius puts(_("requires the option '%s'\n")); 1696290001Sglebius#line 655 "../usage.c" 1697290001Sglebius puts(_("requires these options:\n")); 1698290001Sglebius#line 1321 "../usage.c" 1699290001Sglebius puts(_(" Arg Option-Name Req? Description\n")); 1700290001Sglebius#line 1315 "../usage.c" 1701290001Sglebius puts(_(" Flg Arg Option-Name Req? Description\n")); 1702290001Sglebius#line 167 "../enum.c" 1703290001Sglebius puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 1704290001Sglebius "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 1705290001Sglebius "will set them all. Multiple entries may be passed as an option\n" 1706290001Sglebius "argument list.\n")); 1707290001Sglebius#line 910 "../usage.c" 1708290001Sglebius puts(_("\t\t\t\t- may appear up to %d times\n")); 1709290001Sglebius#line 77 "../enum.c" 1710290001Sglebius puts(_("The valid \"%s\" option keywords are:\n")); 1711290001Sglebius#line 1152 "../usage.c" 1712290001Sglebius puts(_("The next option supports vendor supported extra options:")); 1713290001Sglebius#line 773 "../usage.c" 1714290001Sglebius puts(_("These additional options are:")); 1715290001Sglebius /* END-USAGE-TEXT */ 1716290001Sglebius} 1717290001Sglebius#endif /* uncompilable code */ 1718181834Sroberto#ifdef __cplusplus 1719181834Sroberto} 1720181834Sroberto#endif 1721181834Sroberto/* ntp-keygen-opts.c ends here */ 1722