Blame src/serv-args.h.bak

Packit Service 4684c1
/*   -*- buffer-read-only: t -*- vi: set ro:
Packit Service 4684c1
 *
Packit Service 4684c1
 *  DO NOT EDIT THIS FILE   (serv-args.h)
Packit Service 4684c1
 *
Packit Service 4684c1
 *  It has been AutoGen-ed
Packit Service 4684c1
 *  From the definitions    serv-args.def
Packit Service 4684c1
 *  and the template file   options
Packit Service 4684c1
 *
Packit Service 4684c1
 * Generated from AutoOpts 42:1:17 templates.
Packit Service 4684c1
 *
Packit Service 4684c1
 *  AutoOpts is a copyrighted work.  This header file is not encumbered
Packit Service 4684c1
 *  by AutoOpts licensing, but is provided under the licensing terms chosen
Packit Service 4684c1
 *  by the gnutls-serv author or copyright holder.  AutoOpts is
Packit Service 4684c1
 *  licensed under the terms of the LGPL.  The redistributable library
Packit Service 4684c1
 *  (``libopts'') is licensed under the terms of either the LGPL or, at the
Packit Service 4684c1
 *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
Packit Service 4684c1
 *  for details.
Packit Service 4684c1
 *
Packit Service 4684c1
 * The gnutls-serv program is copyrighted and licensed
Packit Service 4684c1
 * under the following terms:
Packit Service 4684c1
 *
Packit Service 4684c1
 *  Copyright (C) 2000-2020 Free Software Foundation, and others, all rights reserved.
Packit Service 4684c1
 *  This is free software. It is licensed for use, modification and
Packit Service 4684c1
 *  redistribution under the terms of the GNU General Public License,
Packit Service 4684c1
 *  version 3 or later <http://gnu.org/licenses/gpl.html>
Packit Service 4684c1
 *
Packit Service 4684c1
 *  gnutls-serv is free software: you can redistribute it and/or modify it
Packit Service 4684c1
 *  under the terms of the GNU General Public License as published by the
Packit Service 4684c1
 *  Free Software Foundation, either version 3 of the License, or
Packit Service 4684c1
 *  (at your option) any later version.
Packit Service 4684c1
 *
Packit Service 4684c1
 *  gnutls-serv is distributed in the hope that it will be useful, but
Packit Service 4684c1
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 4684c1
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit Service 4684c1
 *  See the GNU General Public License for more details.
Packit Service 4684c1
 *
Packit Service 4684c1
 *  You should have received a copy of the GNU General Public License along
Packit Service 4684c1
 *  with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit Service 4684c1
 */
Packit Service 4684c1
/**
Packit Service 4684c1
 *  This file contains the programmatic interface to the Automated
Packit Service 4684c1
 *  Options generated for the gnutls-serv program.
Packit Service 4684c1
 *  These macros are documented in the AutoGen info file in the
Packit Service 4684c1
 *  "AutoOpts" chapter.  Please refer to that doc for usage help.
Packit Service 4684c1
 */
Packit Service 4684c1
#ifndef AUTOOPTS_SERV_ARGS_H_GUARD
Packit Service 4684c1
#define AUTOOPTS_SERV_ARGS_H_GUARD 1
Packit Service 4684c1
#include "config.h"
Packit Service 4684c1
#include <autoopts/options.h>
Packit Service 4684c1
#include <stdarg.h>
Packit Service 4684c1
#include <stdnoreturn.h>
Packit Service 4684c1
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Ensure that the library used for compiling this generated header is at
Packit Service 4684c1
 *  least as new as the version current when the header template was released
Packit Service 4684c1
 *  (not counting patch version increments).  Also ensure that the oldest
Packit Service 4684c1
 *  tolerable version is at least as old as what was current when the header
Packit Service 4684c1
 *  template was released.
Packit Service 4684c1
 */
Packit Service 4684c1
#define AO_TEMPLATE_VERSION 172033
Packit Service 4684c1
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
Packit Service 4684c1
 || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
Packit Service 4684c1
# error option template version mismatches autoopts/options.h header
Packit Service 4684c1
  Choke Me.
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if GCC_VERSION > 40400
Packit Service 4684c1
#define NOT_REACHED __builtin_unreachable();
Packit Service 4684c1
#else
Packit Service 4684c1
#define NOT_REACHED
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Enumeration of each option type for gnutls-serv
Packit Service 4684c1
 */
