ntpaths.h revision 290001
1/*
2 * Copyright (C) 2004, 2007, 2009  Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2000, 2001  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: ntpaths.h,v 1.20 2009/07/14 22:54:57 each Exp $ */
19
20/*
21 * Windows-specific path definitions
22 * These routines are used to set up and return system-specific path
23 * information about the files enumerated in NtPaths
24 */
25
26#ifndef ISC_NTPATHS_H
27#define ISC_NTPATHS_H
28
29#include <isc/lang.h>
30
31/*
32 * Index of paths needed
33 */
34enum NtPaths {
35	NAMED_CONF_PATH,
36	LWRES_CONF_PATH,
37	RESOLV_CONF_PATH,
38	RNDC_CONF_PATH,
39	NAMED_PID_PATH,
40	LWRESD_PID_PATH,
41	LOCAL_STATE_DIR,
42	SYS_CONF_DIR,
43	RNDC_KEY_PATH,
44	SESSION_KEY_PATH
45};
46
47/*
48 * Define macros to get the path of the config files
49 */
50#define NAMED_CONFFILE isc_ntpaths_get(NAMED_CONF_PATH)
51#define RNDC_CONFFILE isc_ntpaths_get(RNDC_CONF_PATH)
52#define RNDC_KEYFILE isc_ntpaths_get(RNDC_KEY_PATH)
53#define SESSION_KEYFILE isc_ntpaths_get(SESSION_KEY_PATH)
54#define RESOLV_CONF isc_ntpaths_get(RESOLV_CONF_PATH)
55
56/*
57 * Information about where the files are on disk
58 */
59#define NS_LOCALSTATEDIR	"/dns/bin"
60#define NS_SYSCONFDIR		"/dns/etc"
61
62ISC_LANG_BEGINDECLS
63
64void
65isc_ntpaths_init(void);
66
67char *
68isc_ntpaths_get(int);
69
70ISC_LANG_ENDDECLS
71
72#endif /* ISC_NTPATHS_H */
73