Merge from vendor branch OPENSSH:
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / named / include / named / globals.h
1 /*
2  * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 1999-2001  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and 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.59.2.1 2004/03/09 06:09:21 marka Exp $ */
19
20 #ifndef NAMED_GLOBALS_H
21 #define NAMED_GLOBALS_H 1
22
23 #include <isc/rwlock.h>
24 #include <isc/log.h>
25 #include <isc/net.h>
26
27 #include <isccfg/cfg.h>
28
29 #include <dns/zone.h>
30
31 #include <named/types.h>
32
33 #undef EXTERN
34 #undef INIT
35 #ifdef NS_MAIN
36 #define EXTERN
37 #define INIT(v) = (v)
38 #else
39 #define EXTERN extern
40 #define INIT(v)
41 #endif
42
43 EXTERN isc_mem_t *              ns_g_mctx               INIT(NULL);
44 EXTERN unsigned int             ns_g_cpus               INIT(0);
45 EXTERN isc_taskmgr_t *          ns_g_taskmgr            INIT(NULL);
46 EXTERN dns_dispatchmgr_t *      ns_g_dispatchmgr        INIT(NULL);
47 EXTERN isc_entropy_t *          ns_g_entropy            INIT(NULL);
48 /*
49  * XXXRTH  We're going to want multiple timer managers eventually.  One
50  *         for really short timers, another for client timers, and one
51  *         for zone timers.
52  */
53 EXTERN isc_timermgr_t *         ns_g_timermgr           INIT(NULL);
54 EXTERN isc_socketmgr_t *        ns_g_socketmgr          INIT(NULL);
55 EXTERN cfg_parser_t *           ns_g_parser             INIT(NULL);
56 EXTERN const char *             ns_g_version            INIT(VERSION);
57 EXTERN in_port_t                ns_g_port               INIT(0);
58 EXTERN in_port_t                lwresd_g_listenport     INIT(0);
59
60 EXTERN ns_server_t *            ns_g_server             INIT(NULL);
61
62 EXTERN isc_boolean_t            ns_g_lwresdonly         INIT(ISC_FALSE);
63
64 /*
65  * Logging.
66  */
67 EXTERN isc_log_t *              ns_g_lctx               INIT(NULL);
68 EXTERN isc_logcategory_t *      ns_g_categories         INIT(NULL);
69 EXTERN isc_logmodule_t *        ns_g_modules            INIT(NULL);
70 EXTERN unsigned int             ns_g_debuglevel         INIT(0);
71
72 /*
73  * Current configuration information.
74  */
75 EXTERN cfg_obj_t *              ns_g_config             INIT(NULL);
76 EXTERN cfg_obj_t *              ns_g_defaults           INIT(NULL);
77 EXTERN const char *             ns_g_conffile           INIT(NS_SYSCONFDIR
78                                                              "/named.conf");
79 EXTERN const char *             ns_g_keyfile            INIT(NS_SYSCONFDIR
80                                                              "/rndc.key");
81 EXTERN const char *             lwresd_g_conffile       INIT(NS_SYSCONFDIR
82                                                              "/lwresd.conf");
83 EXTERN const char *             lwresd_g_resolvconffile INIT("/etc"
84                                                              "/resolv.conf");
85 EXTERN isc_boolean_t            ns_g_conffileset        INIT(ISC_FALSE);
86 EXTERN isc_boolean_t            lwresd_g_useresolvconf  INIT(ISC_FALSE);
87
88 /*
89  * Initial resource limits.
90  */
91 EXTERN isc_resourcevalue_t      ns_g_initstacksize      INIT(0);
92 EXTERN isc_resourcevalue_t      ns_g_initdatasize       INIT(0);
93 EXTERN isc_resourcevalue_t      ns_g_initcoresize       INIT(0);
94 EXTERN isc_resourcevalue_t      ns_g_initopenfiles      INIT(0);
95
96 /*
97  * Misc.
98  */
99 EXTERN isc_boolean_t            ns_g_coreok             INIT(ISC_TRUE);
100 EXTERN const char *             ns_g_chrootdir          INIT(NULL);
101 EXTERN isc_boolean_t            ns_g_foreground         INIT(ISC_FALSE);
102 EXTERN isc_boolean_t            ns_g_logstderr          INIT(ISC_FALSE);
103
104 EXTERN const char *             ns_g_defaultpidfile     INIT(NS_LOCALSTATEDIR
105                                                              "/run/named.pid");
106 EXTERN const char *             lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
107                                                             "/run/lwresd.pid");
108 EXTERN const char *             ns_g_username           INIT(NULL);
109
110 #undef EXTERN
111 #undef INIT
112
113 #endif /* NAMED_GLOBALS_H */