1 #ifndef __config_h
2 #define __config_h
3 
4 /* compile options */
5 /* HAVE_SYSLOG		compile with syslog() support */
6 /* HAVE_SETSID		only useful for supervise mode: sets session ID */
7 /* HAVE_POLL		use poll() instead of select() */
8 /* HAVE_WAITPID		use waitpid() instead of wait() */
9 /* HAVE_WAIT4		use wait4() instead of wait() */
10 /* HAVE_SEMAPHORE	use pthread semaphore instead of our own */
11 
12 #include "list.h"
13 #include "ht.h"
14 
15 struct config_s {
16 	int handlers;
17 	int ldap_threads;
18 	int dns_threads;
19 	list_t hosts;
20 	int one2one_mode;
21 
22 	int accelerate_cache;
23 	int relative_names;
24 	int netbios;
25 
26 	/* the hardcoded $HOSTMASTER environment variable */
27 	char *hostmaster;
28 
29 	/* our own nameservers; normally we use nsRecord attribute,
30 	 * but sometimes, we might want to use this instead...
31 	 */
32 	char *self_ns;
33 	list_t peer_ns;
34 
35 	char *axfr_base;
36 	char *notify;
37 	char *update;
38 
39 	int auth_mode;
40 #define AUTH_MODE_ANONYMOUS	0x00
41 #define AUTH_MODE_SIMPLE	0x01
42 #define AUTH_MODE_SASL		0x02
43 
44 	char *ldap_name;
45 	char *ldap_cred;
46 
47 	char *ldap_suffix;
48 
49 	int dn_mode;
50 #define DN_MODE_COSINE		0x00
51 #define DN_MODE_RFC1279		0x01
52 #define DN_MODE_MSDNS		0x02
53 #define DN_MODE_LDAPDNS		0x03
54 
55 	int always_hangup;
56 	long timeout_tcp;
57 
58 /* switches; row is 8bytes + asciiz string */
59 	list_t	swm;
60 /* axfr switch; same format, but string is AXFR field */
61 	list_t	swaxfr;
62 /* search switch */
63 	ht	search;
64 
65 #define SCHEDULE_A_NONE		0
66 #define SCHEDULE_A_RANDOM	1
67 	int schedule_arecord;
68 
69 /* verious performance tuners */
70 	int no_additionals;
71 	int no_additionals_ns;
72 };
73 
74 
75 typedef struct config_s config_t;
76 extern config_t ldapdns;
77 
78 #endif
79