"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/bin/named/include/named/globals.h" (4 Sep 2020, 4989 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "globals.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 9.16.6_vs_9.16.7.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef NAMED_GLOBALS_H
   13 #define NAMED_GLOBALS_H 1
   14 
   15 /*! \file */
   16 
   17 #include <stdbool.h>
   18 
   19 #include <isc/log.h>
   20 #include <isc/net.h>
   21 #include <isc/netmgr.h>
   22 #include <isc/rwlock.h>
   23 
   24 #include <dns/acl.h>
   25 #include <dns/zone.h>
   26 
   27 #include <isccfg/aclconf.h>
   28 #include <isccfg/cfg.h>
   29 
   30 #include <dst/dst.h>
   31 #include <named/fuzz.h>
   32 #include <named/types.h>
   33 
   34 #undef EXTERN
   35 #undef INIT
   36 #ifdef NAMED_MAIN
   37 #define EXTERN
   38 #define INIT(v) = (v)
   39 #else /* ifdef NAMED_MAIN */
   40 #define EXTERN extern
   41 #define INIT(v)
   42 #endif /* ifdef NAMED_MAIN */
   43 
   44 #ifndef NAMED_RUN_PID_DIR
   45 #define NAMED_RUN_PID_DIR 1
   46 #endif /* ifndef NAMED_RUN_PID_DIR */
   47 
   48 EXTERN isc_mem_t *named_g_mctx      INIT(NULL);
   49 EXTERN unsigned int named_g_cpus    INIT(0);
   50 EXTERN unsigned int named_g_udpdisp INIT(0);
   51 EXTERN isc_taskmgr_t *named_g_taskmgr INIT(NULL);
   52 EXTERN dns_dispatchmgr_t *named_g_dispatchmgr INIT(NULL);
   53 EXTERN unsigned int named_g_cpus_detected     INIT(1);
   54 
   55 #ifdef ENABLE_AFL
   56 EXTERN bool named_g_run_done INIT(false);
   57 #endif /* ifdef ENABLE_AFL */
   58 /*
   59  * XXXRTH  We're going to want multiple timer managers eventually.  One
   60  *         for really short timers, another for client timers, and one
   61  *         for zone timers.
   62  */
   63 EXTERN isc_timermgr_t *named_g_timermgr INIT(NULL);
   64 EXTERN isc_socketmgr_t *named_g_socketmgr INIT(NULL);
   65 EXTERN isc_nm_t *named_g_nm INIT(NULL);
   66 EXTERN cfg_parser_t *named_g_parser INIT(NULL);
   67 EXTERN cfg_parser_t *named_g_addparser INIT(NULL);
   68 EXTERN const char *named_g_version     INIT(VERSION);
   69 EXTERN const char *named_g_product     INIT(PRODUCT);
   70 EXTERN const char *named_g_description INIT(DESCRIPTION);
   71 EXTERN const char *named_g_srcid       INIT(SRCID);
   72 EXTERN const char *named_g_configargs  INIT(CONFIGARGS);
   73 EXTERN const char *named_g_builder     INIT(BUILDER);
   74 EXTERN in_port_t named_g_port          INIT(0);
   75 EXTERN isc_dscp_t named_g_dscp         INIT(-1);
   76 
   77 EXTERN named_server_t *named_g_server INIT(NULL);
   78 
   79 /*
   80  * Logging.
   81  */
   82 EXTERN isc_log_t *named_g_lctx INIT(NULL);
   83 EXTERN isc_logcategory_t *named_g_categories INIT(NULL);
   84 EXTERN isc_logmodule_t *named_g_modules INIT(NULL);
   85 EXTERN unsigned int named_g_debuglevel  INIT(0);
   86 
   87 /*
   88  * Current configuration information.
   89  */
   90 EXTERN cfg_obj_t *named_g_config INIT(NULL);
   91 EXTERN const cfg_obj_t *named_g_defaults   INIT(NULL);
   92 EXTERN const char *named_g_conffile    INIT(NAMED_SYSCONFDIR "/named.conf");
   93 EXTERN const char *named_g_defaultbindkeys INIT(NAMED_SYSCONFDIR "/bind.keys");
   94 EXTERN const char *named_g_keyfile     INIT(NAMED_SYSCONFDIR "/rndc.key");
   95 
   96 EXTERN dns_tsigkey_t *named_g_sessionkey INIT(NULL);
   97 EXTERN dns_name_t            named_g_sessionkeyname;
   98 EXTERN bool named_g_conffileset      INIT(false);
   99 EXTERN cfg_aclconfctx_t *named_g_aclconfctx INIT(NULL);
  100 
  101 /*
  102  * Initial resource limits.
  103  */
  104 EXTERN isc_resourcevalue_t named_g_initstacksize INIT(0);
  105 EXTERN isc_resourcevalue_t named_g_initdatasize  INIT(0);
  106 EXTERN isc_resourcevalue_t named_g_initcoresize  INIT(0);
  107 EXTERN isc_resourcevalue_t named_g_initopenfiles INIT(0);
  108 
  109 /*
  110  * Misc.
  111  */
  112 EXTERN bool named_g_coreok       INIT(true);
  113 EXTERN const char *named_g_chrootdir INIT(NULL);
  114 EXTERN bool named_g_foreground       INIT(false);
  115 EXTERN bool named_g_logstderr        INIT(false);
  116 EXTERN bool named_g_nosyslog         INIT(false);
  117 EXTERN const char *named_g_logfile   INIT(NULL);
  118 
  119 EXTERN const char *named_g_defaultsessionkeyfile INIT(NAMED_LOCALSTATEDIR
  120                               "/run/named/"
  121                               "session.key");
  122 EXTERN const char *named_g_defaultlockfile INIT(NAMED_LOCALSTATEDIR "/run/"
  123                                     "named/"
  124                                     "named."
  125                                     "lock");
  126 EXTERN bool named_g_forcelock          INIT(false);
  127 
  128 #if NAMED_RUN_PID_DIR
  129 EXTERN const char *named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR "/run/named/"
  130                                    "named.pid");
  131 #else  /* if NAMED_RUN_PID_DIR */
  132 EXTERN const char *named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR "/run/"
  133                                    "named.pid");
  134 #endif /* if NAMED_RUN_PID_DIR */
  135 
  136 EXTERN const char *named_g_username INIT(NULL);
  137 
  138 EXTERN const char *named_g_engine INIT(NULL);
  139 
  140 EXTERN isc_time_t         named_g_boottime;
  141 EXTERN isc_time_t         named_g_configtime;
  142 EXTERN bool named_g_memstatistics INIT(false);
  143 EXTERN bool named_g_keepstderr    INIT(false);
  144 
  145 EXTERN unsigned int named_g_tat_interval INIT(24 * 3600);
  146 EXTERN unsigned int named_g_maxcachesize INIT(0);
  147 
  148 #if defined(HAVE_GEOIP2)
  149 EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
  150 #endif /* if defined(HAVE_GEOIP2) */
  151 
  152 EXTERN const char *named_g_fuzz_addr    INIT(NULL);
  153 EXTERN isc_fuzztype_t named_g_fuzz_type INIT(isc_fuzz_none);
  154 
  155 EXTERN dns_acl_t *named_g_mapped INIT(NULL);
  156 
  157 #undef EXTERN
  158 #undef INIT
  159 
  160 #endif /* NAMED_GLOBALS_H */