1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
4 /* Directory to chroot to */
5 #define CHROOT_DIR "/var/unbound"
7 /* Define this to enable client subnet option. */
8 /* #undef CLIENT_SUBNET */
10 /* Do sha512 definitions in config.h */
11 /* #undef COMPAT_SHA512 */
13 /* Pathname to the Unbound configuration file */
14 #define CONFIGFILE "/var/unbound/unbound.conf"
16 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
18 /* #undef DARWIN_BROKEN_SETREUID */
20 /* Whether daemon is deprecated */
21 /* #undef DEPRECATED_DAEMON */
23 /* default dnstap socket path */
24 /* #undef DNSTAP_SOCKET_PATH */
26 /* Define if you want to use debug lock checking (slow). */
27 /* #undef ENABLE_LOCK_CHECKS */
29 /* Define this if you enabled-allsymbols from libunbound to link binaries to
30 it for smaller install size, but the libunbound export table is polluted by
32 /* #undef EXPORT_ALL_SYMBOLS */
34 /* Define to 1 if you have the `arc4random' function. */
35 #define HAVE_ARC4RANDOM 1
37 /* Define to 1 if you have the `arc4random_uniform' function. */
38 #define HAVE_ARC4RANDOM_UNIFORM 1
40 /* Define to 1 if you have the <arpa/inet.h> header file. */
41 #define HAVE_ARPA_INET_H 1
43 /* Whether the C compiler accepts the "format" attribute */
44 #define HAVE_ATTR_FORMAT 1
46 /* Whether the C compiler accepts the "unused" attribute */
47 #define HAVE_ATTR_UNUSED 1
49 /* Whether the C compiler accepts the "weak" attribute */
50 #define HAVE_ATTR_WEAK 1
52 /* Define to 1 if you have the `chown' function. */
55 /* Define to 1 if you have the `chroot' function. */
58 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
59 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
61 /* Define to 1 if you have the `ctime_r' function. */
62 #define HAVE_CTIME_R 1
64 /* Define to 1 if you have the `daemon' function. */
67 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
69 /* #undef HAVE_DECL_ARC4RANDOM */
71 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
73 /* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
75 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
77 #define HAVE_DECL_INET_NTOP 1
79 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
81 #define HAVE_DECL_INET_PTON 1
83 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
85 #define HAVE_DECL_NID_ED25519 0
87 /* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
89 #define HAVE_DECL_NID_ED448 0
91 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
93 #define HAVE_DECL_NID_SECP384R1 1
95 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
97 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
99 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
101 /* #undef HAVE_DECL_REALLOCARRAY */
103 /* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
105 /* #undef HAVE_DECL_REDISCONNECT */
107 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
109 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
111 /* Define to 1 if you have the declaration of
112 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
113 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
115 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
117 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
119 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
121 /* #undef HAVE_DECL_STRLCAT */
123 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
125 /* #undef HAVE_DECL_STRLCPY */
127 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
129 #define HAVE_DECL_XML_STOPPARSER 1
131 /* Define to 1 if you have the <dlfcn.h> header file. */
132 #define HAVE_DLFCN_H 1
134 /* Define to 1 if you have the `DSA_SIG_set0' function. */
135 /* #undef HAVE_DSA_SIG_SET0 */
137 /* Define to 1 if you have the <endian.h> header file. */
138 /* #undef HAVE_ENDIAN_H */
140 /* Define to 1 if you have the `endprotoent' function. */
141 #define HAVE_ENDPROTOENT 1
143 /* Define to 1 if you have the `endpwent' function. */
144 #define HAVE_ENDPWENT 1
146 /* Define to 1 if you have the `endservent' function. */
147 #define HAVE_ENDSERVENT 1
149 /* Define to 1 if you have the `ERR_free_strings' function. */
150 #define HAVE_ERR_FREE_STRINGS 1
152 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
153 #define HAVE_ERR_LOAD_CRYPTO_STRINGS 1
155 /* Define to 1 if you have the `event_base_free' function. */
156 /* #undef HAVE_EVENT_BASE_FREE */
158 /* Define to 1 if you have the `event_base_get_method' function. */
159 /* #undef HAVE_EVENT_BASE_GET_METHOD */
161 /* Define to 1 if you have the `event_base_new' function. */
162 /* #undef HAVE_EVENT_BASE_NEW */
164 /* Define to 1 if you have the `event_base_once' function. */
165 /* #undef HAVE_EVENT_BASE_ONCE */
167 /* Define to 1 if you have the <event.h> header file. */
168 /* #undef HAVE_EVENT_H */
170 /* Define to 1 if you have the `EVP_cleanup' function. */
171 #define HAVE_EVP_CLEANUP 1
173 /* Define to 1 if you have the `EVP_DigestVerify' function. */
174 /* #undef HAVE_EVP_DIGESTVERIFY */
176 /* Define to 1 if you have the `EVP_dss1' function. */
177 #define HAVE_EVP_DSS1 1
179 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
180 /* #undef HAVE_EVP_MD_CTX_NEW */
182 /* Define to 1 if you have the `EVP_sha1' function. */
183 #define HAVE_EVP_SHA1 1
185 /* Define to 1 if you have the `EVP_sha256' function. */
186 #define HAVE_EVP_SHA256 1
188 /* Define to 1 if you have the `EVP_sha512' function. */
189 #define HAVE_EVP_SHA512 1
191 /* Define to 1 if you have the `ev_default_loop' function. */
192 /* #undef HAVE_EV_DEFAULT_LOOP */
194 /* Define to 1 if you have the `ev_loop' function. */
195 /* #undef HAVE_EV_LOOP */
197 /* Define to 1 if you have the <expat.h> header file. */
198 #define HAVE_EXPAT_H 1
200 /* Define to 1 if you have the `fcntl' function. */
203 /* Define to 1 if you have the `FIPS_mode' function. */
204 #define HAVE_FIPS_MODE 1
206 /* Define to 1 if you have the `fork' function. */
209 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
210 #define HAVE_FSEEKO 1
212 /* Define to 1 if you have the `fsync' function. */
215 /* Whether getaddrinfo is available */
216 #define HAVE_GETADDRINFO 1
218 /* Define to 1 if you have the `getauxval' function. */
219 /* #undef HAVE_GETAUXVAL */
221 /* Define to 1 if you have the `getentropy' function. */
222 /* #undef HAVE_GETENTROPY */
224 /* Define to 1 if you have the <getopt.h> header file. */
225 #define HAVE_GETOPT_H 1
227 /* Define to 1 if you have the `getpwnam' function. */
228 #define HAVE_GETPWNAM 1
230 /* Define to 1 if you have the `getrlimit' function. */
231 #define HAVE_GETRLIMIT 1
233 /* Define to 1 if you have the `glob' function. */
236 /* Define to 1 if you have the <glob.h> header file. */
237 #define HAVE_GLOB_H 1
239 /* Define to 1 if you have the `gmtime_r' function. */
240 #define HAVE_GMTIME_R 1
242 /* Define to 1 if you have the <grp.h> header file. */
245 /* Define to 1 if you have the <hiredis/hiredis.h> header file. */
246 /* #undef HAVE_HIREDIS_HIREDIS_H */
248 /* If you have HMAC_Update */
249 #define HAVE_HMAC_UPDATE 1
251 /* Define to 1 if you have the `inet_aton' function. */
252 #define HAVE_INET_ATON 1
254 /* Define to 1 if you have the `inet_ntop' function. */
255 #define HAVE_INET_NTOP 1
257 /* Define to 1 if you have the `inet_pton' function. */
258 #define HAVE_INET_PTON 1
260 /* Define to 1 if you have the `initgroups' function. */
261 #define HAVE_INITGROUPS 1
263 /* Define to 1 if you have the <inttypes.h> header file. */
264 #define HAVE_INTTYPES_H 1
266 /* if the function 'ioctlsocket' is available */
267 /* #undef HAVE_IOCTLSOCKET */
269 /* Define to 1 if you have the <iphlpapi.h> header file. */
270 /* #undef HAVE_IPHLPAPI_H */
272 /* Define to 1 if you have the `isblank' function. */
273 #define HAVE_ISBLANK 1
275 /* Define to 1 if you have the `kill' function. */
278 /* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
279 /* #undef HAVE_LIBKERN_OSBYTEORDER_H */
281 /* Define if we have LibreSSL */
282 /* #undef HAVE_LIBRESSL */
284 /* Define to 1 if you have the `localtime_r' function. */
285 #define HAVE_LOCALTIME_R 1
287 /* Define to 1 if you have the <login_cap.h> header file. */
288 #define HAVE_LOGIN_CAP_H 1
290 /* If have GNU libc compatible malloc */
291 #define HAVE_MALLOC 1
293 /* Define to 1 if you have the `memmove' function. */
294 #define HAVE_MEMMOVE 1
296 /* Define to 1 if you have the <memory.h> header file. */
297 #define HAVE_MEMORY_H 1
299 /* Define to 1 if you have the <netdb.h> header file. */
300 #define HAVE_NETDB_H 1
302 /* Define to 1 if you have the <netinet/in.h> header file. */
303 #define HAVE_NETINET_IN_H 1
305 /* Define to 1 if you have the <netinet/tcp.h> header file. */
306 #define HAVE_NETINET_TCP_H 1
308 /* Use libnettle for crypto */
309 /* #undef HAVE_NETTLE */
311 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
312 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
314 /* Define to 1 if you have the <nettle/eddsa.h> header file. */
315 /* #undef HAVE_NETTLE_EDDSA_H */
317 /* Use libnss for crypto */
318 /* #undef HAVE_NSS */
320 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
321 #define HAVE_OPENSSL_ADD_ALL_DIGESTS 1
323 /* Define to 1 if you have the <openssl/bn.h> header file. */
324 #define HAVE_OPENSSL_BN_H 1
326 /* Define to 1 if you have the `OPENSSL_config' function. */
327 #define HAVE_OPENSSL_CONFIG 1
329 /* Define to 1 if you have the <openssl/conf.h> header file. */
330 #define HAVE_OPENSSL_CONF_H 1
332 /* Define to 1 if you have the <openssl/dh.h> header file. */
333 #define HAVE_OPENSSL_DH_H 1
335 /* Define to 1 if you have the <openssl/dsa.h> header file. */
336 #define HAVE_OPENSSL_DSA_H 1
338 /* Define to 1 if you have the <openssl/engine.h> header file. */
339 #define HAVE_OPENSSL_ENGINE_H 1
341 /* Define to 1 if you have the <openssl/err.h> header file. */
342 #define HAVE_OPENSSL_ERR_H 1
344 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
345 /* #undef HAVE_OPENSSL_INIT_CRYPTO */
347 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
348 /* #undef HAVE_OPENSSL_INIT_SSL */
350 /* Define to 1 if you have the <openssl/rand.h> header file. */
351 #define HAVE_OPENSSL_RAND_H 1
353 /* Define to 1 if you have the <openssl/rsa.h> header file. */
354 #define HAVE_OPENSSL_RSA_H 1
356 /* Define to 1 if you have the <openssl/ssl.h> header file. */
357 #define HAVE_OPENSSL_SSL_H 1
359 /* Define if you have POSIX threads libraries and header files. */
360 #define HAVE_PTHREAD 1
362 /* Have PTHREAD_PRIO_INHERIT. */
363 #define HAVE_PTHREAD_PRIO_INHERIT 1
365 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
366 #define HAVE_PTHREAD_RWLOCK_T 1
368 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
369 #define HAVE_PTHREAD_SPINLOCK_T 1
371 /* Define to 1 if you have the <pwd.h> header file. */
374 /* Define if you have Python libraries and header files. */
375 /* #undef HAVE_PYTHON */
377 /* Define to 1 if you have the `random' function. */
378 #define HAVE_RANDOM 1
380 /* Define to 1 if you have the `RAND_cleanup' function. */
381 #define HAVE_RAND_CLEANUP 1
383 /* Define to 1 if you have the `reallocarray' function. */
384 #define HAVE_REALLOCARRAY 1
386 /* Define to 1 if you have the `recvmsg' function. */
387 #define HAVE_RECVMSG 1
389 /* Define to 1 if you have the `sendmsg' function. */
390 #define HAVE_SENDMSG 1
392 /* Define to 1 if you have the `setregid' function. */
393 /* #undef HAVE_SETREGID */
395 /* Define to 1 if you have the `setresgid' function. */
396 #define HAVE_SETRESGID 1
398 /* Define to 1 if you have the `setresuid' function. */
399 #define HAVE_SETRESUID 1
401 /* Define to 1 if you have the `setreuid' function. */
402 /* #undef HAVE_SETREUID */
404 /* Define to 1 if you have the `setrlimit' function. */
405 #define HAVE_SETRLIMIT 1
407 /* Define to 1 if you have the `setsid' function. */
408 #define HAVE_SETSID 1
410 /* Define to 1 if you have the `setusercontext' function. */
411 #define HAVE_SETUSERCONTEXT 1
413 /* Define to 1 if you have the `SHA512_Update' function. */
414 /* #undef HAVE_SHA512_UPDATE */
416 /* Define to 1 if you have the `shmget' function. */
417 #define HAVE_SHMGET 1
419 /* Define to 1 if you have the `sigprocmask' function. */
420 #define HAVE_SIGPROCMASK 1
422 /* Define to 1 if you have the `sleep' function. */
425 /* Define to 1 if you have the `snprintf' function. */
426 #define HAVE_SNPRINTF 1
428 /* Define to 1 if you have the `socketpair' function. */
429 #define HAVE_SOCKETPAIR 1
431 /* Using Solaris threads */
432 /* #undef HAVE_SOLARIS_THREADS */
434 /* Define to 1 if you have the `srandom' function. */
435 #define HAVE_SRANDOM 1
437 /* Define if you have the SSL libraries installed. */
438 #define HAVE_SSL /**/
440 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
441 /* #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL */
443 /* Define to 1 if you have the `SSL_get0_peername' function. */
444 /* #undef HAVE_SSL_GET0_PEERNAME */
446 /* Define to 1 if you have the `SSL_set1_host' function. */
447 /* #undef HAVE_SSL_SET1_HOST */
449 /* Define to 1 if you have the <stdarg.h> header file. */
450 #define HAVE_STDARG_H 1
452 /* Define to 1 if you have the <stdbool.h> header file. */
453 #define HAVE_STDBOOL_H 1
455 /* Define to 1 if you have the <stdint.h> header file. */
456 #define HAVE_STDINT_H 1
458 /* Define to 1 if you have the <stdlib.h> header file. */
459 #define HAVE_STDLIB_H 1
461 /* Define to 1 if you have the `strftime' function. */
462 #define HAVE_STRFTIME 1
464 /* Define to 1 if you have the <strings.h> header file. */
465 #define HAVE_STRINGS_H 1
467 /* Define to 1 if you have the <string.h> header file. */
468 #define HAVE_STRING_H 1
470 /* Define to 1 if you have the `strlcat' function. */
471 #define HAVE_STRLCAT 1
473 /* Define to 1 if you have the `strlcpy' function. */
474 #define HAVE_STRLCPY 1
476 /* Define to 1 if you have the `strptime' function. */
477 #define HAVE_STRPTIME 1
479 /* Define to 1 if you have the `strsep' function. */
480 #define HAVE_STRSEP 1
482 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
483 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
485 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
486 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
488 /* Define if you have Swig libraries and header files. */
489 /* #undef HAVE_SWIG */
491 /* Define to 1 if you have the <syslog.h> header file. */
492 #define HAVE_SYSLOG_H 1
494 /* Define to 1 if systemd should be used */
495 /* #undef HAVE_SYSTEMD */
497 /* Define to 1 if you have the <sys/endian.h> header file. */
498 #define HAVE_SYS_ENDIAN_H 1
500 /* Define to 1 if you have the <sys/ipc.h> header file. */
501 #define HAVE_SYS_IPC_H 1
503 /* Define to 1 if you have the <sys/param.h> header file. */
504 #define HAVE_SYS_PARAM_H 1
506 /* Define to 1 if you have the <sys/resource.h> header file. */
507 #define HAVE_SYS_RESOURCE_H 1
509 /* Define to 1 if you have the <sys/sha2.h> header file. */
510 /* #undef HAVE_SYS_SHA2_H */
512 /* Define to 1 if you have the <sys/shm.h> header file. */
513 #define HAVE_SYS_SHM_H 1
515 /* Define to 1 if you have the <sys/socket.h> header file. */
516 #define HAVE_SYS_SOCKET_H 1
518 /* Define to 1 if you have the <sys/stat.h> header file. */
519 #define HAVE_SYS_STAT_H 1
521 /* Define to 1 if you have the <sys/sysctl.h> header file. */
522 /* #undef HAVE_SYS_SYSCTL_H */
524 /* Define to 1 if you have the <sys/types.h> header file. */
525 #define HAVE_SYS_TYPES_H 1
527 /* Define to 1 if you have the <sys/uio.h> header file. */
528 #define HAVE_SYS_UIO_H 1
530 /* Define to 1 if you have the <sys/un.h> header file. */
531 #define HAVE_SYS_UN_H 1
533 /* Define to 1 if you have the <sys/wait.h> header file. */
534 #define HAVE_SYS_WAIT_H 1
536 /* Define to 1 if you have the <time.h> header file. */
537 #define HAVE_TIME_H 1
539 /* Define to 1 if you have the `tzset' function. */
542 /* Define to 1 if you have the <unistd.h> header file. */
543 #define HAVE_UNISTD_H 1
545 /* Define to 1 if you have the `usleep' function. */
546 #define HAVE_USLEEP 1
548 /* Define to 1 if you have the `vfork' function. */
551 /* Define to 1 if you have the <vfork.h> header file. */
552 /* #undef HAVE_VFORK_H */
554 /* Define to 1 if you have the <windows.h> header file. */
555 /* #undef HAVE_WINDOWS_H */
557 /* Using Windows threads */
558 /* #undef HAVE_WINDOWS_THREADS */
560 /* Define to 1 if you have the <winsock2.h> header file. */
561 /* #undef HAVE_WINSOCK2_H */
563 /* Define to 1 if `fork' works. */
564 #define HAVE_WORKING_FORK 1
566 /* Define to 1 if `vfork' works. */
567 #define HAVE_WORKING_VFORK 1
569 /* Define to 1 if you have the `writev' function. */
570 #define HAVE_WRITEV 1
572 /* Define to 1 if you have the <ws2tcpip.h> header file. */
573 /* #undef HAVE_WS2TCPIP_H */
575 /* Define to 1 if you have the `_beginthreadex' function. */
576 /* #undef HAVE__BEGINTHREADEX */
578 /* if lex has yylex_destroy */
579 #define LEX_HAS_YYLEX_DESTROY 1
581 /* Define to the sub-directory where libtool stores uninstalled libraries. */
582 #define LT_OBJDIR ".libs/"
584 /* Define to the maximum message length to pass to syslog. */
585 #define MAXSYSLOGMSGLEN 10240
587 /* Define if memcmp() does not compare unsigned bytes */
588 /* #undef MEMCMP_IS_BROKEN */
590 /* Define if mkdir has one argument. */
591 /* #undef MKDIR_HAS_ONE_ARG */
593 /* Define if the network stack does not fully support nonblocking io (causes
594 lower performance). */
595 /* #undef NONBLOCKING_IS_BROKEN */
597 /* Put -D_ALL_SOURCE define in config.h */
598 /* #undef OMITTED__D_ALL_SOURCE */
600 /* Put -D_BSD_SOURCE define in config.h */
601 /* #undef OMITTED__D_BSD_SOURCE */
603 /* Put -D_DEFAULT_SOURCE define in config.h */
604 /* #undef OMITTED__D_DEFAULT_SOURCE */
606 /* Put -D_GNU_SOURCE define in config.h */
607 /* #undef OMITTED__D_GNU_SOURCE */
609 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
610 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
612 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
613 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
615 /* Put -D_XOPEN_SOURCE=600 define in config.h */
616 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
618 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
619 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
621 /* Put -D__EXTENSIONS__ define in config.h */
622 /* #undef OMITTED__D__EXTENSIONS__ */
624 /* Define to the address where bug reports for this package should be sent. */
625 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
627 /* Define to the full name of this package. */
628 #define PACKAGE_NAME "unbound"
630 /* Define to the full name and version of this package. */
631 #define PACKAGE_STRING "unbound 1.7.1"
633 /* Define to the one symbol short name of this package. */
634 #define PACKAGE_TARNAME "unbound"
636 /* Define to the home page for this package. */
637 #define PACKAGE_URL ""
639 /* Define to the version of this package. */
640 #define PACKAGE_VERSION "1.7.1"
642 /* default pidfile location */
643 #define PIDFILE "/var/unbound/unbound.pid"
645 /* Define to necessary symbol if this constant uses a non-standard name on
647 /* #undef PTHREAD_CREATE_JOINABLE */
649 /* Define as the return type of signal handlers (`int' or `void'). */
650 #define RETSIGTYPE void
652 /* default rootkey location */
653 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
655 /* default rootcert location */
656 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
658 /* version number for resource files */
659 #define RSRC_PACKAGE_VERSION 1,7,1,0
661 /* Directory to chdir to */
662 #define RUN_DIR "/var/unbound"
665 #define SHARE_DIR "/var/unbound"
667 /* The size of `time_t', as computed by sizeof. */
668 #define SIZEOF_TIME_T 8
670 /* define if (v)snprintf does not return length needed, (but length used) */
671 /* #undef SNPRINTF_RET_BROKEN */
673 /* Define to 1 if libsodium supports sodium_set_misuse_handler */
674 /* #undef SODIUM_MISUSE_HANDLER */
676 /* Define to 1 if you have the ANSI C header files. */
677 #define STDC_HEADERS 1
679 /* use default strptime. */
680 #define STRPTIME_WORKS 1
682 /* Use win32 resources and API */
683 /* #undef UB_ON_WINDOWS */
685 /* default username */
686 #define UB_USERNAME "unbound"
688 /* use to enable lightweight alloc assertions, for debug use */
689 /* #undef UNBOUND_ALLOC_LITE */
691 /* use malloc not regions, for debug use */
692 /* #undef UNBOUND_ALLOC_NONREGIONAL */
694 /* use statistics for allocs and frees, for debug use */
695 /* #undef UNBOUND_ALLOC_STATS */
697 /* define this to enable debug checks. */
698 /* #undef UNBOUND_DEBUG */
700 /* Define to 1 to use cachedb support */
701 /* #undef USE_CACHEDB */
703 /* Define to 1 to enable dnscrypt support */
704 /* #undef USE_DNSCRYPT */
706 /* Define to 1 to enable dnscrypt with xchacha20 support */
707 /* #undef USE_DNSCRYPT_XCHACHA20 */
709 /* Define to 1 to enable dnstap support */
710 /* #undef USE_DNSTAP */
712 /* Define this to enable DSA support. */
715 /* Define this to enable ECDSA support. */
718 /* Define this to enable an EVP workaround for older openssl */
719 /* #undef USE_ECDSA_EVP_WORKAROUND */
721 /* Define this to enable ED25519 support. */
722 /* #undef USE_ED25519 */
724 /* Define this to enable ED448 support. */
725 /* #undef USE_ED448 */
727 /* Define this to enable GOST support. */
730 /* Define to 1 to use ipsecmod support. */
731 /* #undef USE_IPSECMOD */
733 /* Define if you want to use internal select based events */
734 #define USE_MINI_EVENT 1
736 /* Define this to enable client TCP Fast Open. */
737 /* #undef USE_MSG_FASTOPEN */
739 /* Define this to enable client TCP Fast Open. */
740 /* #undef USE_OSX_MSG_FASTOPEN */
742 /* Define this to use hiredis client. */
743 /* #undef USE_REDIS */
745 /* Define this to enable SHA1 support. */
748 /* Define this to enable SHA256 and SHA512 support. */
751 /* Enable extensions on AIX 3, Interix. */
753 # define _ALL_SOURCE 1
755 /* Enable GNU extensions on systems that have them. */
757 # define _GNU_SOURCE 1
759 /* Enable threading extensions on Solaris. */
760 #ifndef _POSIX_PTHREAD_SEMANTICS
761 # define _POSIX_PTHREAD_SEMANTICS 1
763 /* Enable extensions on HP NonStop. */
764 #ifndef _TANDEM_SOURCE
765 # define _TANDEM_SOURCE 1
767 /* Enable general extensions on Solaris. */
768 #ifndef __EXTENSIONS__
769 # define __EXTENSIONS__ 1
773 /* Define this to enable server TCP Fast Open. */
774 /* #undef USE_TCP_FASTOPEN */
776 /* Whether the windows socket API is used */
777 /* #undef USE_WINSOCK */
779 /* the version of the windows API enabled */
780 #define WINVER 0x0502
782 /* Define if you want Python module. */
783 /* #undef WITH_PYTHONMODULE */
785 /* Define if you want PyUnbound. */
786 /* #undef WITH_PYUNBOUND */
788 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
790 #define YYTEXT_POINTER 1
792 /* Enable large inode numbers on Mac OS X 10.5. */
793 #ifndef _DARWIN_USE_64_BIT_INODE
794 # define _DARWIN_USE_64_BIT_INODE 1
797 /* Number of bits in a file offset, on hosts where this is settable. */
798 /* #undef _FILE_OFFSET_BITS */
800 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
801 /* #undef _LARGEFILE_SOURCE */
803 /* Define for large files, on AIX-style hosts. */
804 /* #undef _LARGE_FILES */
806 /* Define to 1 if on MINIX. */
809 /* Enable for compile on Minix */
810 /* #undef _NETBSD_SOURCE */
812 /* Define to 2 if the system does not provide POSIX.1 features except with
814 /* #undef _POSIX_1_SOURCE */
816 /* Define to 1 if you need to in order for `stat' and other things to work. */
817 /* #undef _POSIX_SOURCE */
819 /* Define to empty if `const' does not conform to ANSI C. */
822 /* Define to `int' if <sys/types.h> doesn't define. */
826 /* #undef in_addr_t */
829 /* #undef in_port_t */
831 /* Define to `__inline__' or `__inline' if that's what the C compiler
832 calls it, or to nothing if 'inline' is not supported under any name. */
837 /* Define to `short' if <sys/types.h> does not define. */
840 /* Define to `int' if <sys/types.h> does not define. */
843 /* Define to `long long' if <sys/types.h> does not define. */
846 /* Define to `signed char' if <sys/types.h> does not define. */
849 /* Define if replacement function should be used. */
852 /* Define to `long int' if <sys/types.h> does not define. */
855 /* Define to `int' if <sys/types.h> does not define. */
858 /* Define to 'int' if not defined */
861 /* Define to `unsigned int' if <sys/types.h> does not define. */
864 /* Define to 'int' if not defined */
865 /* #undef socklen_t */
867 /* Define to `int' if <sys/types.h> does not define. */
870 /* Define to 'unsigned char if not defined */
873 /* Define to `int' if <sys/types.h> doesn't define. */
876 /* Define to `unsigned short' if <sys/types.h> does not define. */
877 /* #undef uint16_t */
879 /* Define to `unsigned int' if <sys/types.h> does not define. */
880 /* #undef uint32_t */
882 /* Define to `unsigned long long' if <sys/types.h> does not define. */
883 /* #undef uint64_t */
885 /* Define to `unsigned char' if <sys/types.h> does not define. */
888 /* Define as `fork' if `vfork' does not work. */
891 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
892 #define _GNU_SOURCE 1
895 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
896 #define _BSD_SOURCE 1
899 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
900 #define _DEFAULT_SOURCE 1
903 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
904 #define __EXTENSIONS__ 1
907 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
908 #define _POSIX_C_SOURCE 200112
911 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
912 #define _XOPEN_SOURCE 600
915 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
916 #define _XOPEN_SOURCE_EXTENDED 1
919 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
920 #define _ALL_SOURCE 1
923 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
924 #define _LARGEFILE_SOURCE 1
930 #ifndef UNBOUND_DEBUG
934 /** Use small-ldns codebase */
937 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
961 #include <sys/param.h>
964 #ifdef HAVE_SYS_SOCKET_H
965 #include <sys/socket.h>
968 #ifdef HAVE_SYS_UIO_H
972 #ifdef HAVE_NETINET_IN_H
973 #include <netinet/in.h>
976 #ifdef HAVE_NETINET_TCP_H
977 #include <netinet/tcp.h>
980 #ifdef HAVE_ARPA_INET_H
981 #include <arpa/inet.h>
984 #ifdef HAVE_WINSOCK2_H
985 #include <winsock2.h>
988 #ifdef HAVE_WS2TCPIP_H
989 #include <ws2tcpip.h>
995 #define ARG_LL "%I64"
999 #define AF_LOCAL AF_UNIX
1004 #ifdef HAVE_ATTR_FORMAT
1005 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
1006 __attribute__ ((format (archetype, string_index, first_to_check)))
1007 #else /* !HAVE_ATTR_FORMAT */
1008 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1009 #endif /* !HAVE_ATTR_FORMAT */
1012 #if defined(DOXYGEN)
1013 # define ATTR_UNUSED(x) x
1014 #elif defined(__cplusplus)
1015 # define ATTR_UNUSED(x)
1016 #elif defined(HAVE_ATTR_UNUSED)
1017 # define ATTR_UNUSED(x) x __attribute__((unused))
1018 #else /* !HAVE_ATTR_UNUSED */
1019 # define ATTR_UNUSED(x) x
1020 #endif /* !HAVE_ATTR_UNUSED */
1024 #define fseeko fseek
1025 #define ftello ftell
1026 #endif /* HAVE_FSEEKO */
1029 #ifndef MAXHOSTNAMELEN
1030 #define MAXHOSTNAMELEN 256
1033 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1034 #define snprintf snprintf_unbound
1035 #define vsnprintf vsnprintf_unbound
1037 int snprintf (char *str, size_t count, const char *fmt, ...);
1038 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1039 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1041 #ifndef HAVE_INET_PTON
1042 #define inet_pton inet_pton_unbound
1043 int inet_pton(int af, const char* src, void* dst);
1044 #endif /* HAVE_INET_PTON */
1047 #ifndef HAVE_INET_NTOP
1048 #define inet_ntop inet_ntop_unbound
1049 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1053 #ifndef HAVE_INET_ATON
1054 #define inet_aton inet_aton_unbound
1055 int inet_aton(const char *cp, struct in_addr *addr);
1059 #ifndef HAVE_MEMMOVE
1060 #define memmove memmove_unbound
1061 void *memmove(void *dest, const void *src, size_t n);
1065 #ifndef HAVE_STRLCAT
1066 #define strlcat strlcat_unbound
1067 size_t strlcat(char *dst, const char *src, size_t siz);
1071 #ifndef HAVE_STRLCPY
1072 #define strlcpy strlcpy_unbound
1073 size_t strlcpy(char *dst, const char *src, size_t siz);
1077 #ifndef HAVE_GMTIME_R
1078 #define gmtime_r gmtime_r_unbound
1079 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1083 #ifndef HAVE_REALLOCARRAY
1084 #define reallocarray reallocarrayunbound
1085 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1089 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1090 #define sleep(x) Sleep((x)*1000) /* on win32 */
1091 #endif /* HAVE_SLEEP */
1095 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1096 #endif /* HAVE_USLEEP */
1100 #define random rand /* on win32, for tests only (bad random) */
1101 #endif /* HAVE_RANDOM */
1104 #ifndef HAVE_SRANDOM
1105 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1106 #endif /* HAVE_SRANDOM */
1109 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1110 #ifdef HAVE_WINSOCK2_H
1111 #define FD_SET_T (u_int)
1117 #ifndef IPV6_MIN_MTU
1118 #define IPV6_MIN_MTU 1280
1119 #endif /* IPV6_MIN_MTU */
1122 #ifdef MEMCMP_IS_BROKEN
1123 #include "compat/memcmp.h"
1124 #define memcmp memcmp_unbound
1125 int memcmp(const void *x, const void *y, size_t n);
1130 #ifndef HAVE_CTIME_R
1131 #define ctime_r unbound_ctime_r
1132 char *ctime_r(const time_t *timep, char *buf);
1136 #define strsep unbound_strsep
1137 char *strsep(char **stringp, const char *delim);
1140 #ifndef HAVE_ISBLANK
1141 #define isblank unbound_isblank
1145 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1146 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1149 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1150 int inet_pton(int af, const char* src, void* dst);
1153 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1154 #define strptime unbound_strptime
1156 char *strptime(const char *s, const char *format, struct tm *tm);
1159 #ifdef HAVE_LIBRESSL
1160 # if !HAVE_DECL_STRLCPY
1161 size_t strlcpy(char *dst, const char *src, size_t siz);
1163 # if !HAVE_DECL_STRLCAT
1164 size_t strlcat(char *dst, const char *src, size_t siz);
1166 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1167 uint32_t arc4random(void);
1169 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1170 uint32_t arc4random_uniform(uint32_t upper_bound);
1172 # if !HAVE_DECL_REALLOCARRAY
1173 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1175 #endif /* HAVE_LIBRESSL */
1176 #ifndef HAVE_ARC4RANDOM
1177 void explicit_bzero(void* buf, size_t len);
1178 int getentropy(void* buf, size_t len);
1179 uint32_t arc4random(void);
1180 void arc4random_buf(void* buf, size_t n);
1181 void _ARC4_LOCK(void);
1182 void _ARC4_UNLOCK(void);
1183 void _ARC4_LOCK_DESTROY(void);
1185 #ifndef HAVE_ARC4RANDOM_UNIFORM
1186 uint32_t arc4random_uniform(uint32_t upper_bound);
1188 #ifdef COMPAT_SHA512
1189 #ifndef SHA512_DIGEST_LENGTH
1190 #define SHA512_BLOCK_LENGTH 128
1191 #define SHA512_DIGEST_LENGTH 64
1192 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1193 typedef struct _SHA512_CTX {
1195 uint64_t bitcount[2];
1196 uint8_t buffer[SHA512_BLOCK_LENGTH];
1198 #endif /* SHA512_DIGEST_LENGTH */
1199 void SHA512_Init(SHA512_CTX*);
1200 void SHA512_Update(SHA512_CTX*, void*, size_t);
1201 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1202 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1203 #endif /* COMPAT_SHA512 */
1207 #if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
1208 /* using version of libevent that is not threadsafe. */
1209 # define LIBEVENT_SIGNAL_PROBLEM 1
1212 #ifndef CHECKED_INET6
1213 # define CHECKED_INET6
1217 # define AF_INET6 28
1219 #endif /* CHECKED_INET6 */
1221 #ifndef HAVE_GETADDRINFO
1222 struct sockaddr_storage;
1223 #include "compat/fake-rfc2553.h"
1226 #ifdef UNBOUND_ALLOC_STATS
1227 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1228 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1229 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1230 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1231 void *unbound_stat_malloc(size_t size);
1232 void *unbound_stat_calloc(size_t nmemb, size_t size);
1233 void unbound_stat_free(void *ptr);
1234 void *unbound_stat_realloc(void *ptr, size_t size);
1235 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1237 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1238 int line, const char* func);
1239 void unbound_stat_free_log(void *ptr, const char* file, int line,
1241 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1242 int line, const char* func);
1243 #elif defined(UNBOUND_ALLOC_LITE)
1244 # include "util/alloc.h"
1245 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1247 /** default port for DNS traffic. */
1248 #define UNBOUND_DNS_PORT 53
1249 /** default port for DNS over TLS traffic. */
1250 #define UNBOUND_DNS_OVER_TLS_PORT 853
1251 /** default port for unbound control traffic, registered port with IANA,
1252 ub-dns-control 8953/tcp unbound dns nameserver control */
1253 #define UNBOUND_CONTROL_PORT 8953
1254 /** the version of unbound-control that this software implements */
1255 #define UNBOUND_CONTROL_VERSION 1