2 * Copyright (C) 2004-2008, 2010 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2003 Internet Software Consortium.
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.
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.
18 /* $Id: globals.h,v 1.80.84.2 2010/06/26 23:46:15 tbox Exp $ */
20 #ifndef NAMED_GLOBALS_H
21 #define NAMED_GLOBALS_H 1
25 #include <isc/rwlock.h>
29 #include <isccfg/cfg.h>
33 #include <named/types.h>
45 #ifndef NS_RUN_PID_DIR
46 #define NS_RUN_PID_DIR 1
49 EXTERN isc_mem_t * ns_g_mctx INIT(NULL);
50 EXTERN unsigned int ns_g_cpus INIT(0);
51 EXTERN isc_taskmgr_t * ns_g_taskmgr INIT(NULL);
52 EXTERN dns_dispatchmgr_t * ns_g_dispatchmgr INIT(NULL);
53 EXTERN isc_entropy_t * ns_g_entropy INIT(NULL);
54 EXTERN isc_entropy_t * ns_g_fallbackentropy INIT(NULL);
55 EXTERN unsigned int ns_g_cpus_detected INIT(1);
58 * XXXRTH We're going to want multiple timer managers eventually. One
59 * for really short timers, another for client timers, and one
62 EXTERN isc_timermgr_t * ns_g_timermgr INIT(NULL);
63 EXTERN isc_socketmgr_t * ns_g_socketmgr INIT(NULL);
64 EXTERN cfg_parser_t * ns_g_parser INIT(NULL);
65 EXTERN const char * ns_g_version INIT(VERSION);
66 EXTERN const char * ns_g_configargs INIT(CONFIGARGS);
67 EXTERN in_port_t ns_g_port INIT(0);
68 EXTERN in_port_t lwresd_g_listenport INIT(0);
70 EXTERN ns_server_t * ns_g_server INIT(NULL);
72 EXTERN isc_boolean_t ns_g_lwresdonly INIT(ISC_FALSE);
77 EXTERN isc_log_t * ns_g_lctx INIT(NULL);
78 EXTERN isc_logcategory_t * ns_g_categories INIT(NULL);
79 EXTERN isc_logmodule_t * ns_g_modules INIT(NULL);
80 EXTERN unsigned int ns_g_debuglevel INIT(0);
83 * Current configuration information.
85 EXTERN cfg_obj_t * ns_g_config INIT(NULL);
86 EXTERN const cfg_obj_t * ns_g_defaults INIT(NULL);
87 EXTERN const char * ns_g_conffile INIT(NS_SYSCONFDIR
89 EXTERN const char * ns_g_keyfile INIT(NS_SYSCONFDIR
91 EXTERN const char * lwresd_g_conffile INIT(NS_SYSCONFDIR
93 EXTERN const char * lwresd_g_resolvconffile INIT("/etc"
95 EXTERN isc_boolean_t ns_g_conffileset INIT(ISC_FALSE);
96 EXTERN isc_boolean_t lwresd_g_useresolvconf INIT(ISC_FALSE);
97 EXTERN isc_uint16_t ns_g_udpsize INIT(4096);
100 * Initial resource limits.
102 EXTERN isc_resourcevalue_t ns_g_initstacksize INIT(0);
103 EXTERN isc_resourcevalue_t ns_g_initdatasize INIT(0);
104 EXTERN isc_resourcevalue_t ns_g_initcoresize INIT(0);
105 EXTERN isc_resourcevalue_t ns_g_initopenfiles INIT(0);
110 EXTERN isc_boolean_t ns_g_coreok INIT(ISC_TRUE);
111 EXTERN const char * ns_g_chrootdir INIT(NULL);
112 EXTERN isc_boolean_t ns_g_foreground INIT(ISC_FALSE);
113 EXTERN isc_boolean_t ns_g_logstderr INIT(ISC_FALSE);
116 EXTERN const char * ns_g_defaultpidfile INIT(NS_LOCALSTATEDIR
119 EXTERN const char * lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
123 EXTERN const char * ns_g_defaultpidfile INIT(NS_LOCALSTATEDIR
125 EXTERN const char * lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
129 EXTERN const char * ns_g_username INIT(NULL);
131 EXTERN int ns_g_listen INIT(3);
132 EXTERN isc_time_t ns_g_boottime;
133 EXTERN isc_boolean_t ns_g_memstatistics INIT(ISC_FALSE);
134 EXTERN isc_boolean_t ns_g_clienttest INIT(ISC_FALSE);
135 EXTERN isc_boolean_t ns_g_nosoa INIT(ISC_FALSE);
140 #endif /* NAMED_GLOBALS_H */