Packit Service 4684c1
typedef enum {
Packit Service 4684c1
    INDEX_OPT_DEBUG                        =  0,
Packit Service 4684c1
    INDEX_OPT_SNI_HOSTNAME                 =  1,
Packit Service 4684c1
    INDEX_OPT_SNI_HOSTNAME_FATAL           =  2,
Packit Service 4684c1
    INDEX_OPT_ALPN                         =  3,
Packit Service 4684c1
    INDEX_OPT_ALPN_FATAL                   =  4,
Packit Service 4684c1
    INDEX_OPT_NOTICKET                     =  5,
Packit Service 4684c1
    INDEX_OPT_EARLYDATA                    =  6,
Packit Service 4684c1
    INDEX_OPT_MAXEARLYDATA                 =  7,
Packit Service 4684c1
    INDEX_OPT_NOCOOKIE                     =  8,
Packit Service 4684c1
    INDEX_OPT_GENERATE                     =  9,
Packit Service 4684c1
    INDEX_OPT_QUIET                        = 10,
Packit Service 4684c1
    INDEX_OPT_NODB                         = 11,
Packit Service 4684c1
    INDEX_OPT_HTTP                         = 12,
Packit Service 4684c1
    INDEX_OPT_ECHO                         = 13,
Packit Service 4684c1
    INDEX_OPT_UDP                          = 14,
Packit Service 4684c1
    INDEX_OPT_MTU                          = 15,
Packit Service 4684c1
    INDEX_OPT_SRTP_PROFILES                = 16,
Packit Service 4684c1
    INDEX_OPT_DISABLE_CLIENT_CERT          = 17,
Packit Service 4684c1
    INDEX_OPT_REQUIRE_CLIENT_CERT          = 18,
Packit Service 4684c1
    INDEX_OPT_VERIFY_CLIENT_CERT           = 19,
Packit Service 4684c1
    INDEX_OPT_HEARTBEAT                    = 20,
Packit Service 4684c1
    INDEX_OPT_X509FMTDER                   = 21,
Packit Service 4684c1
    INDEX_OPT_PRIORITY                     = 22,
Packit Service 4684c1
    INDEX_OPT_DHPARAMS                     = 23,
Packit Service 4684c1
    INDEX_OPT_X509CAFILE                   = 24,
Packit Service 4684c1
    INDEX_OPT_X509CRLFILE                  = 25,
Packit Service 4684c1
    INDEX_OPT_PGPKEYFILE                   = 26,
Packit Service 4684c1
    INDEX_OPT_X509KEYFILE                  = 27,
Packit Service 4684c1
    INDEX_OPT_X509CERTFILE                 = 28,
Packit Service 4684c1
    INDEX_OPT_X509DSAKEYFILE               = 29,
Packit Service 4684c1
    INDEX_OPT_X509DSACERTFILE              = 30,
Packit Service 4684c1
    INDEX_OPT_X509ECCKEYFILE               = 31,
Packit Service 4684c1
    INDEX_OPT_X509ECCCERTFILE              = 32,
Packit Service 4684c1
    INDEX_OPT_RAWPKKEYFILE                 = 33,
Packit Service 4684c1
    INDEX_OPT_RAWPKFILE                    = 34,
Packit Service 4684c1
    INDEX_OPT_SRPPASSWD                    = 35,
Packit Service 4684c1
    INDEX_OPT_SRPPASSWDCONF                = 36,
Packit Service 4684c1
    INDEX_OPT_PSKPASSWD                    = 37,
Packit Service 4684c1
    INDEX_OPT_PSKHINT                      = 38,
Packit Service 4684c1
    INDEX_OPT_OCSP_RESPONSE                = 39,
Packit Service 4684c1
    INDEX_OPT_IGNORE_OCSP_RESPONSE_ERRORS  = 40,
Packit Service 4684c1
    INDEX_OPT_PORT                         = 41,
Packit Service 4684c1
    INDEX_OPT_LIST                         = 42,
Packit Service 4684c1
    INDEX_OPT_PROVIDER                     = 43,
Packit Service 4684c1
    INDEX_OPT_KEYMATEXPORT                 = 44,
Packit Service 4684c1
    INDEX_OPT_KEYMATEXPORTSIZE             = 45,
Packit Service 4684c1
    INDEX_OPT_RECORDSIZE                   = 46,
Packit Service 4684c1
    INDEX_OPT_HTTPDATA                     = 47,
Packit Service 4684c1
    INDEX_OPT_VERSION                      = 48,
Packit Service 4684c1
    INDEX_OPT_HELP                         = 49,
Packit Service 4684c1
    INDEX_OPT_MORE_HELP                    = 50
Packit Service 4684c1
} teOptIndex;
Packit Service 4684c1
/** count of all options for gnutls-serv */
Packit Service 4684c1
#define OPTION_CT    51
Packit Service 4684c1
/** gnutls-serv version */
Packit Service 4684c1
#define GNUTLS_SERV_VERSION       "3.6.14"
Packit Service 4684c1
/** Full gnutls-serv version text */
Packit Service 4684c1
#define GNUTLS_SERV_FULL_VERSION  "gnutls-serv 3.6.14"
Packit Service 4684c1
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Interface defines for all options.  Replace "n" with the UPPER_CASED
Packit Service 4684c1
 *  option name (as in the teOptIndex enumeration above).
