Annotation of embedaddon/ntp/ntpd/ntpd-opts.h, revision 1.1

1.1     ! misho       1: /*  
        !             2:  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
        !             3:  *  
        !             4:  *  It has been AutoGen-ed  December 24, 2011 at 06:34:00 PM by AutoGen 5.12
        !             5:  *  From the definitions    ntpd-opts.def
        !             6:  *  and the template file   options
        !             7:  *
        !             8:  * Generated from AutoOpts 35:0:10 templates.
        !             9:  *
        !            10:  *  AutoOpts is a copyrighted work.  This header file is not encumbered
        !            11:  *  by AutoOpts licensing, but is provided under the licensing terms chosen
        !            12:  *  by the ntpd author or copyright holder.  AutoOpts is
        !            13:  *  licensed under the terms of the LGPL.  The redistributable library
        !            14:  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
        !            15:  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
        !            16:  *  for details.
        !            17:  *
        !            18:  * This source file is copyrighted and licensed under the following terms:
        !            19:  *
        !            20:  *  see html/copyright.html
        !            21:  *  
        !            22:  */
        !            23: /*
        !            24:  *  This file contains the programmatic interface to the Automated
        !            25:  *  Options generated for the ntpd program.
        !            26:  *  These macros are documented in the AutoGen info file in the
        !            27:  *  "AutoOpts" chapter.  Please refer to that doc for usage help.
        !            28:  */
        !            29: #ifndef AUTOOPTS_NTPD_OPTS_H_GUARD
        !            30: #define AUTOOPTS_NTPD_OPTS_H_GUARD 1
        !            31: #include "config.h"
        !            32: #include <autoopts/options.h>
        !            33: 
        !            34: /*
        !            35:  *  Ensure that the library used for compiling this generated header is at
        !            36:  *  least as new as the version current when the header template was released
        !            37:  *  (not counting patch version increments).  Also ensure that the oldest
        !            38:  *  tolerable version is at least as old as what was current when the header
        !            39:  *  template was released.
        !            40:  */
        !            41: #define AO_TEMPLATE_VERSION 143360
        !            42: #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
        !            43:  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
        !            44: # error option template version mismatches autoopts/options.h header
        !            45:   Choke Me.
        !            46: #endif
        !            47: 
        !            48: /*
        !            49:  *  Enumeration of each option:
        !            50:  */
        !            51: typedef enum {
        !            52:     INDEX_OPT_IPV4              =  0,
        !            53:     INDEX_OPT_IPV6              =  1,
        !            54:     INDEX_OPT_AUTHREQ           =  2,
        !            55:     INDEX_OPT_AUTHNOREQ         =  3,
        !            56:     INDEX_OPT_BCASTSYNC         =  4,
        !            57:     INDEX_OPT_CONFIGFILE        =  5,
        !            58:     INDEX_OPT_DEBUG_LEVEL       =  6,
        !            59:     INDEX_OPT_SET_DEBUG_LEVEL   =  7,
        !            60:     INDEX_OPT_DRIFTFILE         =  8,
        !            61:     INDEX_OPT_PANICGATE         =  9,
        !            62:     INDEX_OPT_JAILDIR           = 10,
        !            63:     INDEX_OPT_INTERFACE         = 11,
        !            64:     INDEX_OPT_KEYFILE           = 12,
        !            65:     INDEX_OPT_LOGFILE           = 13,
        !            66:     INDEX_OPT_NOVIRTUALIPS      = 14,
        !            67:     INDEX_OPT_MODIFYMMTIMER     = 15,
        !            68:     INDEX_OPT_NOFORK            = 16,
        !            69:     INDEX_OPT_NICE              = 17,
        !            70:     INDEX_OPT_PIDFILE           = 18,
        !            71:     INDEX_OPT_PRIORITY          = 19,
        !            72:     INDEX_OPT_QUIT              = 20,
        !            73:     INDEX_OPT_PROPAGATIONDELAY  = 21,
        !            74:     INDEX_OPT_SAVECONFIGQUIT    = 22,
        !            75:     INDEX_OPT_STATSDIR          = 23,
        !            76:     INDEX_OPT_TRUSTEDKEY        = 24,
        !            77:     INDEX_OPT_USER              = 25,
        !            78:     INDEX_OPT_UPDATEINTERVAL    = 26,
        !            79:     INDEX_OPT_VAR               = 27,
        !            80:     INDEX_OPT_DVAR              = 28,
        !            81:     INDEX_OPT_SLEW              = 29,
        !            82:     INDEX_OPT_USEPCC            = 30,
        !            83:     INDEX_OPT_PCCFREQ           = 31,
        !            84:     INDEX_OPT_VERSION           = 32,
        !            85:     INDEX_OPT_HELP              = 33,
        !            86:     INDEX_OPT_MORE_HELP         = 34
        !            87: } teOptIndex;
        !            88: 
        !            89: #define OPTION_CT    35
        !            90: #define NTPD_VERSION       "4.2.6p5"
        !            91: #define NTPD_FULL_VERSION  "ntpd 4.2.6p5"
        !            92: 
        !            93: /*
        !            94:  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
        !            95:  *  option name (as in the teOptIndex enumeration above).
        !            96:  *  e.g. HAVE_OPT(IPV4)
        !            97:  */
        !            98: #define         DESC(n) (ntpdOptions.pOptDesc[INDEX_OPT_## n])
        !            99: #define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
        !           100: #define      OPT_ARG(n) (DESC(n).optArg.argString)
        !           101: #define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
        !           102: #define    COUNT_OPT(n) (DESC(n).optOccCt)
        !           103: #define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
        !           104: #define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
        !           105: #define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
        !           106: #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
        !           107: #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
        !           108: #define    CLEAR_OPT(n) STMTS( \
        !           109:                 DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
        !           110:                 if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
        !           111:                     DESC(n).fOptState |= OPTST_DISABLED; \
        !           112:                 DESC(n).optCookie = NULL )
        !           113: 
        !           114: /* * * * * *
        !           115:  *
        !           116:  *  Enumeration of ntpd exit codes
        !           117:  */
        !           118: typedef enum {
        !           119:     NTPD_EXIT_SUCCESS = 0,
        !           120:     NTPD_EXIT_FAILURE = 1
        !           121: } ntpd_exit_code_t;
        !           122: /*
        !           123:  *  Make sure there are no #define name conflicts with the option names
        !           124:  */
        !           125: #ifndef     NO_OPTION_NAME_WARNINGS
        !           126: # ifdef    IPV4
        !           127: #  warning undefining IPV4 due to option name conflict
        !           128: #  undef   IPV4
        !           129: # endif
        !           130: # ifdef    IPV6
        !           131: #  warning undefining IPV6 due to option name conflict
        !           132: #  undef   IPV6
        !           133: # endif
        !           134: # ifdef    AUTHREQ
        !           135: #  warning undefining AUTHREQ due to option name conflict
        !           136: #  undef   AUTHREQ
        !           137: # endif
        !           138: # ifdef    AUTHNOREQ
        !           139: #  warning undefining AUTHNOREQ due to option name conflict
        !           140: #  undef   AUTHNOREQ
        !           141: # endif
        !           142: # ifdef    BCASTSYNC
        !           143: #  warning undefining BCASTSYNC due to option name conflict
        !           144: #  undef   BCASTSYNC
        !           145: # endif
        !           146: # ifdef    CONFIGFILE
        !           147: #  warning undefining CONFIGFILE due to option name conflict
        !           148: #  undef   CONFIGFILE
        !           149: # endif
        !           150: # ifdef    DEBUG_LEVEL
        !           151: #  warning undefining DEBUG_LEVEL due to option name conflict
        !           152: #  undef   DEBUG_LEVEL
        !           153: # endif
        !           154: # ifdef    SET_DEBUG_LEVEL
        !           155: #  warning undefining SET_DEBUG_LEVEL due to option name conflict
        !           156: #  undef   SET_DEBUG_LEVEL
        !           157: # endif
        !           158: # ifdef    DRIFTFILE
        !           159: #  warning undefining DRIFTFILE due to option name conflict
        !           160: #  undef   DRIFTFILE
        !           161: # endif
        !           162: # ifdef    PANICGATE
        !           163: #  warning undefining PANICGATE due to option name conflict
        !           164: #  undef   PANICGATE
        !           165: # endif
        !           166: # ifdef    JAILDIR
        !           167: #  warning undefining JAILDIR due to option name conflict
        !           168: #  undef   JAILDIR
        !           169: # endif
        !           170: # ifdef    INTERFACE
        !           171: #  warning undefining INTERFACE due to option name conflict
        !           172: #  undef   INTERFACE
        !           173: # endif
        !           174: # ifdef    KEYFILE
        !           175: #  warning undefining KEYFILE due to option name conflict
        !           176: #  undef   KEYFILE
        !           177: # endif
        !           178: # ifdef    LOGFILE
        !           179: #  warning undefining LOGFILE due to option name conflict
        !           180: #  undef   LOGFILE
        !           181: # endif
        !           182: # ifdef    NOVIRTUALIPS
        !           183: #  warning undefining NOVIRTUALIPS due to option name conflict
        !           184: #  undef   NOVIRTUALIPS
        !           185: # endif
        !           186: # ifdef    MODIFYMMTIMER
        !           187: #  warning undefining MODIFYMMTIMER due to option name conflict
        !           188: #  undef   MODIFYMMTIMER
        !           189: # endif
        !           190: # ifdef    NOFORK
        !           191: #  warning undefining NOFORK due to option name conflict
        !           192: #  undef   NOFORK
        !           193: # endif
        !           194: # ifdef    NICE
        !           195: #  warning undefining NICE due to option name conflict
        !           196: #  undef   NICE
        !           197: # endif
        !           198: # ifdef    PIDFILE
        !           199: #  warning undefining PIDFILE due to option name conflict
        !           200: #  undef   PIDFILE
        !           201: # endif
        !           202: # ifdef    PRIORITY
        !           203: #  warning undefining PRIORITY due to option name conflict
        !           204: #  undef   PRIORITY
        !           205: # endif
        !           206: # ifdef    QUIT
        !           207: #  warning undefining QUIT due to option name conflict
        !           208: #  undef   QUIT
        !           209: # endif
        !           210: # ifdef    PROPAGATIONDELAY
        !           211: #  warning undefining PROPAGATIONDELAY due to option name conflict
        !           212: #  undef   PROPAGATIONDELAY
        !           213: # endif
        !           214: # ifdef    SAVECONFIGQUIT
        !           215: #  warning undefining SAVECONFIGQUIT due to option name conflict
        !           216: #  undef   SAVECONFIGQUIT
        !           217: # endif
        !           218: # ifdef    STATSDIR
        !           219: #  warning undefining STATSDIR due to option name conflict
        !           220: #  undef   STATSDIR
        !           221: # endif
        !           222: # ifdef    TRUSTEDKEY
        !           223: #  warning undefining TRUSTEDKEY due to option name conflict
        !           224: #  undef   TRUSTEDKEY
        !           225: # endif
        !           226: # ifdef    USER
        !           227: #  warning undefining USER due to option name conflict
        !           228: #  undef   USER
        !           229: # endif
        !           230: # ifdef    UPDATEINTERVAL
        !           231: #  warning undefining UPDATEINTERVAL due to option name conflict
        !           232: #  undef   UPDATEINTERVAL
        !           233: # endif
        !           234: # ifdef    VAR
        !           235: #  warning undefining VAR due to option name conflict
        !           236: #  undef   VAR
        !           237: # endif
        !           238: # ifdef    DVAR
        !           239: #  warning undefining DVAR due to option name conflict
        !           240: #  undef   DVAR
        !           241: # endif
        !           242: # ifdef    SLEW
        !           243: #  warning undefining SLEW due to option name conflict
        !           244: #  undef   SLEW
        !           245: # endif
        !           246: # ifdef    USEPCC
        !           247: #  warning undefining USEPCC due to option name conflict
        !           248: #  undef   USEPCC
        !           249: # endif
        !           250: # ifdef    PCCFREQ
        !           251: #  warning undefining PCCFREQ due to option name conflict
        !           252: #  undef   PCCFREQ
        !           253: # endif
        !           254: #else  /* NO_OPTION_NAME_WARNINGS */
        !           255: # undef IPV4
        !           256: # undef IPV6
        !           257: # undef AUTHREQ
        !           258: # undef AUTHNOREQ
        !           259: # undef BCASTSYNC
        !           260: # undef CONFIGFILE
        !           261: # undef DEBUG_LEVEL
        !           262: # undef SET_DEBUG_LEVEL
        !           263: # undef DRIFTFILE
        !           264: # undef PANICGATE
        !           265: # undef JAILDIR
        !           266: # undef INTERFACE
        !           267: # undef KEYFILE
        !           268: # undef LOGFILE
        !           269: # undef NOVIRTUALIPS
        !           270: # undef MODIFYMMTIMER
        !           271: # undef NOFORK
        !           272: # undef NICE
        !           273: # undef PIDFILE
        !           274: # undef PRIORITY
        !           275: # undef QUIT
        !           276: # undef PROPAGATIONDELAY
        !           277: # undef SAVECONFIGQUIT
        !           278: # undef STATSDIR
        !           279: # undef TRUSTEDKEY
        !           280: # undef USER
        !           281: # undef UPDATEINTERVAL
        !           282: # undef VAR
        !           283: # undef DVAR
        !           284: # undef SLEW
        !           285: # undef USEPCC
        !           286: # undef PCCFREQ
        !           287: #endif  /*  NO_OPTION_NAME_WARNINGS */
        !           288: 
        !           289: /* * * * * *
        !           290:  *
        !           291:  *  Interface defines for specific options.
        !           292:  */
        !           293: #define VALUE_OPT_IPV4           '4'
        !           294: #define VALUE_OPT_IPV6           '6'
        !           295: #define VALUE_OPT_AUTHREQ        'a'
        !           296: #define VALUE_OPT_AUTHNOREQ      'A'
        !           297: #define VALUE_OPT_BCASTSYNC      'b'
        !           298: #define VALUE_OPT_CONFIGFILE     'c'
        !           299: #define VALUE_OPT_DEBUG_LEVEL    'd'
        !           300: #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
        !           301: #define VALUE_OPT_DRIFTFILE      'f'
        !           302: #define VALUE_OPT_PANICGATE      'g'
        !           303: #define VALUE_OPT_JAILDIR        'i'
        !           304: #define VALUE_OPT_INTERFACE      'I'
        !           305: #define VALUE_OPT_KEYFILE        'k'
        !           306: #define VALUE_OPT_LOGFILE        'l'
        !           307: #define VALUE_OPT_NOVIRTUALIPS   'L'
        !           308: #define VALUE_OPT_MODIFYMMTIMER  'M'
        !           309: #define VALUE_OPT_NOFORK         'n'
        !           310: #define VALUE_OPT_NICE           'N'
        !           311: #define VALUE_OPT_PIDFILE        'p'
        !           312: #define VALUE_OPT_PRIORITY       'P'
        !           313: 
        !           314: #define OPT_VALUE_PRIORITY       (DESC(PRIORITY).optArg.argInt)
        !           315: #define VALUE_OPT_QUIT           'q'
        !           316: #define VALUE_OPT_PROPAGATIONDELAY 'r'
        !           317: #define VALUE_OPT_SAVECONFIGQUIT 22
        !           318: #define VALUE_OPT_STATSDIR       's'
        !           319: #define VALUE_OPT_TRUSTEDKEY     't'
        !           320: #define VALUE_OPT_USER           'u'
        !           321: #define VALUE_OPT_UPDATEINTERVAL 'U'
        !           322: 
        !           323: #define OPT_VALUE_UPDATEINTERVAL (DESC(UPDATEINTERVAL).optArg.argInt)
        !           324: #define VALUE_OPT_VAR            27
        !           325: #define VALUE_OPT_DVAR           28
        !           326: #define VALUE_OPT_SLEW           'x'
        !           327: #define VALUE_OPT_USEPCC         30
        !           328: #define VALUE_OPT_PCCFREQ        31
        !           329: #define VALUE_OPT_HELP          '?'
        !           330: #define VALUE_OPT_MORE_HELP     '!'
        !           331: #define VALUE_OPT_VERSION       INDEX_OPT_VERSION
        !           332: /*
        !           333:  *  Interface defines not associated with particular options
        !           334:  */
        !           335: #define ERRSKIP_OPTERR  STMTS(ntpdOptions.fOptSet &= ~OPTPROC_ERRSTOP)
        !           336: #define ERRSTOP_OPTERR  STMTS(ntpdOptions.fOptSet |= OPTPROC_ERRSTOP)
        !           337: #define RESTART_OPT(n)  STMTS( \
        !           338:                 ntpdOptions.curOptIdx = (n); \
        !           339:                 ntpdOptions.pzCurOpt  = NULL)
        !           340: #define START_OPT       RESTART_OPT(1)
        !           341: #define USAGE(c)        (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
        !           342: /* extracted from opthead.tlib near line 451 */
        !           343: 
        !           344: #ifdef  __cplusplus
        !           345: extern "C" {
        !           346: #endif
        !           347: 
        !           348: /* * * * * *
        !           349:  *
        !           350:  *  Declare the ntpd option descriptor.
        !           351:  */
        !           352: extern tOptions ntpdOptions;
        !           353: 
        !           354: #if defined(ENABLE_NLS)
        !           355: # ifndef _
        !           356: #   include <stdio.h>
        !           357: static inline char* aoGetsText(char const* pz) {
        !           358:     if (pz == NULL) return NULL;
        !           359:     return (char*)gettext(pz);
        !           360: }
        !           361: #   define _(s)  aoGetsText(s)
        !           362: # endif /* _() */
        !           363: 
        !           364: # define OPT_NO_XLAT_CFG_NAMES  STMTS(ntpdOptions.fOptSet |= \
        !           365:                                     OPTPROC_NXLAT_OPT_CFG;)
        !           366: # define OPT_NO_XLAT_OPT_NAMES  STMTS(ntpdOptions.fOptSet |= \
        !           367:                                     OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
        !           368: 
        !           369: # define OPT_XLAT_CFG_NAMES     STMTS(ntpdOptions.fOptSet &= \
        !           370:                                   ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
        !           371: # define OPT_XLAT_OPT_NAMES     STMTS(ntpdOptions.fOptSet &= \
        !           372:                                   ~OPTPROC_NXLAT_OPT;)
        !           373: 
        !           374: #else   /* ENABLE_NLS */
        !           375: # define OPT_NO_XLAT_CFG_NAMES
        !           376: # define OPT_NO_XLAT_OPT_NAMES
        !           377: 
        !           378: # define OPT_XLAT_CFG_NAMES
        !           379: # define OPT_XLAT_OPT_NAMES
        !           380: 
        !           381: # ifndef _
        !           382: #   define _(_s)  _s
        !           383: # endif
        !           384: #endif  /* ENABLE_NLS */
        !           385: 
        !           386: #ifdef  __cplusplus
        !           387: }
        !           388: #endif
        !           389: #endif /* AUTOOPTS_NTPD_OPTS_H_GUARD */
        !           390: /* ntpd-opts.h ends here */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>