PageRenderTime 55ms CodeModel.GetById 17ms app.highlight 33ms RepoModel.GetById 1ms app.codeStats 1ms

/contrib/bind9/bin/named/include/named/globals.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 160 lines | 98 code | 27 blank | 35 comment | 0 complexity | c8083d62f69b35984a14345db474ee58 MD5 | raw file
  1/*
  2 * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  3 * Copyright (C) 1999-2003  Internet Software Consortium.
  4 *
  5 * Permission to use, copy, modify, and/or distribute this software for any
  6 * purpose with or without fee is hereby granted, provided that the above
  7 * copyright notice and this permission notice appear in all copies.
  8 *
  9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 11 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 15 * PERFORMANCE OF THIS SOFTWARE.
 16 */
 17
 18/* $Id: globals.h,v 1.89.54.2 2011/06/17 23:47:10 tbox Exp $ */
 19
 20#ifndef NAMED_GLOBALS_H
 21#define NAMED_GLOBALS_H 1
 22
 23/*! \file */
 24
 25#include <isc/rwlock.h>
 26#include <isc/log.h>
 27#include <isc/net.h>
 28
 29#include <isccfg/aclconf.h>
 30#include <isccfg/cfg.h>
 31
 32#include <dns/zone.h>
 33
 34#include <dst/dst.h>
 35
 36#include <named/types.h>
 37
 38#undef EXTERN
 39#undef INIT
 40#ifdef NS_MAIN
 41#define EXTERN
 42#define INIT(v)	= (v)
 43#else
 44#define EXTERN extern
 45#define INIT(v)
 46#endif
 47
 48#ifndef NS_RUN_PID_DIR
 49#define NS_RUN_PID_DIR 1
 50#endif
 51
 52EXTERN isc_mem_t *		ns_g_mctx		INIT(NULL);
 53EXTERN unsigned int		ns_g_cpus		INIT(0);
 54EXTERN isc_taskmgr_t *		ns_g_taskmgr		INIT(NULL);
 55EXTERN dns_dispatchmgr_t *	ns_g_dispatchmgr	INIT(NULL);
 56EXTERN isc_entropy_t *		ns_g_entropy		INIT(NULL);
 57EXTERN isc_entropy_t *		ns_g_fallbackentropy	INIT(NULL);
 58EXTERN unsigned int		ns_g_cpus_detected	INIT(1);
 59
 60/*
 61 * XXXRTH  We're going to want multiple timer managers eventually.  One
 62 *         for really short timers, another for client timers, and one
 63 *         for zone timers.
 64 */
 65EXTERN isc_timermgr_t *		ns_g_timermgr		INIT(NULL);
 66EXTERN isc_socketmgr_t *	ns_g_socketmgr		INIT(NULL);
 67EXTERN cfg_parser_t *		ns_g_parser		INIT(NULL);
 68EXTERN const char *		ns_g_version		INIT(VERSION);
 69EXTERN const char *		ns_g_configargs		INIT(CONFIGARGS);
 70EXTERN in_port_t		ns_g_port		INIT(0);
 71EXTERN in_port_t		lwresd_g_listenport	INIT(0);
 72
 73EXTERN ns_server_t *		ns_g_server		INIT(NULL);
 74
 75EXTERN isc_boolean_t		ns_g_lwresdonly		INIT(ISC_FALSE);
 76
 77/*
 78 * Logging.
 79 */
 80EXTERN isc_log_t *		ns_g_lctx		INIT(NULL);
 81EXTERN isc_logcategory_t *	ns_g_categories		INIT(NULL);
 82EXTERN isc_logmodule_t *	ns_g_modules		INIT(NULL);
 83EXTERN unsigned int		ns_g_debuglevel		INIT(0);
 84
 85/*
 86 * Current configuration information.
 87 */
 88EXTERN cfg_obj_t *		ns_g_config		INIT(NULL);
 89EXTERN const cfg_obj_t *	ns_g_defaults		INIT(NULL);
 90EXTERN const char *		ns_g_conffile		INIT(NS_SYSCONFDIR
 91							     "/named.conf");
 92EXTERN cfg_obj_t *		ns_g_bindkeys		INIT(NULL);
 93EXTERN const char *		ns_g_keyfile		INIT(NS_SYSCONFDIR
 94							     "/rndc.key");
 95
 96EXTERN dns_tsigkey_t *		ns_g_sessionkey		INIT(NULL);
 97EXTERN dns_name_t		ns_g_sessionkeyname;
 98
 99EXTERN const char *		lwresd_g_conffile	INIT(NS_SYSCONFDIR
100							     "/lwresd.conf");
101EXTERN const char *		lwresd_g_resolvconffile	INIT("/etc"
102							     "/resolv.conf");
103EXTERN isc_boolean_t		ns_g_conffileset	INIT(ISC_FALSE);
104EXTERN isc_boolean_t		lwresd_g_useresolvconf	INIT(ISC_FALSE);
105EXTERN isc_uint16_t		ns_g_udpsize		INIT(4096);
106EXTERN cfg_aclconfctx_t *	ns_g_aclconfctx		INIT(NULL);
107
108/*
109 * Initial resource limits.
110 */
111EXTERN isc_resourcevalue_t	ns_g_initstacksize	INIT(0);
112EXTERN isc_resourcevalue_t	ns_g_initdatasize	INIT(0);
113EXTERN isc_resourcevalue_t	ns_g_initcoresize	INIT(0);
114EXTERN isc_resourcevalue_t	ns_g_initopenfiles	INIT(0);
115
116/*
117 * Misc.
118 */
119EXTERN isc_boolean_t		ns_g_coreok		INIT(ISC_TRUE);
120EXTERN const char *		ns_g_chrootdir		INIT(NULL);
121EXTERN isc_boolean_t		ns_g_foreground		INIT(ISC_FALSE);
122EXTERN isc_boolean_t		ns_g_logstderr		INIT(ISC_FALSE);
123
124EXTERN const char *		ns_g_defaultsessionkeyfile
125					INIT(NS_LOCALSTATEDIR "/run/named/"
126							      "session.key");
127
128#if NS_RUN_PID_DIR
129EXTERN const char *		ns_g_defaultpidfile 	INIT(NS_LOCALSTATEDIR
130							     "/run/named/"
131							     "named.pid");
132EXTERN const char *		lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
133							     "/run/lwresd/"
134							     "lwresd.pid");
135#else
136EXTERN const char *		ns_g_defaultpidfile 	INIT(NS_LOCALSTATEDIR
137							     "/run/named.pid");
138EXTERN const char *		lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
139							     "/run/lwresd.pid");
140#endif
141
142EXTERN const char *		ns_g_username		INIT(NULL);
143
144#ifdef USE_PKCS11
145EXTERN const char *		ns_g_engine		INIT("pkcs11");
146#else
147EXTERN const char *		ns_g_engine		INIT(NULL);
148#endif
149
150EXTERN int			ns_g_listen		INIT(3);
151EXTERN isc_time_t		ns_g_boottime;
152EXTERN isc_boolean_t		ns_g_memstatistics	INIT(ISC_FALSE);
153EXTERN isc_boolean_t		ns_g_clienttest		INIT(ISC_FALSE);
154EXTERN isc_boolean_t		ns_g_nosoa		INIT(ISC_FALSE);
155EXTERN isc_boolean_t		ns_g_noaa		INIT(ISC_FALSE);
156
157#undef EXTERN
158#undef INIT
159
160#endif /* NAMED_GLOBALS_H */