Packit Service 4684c1
 *  e.g. HAVE_OPT(DEBUG)
Packit Service 4684c1
 */
Packit Service 4684c1
#define         DESC(n) (gnutls_servOptions.pOptDesc[INDEX_OPT_## n])
Packit Service 4684c1
/** 'true' if an option has been specified in any way */
Packit Service 4684c1
#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
Packit Service 4684c1
/** The string argument to an option. The argument type must be \"string\". */
Packit Service 4684c1
#define      OPT_ARG(n) (DESC(n).optArg.argString)
Packit Service 4684c1
/** Mask the option state revealing how an option was specified.
Packit Service 4684c1
 *  It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
Packit Service 4684c1
 * \a OPTST_DEFINED, \a OPTST_RESET or zero.
Packit Service 4684c1
 */
Packit Service 4684c1
#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
Packit Service 4684c1
/** Count of option's occurrances *on the command line*. */
Packit Service 4684c1
#define    COUNT_OPT(n) (DESC(n).optOccCt)
Packit Service 4684c1
/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
Packit Service 4684c1
#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
Packit Service 4684c1
/** 'true' if \a HAVE_OPT would yield 'false'. */
Packit Service 4684c1
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
Packit Service 4684c1
/** 'true' if OPTST_DISABLED bit not set. */
Packit Service 4684c1
#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
Packit Service 4684c1
/** number of stacked option arguments.
Packit Service 4684c1
 *  Valid only for stacked option arguments. */
Packit Service 4684c1
#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
Packit Service 4684c1
/** stacked argument vector.
Packit Service 4684c1
 *  Valid only for stacked option arguments. */
Packit Service 4684c1
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
Packit Service 4684c1
/** Reset an option. */
Packit Service 4684c1
#define    CLEAR_OPT(n) STMTS( \
Packit Service 4684c1
                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
Packit Service 4684c1
                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
Packit Service 4684c1
                    DESC(n).fOptState |= OPTST_DISABLED; \
Packit Service 4684c1
                DESC(n).optCookie = NULL )
Packit Service 4684c1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Enumeration of gnutls-serv exit codes
Packit Service 4684c1
 */
