config.h revision 285206
1255581Sdes/* config.h. Generated from config.h.in by configure. */ 2255581Sdes/* config.h.in. Generated from configure.ac by autoheader. */ 3255581Sdes 4255581Sdes/* Directory to chroot to */ 5255581Sdes#define CHROOT_DIR "/var/unbound" 6255581Sdes 7285206Sdes/* Do sha512 definitions in config.h */ 8285206Sdes/* #undef COMPAT_SHA512 */ 9285206Sdes 10255581Sdes/* Pathname to the Unbound configuration file */ 11255840Sdes#define CONFIGFILE "/var/unbound/unbound.conf" 12255581Sdes 13255581Sdes/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work 14255581Sdes */ 15255581Sdes/* #undef DARWIN_BROKEN_SETREUID */ 16255581Sdes 17255581Sdes/* Whether daemon is deprecated */ 18255581Sdes/* #undef DEPRECATED_DAEMON */ 19255581Sdes 20285206Sdes/* default dnstap socket path */ 21285206Sdes/* #undef DNSTAP_SOCKET_PATH */ 22285206Sdes 23255581Sdes/* Define if you want to use debug lock checking (slow). */ 24255581Sdes/* #undef ENABLE_LOCK_CHECKS */ 25255581Sdes 26255581Sdes/* Define this if you enabled-allsymbols from libunbound to link binaries to 27255581Sdes it for smaller install size, but the libunbound export table is polluted by 28255581Sdes internal symbols */ 29255581Sdes/* #undef EXPORT_ALL_SYMBOLS */ 30255581Sdes 31285206Sdes/* Define to 1 if you have the `arc4random' function. */ 32285206Sdes#define HAVE_ARC4RANDOM 1 33285206Sdes 34285206Sdes/* Define to 1 if you have the `arc4random_uniform' function. */ 35285206Sdes#define HAVE_ARC4RANDOM_UNIFORM 1 36285206Sdes 37255581Sdes/* Define to 1 if you have the <arpa/inet.h> header file. */ 38255581Sdes#define HAVE_ARPA_INET_H 1 39255581Sdes 40255581Sdes/* Whether the C compiler accepts the "format" attribute */ 41255581Sdes#define HAVE_ATTR_FORMAT 1 42255581Sdes 43255581Sdes/* Whether the C compiler accepts the "unused" attribute */ 44255581Sdes#define HAVE_ATTR_UNUSED 1 45255581Sdes 46285206Sdes/* Define to 1 if you have the `chown' function. */ 47255581Sdes#define HAVE_CHOWN 1 48255581Sdes 49255581Sdes/* Define to 1 if you have the `chroot' function. */ 50255581Sdes#define HAVE_CHROOT 1 51255581Sdes 52255581Sdes/* Define to 1 if you have the `ctime_r' function. */ 53255581Sdes#define HAVE_CTIME_R 1 54255581Sdes 55255581Sdes/* Define to 1 if you have the `daemon' function. */ 56255581Sdes#define HAVE_DAEMON 1 57255581Sdes 58285206Sdes/* Define to 1 if you have the declaration of `arc4random', and to 0 if you 59285206Sdes don't. */ 60285206Sdes/* #undef HAVE_DECL_ARC4RANDOM */ 61285206Sdes 62285206Sdes/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 63285206Sdes if you don't. */ 64285206Sdes/* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */ 65285206Sdes 66255581Sdes/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you 67255581Sdes don't. */ 68255581Sdes#define HAVE_DECL_NID_SECP384R1 1 69255581Sdes 70255581Sdes/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 71255581Sdes if you don't. */ 72255581Sdes#define HAVE_DECL_NID_X9_62_PRIME256V1 1 73255581Sdes 74255581Sdes/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 75255581Sdes if you don't. */ 76255581Sdes#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1 77255581Sdes 78255581Sdes/* Define to 1 if you have the declaration of 79255581Sdes `SSL_COMP_get_compression_methods', and to 0 if you don't. */ 80255581Sdes#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1 81255581Sdes 82285206Sdes/* Define to 1 if you have the declaration of `strlcat', and to 0 if you 83285206Sdes don't. */ 84285206Sdes/* #undef HAVE_DECL_STRLCAT */ 85285206Sdes 86285206Sdes/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you 87285206Sdes don't. */ 88285206Sdes/* #undef HAVE_DECL_STRLCPY */ 89285206Sdes 90255581Sdes/* Define to 1 if you have the <dlfcn.h> header file. */ 91255581Sdes#define HAVE_DLFCN_H 1 92255581Sdes 93285206Sdes/* Define to 1 if you have the <endian.h> header file. */ 94285206Sdes/* #undef HAVE_ENDIAN_H */ 95285206Sdes 96269257Sdes/* Define to 1 if you have the `endprotoent' function. */ 97269257Sdes#define HAVE_ENDPROTOENT 1 98269257Sdes 99269257Sdes/* Define to 1 if you have the `endservent' function. */ 100269257Sdes#define HAVE_ENDSERVENT 1 101269257Sdes 102255581Sdes/* Define to 1 if you have the `event_base_free' function. */ 103255581Sdes/* #undef HAVE_EVENT_BASE_FREE */ 104255581Sdes 105255581Sdes/* Define to 1 if you have the `event_base_get_method' function. */ 106255581Sdes/* #undef HAVE_EVENT_BASE_GET_METHOD */ 107255581Sdes 108255581Sdes/* Define to 1 if you have the `event_base_new' function. */ 109255581Sdes/* #undef HAVE_EVENT_BASE_NEW */ 110255581Sdes 111255581Sdes/* Define to 1 if you have the `event_base_once' function. */ 112255581Sdes/* #undef HAVE_EVENT_BASE_ONCE */ 113255581Sdes 114255581Sdes/* Define to 1 if you have the <event.h> header file. */ 115255581Sdes/* #undef HAVE_EVENT_H */ 116255581Sdes 117255581Sdes/* Define to 1 if you have the `EVP_sha1' function. */ 118255581Sdes#define HAVE_EVP_SHA1 1 119255581Sdes 120255581Sdes/* Define to 1 if you have the `EVP_sha256' function. */ 121255581Sdes#define HAVE_EVP_SHA256 1 122255581Sdes 123255581Sdes/* Define to 1 if you have the `EVP_sha512' function. */ 124255581Sdes#define HAVE_EVP_SHA512 1 125255581Sdes 126255581Sdes/* Define to 1 if you have the `ev_default_loop' function. */ 127255581Sdes/* #undef HAVE_EV_DEFAULT_LOOP */ 128255581Sdes 129255581Sdes/* Define to 1 if you have the `ev_loop' function. */ 130255581Sdes/* #undef HAVE_EV_LOOP */ 131255581Sdes 132255581Sdes/* Define to 1 if you have the <expat.h> header file. */ 133255581Sdes#define HAVE_EXPAT_H 1 134255581Sdes 135255581Sdes/* Define to 1 if you have the `fcntl' function. */ 136255581Sdes#define HAVE_FCNTL 1 137255581Sdes 138255581Sdes/* Define to 1 if you have the `FIPS_mode' function. */ 139255581Sdes#define HAVE_FIPS_MODE 1 140255581Sdes 141255581Sdes/* Define to 1 if you have the `fork' function. */ 142255581Sdes#define HAVE_FORK 1 143255581Sdes 144255581Sdes/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 145255581Sdes#define HAVE_FSEEKO 1 146255581Sdes 147255581Sdes/* Whether getaddrinfo is available */ 148255581Sdes#define HAVE_GETADDRINFO 1 149255581Sdes 150285206Sdes/* Define to 1 if you have the `getauxval' function. */ 151285206Sdes/* #undef HAVE_GETAUXVAL */ 152285206Sdes 153285206Sdes/* Define to 1 if you have the `getentropy' function. */ 154285206Sdes/* #undef HAVE_GETENTROPY */ 155285206Sdes 156255581Sdes/* Define to 1 if you have the <getopt.h> header file. */ 157255581Sdes#define HAVE_GETOPT_H 1 158255581Sdes 159255581Sdes/* Define to 1 if you have the `getpwnam' function. */ 160255581Sdes#define HAVE_GETPWNAM 1 161255581Sdes 162255581Sdes/* Define to 1 if you have the `getrlimit' function. */ 163255581Sdes#define HAVE_GETRLIMIT 1 164255581Sdes 165255581Sdes/* Define to 1 if you have the `glob' function. */ 166255581Sdes#define HAVE_GLOB 1 167255581Sdes 168255581Sdes/* Define to 1 if you have the <glob.h> header file. */ 169255581Sdes#define HAVE_GLOB_H 1 170255581Sdes 171255581Sdes/* Define to 1 if you have the `gmtime_r' function. */ 172255581Sdes#define HAVE_GMTIME_R 1 173255581Sdes 174255581Sdes/* Define to 1 if you have the <grp.h> header file. */ 175255581Sdes#define HAVE_GRP_H 1 176255581Sdes 177255581Sdes/* If you have HMAC_CTX_init */ 178255581Sdes#define HAVE_HMAC_CTX_INIT 1 179255581Sdes 180255581Sdes/* Define to 1 if you have the `inet_aton' function. */ 181255581Sdes#define HAVE_INET_ATON 1 182255581Sdes 183255581Sdes/* Define to 1 if you have the `inet_ntop' function. */ 184255581Sdes#define HAVE_INET_NTOP 1 185255581Sdes 186255581Sdes/* Define to 1 if you have the `inet_pton' function. */ 187255581Sdes#define HAVE_INET_PTON 1 188255581Sdes 189255581Sdes/* Define to 1 if you have the `initgroups' function. */ 190255581Sdes#define HAVE_INITGROUPS 1 191255581Sdes 192255581Sdes/* Define to 1 if you have the <inttypes.h> header file. */ 193255581Sdes#define HAVE_INTTYPES_H 1 194255581Sdes 195255581Sdes/* if the function 'ioctlsocket' is available */ 196255581Sdes/* #undef HAVE_IOCTLSOCKET */ 197255581Sdes 198255581Sdes/* Define to 1 if you have the <iphlpapi.h> header file. */ 199255581Sdes/* #undef HAVE_IPHLPAPI_H */ 200255581Sdes 201255581Sdes/* Define to 1 if you have the `kill' function. */ 202255581Sdes#define HAVE_KILL 1 203255581Sdes 204285206Sdes/* Define if we have LibreSSL */ 205285206Sdes/* #undef HAVE_LIBRESSL */ 206285206Sdes 207255581Sdes/* Define to 1 if you have the `localtime_r' function. */ 208255581Sdes#define HAVE_LOCALTIME_R 1 209255581Sdes 210255581Sdes/* Define to 1 if you have the <login_cap.h> header file. */ 211255581Sdes#define HAVE_LOGIN_CAP_H 1 212255581Sdes 213255581Sdes/* If have GNU libc compatible malloc */ 214255581Sdes#define HAVE_MALLOC 1 215255581Sdes 216255581Sdes/* Define to 1 if you have the `memmove' function. */ 217255581Sdes#define HAVE_MEMMOVE 1 218255581Sdes 219255581Sdes/* Define to 1 if you have the <memory.h> header file. */ 220255581Sdes#define HAVE_MEMORY_H 1 221255581Sdes 222255581Sdes/* Define to 1 if you have the <netdb.h> header file. */ 223255581Sdes#define HAVE_NETDB_H 1 224255581Sdes 225255581Sdes/* Define to 1 if you have the <netinet/in.h> header file. */ 226255581Sdes#define HAVE_NETINET_IN_H 1 227255581Sdes 228255581Sdes/* Use libnss for crypto */ 229255581Sdes/* #undef HAVE_NSS */ 230255581Sdes 231255581Sdes/* Define to 1 if you have the `OPENSSL_config' function. */ 232255581Sdes#define HAVE_OPENSSL_CONFIG 1 233255581Sdes 234255581Sdes/* Define to 1 if you have the <openssl/conf.h> header file. */ 235255581Sdes#define HAVE_OPENSSL_CONF_H 1 236255581Sdes 237255581Sdes/* Define to 1 if you have the <openssl/engine.h> header file. */ 238255581Sdes#define HAVE_OPENSSL_ENGINE_H 1 239255581Sdes 240255581Sdes/* Define to 1 if you have the <openssl/err.h> header file. */ 241255581Sdes#define HAVE_OPENSSL_ERR_H 1 242255581Sdes 243255581Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */ 244255581Sdes#define HAVE_OPENSSL_RAND_H 1 245255581Sdes 246255581Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */ 247255581Sdes#define HAVE_OPENSSL_SSL_H 1 248255581Sdes 249255581Sdes/* Define if you have POSIX threads libraries and header files. */ 250255581Sdes#define HAVE_PTHREAD 1 251255581Sdes 252269257Sdes/* Have PTHREAD_PRIO_INHERIT. */ 253269257Sdes#define HAVE_PTHREAD_PRIO_INHERIT 1 254269257Sdes 255255581Sdes/* Define to 1 if the system has the type `pthread_rwlock_t'. */ 256255581Sdes#define HAVE_PTHREAD_RWLOCK_T 1 257255581Sdes 258255581Sdes/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 259255581Sdes#define HAVE_PTHREAD_SPINLOCK_T 1 260255581Sdes 261255581Sdes/* Define to 1 if you have the <pwd.h> header file. */ 262255581Sdes#define HAVE_PWD_H 1 263255581Sdes 264255581Sdes/* Define if you have Python libraries and header files. */ 265255581Sdes/* #undef HAVE_PYTHON */ 266255581Sdes 267255581Sdes/* Define to 1 if you have the `random' function. */ 268255581Sdes#define HAVE_RANDOM 1 269255581Sdes 270255581Sdes/* Define to 1 if you have the `recvmsg' function. */ 271255581Sdes#define HAVE_RECVMSG 1 272255581Sdes 273255581Sdes/* Define to 1 if you have the `sbrk' function. */ 274269257Sdes/* #undef HAVE_SBRK */ 275255581Sdes 276255581Sdes/* Define to 1 if you have the `sendmsg' function. */ 277255581Sdes#define HAVE_SENDMSG 1 278255581Sdes 279255581Sdes/* Define to 1 if you have the `setregid' function. */ 280255581Sdes/* #undef HAVE_SETREGID */ 281255581Sdes 282255581Sdes/* Define to 1 if you have the `setresgid' function. */ 283255581Sdes#define HAVE_SETRESGID 1 284255581Sdes 285255581Sdes/* Define to 1 if you have the `setresuid' function. */ 286255581Sdes#define HAVE_SETRESUID 1 287255581Sdes 288255581Sdes/* Define to 1 if you have the `setreuid' function. */ 289255581Sdes/* #undef HAVE_SETREUID */ 290255581Sdes 291255581Sdes/* Define to 1 if you have the `setrlimit' function. */ 292255581Sdes#define HAVE_SETRLIMIT 1 293255581Sdes 294255581Sdes/* Define to 1 if you have the `setsid' function. */ 295255581Sdes#define HAVE_SETSID 1 296255581Sdes 297255581Sdes/* Define to 1 if you have the `setusercontext' function. */ 298255581Sdes#define HAVE_SETUSERCONTEXT 1 299255581Sdes 300285206Sdes/* Define to 1 if you have the `SHA512_Update' function. */ 301285206Sdes/* #undef HAVE_SHA512_UPDATE */ 302285206Sdes 303255581Sdes/* Define to 1 if you have the `sigprocmask' function. */ 304255581Sdes#define HAVE_SIGPROCMASK 1 305255581Sdes 306255581Sdes/* Define to 1 if you have the `sleep' function. */ 307255581Sdes#define HAVE_SLEEP 1 308255581Sdes 309255581Sdes/* Define to 1 if you have the `snprintf' function. */ 310255581Sdes#define HAVE_SNPRINTF 1 311255581Sdes 312255581Sdes/* Define to 1 if you have the `socketpair' function. */ 313255581Sdes#define HAVE_SOCKETPAIR 1 314255581Sdes 315255581Sdes/* Using Solaris threads */ 316255581Sdes/* #undef HAVE_SOLARIS_THREADS */ 317255581Sdes 318255581Sdes/* Define to 1 if you have the `srandom' function. */ 319255581Sdes#define HAVE_SRANDOM 1 320255581Sdes 321255581Sdes/* Define if you have the SSL libraries installed. */ 322255581Sdes#define HAVE_SSL /**/ 323255581Sdes 324255581Sdes/* Define to 1 if you have the <stdarg.h> header file. */ 325255581Sdes#define HAVE_STDARG_H 1 326255581Sdes 327255581Sdes/* Define to 1 if you have the <stdbool.h> header file. */ 328255581Sdes#define HAVE_STDBOOL_H 1 329255581Sdes 330255581Sdes/* Define to 1 if you have the <stdint.h> header file. */ 331255581Sdes#define HAVE_STDINT_H 1 332255581Sdes 333255581Sdes/* Define to 1 if you have the <stdlib.h> header file. */ 334255581Sdes#define HAVE_STDLIB_H 1 335255581Sdes 336255581Sdes/* Define to 1 if you have the `strftime' function. */ 337255581Sdes#define HAVE_STRFTIME 1 338255581Sdes 339255581Sdes/* Define to 1 if you have the <strings.h> header file. */ 340255581Sdes#define HAVE_STRINGS_H 1 341255581Sdes 342255581Sdes/* Define to 1 if you have the <string.h> header file. */ 343255581Sdes#define HAVE_STRING_H 1 344255581Sdes 345269257Sdes/* Define to 1 if you have the `strlcat' function. */ 346269257Sdes#define HAVE_STRLCAT 1 347269257Sdes 348255581Sdes/* Define to 1 if you have the `strlcpy' function. */ 349255581Sdes#define HAVE_STRLCPY 1 350255581Sdes 351255581Sdes/* Define to 1 if you have the `strptime' function. */ 352255581Sdes#define HAVE_STRPTIME 1 353255581Sdes 354255581Sdes/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ 355255581Sdes/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ 356255581Sdes 357285206Sdes/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ 358285206Sdes#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1 359285206Sdes 360255581Sdes/* Define if you have Swig libraries and header files. */ 361255581Sdes/* #undef HAVE_SWIG */ 362255581Sdes 363255581Sdes/* Define to 1 if you have the <syslog.h> header file. */ 364255581Sdes#define HAVE_SYSLOG_H 1 365255581Sdes 366255581Sdes/* Define to 1 if you have the <sys/param.h> header file. */ 367255581Sdes#define HAVE_SYS_PARAM_H 1 368255581Sdes 369255581Sdes/* Define to 1 if you have the <sys/resource.h> header file. */ 370255581Sdes#define HAVE_SYS_RESOURCE_H 1 371255581Sdes 372285206Sdes/* Define to 1 if you have the <sys/sha2.h> header file. */ 373285206Sdes/* #undef HAVE_SYS_SHA2_H */ 374285206Sdes 375255581Sdes/* Define to 1 if you have the <sys/socket.h> header file. */ 376255581Sdes#define HAVE_SYS_SOCKET_H 1 377255581Sdes 378255581Sdes/* Define to 1 if you have the <sys/stat.h> header file. */ 379255581Sdes#define HAVE_SYS_STAT_H 1 380255581Sdes 381285206Sdes/* Define to 1 if you have the <sys/sysctl.h> header file. */ 382285206Sdes/* #undef HAVE_SYS_SYSCTL_H */ 383285206Sdes 384255581Sdes/* Define to 1 if you have the <sys/types.h> header file. */ 385255581Sdes#define HAVE_SYS_TYPES_H 1 386255581Sdes 387255581Sdes/* Define to 1 if you have the <sys/uio.h> header file. */ 388255581Sdes#define HAVE_SYS_UIO_H 1 389255581Sdes 390285206Sdes/* Define to 1 if you have the <sys/un.h> header file. */ 391285206Sdes#define HAVE_SYS_UN_H 1 392285206Sdes 393255581Sdes/* Define to 1 if you have the <sys/wait.h> header file. */ 394255581Sdes#define HAVE_SYS_WAIT_H 1 395255581Sdes 396255581Sdes/* Define to 1 if you have the <time.h> header file. */ 397255581Sdes#define HAVE_TIME_H 1 398255581Sdes 399255581Sdes/* Define to 1 if you have the `tzset' function. */ 400255581Sdes#define HAVE_TZSET 1 401255581Sdes 402255581Sdes/* Define to 1 if you have the <unistd.h> header file. */ 403255581Sdes#define HAVE_UNISTD_H 1 404255581Sdes 405255581Sdes/* Define to 1 if you have the `usleep' function. */ 406255581Sdes#define HAVE_USLEEP 1 407255581Sdes 408255581Sdes/* Define to 1 if you have the `vfork' function. */ 409255581Sdes#define HAVE_VFORK 1 410255581Sdes 411255581Sdes/* Define to 1 if you have the <vfork.h> header file. */ 412255581Sdes/* #undef HAVE_VFORK_H */ 413255581Sdes 414255581Sdes/* Define to 1 if you have the <windows.h> header file. */ 415255581Sdes/* #undef HAVE_WINDOWS_H */ 416255581Sdes 417255581Sdes/* Using Windows threads */ 418255581Sdes/* #undef HAVE_WINDOWS_THREADS */ 419255581Sdes 420255581Sdes/* Define to 1 if you have the <winsock2.h> header file. */ 421255581Sdes/* #undef HAVE_WINSOCK2_H */ 422255581Sdes 423255581Sdes/* Define to 1 if `fork' works. */ 424255581Sdes#define HAVE_WORKING_FORK 1 425255581Sdes 426255581Sdes/* Define to 1 if `vfork' works. */ 427255581Sdes#define HAVE_WORKING_VFORK 1 428255581Sdes 429255581Sdes/* Define to 1 if you have the `writev' function. */ 430255581Sdes#define HAVE_WRITEV 1 431255581Sdes 432255581Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */ 433255581Sdes/* #undef HAVE_WS2TCPIP_H */ 434255581Sdes 435255581Sdes/* Define to 1 if you have the `_beginthreadex' function. */ 436255581Sdes/* #undef HAVE__BEGINTHREADEX */ 437255581Sdes 438255581Sdes/* if lex has yylex_destroy */ 439255581Sdes#define LEX_HAS_YYLEX_DESTROY 1 440255581Sdes 441255581Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries. 442255581Sdes */ 443255581Sdes#define LT_OBJDIR ".libs/" 444255581Sdes 445255581Sdes/* Define to the maximum message length to pass to syslog. */ 446255581Sdes#define MAXSYSLOGMSGLEN 10240 447255581Sdes 448255581Sdes/* Define if memcmp() does not compare unsigned bytes */ 449255581Sdes/* #undef MEMCMP_IS_BROKEN */ 450255581Sdes 451255581Sdes/* Define if mkdir has one argument. */ 452255581Sdes/* #undef MKDIR_HAS_ONE_ARG */ 453255581Sdes 454255581Sdes/* Define if the network stack does not fully support nonblocking io (causes 455255581Sdes lower performance). */ 456255581Sdes/* #undef NONBLOCKING_IS_BROKEN */ 457255581Sdes 458255581Sdes/* Put -D_ALL_SOURCE define in config.h */ 459255581Sdes/* #undef OMITTED__D_ALL_SOURCE */ 460255581Sdes 461255581Sdes/* Put -D_BSD_SOURCE define in config.h */ 462255581Sdes/* #undef OMITTED__D_BSD_SOURCE */ 463255581Sdes 464255581Sdes/* Put -D_GNU_SOURCE define in config.h */ 465255581Sdes/* #undef OMITTED__D_GNU_SOURCE */ 466255581Sdes 467255581Sdes/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ 468255581Sdes/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */ 469255581Sdes 470255581Sdes/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ 471255581Sdes/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */ 472255581Sdes 473255581Sdes/* Put -D_XOPEN_SOURCE=600 define in config.h */ 474255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_600 */ 475255581Sdes 476255581Sdes/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ 477255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */ 478255581Sdes 479255581Sdes/* Put -D__EXTENSIONS__ define in config.h */ 480255581Sdes/* #undef OMITTED__D__EXTENSIONS__ */ 481255581Sdes 482255581Sdes/* Define to the address where bug reports for this package should be sent. */ 483255581Sdes#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl" 484255581Sdes 485255581Sdes/* Define to the full name of this package. */ 486255581Sdes#define PACKAGE_NAME "unbound" 487255581Sdes 488255581Sdes/* Define to the full name and version of this package. */ 489285206Sdes#define PACKAGE_STRING "unbound 1.5.3" 490255581Sdes 491255581Sdes/* Define to the one symbol short name of this package. */ 492255581Sdes#define PACKAGE_TARNAME "unbound" 493255581Sdes 494255581Sdes/* Define to the home page for this package. */ 495255581Sdes#define PACKAGE_URL "" 496255581Sdes 497255581Sdes/* Define to the version of this package. */ 498285206Sdes#define PACKAGE_VERSION "1.5.3" 499255581Sdes 500255581Sdes/* default pidfile location */ 501255581Sdes#define PIDFILE "/var/unbound/unbound.pid" 502255581Sdes 503255581Sdes/* Define to necessary symbol if this constant uses a non-standard name on 504255581Sdes your system. */ 505255581Sdes/* #undef PTHREAD_CREATE_JOINABLE */ 506255581Sdes 507255581Sdes/* Define as the return type of signal handlers (`int' or `void'). */ 508255581Sdes#define RETSIGTYPE void 509255581Sdes 510255581Sdes/* default rootkey location */ 511255581Sdes#define ROOT_ANCHOR_FILE "/var/unbound/root.key" 512255581Sdes 513255581Sdes/* default rootcert location */ 514255581Sdes#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" 515255581Sdes 516255581Sdes/* version number for resource files */ 517285206Sdes#define RSRC_PACKAGE_VERSION 1,5,3,0 518255581Sdes 519255581Sdes/* Directory to chdir to */ 520255581Sdes#define RUN_DIR "/var/unbound" 521255581Sdes 522255581Sdes/* Shared data */ 523255581Sdes#define SHARE_DIR "/var/unbound" 524255581Sdes 525269257Sdes/* The size of `time_t', as computed by sizeof. */ 526269257Sdes#define SIZEOF_TIME_T 8 527269257Sdes 528255581Sdes/* Define to 1 if you have the ANSI C header files. */ 529255581Sdes#define STDC_HEADERS 1 530255581Sdes 531255581Sdes/* use default strptime. */ 532255581Sdes#define STRPTIME_WORKS 1 533255581Sdes 534255581Sdes/* Use win32 resources and API */ 535255581Sdes/* #undef UB_ON_WINDOWS */ 536255581Sdes 537255581Sdes/* default username */ 538255581Sdes#define UB_USERNAME "unbound" 539255581Sdes 540255581Sdes/* use to enable lightweight alloc assertions, for debug use */ 541255581Sdes/* #undef UNBOUND_ALLOC_LITE */ 542255581Sdes 543255581Sdes/* use malloc not regions, for debug use */ 544255581Sdes/* #undef UNBOUND_ALLOC_NONREGIONAL */ 545255581Sdes 546255581Sdes/* use statistics for allocs and frees, for debug use */ 547255581Sdes/* #undef UNBOUND_ALLOC_STATS */ 548255581Sdes 549255581Sdes/* define this to enable debug checks. */ 550255581Sdes/* #undef UNBOUND_DEBUG */ 551255581Sdes 552285206Sdes/* Define to 1 to enable dnstap support */ 553285206Sdes/* #undef USE_DNSTAP */ 554285206Sdes 555255581Sdes/* Define this to enable ECDSA support. */ 556255581Sdes#define USE_ECDSA 1 557255581Sdes 558255581Sdes/* Define this to enable an EVP workaround for older openssl */ 559255581Sdes/* #undef USE_ECDSA_EVP_WORKAROUND */ 560255581Sdes 561255581Sdes/* Define this to enable GOST support. */ 562255581Sdes/* #undef USE_GOST */ 563255581Sdes 564255581Sdes/* Define if you want to use internal select based events */ 565255581Sdes#define USE_MINI_EVENT 1 566255581Sdes 567255581Sdes/* Define this to enable SHA256 and SHA512 support. */ 568255581Sdes#define USE_SHA2 1 569255581Sdes 570255581Sdes/* Enable extensions on AIX 3, Interix. */ 571255581Sdes#ifndef _ALL_SOURCE 572255581Sdes# define _ALL_SOURCE 1 573255581Sdes#endif 574255581Sdes/* Enable GNU extensions on systems that have them. */ 575255581Sdes#ifndef _GNU_SOURCE 576255581Sdes# define _GNU_SOURCE 1 577255581Sdes#endif 578255581Sdes/* Enable threading extensions on Solaris. */ 579255581Sdes#ifndef _POSIX_PTHREAD_SEMANTICS 580255581Sdes# define _POSIX_PTHREAD_SEMANTICS 1 581255581Sdes#endif 582255581Sdes/* Enable extensions on HP NonStop. */ 583255581Sdes#ifndef _TANDEM_SOURCE 584255581Sdes# define _TANDEM_SOURCE 1 585255581Sdes#endif 586255581Sdes/* Enable general extensions on Solaris. */ 587255581Sdes#ifndef __EXTENSIONS__ 588255581Sdes# define __EXTENSIONS__ 1 589255581Sdes#endif 590255581Sdes 591255581Sdes 592255581Sdes/* Whether the windows socket API is used */ 593255581Sdes/* #undef USE_WINSOCK */ 594255581Sdes 595255581Sdes/* the version of the windows API enabled */ 596255581Sdes#define WINVER 0x0502 597255581Sdes 598255581Sdes/* Define if you want Python module. */ 599255581Sdes/* #undef WITH_PYTHONMODULE */ 600255581Sdes 601255581Sdes/* Define if you want PyUnbound. */ 602255581Sdes/* #undef WITH_PYUNBOUND */ 603255581Sdes 604255581Sdes/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a 605255581Sdes `char[]'. */ 606255581Sdes#define YYTEXT_POINTER 1 607255581Sdes 608255581Sdes/* Enable large inode numbers on Mac OS X 10.5. */ 609255581Sdes#ifndef _DARWIN_USE_64_BIT_INODE 610255581Sdes# define _DARWIN_USE_64_BIT_INODE 1 611255581Sdes#endif 612255581Sdes 613255581Sdes/* Number of bits in a file offset, on hosts where this is settable. */ 614255581Sdes/* #undef _FILE_OFFSET_BITS */ 615255581Sdes 616255581Sdes/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 617255581Sdes/* #undef _LARGEFILE_SOURCE */ 618255581Sdes 619255581Sdes/* Define for large files, on AIX-style hosts. */ 620255581Sdes/* #undef _LARGE_FILES */ 621255581Sdes 622255581Sdes/* Define to 1 if on MINIX. */ 623255581Sdes/* #undef _MINIX */ 624255581Sdes 625269257Sdes/* Enable for compile on Minix */ 626269257Sdes/* #undef _NETBSD_SOURCE */ 627269257Sdes 628255581Sdes/* Define to 2 if the system does not provide POSIX.1 features except with 629255581Sdes this defined. */ 630255581Sdes/* #undef _POSIX_1_SOURCE */ 631255581Sdes 632255581Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */ 633255581Sdes/* #undef _POSIX_SOURCE */ 634255581Sdes 635255581Sdes/* Define to empty if `const' does not conform to ANSI C. */ 636255581Sdes/* #undef const */ 637255581Sdes 638255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 639255581Sdes/* #undef gid_t */ 640255581Sdes 641255581Sdes/* in_addr_t */ 642255581Sdes/* #undef in_addr_t */ 643255581Sdes 644255581Sdes/* in_port_t */ 645255581Sdes/* #undef in_port_t */ 646255581Sdes 647255581Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler 648255581Sdes calls it, or to nothing if 'inline' is not supported under any name. */ 649255581Sdes#ifndef __cplusplus 650255581Sdes/* #undef inline */ 651255581Sdes#endif 652255581Sdes 653255581Sdes/* Define to `short' if <sys/types.h> does not define. */ 654255581Sdes/* #undef int16_t */ 655255581Sdes 656255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 657255581Sdes/* #undef int32_t */ 658255581Sdes 659255581Sdes/* Define to `long long' if <sys/types.h> does not define. */ 660255581Sdes/* #undef int64_t */ 661255581Sdes 662255581Sdes/* Define to `signed char' if <sys/types.h> does not define. */ 663255581Sdes/* #undef int8_t */ 664255581Sdes 665255581Sdes/* Define if replacement function should be used. */ 666255581Sdes/* #undef malloc */ 667255581Sdes 668255581Sdes/* Define to `long int' if <sys/types.h> does not define. */ 669255581Sdes/* #undef off_t */ 670255581Sdes 671255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 672255581Sdes/* #undef pid_t */ 673255581Sdes 674255581Sdes/* Define to 'int' if not defined */ 675255581Sdes/* #undef rlim_t */ 676255581Sdes 677255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 678255581Sdes/* #undef size_t */ 679255581Sdes 680255581Sdes/* Define to 'int' if not defined */ 681255581Sdes/* #undef socklen_t */ 682255581Sdes 683255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 684255581Sdes/* #undef ssize_t */ 685255581Sdes 686255581Sdes/* Define to 'unsigned char if not defined */ 687255581Sdes/* #undef u_char */ 688255581Sdes 689255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 690255581Sdes/* #undef uid_t */ 691255581Sdes 692255581Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */ 693255581Sdes/* #undef uint16_t */ 694255581Sdes 695255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 696255581Sdes/* #undef uint32_t */ 697255581Sdes 698255581Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */ 699255581Sdes/* #undef uint64_t */ 700255581Sdes 701255581Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */ 702255581Sdes/* #undef uint8_t */ 703255581Sdes 704255581Sdes/* Define as `fork' if `vfork' does not work. */ 705255581Sdes/* #undef vfork */ 706255581Sdes 707255581Sdes#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) 708255581Sdes#define _GNU_SOURCE 1 709255581Sdes#endif 710255581Sdes 711255581Sdes#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) 712255581Sdes#define _BSD_SOURCE 1 713255581Sdes#endif 714255581Sdes 715255581Sdes#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) 716255581Sdes#define __EXTENSIONS__ 1 717255581Sdes#endif 718255581Sdes 719255581Sdes#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) 720255581Sdes#define _POSIX_C_SOURCE 200112 721255581Sdes#endif 722255581Sdes 723255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) 724255581Sdes#define _XOPEN_SOURCE 600 725255581Sdes#endif 726255581Sdes 727255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) 728255581Sdes#define _XOPEN_SOURCE_EXTENDED 1 729255581Sdes#endif 730255581Sdes 731255581Sdes#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) 732255581Sdes#define _ALL_SOURCE 1 733255581Sdes#endif 734255581Sdes 735255581Sdes#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) 736255581Sdes#define _LARGEFILE_SOURCE 1 737255581Sdes#endif 738255581Sdes 739255581Sdes 740255581Sdes 741255581Sdes 742255581Sdes#ifndef UNBOUND_DEBUG 743255581Sdes# define NDEBUG 744255581Sdes#endif 745255581Sdes 746269257Sdes/** Use small-ldns codebase */ 747269257Sdes#define USE_SLDNS 1 748269257Sdes#ifdef HAVE_SSL 749269257Sdes# define LDNS_BUILD_CONFIG_HAVE_SSL 1 750269257Sdes#endif 751269257Sdes 752255581Sdes#include <stdio.h> 753255581Sdes#include <string.h> 754255581Sdes#include <unistd.h> 755255581Sdes#include <assert.h> 756255581Sdes 757255581Sdes#if STDC_HEADERS 758255581Sdes#include <stdlib.h> 759255581Sdes#include <stddef.h> 760255581Sdes#endif 761255581Sdes 762269257Sdes#ifdef HAVE_STDARG_H 763269257Sdes#include <stdarg.h> 764269257Sdes#endif 765269257Sdes 766255581Sdes#ifdef HAVE_STDINT_H 767255581Sdes#include <stdint.h> 768255581Sdes#endif 769255581Sdes 770255581Sdes#include <errno.h> 771255581Sdes 772255581Sdes#if HAVE_SYS_PARAM_H 773255581Sdes#include <sys/param.h> 774255581Sdes#endif 775255581Sdes 776255581Sdes#ifdef HAVE_SYS_SOCKET_H 777255581Sdes#include <sys/socket.h> 778255581Sdes#endif 779255581Sdes 780255581Sdes#ifdef HAVE_SYS_UIO_H 781255581Sdes#include <sys/uio.h> 782255581Sdes#endif 783255581Sdes 784255581Sdes#ifdef HAVE_NETINET_IN_H 785255581Sdes#include <netinet/in.h> 786255581Sdes#endif 787255581Sdes 788255581Sdes#ifdef HAVE_ARPA_INET_H 789255581Sdes#include <arpa/inet.h> 790255581Sdes#endif 791255581Sdes 792255581Sdes#ifdef HAVE_WINSOCK2_H 793255581Sdes#include <winsock2.h> 794255581Sdes#endif 795255581Sdes 796255581Sdes#ifdef HAVE_WS2TCPIP_H 797255581Sdes#include <ws2tcpip.h> 798255581Sdes#endif 799255581Sdes 800269257Sdes#ifndef USE_WINSOCK 801269257Sdes#define ARG_LL "%ll" 802269257Sdes#else 803269257Sdes#define ARG_LL "%I64" 804269257Sdes#endif 805255581Sdes 806285206Sdes#ifndef AF_LOCAL 807285206Sdes#define AF_LOCAL AF_UNIX 808285206Sdes#endif 809269257Sdes 810285206Sdes 811255581Sdes 812255581Sdes#ifdef HAVE_ATTR_FORMAT 813255581Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) \ 814255581Sdes __attribute__ ((format (archetype, string_index, first_to_check))) 815255581Sdes#else /* !HAVE_ATTR_FORMAT */ 816255581Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ 817255581Sdes#endif /* !HAVE_ATTR_FORMAT */ 818255581Sdes 819255581Sdes 820255581Sdes#if defined(DOXYGEN) 821255581Sdes# define ATTR_UNUSED(x) x 822255581Sdes#elif defined(__cplusplus) 823255581Sdes# define ATTR_UNUSED(x) 824255581Sdes#elif defined(HAVE_ATTR_UNUSED) 825255581Sdes# define ATTR_UNUSED(x) x __attribute__((unused)) 826255581Sdes#else /* !HAVE_ATTR_UNUSED */ 827255581Sdes# define ATTR_UNUSED(x) x 828255581Sdes#endif /* !HAVE_ATTR_UNUSED */ 829255581Sdes 830255581Sdes 831255581Sdes#ifndef HAVE_FSEEKO 832255581Sdes#define fseeko fseek 833255581Sdes#define ftello ftell 834255581Sdes#endif /* HAVE_FSEEKO */ 835255581Sdes 836255581Sdes 837255581Sdes#ifndef MAXHOSTNAMELEN 838255581Sdes#define MAXHOSTNAMELEN 256 839255581Sdes#endif 840255581Sdes 841255581Sdes 842255581Sdes#ifndef HAVE_SNPRINTF 843255581Sdes#define snprintf snprintf_unbound 844255581Sdes#define vsnprintf vsnprintf_unbound 845255581Sdes#include <stdarg.h> 846255581Sdesint snprintf (char *str, size_t count, const char *fmt, ...); 847255581Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 848255581Sdes#endif /* HAVE_SNPRINTF */ 849255581Sdes 850255581Sdes 851255581Sdes#ifndef HAVE_INET_PTON 852255581Sdes#define inet_pton inet_pton_unbound 853255581Sdesint inet_pton(int af, const char* src, void* dst); 854255581Sdes#endif /* HAVE_INET_PTON */ 855255581Sdes 856255581Sdes 857255581Sdes#ifndef HAVE_INET_NTOP 858255581Sdes#define inet_ntop inet_ntop_unbound 859255581Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size); 860255581Sdes#endif 861255581Sdes 862255581Sdes 863255581Sdes#ifndef HAVE_INET_ATON 864255581Sdes#define inet_aton inet_aton_unbound 865255581Sdesint inet_aton(const char *cp, struct in_addr *addr); 866255581Sdes#endif 867255581Sdes 868255581Sdes 869255581Sdes#ifndef HAVE_MEMMOVE 870255581Sdes#define memmove memmove_unbound 871255581Sdesvoid *memmove(void *dest, const void *src, size_t n); 872255581Sdes#endif 873255581Sdes 874255581Sdes 875269257Sdes#ifndef HAVE_STRLCAT 876269257Sdes#define strlcat strlcat_unbound 877269257Sdessize_t strlcat(char *dst, const char *src, size_t siz); 878269257Sdes#endif 879269257Sdes 880269257Sdes 881255581Sdes#ifndef HAVE_STRLCPY 882255581Sdes#define strlcpy strlcpy_unbound 883255581Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 884255581Sdes#endif 885255581Sdes 886255581Sdes 887255581Sdes#ifndef HAVE_GMTIME_R 888255581Sdes#define gmtime_r gmtime_r_unbound 889255581Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result); 890255581Sdes#endif 891255581Sdes 892255581Sdes 893269257Sdes#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H) 894255581Sdes#define sleep(x) Sleep((x)*1000) /* on win32 */ 895255581Sdes#endif /* HAVE_SLEEP */ 896255581Sdes 897255581Sdes 898255581Sdes#ifndef HAVE_USLEEP 899255581Sdes#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ 900255581Sdes#endif /* HAVE_USLEEP */ 901255581Sdes 902255581Sdes 903255581Sdes#ifndef HAVE_RANDOM 904255581Sdes#define random rand /* on win32, for tests only (bad random) */ 905255581Sdes#endif /* HAVE_RANDOM */ 906255581Sdes 907255581Sdes 908255581Sdes#ifndef HAVE_SRANDOM 909255581Sdes#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ 910255581Sdes#endif /* HAVE_SRANDOM */ 911255581Sdes 912255581Sdes 913255581Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 914255581Sdes#ifdef HAVE_WINSOCK2_H 915255581Sdes#define FD_SET_T (u_int) 916255581Sdes#else 917255581Sdes#define FD_SET_T 918255581Sdes#endif 919255581Sdes 920255581Sdes 921255581Sdes#ifndef IPV6_MIN_MTU 922255581Sdes#define IPV6_MIN_MTU 1280 923255581Sdes#endif /* IPV6_MIN_MTU */ 924255581Sdes 925255581Sdes 926255581Sdes#ifdef MEMCMP_IS_BROKEN 927255581Sdes#include "compat/memcmp.h" 928255581Sdes#define memcmp memcmp_unbound 929255581Sdesint memcmp(const void *x, const void *y, size_t n); 930255581Sdes#endif 931255581Sdes 932255581Sdes 933255581Sdes 934255581Sdes#ifndef HAVE_CTIME_R 935255581Sdes#define ctime_r unbound_ctime_r 936255581Sdeschar *ctime_r(const time_t *timep, char *buf); 937255581Sdes#endif 938255581Sdes 939255581Sdes#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) 940255581Sdes#define strptime unbound_strptime 941255581Sdesstruct tm; 942255581Sdeschar *strptime(const char *s, const char *format, struct tm *tm); 943255581Sdes#endif 944255581Sdes 945285206Sdes#ifdef HAVE_LIBRESSL 946285206Sdes# if !HAVE_DECL_STRLCPY 947285206Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 948285206Sdes# endif 949285206Sdes# if !HAVE_DECL_STRLCAT 950285206Sdessize_t strlcat(char *dst, const char *src, size_t siz); 951285206Sdes# endif 952285206Sdes# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM) 953285206Sdesuint32_t arc4random(void); 954285206Sdes# endif 955285206Sdes# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) 956285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 957285206Sdes# endif 958285206Sdes#endif /* HAVE_LIBRESSL */ 959285206Sdes#ifndef HAVE_ARC4RANDOM 960285206Sdesvoid explicit_bzero(void* buf, size_t len); 961285206Sdesint getentropy(void* buf, size_t len); 962285206Sdesuint32_t arc4random(void); 963285206Sdesvoid arc4random_buf(void* buf, size_t n); 964285206Sdesvoid _ARC4_LOCK(void); 965285206Sdesvoid _ARC4_UNLOCK(void); 966285206Sdes#endif 967285206Sdes#ifndef HAVE_ARC4RANDOM_UNIFORM 968285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 969285206Sdes#endif 970285206Sdes#ifdef COMPAT_SHA512 971285206Sdes#ifndef SHA512_DIGEST_LENGTH 972285206Sdes#define SHA512_BLOCK_LENGTH 128 973285206Sdes#define SHA512_DIGEST_LENGTH 64 974285206Sdes#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) 975285206Sdestypedef struct _SHA512_CTX { 976285206Sdes uint64_t state[8]; 977285206Sdes uint64_t bitcount[2]; 978285206Sdes uint8_t buffer[SHA512_BLOCK_LENGTH]; 979285206Sdes} SHA512_CTX; 980285206Sdes#endif /* SHA512_DIGEST_LENGTH */ 981285206Sdesvoid SHA512_Init(SHA512_CTX*); 982285206Sdesvoid SHA512_Update(SHA512_CTX*, void*, size_t); 983285206Sdesvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); 984285206Sdesunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); 985285206Sdes#endif /* COMPAT_SHA512 */ 986285206Sdes 987285206Sdes 988285206Sdes 989255581Sdes#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)) 990255581Sdes /* using version of libevent that is not threadsafe. */ 991255581Sdes# define LIBEVENT_SIGNAL_PROBLEM 1 992255581Sdes#endif 993255581Sdes 994255581Sdes#ifndef CHECKED_INET6 995255581Sdes# define CHECKED_INET6 996255581Sdes# ifdef AF_INET6 997255581Sdes# define INET6 998255581Sdes# else 999255581Sdes# define AF_INET6 28 1000255581Sdes# endif 1001255581Sdes#endif /* CHECKED_INET6 */ 1002255581Sdes 1003255581Sdes#ifndef HAVE_GETADDRINFO 1004255581Sdesstruct sockaddr_storage; 1005255581Sdes#include "compat/fake-rfc2553.h" 1006255581Sdes#endif 1007255581Sdes 1008255581Sdes#ifdef UNBOUND_ALLOC_STATS 1009255581Sdes# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) 1010255581Sdes# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) 1011255581Sdes# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) 1012255581Sdes# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) 1013255581Sdesvoid *unbound_stat_malloc(size_t size); 1014255581Sdesvoid *unbound_stat_calloc(size_t nmemb, size_t size); 1015255581Sdesvoid unbound_stat_free(void *ptr); 1016255581Sdesvoid *unbound_stat_realloc(void *ptr, size_t size); 1017255581Sdesvoid *unbound_stat_malloc_log(size_t size, const char* file, int line, 1018255581Sdes const char* func); 1019255581Sdesvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, 1020255581Sdes int line, const char* func); 1021255581Sdesvoid unbound_stat_free_log(void *ptr, const char* file, int line, 1022255581Sdes const char* func); 1023255581Sdesvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, 1024255581Sdes int line, const char* func); 1025255581Sdes#elif defined(UNBOUND_ALLOC_LITE) 1026255581Sdes# include "util/alloc.h" 1027255581Sdes#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ 1028255581Sdes 1029255581Sdes/** default port for DNS traffic. */ 1030255581Sdes#define UNBOUND_DNS_PORT 53 1031255581Sdes/** default port for unbound control traffic, registered port with IANA, 1032255581Sdes ub-dns-control 8953/tcp unbound dns nameserver control */ 1033255581Sdes#define UNBOUND_CONTROL_PORT 8953 1034255581Sdes/** the version of unbound-control that this software implements */ 1035255581Sdes#define UNBOUND_CONTROL_VERSION 1 1036255581Sdes 1037255581Sdes 1038