Packit Service 4684c1
typedef enum {
Packit Service 4684c1
    GNUTLS_SERV_EXIT_SUCCESS         = 0,
Packit Service 4684c1
    GNUTLS_SERV_EXIT_FAILURE         = 1,
Packit Service 4684c1
    GNUTLS_SERV_EXIT_USAGE_ERROR     = 64,
Packit Service 4684c1
    GNUTLS_SERV_EXIT_LIBOPTS_FAILURE = 70
Packit Service 4684c1
}   gnutls_serv_exit_code_t;
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Interface defines for specific options.
Packit Service 4684c1
 * @{
Packit Service 4684c1
 */
Packit Service 4684c1
#define VALUE_OPT_DEBUG          'd'
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_SNI_HOSTNAME   0x1001
Packit Service 4684c1
#define VALUE_OPT_SNI_HOSTNAME_FATAL 0x1002
Packit Service 4684c1
#define VALUE_OPT_ALPN           0x1003
Packit Service 4684c1
#define VALUE_OPT_ALPN_FATAL     0x1004
Packit Service 4684c1
#define VALUE_OPT_NOTICKET       0x1005
Packit Service 4684c1
#define VALUE_OPT_EARLYDATA      0x1006
Packit Service 4684c1
#define VALUE_OPT_MAXEARLYDATA   0x1007
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_MAXEARLYDATA   (DESC(MAXEARLYDATA).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_NOCOOKIE       0x1008
Packit Service 4684c1
#define VALUE_OPT_GENERATE       'g'
Packit Service 4684c1
#define VALUE_OPT_QUIET          'q'
Packit Service 4684c1
#define VALUE_OPT_NODB           0x1009
Packit Service 4684c1
#define VALUE_OPT_HTTP           0x100A
Packit Service 4684c1
#define VALUE_OPT_ECHO           0x100B
Packit Service 4684c1
#define VALUE_OPT_UDP            'u'
Packit Service 4684c1
#define VALUE_OPT_MTU            0x100C
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_MTU            (DESC(MTU).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_SRTP_PROFILES  0x100D
Packit Service 4684c1
#define VALUE_OPT_DISABLE_CLIENT_CERT 'a'
Packit Service 4684c1
#define VALUE_OPT_REQUIRE_CLIENT_CERT 'r'
Packit Service 4684c1
#define VALUE_OPT_VERIFY_CLIENT_CERT 0x100E
Packit Service 4684c1
#define VALUE_OPT_HEARTBEAT      'b'
Packit Service 4684c1
#define VALUE_OPT_X509FMTDER     0x100F
Packit Service 4684c1
#define VALUE_OPT_PRIORITY       0x1010
Packit Service 4684c1
#define VALUE_OPT_DHPARAMS       0x1011
Packit Service 4684c1
#define VALUE_OPT_X509CAFILE     0x1012
Packit Service 4684c1
#define VALUE_OPT_X509CRLFILE    0x1013
Packit Service 4684c1
#define VALUE_OPT_PGPKEYFILE     0x1014
Packit Service 4684c1
#define VALUE_OPT_X509KEYFILE    0x1015
Packit Service 4684c1
#define VALUE_OPT_X509CERTFILE   0x1016
Packit Service 4684c1
#define VALUE_OPT_X509DSAKEYFILE 0x1017
Packit Service 4684c1
#define VALUE_OPT_X509DSACERTFILE 0x1018
Packit Service 4684c1
#define VALUE_OPT_X509ECCKEYFILE 0x1019
Packit Service 4684c1
#define VALUE_OPT_X509ECCCERTFILE 0x101A
Packit Service 4684c1
#define VALUE_OPT_RAWPKKEYFILE   0x101B
Packit Service 4684c1
#define VALUE_OPT_RAWPKFILE      0x101C
Packit Service 4684c1
#define VALUE_OPT_SRPPASSWD      0x101D
Packit Service 4684c1
#define VALUE_OPT_SRPPASSWDCONF  0x101E
Packit Service 4684c1
#define VALUE_OPT_PSKPASSWD      0x101F
Packit Service 4684c1
#define VALUE_OPT_PSKHINT        0x1020
Packit Service 4684c1
#define VALUE_OPT_OCSP_RESPONSE  0x1021
Packit Service 4684c1
#define VALUE_OPT_IGNORE_OCSP_RESPONSE_ERRORS 0x1022
Packit Service 4684c1
#define VALUE_OPT_PORT           'p'
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_PORT           (DESC(PORT).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_LIST           'l'
Packit Service 4684c1
#define VALUE_OPT_PROVIDER       0x1023
Packit Service 4684c1
#define VALUE_OPT_KEYMATEXPORT   0x1024
Packit Service 4684c1
#define VALUE_OPT_KEYMATEXPORTSIZE 0x1025
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_KEYMATEXPORTSIZE (DESC(KEYMATEXPORTSIZE).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_RECORDSIZE     0x1026
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_RECORDSIZE     (DESC(RECORDSIZE).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_HTTPDATA       0x1027
Packit Service 4684c1
/** option flag (value) for help-value option */
Packit Service 4684c1
#define VALUE_OPT_HELP          'h'
Packit Service 4684c1
/** option flag (value) for more-help-value option */
Packit Service 4684c1
#define VALUE_OPT_MORE_HELP     '!'
Packit Service 4684c1
/** option flag (value) for version-value option */
Packit Service 4684c1
#define VALUE_OPT_VERSION       'v'
Packit Service 4684c1
/*
Packit Service 4684c1
 *  Interface defines not associated with particular options
Packit Service 4684c1
 */
Packit Service 4684c1
#define ERRSKIP_OPTERR  STMTS(gnutls_servOptions.fOptSet &= ~OPTPROC_ERRSTOP)
Packit Service 4684c1
#define ERRSTOP_OPTERR  STMTS(gnutls_servOptions.fOptSet |= OPTPROC_ERRSTOP)
Packit Service 4684c1
#define RESTART_OPT(n)  STMTS( \
Packit Service 4684c1
                gnutls_servOptions.curOptIdx = (n); \
Packit Service 4684c1
                gnutls_servOptions.pzCurOpt  = NULL )
Packit Service 4684c1
#define START_OPT       RESTART_OPT(1)
Packit Service 4684c1
#define USAGE(c)        (*gnutls_servOptions.pUsageProc)(&gnutls_servOptions, c)
Packit Service 4684c1
Packit Service 4684c1
#ifdef  __cplusplus
Packit Service 4684c1
extern "C" {
Packit Service 4684c1
#endif
Packit Service 4684c1
/*
Packit Service 4684c1
 *  global exported definitions
Packit Service 4684c1
 */
Packit Service 4684c1
#include <gettext.h>
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* * * * * *
Packit Service 4684c1
 *
Packit Service 4684c1
 *  Declare the gnutls-serv option descriptor.
Packit Service 4684c1
 */
Packit Service 4684c1
extern tOptions gnutls_servOptions;
Packit Service 4684c1
Packit Service 4684c1
#if defined(ENABLE_NLS)
Packit Service 4684c1
# ifndef _
Packit Service 4684c1
#   include <stdio.h>
Packit Service 4684c1
#   ifndef HAVE_GETTEXT
Packit Service 4684c1
      extern char * gettext(char const *);
Packit Service 4684c1
#   else
Packit Service 4684c1
#     include <libintl.h>
Packit Service 4684c1
#   endif
Packit Service 4684c1
Packit Service 4684c1
# ifndef ATTRIBUTE_FORMAT_ARG
Packit Service 4684c1
#   define ATTRIBUTE_FORMAT_ARG(_a)
Packit Service 4684c1
# endif
Packit Service 4684c1
Packit Service 4684c1
static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
Packit Service 4684c1
static inline char* aoGetsText(char const* pz) {
Packit Service 4684c1
    if (pz == NULL) return NULL;
Packit Service 4684c1
    return (char*)gettext(pz);
Packit Service 4684c1
}
Packit Service 4684c1
#   define _(s)  aoGetsText(s)
Packit Service 4684c1
# endif /* _() */
Packit Service 4684c1
Packit Service 4684c1
# define OPT_NO_XLAT_CFG_NAMES  STMTS(gnutls_servOptions.fOptSet |= \
Packit Service 4684c1
                                    OPTPROC_NXLAT_OPT_CFG;)
Packit Service 4684c1
# define OPT_NO_XLAT_OPT_NAMES  STMTS(gnutls_servOptions.fOptSet |= \
Packit Service 4684c1
                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
Packit Service 4684c1
Packit Service 4684c1
# define OPT_XLAT_CFG_NAMES     STMTS(gnutls_servOptions.fOptSet &= \
Packit Service 4684c1
                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
Packit Service 4684c1
# define OPT_XLAT_OPT_NAMES     STMTS(gnutls_servOptions.fOptSet &= \
Packit Service 4684c1
                                  ~OPTPROC_NXLAT_OPT;)
Packit Service 4684c1
Packit Service 4684c1
#else   /* ENABLE_NLS */
Packit Service 4684c1
# define OPT_NO_XLAT_CFG_NAMES
Packit Service 4684c1
# define OPT_NO_XLAT_OPT_NAMES
Packit Service 4684c1
Packit Service 4684c1
# define OPT_XLAT_CFG_NAMES
Packit Service 4684c1
# define OPT_XLAT_OPT_NAMES
Packit Service 4684c1
Packit Service 4684c1
# ifndef _
Packit Service 4684c1
#   define _(_s)  _s
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif  /* ENABLE_NLS */
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
#ifdef  __cplusplus
Packit Service 4684c1
}
Packit Service 4684c1
#endif
Packit Service 4684c1
#endif /* AUTOOPTS_SERV_ARGS_H_GUARD */
Packit Service 4684c1
Packit Service 4684c1
/* serv-args.h ends here */