config.h revision 291767
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 74291767Sdes/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you 75291767Sdes don't. */ 76291767Sdes/* #undef HAVE_DECL_REALLOCARRAY */ 77291767Sdes 78255581Sdes/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 79255581Sdes if you don't. */ 80255581Sdes#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1 81255581Sdes 82255581Sdes/* Define to 1 if you have the declaration of 83255581Sdes `SSL_COMP_get_compression_methods', and to 0 if you don't. */ 84255581Sdes#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1 85255581Sdes 86291767Sdes/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to 87291767Sdes 0 if you don't. */ 88291767Sdes#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 0 89291767Sdes 90285206Sdes/* Define to 1 if you have the declaration of `strlcat', and to 0 if you 91285206Sdes don't. */ 92285206Sdes/* #undef HAVE_DECL_STRLCAT */ 93285206Sdes 94285206Sdes/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you 95285206Sdes don't. */ 96285206Sdes/* #undef HAVE_DECL_STRLCPY */ 97285206Sdes 98255581Sdes/* Define to 1 if you have the <dlfcn.h> header file. */ 99255581Sdes#define HAVE_DLFCN_H 1 100255581Sdes 101285206Sdes/* Define to 1 if you have the <endian.h> header file. */ 102285206Sdes/* #undef HAVE_ENDIAN_H */ 103285206Sdes 104269257Sdes/* Define to 1 if you have the `endprotoent' function. */ 105269257Sdes#define HAVE_ENDPROTOENT 1 106269257Sdes 107269257Sdes/* Define to 1 if you have the `endservent' function. */ 108269257Sdes#define HAVE_ENDSERVENT 1 109269257Sdes 110255581Sdes/* Define to 1 if you have the `event_base_free' function. */ 111255581Sdes/* #undef HAVE_EVENT_BASE_FREE */ 112255581Sdes 113255581Sdes/* Define to 1 if you have the `event_base_get_method' function. */ 114255581Sdes/* #undef HAVE_EVENT_BASE_GET_METHOD */ 115255581Sdes 116255581Sdes/* Define to 1 if you have the `event_base_new' function. */ 117255581Sdes/* #undef HAVE_EVENT_BASE_NEW */ 118255581Sdes 119255581Sdes/* Define to 1 if you have the `event_base_once' function. */ 120255581Sdes/* #undef HAVE_EVENT_BASE_ONCE */ 121255581Sdes 122255581Sdes/* Define to 1 if you have the <event.h> header file. */ 123255581Sdes/* #undef HAVE_EVENT_H */ 124255581Sdes 125255581Sdes/* Define to 1 if you have the `EVP_sha1' function. */ 126255581Sdes#define HAVE_EVP_SHA1 1 127255581Sdes 128255581Sdes/* Define to 1 if you have the `EVP_sha256' function. */ 129255581Sdes#define HAVE_EVP_SHA256 1 130255581Sdes 131255581Sdes/* Define to 1 if you have the `EVP_sha512' function. */ 132255581Sdes#define HAVE_EVP_SHA512 1 133255581Sdes 134255581Sdes/* Define to 1 if you have the `ev_default_loop' function. */ 135255581Sdes/* #undef HAVE_EV_DEFAULT_LOOP */ 136255581Sdes 137255581Sdes/* Define to 1 if you have the `ev_loop' function. */ 138255581Sdes/* #undef HAVE_EV_LOOP */ 139255581Sdes 140255581Sdes/* Define to 1 if you have the <expat.h> header file. */ 141255581Sdes#define HAVE_EXPAT_H 1 142255581Sdes 143255581Sdes/* Define to 1 if you have the `fcntl' function. */ 144255581Sdes#define HAVE_FCNTL 1 145255581Sdes 146255581Sdes/* Define to 1 if you have the `FIPS_mode' function. */ 147255581Sdes#define HAVE_FIPS_MODE 1 148255581Sdes 149255581Sdes/* Define to 1 if you have the `fork' function. */ 150255581Sdes#define HAVE_FORK 1 151255581Sdes 152255581Sdes/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 153255581Sdes#define HAVE_FSEEKO 1 154255581Sdes 155255581Sdes/* Whether getaddrinfo is available */ 156255581Sdes#define HAVE_GETADDRINFO 1 157255581Sdes 158285206Sdes/* Define to 1 if you have the `getauxval' function. */ 159285206Sdes/* #undef HAVE_GETAUXVAL */ 160285206Sdes 161285206Sdes/* Define to 1 if you have the `getentropy' function. */ 162285206Sdes/* #undef HAVE_GETENTROPY */ 163285206Sdes 164255581Sdes/* Define to 1 if you have the <getopt.h> header file. */ 165255581Sdes#define HAVE_GETOPT_H 1 166255581Sdes 167255581Sdes/* Define to 1 if you have the `getpwnam' function. */ 168255581Sdes#define HAVE_GETPWNAM 1 169255581Sdes 170255581Sdes/* Define to 1 if you have the `getrlimit' function. */ 171255581Sdes#define HAVE_GETRLIMIT 1 172255581Sdes 173255581Sdes/* Define to 1 if you have the `glob' function. */ 174255581Sdes#define HAVE_GLOB 1 175255581Sdes 176255581Sdes/* Define to 1 if you have the <glob.h> header file. */ 177255581Sdes#define HAVE_GLOB_H 1 178255581Sdes 179255581Sdes/* Define to 1 if you have the `gmtime_r' function. */ 180255581Sdes#define HAVE_GMTIME_R 1 181255581Sdes 182255581Sdes/* Define to 1 if you have the <grp.h> header file. */ 183255581Sdes#define HAVE_GRP_H 1 184255581Sdes 185255581Sdes/* If you have HMAC_CTX_init */ 186255581Sdes#define HAVE_HMAC_CTX_INIT 1 187255581Sdes 188255581Sdes/* Define to 1 if you have the `inet_aton' function. */ 189255581Sdes#define HAVE_INET_ATON 1 190255581Sdes 191255581Sdes/* Define to 1 if you have the `inet_ntop' function. */ 192255581Sdes#define HAVE_INET_NTOP 1 193255581Sdes 194255581Sdes/* Define to 1 if you have the `inet_pton' function. */ 195255581Sdes#define HAVE_INET_PTON 1 196255581Sdes 197255581Sdes/* Define to 1 if you have the `initgroups' function. */ 198255581Sdes#define HAVE_INITGROUPS 1 199255581Sdes 200255581Sdes/* Define to 1 if you have the <inttypes.h> header file. */ 201255581Sdes#define HAVE_INTTYPES_H 1 202255581Sdes 203255581Sdes/* if the function 'ioctlsocket' is available */ 204255581Sdes/* #undef HAVE_IOCTLSOCKET */ 205255581Sdes 206255581Sdes/* Define to 1 if you have the <iphlpapi.h> header file. */ 207255581Sdes/* #undef HAVE_IPHLPAPI_H */ 208255581Sdes 209255581Sdes/* Define to 1 if you have the `kill' function. */ 210255581Sdes#define HAVE_KILL 1 211255581Sdes 212285206Sdes/* Define if we have LibreSSL */ 213285206Sdes/* #undef HAVE_LIBRESSL */ 214285206Sdes 215255581Sdes/* Define to 1 if you have the `localtime_r' function. */ 216255581Sdes#define HAVE_LOCALTIME_R 1 217255581Sdes 218255581Sdes/* Define to 1 if you have the <login_cap.h> header file. */ 219255581Sdes#define HAVE_LOGIN_CAP_H 1 220255581Sdes 221255581Sdes/* If have GNU libc compatible malloc */ 222255581Sdes#define HAVE_MALLOC 1 223255581Sdes 224255581Sdes/* Define to 1 if you have the `memmove' function. */ 225255581Sdes#define HAVE_MEMMOVE 1 226255581Sdes 227255581Sdes/* Define to 1 if you have the <memory.h> header file. */ 228255581Sdes#define HAVE_MEMORY_H 1 229255581Sdes 230255581Sdes/* Define to 1 if you have the <netdb.h> header file. */ 231255581Sdes#define HAVE_NETDB_H 1 232255581Sdes 233255581Sdes/* Define to 1 if you have the <netinet/in.h> header file. */ 234255581Sdes#define HAVE_NETINET_IN_H 1 235255581Sdes 236255581Sdes/* Use libnss for crypto */ 237255581Sdes/* #undef HAVE_NSS */ 238255581Sdes 239255581Sdes/* Define to 1 if you have the `OPENSSL_config' function. */ 240255581Sdes#define HAVE_OPENSSL_CONFIG 1 241255581Sdes 242255581Sdes/* Define to 1 if you have the <openssl/conf.h> header file. */ 243255581Sdes#define HAVE_OPENSSL_CONF_H 1 244255581Sdes 245255581Sdes/* Define to 1 if you have the <openssl/engine.h> header file. */ 246255581Sdes#define HAVE_OPENSSL_ENGINE_H 1 247255581Sdes 248255581Sdes/* Define to 1 if you have the <openssl/err.h> header file. */ 249255581Sdes#define HAVE_OPENSSL_ERR_H 1 250255581Sdes 251255581Sdes/* Define to 1 if you have the <openssl/rand.h> header file. */ 252255581Sdes#define HAVE_OPENSSL_RAND_H 1 253255581Sdes 254255581Sdes/* Define to 1 if you have the <openssl/ssl.h> header file. */ 255255581Sdes#define HAVE_OPENSSL_SSL_H 1 256255581Sdes 257255581Sdes/* Define if you have POSIX threads libraries and header files. */ 258255581Sdes#define HAVE_PTHREAD 1 259255581Sdes 260269257Sdes/* Have PTHREAD_PRIO_INHERIT. */ 261269257Sdes#define HAVE_PTHREAD_PRIO_INHERIT 1 262269257Sdes 263255581Sdes/* Define to 1 if the system has the type `pthread_rwlock_t'. */ 264255581Sdes#define HAVE_PTHREAD_RWLOCK_T 1 265255581Sdes 266255581Sdes/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 267255581Sdes#define HAVE_PTHREAD_SPINLOCK_T 1 268255581Sdes 269255581Sdes/* Define to 1 if you have the <pwd.h> header file. */ 270255581Sdes#define HAVE_PWD_H 1 271255581Sdes 272255581Sdes/* Define if you have Python libraries and header files. */ 273255581Sdes/* #undef HAVE_PYTHON */ 274255581Sdes 275255581Sdes/* Define to 1 if you have the `random' function. */ 276255581Sdes#define HAVE_RANDOM 1 277255581Sdes 278291767Sdes/* Define to 1 if you have the `reallocarray' function. */ 279291767Sdes/* #undef HAVE_REALLOCARRAY */ 280291767Sdes 281255581Sdes/* Define to 1 if you have the `recvmsg' function. */ 282255581Sdes#define HAVE_RECVMSG 1 283255581Sdes 284255581Sdes/* Define to 1 if you have the `sbrk' function. */ 285269257Sdes/* #undef HAVE_SBRK */ 286255581Sdes 287255581Sdes/* Define to 1 if you have the `sendmsg' function. */ 288255581Sdes#define HAVE_SENDMSG 1 289255581Sdes 290255581Sdes/* Define to 1 if you have the `setregid' function. */ 291255581Sdes/* #undef HAVE_SETREGID */ 292255581Sdes 293255581Sdes/* Define to 1 if you have the `setresgid' function. */ 294255581Sdes#define HAVE_SETRESGID 1 295255581Sdes 296255581Sdes/* Define to 1 if you have the `setresuid' function. */ 297255581Sdes#define HAVE_SETRESUID 1 298255581Sdes 299255581Sdes/* Define to 1 if you have the `setreuid' function. */ 300255581Sdes/* #undef HAVE_SETREUID */ 301255581Sdes 302255581Sdes/* Define to 1 if you have the `setrlimit' function. */ 303255581Sdes#define HAVE_SETRLIMIT 1 304255581Sdes 305255581Sdes/* Define to 1 if you have the `setsid' function. */ 306255581Sdes#define HAVE_SETSID 1 307255581Sdes 308255581Sdes/* Define to 1 if you have the `setusercontext' function. */ 309255581Sdes#define HAVE_SETUSERCONTEXT 1 310255581Sdes 311285206Sdes/* Define to 1 if you have the `SHA512_Update' function. */ 312285206Sdes/* #undef HAVE_SHA512_UPDATE */ 313285206Sdes 314255581Sdes/* Define to 1 if you have the `sigprocmask' function. */ 315255581Sdes#define HAVE_SIGPROCMASK 1 316255581Sdes 317255581Sdes/* Define to 1 if you have the `sleep' function. */ 318255581Sdes#define HAVE_SLEEP 1 319255581Sdes 320255581Sdes/* Define to 1 if you have the `snprintf' function. */ 321255581Sdes#define HAVE_SNPRINTF 1 322255581Sdes 323255581Sdes/* Define to 1 if you have the `socketpair' function. */ 324255581Sdes#define HAVE_SOCKETPAIR 1 325255581Sdes 326255581Sdes/* Using Solaris threads */ 327255581Sdes/* #undef HAVE_SOLARIS_THREADS */ 328255581Sdes 329255581Sdes/* Define to 1 if you have the `srandom' function. */ 330255581Sdes#define HAVE_SRANDOM 1 331255581Sdes 332255581Sdes/* Define if you have the SSL libraries installed. */ 333255581Sdes#define HAVE_SSL /**/ 334255581Sdes 335255581Sdes/* Define to 1 if you have the <stdarg.h> header file. */ 336255581Sdes#define HAVE_STDARG_H 1 337255581Sdes 338255581Sdes/* Define to 1 if you have the <stdbool.h> header file. */ 339255581Sdes#define HAVE_STDBOOL_H 1 340255581Sdes 341255581Sdes/* Define to 1 if you have the <stdint.h> header file. */ 342255581Sdes#define HAVE_STDINT_H 1 343255581Sdes 344255581Sdes/* Define to 1 if you have the <stdlib.h> header file. */ 345255581Sdes#define HAVE_STDLIB_H 1 346255581Sdes 347255581Sdes/* Define to 1 if you have the `strftime' function. */ 348255581Sdes#define HAVE_STRFTIME 1 349255581Sdes 350255581Sdes/* Define to 1 if you have the <strings.h> header file. */ 351255581Sdes#define HAVE_STRINGS_H 1 352255581Sdes 353255581Sdes/* Define to 1 if you have the <string.h> header file. */ 354255581Sdes#define HAVE_STRING_H 1 355255581Sdes 356269257Sdes/* Define to 1 if you have the `strlcat' function. */ 357269257Sdes#define HAVE_STRLCAT 1 358269257Sdes 359255581Sdes/* Define to 1 if you have the `strlcpy' function. */ 360255581Sdes#define HAVE_STRLCPY 1 361255581Sdes 362255581Sdes/* Define to 1 if you have the `strptime' function. */ 363255581Sdes#define HAVE_STRPTIME 1 364255581Sdes 365255581Sdes/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ 366255581Sdes/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ 367255581Sdes 368285206Sdes/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ 369285206Sdes#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1 370285206Sdes 371255581Sdes/* Define if you have Swig libraries and header files. */ 372255581Sdes/* #undef HAVE_SWIG */ 373255581Sdes 374255581Sdes/* Define to 1 if you have the <syslog.h> header file. */ 375255581Sdes#define HAVE_SYSLOG_H 1 376255581Sdes 377255581Sdes/* Define to 1 if you have the <sys/param.h> header file. */ 378255581Sdes#define HAVE_SYS_PARAM_H 1 379255581Sdes 380255581Sdes/* Define to 1 if you have the <sys/resource.h> header file. */ 381255581Sdes#define HAVE_SYS_RESOURCE_H 1 382255581Sdes 383285206Sdes/* Define to 1 if you have the <sys/sha2.h> header file. */ 384285206Sdes/* #undef HAVE_SYS_SHA2_H */ 385285206Sdes 386255581Sdes/* Define to 1 if you have the <sys/socket.h> header file. */ 387255581Sdes#define HAVE_SYS_SOCKET_H 1 388255581Sdes 389255581Sdes/* Define to 1 if you have the <sys/stat.h> header file. */ 390255581Sdes#define HAVE_SYS_STAT_H 1 391255581Sdes 392285206Sdes/* Define to 1 if you have the <sys/sysctl.h> header file. */ 393285206Sdes/* #undef HAVE_SYS_SYSCTL_H */ 394285206Sdes 395255581Sdes/* Define to 1 if you have the <sys/types.h> header file. */ 396255581Sdes#define HAVE_SYS_TYPES_H 1 397255581Sdes 398255581Sdes/* Define to 1 if you have the <sys/uio.h> header file. */ 399255581Sdes#define HAVE_SYS_UIO_H 1 400255581Sdes 401285206Sdes/* Define to 1 if you have the <sys/un.h> header file. */ 402285206Sdes#define HAVE_SYS_UN_H 1 403285206Sdes 404255581Sdes/* Define to 1 if you have the <sys/wait.h> header file. */ 405255581Sdes#define HAVE_SYS_WAIT_H 1 406255581Sdes 407255581Sdes/* Define to 1 if you have the <time.h> header file. */ 408255581Sdes#define HAVE_TIME_H 1 409255581Sdes 410255581Sdes/* Define to 1 if you have the `tzset' function. */ 411255581Sdes#define HAVE_TZSET 1 412255581Sdes 413255581Sdes/* Define to 1 if you have the <unistd.h> header file. */ 414255581Sdes#define HAVE_UNISTD_H 1 415255581Sdes 416255581Sdes/* Define to 1 if you have the `usleep' function. */ 417255581Sdes#define HAVE_USLEEP 1 418255581Sdes 419255581Sdes/* Define to 1 if you have the `vfork' function. */ 420255581Sdes#define HAVE_VFORK 1 421255581Sdes 422255581Sdes/* Define to 1 if you have the <vfork.h> header file. */ 423255581Sdes/* #undef HAVE_VFORK_H */ 424255581Sdes 425255581Sdes/* Define to 1 if you have the <windows.h> header file. */ 426255581Sdes/* #undef HAVE_WINDOWS_H */ 427255581Sdes 428255581Sdes/* Using Windows threads */ 429255581Sdes/* #undef HAVE_WINDOWS_THREADS */ 430255581Sdes 431255581Sdes/* Define to 1 if you have the <winsock2.h> header file. */ 432255581Sdes/* #undef HAVE_WINSOCK2_H */ 433255581Sdes 434255581Sdes/* Define to 1 if `fork' works. */ 435255581Sdes#define HAVE_WORKING_FORK 1 436255581Sdes 437255581Sdes/* Define to 1 if `vfork' works. */ 438255581Sdes#define HAVE_WORKING_VFORK 1 439255581Sdes 440255581Sdes/* Define to 1 if you have the `writev' function. */ 441255581Sdes#define HAVE_WRITEV 1 442255581Sdes 443255581Sdes/* Define to 1 if you have the <ws2tcpip.h> header file. */ 444255581Sdes/* #undef HAVE_WS2TCPIP_H */ 445255581Sdes 446255581Sdes/* Define to 1 if you have the `_beginthreadex' function. */ 447255581Sdes/* #undef HAVE__BEGINTHREADEX */ 448255581Sdes 449255581Sdes/* if lex has yylex_destroy */ 450255581Sdes#define LEX_HAS_YYLEX_DESTROY 1 451255581Sdes 452255581Sdes/* Define to the sub-directory in which libtool stores uninstalled libraries. 453255581Sdes */ 454255581Sdes#define LT_OBJDIR ".libs/" 455255581Sdes 456255581Sdes/* Define to the maximum message length to pass to syslog. */ 457255581Sdes#define MAXSYSLOGMSGLEN 10240 458255581Sdes 459255581Sdes/* Define if memcmp() does not compare unsigned bytes */ 460255581Sdes/* #undef MEMCMP_IS_BROKEN */ 461255581Sdes 462255581Sdes/* Define if mkdir has one argument. */ 463255581Sdes/* #undef MKDIR_HAS_ONE_ARG */ 464255581Sdes 465255581Sdes/* Define if the network stack does not fully support nonblocking io (causes 466255581Sdes lower performance). */ 467255581Sdes/* #undef NONBLOCKING_IS_BROKEN */ 468255581Sdes 469255581Sdes/* Put -D_ALL_SOURCE define in config.h */ 470255581Sdes/* #undef OMITTED__D_ALL_SOURCE */ 471255581Sdes 472255581Sdes/* Put -D_BSD_SOURCE define in config.h */ 473255581Sdes/* #undef OMITTED__D_BSD_SOURCE */ 474255581Sdes 475255581Sdes/* Put -D_GNU_SOURCE define in config.h */ 476255581Sdes/* #undef OMITTED__D_GNU_SOURCE */ 477255581Sdes 478255581Sdes/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ 479255581Sdes/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */ 480255581Sdes 481255581Sdes/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ 482255581Sdes/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */ 483255581Sdes 484255581Sdes/* Put -D_XOPEN_SOURCE=600 define in config.h */ 485255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_600 */ 486255581Sdes 487255581Sdes/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ 488255581Sdes/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */ 489255581Sdes 490255581Sdes/* Put -D__EXTENSIONS__ define in config.h */ 491255581Sdes/* #undef OMITTED__D__EXTENSIONS__ */ 492255581Sdes 493255581Sdes/* Define to the address where bug reports for this package should be sent. */ 494255581Sdes#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl" 495255581Sdes 496255581Sdes/* Define to the full name of this package. */ 497255581Sdes#define PACKAGE_NAME "unbound" 498255581Sdes 499255581Sdes/* Define to the full name and version of this package. */ 500291767Sdes#define PACKAGE_STRING "unbound 1.5.5" 501255581Sdes 502255581Sdes/* Define to the one symbol short name of this package. */ 503255581Sdes#define PACKAGE_TARNAME "unbound" 504255581Sdes 505255581Sdes/* Define to the home page for this package. */ 506255581Sdes#define PACKAGE_URL "" 507255581Sdes 508255581Sdes/* Define to the version of this package. */ 509291767Sdes#define PACKAGE_VERSION "1.5.5" 510255581Sdes 511255581Sdes/* default pidfile location */ 512255581Sdes#define PIDFILE "/var/unbound/unbound.pid" 513255581Sdes 514255581Sdes/* Define to necessary symbol if this constant uses a non-standard name on 515255581Sdes your system. */ 516255581Sdes/* #undef PTHREAD_CREATE_JOINABLE */ 517255581Sdes 518255581Sdes/* Define as the return type of signal handlers (`int' or `void'). */ 519255581Sdes#define RETSIGTYPE void 520255581Sdes 521255581Sdes/* default rootkey location */ 522255581Sdes#define ROOT_ANCHOR_FILE "/var/unbound/root.key" 523255581Sdes 524255581Sdes/* default rootcert location */ 525255581Sdes#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" 526255581Sdes 527255581Sdes/* version number for resource files */ 528291767Sdes#define RSRC_PACKAGE_VERSION 1,5,5,0 529255581Sdes 530255581Sdes/* Directory to chdir to */ 531255581Sdes#define RUN_DIR "/var/unbound" 532255581Sdes 533255581Sdes/* Shared data */ 534255581Sdes#define SHARE_DIR "/var/unbound" 535255581Sdes 536269257Sdes/* The size of `time_t', as computed by sizeof. */ 537269257Sdes#define SIZEOF_TIME_T 8 538269257Sdes 539255581Sdes/* Define to 1 if you have the ANSI C header files. */ 540255581Sdes#define STDC_HEADERS 1 541255581Sdes 542255581Sdes/* use default strptime. */ 543255581Sdes#define STRPTIME_WORKS 1 544255581Sdes 545255581Sdes/* Use win32 resources and API */ 546255581Sdes/* #undef UB_ON_WINDOWS */ 547255581Sdes 548255581Sdes/* default username */ 549255581Sdes#define UB_USERNAME "unbound" 550255581Sdes 551255581Sdes/* use to enable lightweight alloc assertions, for debug use */ 552255581Sdes/* #undef UNBOUND_ALLOC_LITE */ 553255581Sdes 554255581Sdes/* use malloc not regions, for debug use */ 555255581Sdes/* #undef UNBOUND_ALLOC_NONREGIONAL */ 556255581Sdes 557255581Sdes/* use statistics for allocs and frees, for debug use */ 558255581Sdes/* #undef UNBOUND_ALLOC_STATS */ 559255581Sdes 560255581Sdes/* define this to enable debug checks. */ 561255581Sdes/* #undef UNBOUND_DEBUG */ 562255581Sdes 563285206Sdes/* Define to 1 to enable dnstap support */ 564285206Sdes/* #undef USE_DNSTAP */ 565285206Sdes 566255581Sdes/* Define this to enable ECDSA support. */ 567255581Sdes#define USE_ECDSA 1 568255581Sdes 569255581Sdes/* Define this to enable an EVP workaround for older openssl */ 570255581Sdes/* #undef USE_ECDSA_EVP_WORKAROUND */ 571255581Sdes 572255581Sdes/* Define this to enable GOST support. */ 573255581Sdes/* #undef USE_GOST */ 574255581Sdes 575255581Sdes/* Define if you want to use internal select based events */ 576255581Sdes#define USE_MINI_EVENT 1 577255581Sdes 578255581Sdes/* Define this to enable SHA256 and SHA512 support. */ 579255581Sdes#define USE_SHA2 1 580255581Sdes 581255581Sdes/* Enable extensions on AIX 3, Interix. */ 582255581Sdes#ifndef _ALL_SOURCE 583255581Sdes# define _ALL_SOURCE 1 584255581Sdes#endif 585255581Sdes/* Enable GNU extensions on systems that have them. */ 586255581Sdes#ifndef _GNU_SOURCE 587255581Sdes# define _GNU_SOURCE 1 588255581Sdes#endif 589255581Sdes/* Enable threading extensions on Solaris. */ 590255581Sdes#ifndef _POSIX_PTHREAD_SEMANTICS 591255581Sdes# define _POSIX_PTHREAD_SEMANTICS 1 592255581Sdes#endif 593255581Sdes/* Enable extensions on HP NonStop. */ 594255581Sdes#ifndef _TANDEM_SOURCE 595255581Sdes# define _TANDEM_SOURCE 1 596255581Sdes#endif 597255581Sdes/* Enable general extensions on Solaris. */ 598255581Sdes#ifndef __EXTENSIONS__ 599255581Sdes# define __EXTENSIONS__ 1 600255581Sdes#endif 601255581Sdes 602255581Sdes 603255581Sdes/* Whether the windows socket API is used */ 604255581Sdes/* #undef USE_WINSOCK */ 605255581Sdes 606255581Sdes/* the version of the windows API enabled */ 607255581Sdes#define WINVER 0x0502 608255581Sdes 609255581Sdes/* Define if you want Python module. */ 610255581Sdes/* #undef WITH_PYTHONMODULE */ 611255581Sdes 612255581Sdes/* Define if you want PyUnbound. */ 613255581Sdes/* #undef WITH_PYUNBOUND */ 614255581Sdes 615255581Sdes/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a 616255581Sdes `char[]'. */ 617255581Sdes#define YYTEXT_POINTER 1 618255581Sdes 619255581Sdes/* Enable large inode numbers on Mac OS X 10.5. */ 620255581Sdes#ifndef _DARWIN_USE_64_BIT_INODE 621255581Sdes# define _DARWIN_USE_64_BIT_INODE 1 622255581Sdes#endif 623255581Sdes 624255581Sdes/* Number of bits in a file offset, on hosts where this is settable. */ 625255581Sdes/* #undef _FILE_OFFSET_BITS */ 626255581Sdes 627255581Sdes/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 628255581Sdes/* #undef _LARGEFILE_SOURCE */ 629255581Sdes 630255581Sdes/* Define for large files, on AIX-style hosts. */ 631255581Sdes/* #undef _LARGE_FILES */ 632255581Sdes 633255581Sdes/* Define to 1 if on MINIX. */ 634255581Sdes/* #undef _MINIX */ 635255581Sdes 636269257Sdes/* Enable for compile on Minix */ 637269257Sdes/* #undef _NETBSD_SOURCE */ 638269257Sdes 639255581Sdes/* Define to 2 if the system does not provide POSIX.1 features except with 640255581Sdes this defined. */ 641255581Sdes/* #undef _POSIX_1_SOURCE */ 642255581Sdes 643255581Sdes/* Define to 1 if you need to in order for `stat' and other things to work. */ 644255581Sdes/* #undef _POSIX_SOURCE */ 645255581Sdes 646255581Sdes/* Define to empty if `const' does not conform to ANSI C. */ 647255581Sdes/* #undef const */ 648255581Sdes 649255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 650255581Sdes/* #undef gid_t */ 651255581Sdes 652255581Sdes/* in_addr_t */ 653255581Sdes/* #undef in_addr_t */ 654255581Sdes 655255581Sdes/* in_port_t */ 656255581Sdes/* #undef in_port_t */ 657255581Sdes 658255581Sdes/* Define to `__inline__' or `__inline' if that's what the C compiler 659255581Sdes calls it, or to nothing if 'inline' is not supported under any name. */ 660255581Sdes#ifndef __cplusplus 661255581Sdes/* #undef inline */ 662255581Sdes#endif 663255581Sdes 664255581Sdes/* Define to `short' if <sys/types.h> does not define. */ 665255581Sdes/* #undef int16_t */ 666255581Sdes 667255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 668255581Sdes/* #undef int32_t */ 669255581Sdes 670255581Sdes/* Define to `long long' if <sys/types.h> does not define. */ 671255581Sdes/* #undef int64_t */ 672255581Sdes 673255581Sdes/* Define to `signed char' if <sys/types.h> does not define. */ 674255581Sdes/* #undef int8_t */ 675255581Sdes 676255581Sdes/* Define if replacement function should be used. */ 677255581Sdes/* #undef malloc */ 678255581Sdes 679255581Sdes/* Define to `long int' if <sys/types.h> does not define. */ 680255581Sdes/* #undef off_t */ 681255581Sdes 682255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 683255581Sdes/* #undef pid_t */ 684255581Sdes 685255581Sdes/* Define to 'int' if not defined */ 686255581Sdes/* #undef rlim_t */ 687255581Sdes 688255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 689255581Sdes/* #undef size_t */ 690255581Sdes 691255581Sdes/* Define to 'int' if not defined */ 692255581Sdes/* #undef socklen_t */ 693255581Sdes 694255581Sdes/* Define to `int' if <sys/types.h> does not define. */ 695255581Sdes/* #undef ssize_t */ 696255581Sdes 697255581Sdes/* Define to 'unsigned char if not defined */ 698255581Sdes/* #undef u_char */ 699255581Sdes 700255581Sdes/* Define to `int' if <sys/types.h> doesn't define. */ 701255581Sdes/* #undef uid_t */ 702255581Sdes 703255581Sdes/* Define to `unsigned short' if <sys/types.h> does not define. */ 704255581Sdes/* #undef uint16_t */ 705255581Sdes 706255581Sdes/* Define to `unsigned int' if <sys/types.h> does not define. */ 707255581Sdes/* #undef uint32_t */ 708255581Sdes 709255581Sdes/* Define to `unsigned long long' if <sys/types.h> does not define. */ 710255581Sdes/* #undef uint64_t */ 711255581Sdes 712255581Sdes/* Define to `unsigned char' if <sys/types.h> does not define. */ 713255581Sdes/* #undef uint8_t */ 714255581Sdes 715255581Sdes/* Define as `fork' if `vfork' does not work. */ 716255581Sdes/* #undef vfork */ 717255581Sdes 718255581Sdes#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) 719255581Sdes#define _GNU_SOURCE 1 720255581Sdes#endif 721255581Sdes 722255581Sdes#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) 723255581Sdes#define _BSD_SOURCE 1 724255581Sdes#endif 725255581Sdes 726255581Sdes#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) 727255581Sdes#define __EXTENSIONS__ 1 728255581Sdes#endif 729255581Sdes 730255581Sdes#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) 731255581Sdes#define _POSIX_C_SOURCE 200112 732255581Sdes#endif 733255581Sdes 734255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) 735255581Sdes#define _XOPEN_SOURCE 600 736255581Sdes#endif 737255581Sdes 738255581Sdes#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) 739255581Sdes#define _XOPEN_SOURCE_EXTENDED 1 740255581Sdes#endif 741255581Sdes 742255581Sdes#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) 743255581Sdes#define _ALL_SOURCE 1 744255581Sdes#endif 745255581Sdes 746255581Sdes#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) 747255581Sdes#define _LARGEFILE_SOURCE 1 748255581Sdes#endif 749255581Sdes 750255581Sdes 751255581Sdes 752255581Sdes 753255581Sdes#ifndef UNBOUND_DEBUG 754255581Sdes# define NDEBUG 755255581Sdes#endif 756255581Sdes 757269257Sdes/** Use small-ldns codebase */ 758269257Sdes#define USE_SLDNS 1 759269257Sdes#ifdef HAVE_SSL 760269257Sdes# define LDNS_BUILD_CONFIG_HAVE_SSL 1 761269257Sdes#endif 762269257Sdes 763255581Sdes#include <stdio.h> 764255581Sdes#include <string.h> 765255581Sdes#include <unistd.h> 766255581Sdes#include <assert.h> 767255581Sdes 768255581Sdes#if STDC_HEADERS 769255581Sdes#include <stdlib.h> 770255581Sdes#include <stddef.h> 771255581Sdes#endif 772255581Sdes 773269257Sdes#ifdef HAVE_STDARG_H 774269257Sdes#include <stdarg.h> 775269257Sdes#endif 776269257Sdes 777255581Sdes#ifdef HAVE_STDINT_H 778255581Sdes#include <stdint.h> 779255581Sdes#endif 780255581Sdes 781255581Sdes#include <errno.h> 782255581Sdes 783255581Sdes#if HAVE_SYS_PARAM_H 784255581Sdes#include <sys/param.h> 785255581Sdes#endif 786255581Sdes 787255581Sdes#ifdef HAVE_SYS_SOCKET_H 788255581Sdes#include <sys/socket.h> 789255581Sdes#endif 790255581Sdes 791255581Sdes#ifdef HAVE_SYS_UIO_H 792255581Sdes#include <sys/uio.h> 793255581Sdes#endif 794255581Sdes 795255581Sdes#ifdef HAVE_NETINET_IN_H 796255581Sdes#include <netinet/in.h> 797255581Sdes#endif 798255581Sdes 799255581Sdes#ifdef HAVE_ARPA_INET_H 800255581Sdes#include <arpa/inet.h> 801255581Sdes#endif 802255581Sdes 803255581Sdes#ifdef HAVE_WINSOCK2_H 804255581Sdes#include <winsock2.h> 805255581Sdes#endif 806255581Sdes 807255581Sdes#ifdef HAVE_WS2TCPIP_H 808255581Sdes#include <ws2tcpip.h> 809255581Sdes#endif 810255581Sdes 811269257Sdes#ifndef USE_WINSOCK 812269257Sdes#define ARG_LL "%ll" 813269257Sdes#else 814269257Sdes#define ARG_LL "%I64" 815269257Sdes#endif 816255581Sdes 817285206Sdes#ifndef AF_LOCAL 818285206Sdes#define AF_LOCAL AF_UNIX 819285206Sdes#endif 820269257Sdes 821285206Sdes 822255581Sdes 823255581Sdes#ifdef HAVE_ATTR_FORMAT 824255581Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) \ 825255581Sdes __attribute__ ((format (archetype, string_index, first_to_check))) 826255581Sdes#else /* !HAVE_ATTR_FORMAT */ 827255581Sdes# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ 828255581Sdes#endif /* !HAVE_ATTR_FORMAT */ 829255581Sdes 830255581Sdes 831255581Sdes#if defined(DOXYGEN) 832255581Sdes# define ATTR_UNUSED(x) x 833255581Sdes#elif defined(__cplusplus) 834255581Sdes# define ATTR_UNUSED(x) 835255581Sdes#elif defined(HAVE_ATTR_UNUSED) 836255581Sdes# define ATTR_UNUSED(x) x __attribute__((unused)) 837255581Sdes#else /* !HAVE_ATTR_UNUSED */ 838255581Sdes# define ATTR_UNUSED(x) x 839255581Sdes#endif /* !HAVE_ATTR_UNUSED */ 840255581Sdes 841255581Sdes 842255581Sdes#ifndef HAVE_FSEEKO 843255581Sdes#define fseeko fseek 844255581Sdes#define ftello ftell 845255581Sdes#endif /* HAVE_FSEEKO */ 846255581Sdes 847255581Sdes 848255581Sdes#ifndef MAXHOSTNAMELEN 849255581Sdes#define MAXHOSTNAMELEN 256 850255581Sdes#endif 851255581Sdes 852255581Sdes 853255581Sdes#ifndef HAVE_SNPRINTF 854255581Sdes#define snprintf snprintf_unbound 855255581Sdes#define vsnprintf vsnprintf_unbound 856255581Sdes#include <stdarg.h> 857255581Sdesint snprintf (char *str, size_t count, const char *fmt, ...); 858255581Sdesint vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 859255581Sdes#endif /* HAVE_SNPRINTF */ 860255581Sdes 861255581Sdes 862255581Sdes#ifndef HAVE_INET_PTON 863255581Sdes#define inet_pton inet_pton_unbound 864255581Sdesint inet_pton(int af, const char* src, void* dst); 865255581Sdes#endif /* HAVE_INET_PTON */ 866255581Sdes 867255581Sdes 868255581Sdes#ifndef HAVE_INET_NTOP 869255581Sdes#define inet_ntop inet_ntop_unbound 870255581Sdesconst char *inet_ntop(int af, const void *src, char *dst, size_t size); 871255581Sdes#endif 872255581Sdes 873255581Sdes 874255581Sdes#ifndef HAVE_INET_ATON 875255581Sdes#define inet_aton inet_aton_unbound 876255581Sdesint inet_aton(const char *cp, struct in_addr *addr); 877255581Sdes#endif 878255581Sdes 879255581Sdes 880255581Sdes#ifndef HAVE_MEMMOVE 881255581Sdes#define memmove memmove_unbound 882255581Sdesvoid *memmove(void *dest, const void *src, size_t n); 883255581Sdes#endif 884255581Sdes 885255581Sdes 886269257Sdes#ifndef HAVE_STRLCAT 887269257Sdes#define strlcat strlcat_unbound 888269257Sdessize_t strlcat(char *dst, const char *src, size_t siz); 889269257Sdes#endif 890269257Sdes 891269257Sdes 892255581Sdes#ifndef HAVE_STRLCPY 893255581Sdes#define strlcpy strlcpy_unbound 894255581Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 895255581Sdes#endif 896255581Sdes 897255581Sdes 898255581Sdes#ifndef HAVE_GMTIME_R 899255581Sdes#define gmtime_r gmtime_r_unbound 900255581Sdesstruct tm *gmtime_r(const time_t *timep, struct tm *result); 901255581Sdes#endif 902255581Sdes 903255581Sdes 904291767Sdes#ifndef HAVE_REALLOCARRAY 905291767Sdes#define reallocarray reallocarrayunbound 906291767Sdesvoid* reallocarray(void *ptr, size_t nmemb, size_t size); 907291767Sdes#endif 908291767Sdes 909291767Sdes 910269257Sdes#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H) 911255581Sdes#define sleep(x) Sleep((x)*1000) /* on win32 */ 912255581Sdes#endif /* HAVE_SLEEP */ 913255581Sdes 914255581Sdes 915255581Sdes#ifndef HAVE_USLEEP 916255581Sdes#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ 917255581Sdes#endif /* HAVE_USLEEP */ 918255581Sdes 919255581Sdes 920255581Sdes#ifndef HAVE_RANDOM 921255581Sdes#define random rand /* on win32, for tests only (bad random) */ 922255581Sdes#endif /* HAVE_RANDOM */ 923255581Sdes 924255581Sdes 925255581Sdes#ifndef HAVE_SRANDOM 926255581Sdes#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ 927255581Sdes#endif /* HAVE_SRANDOM */ 928255581Sdes 929255581Sdes 930255581Sdes/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 931255581Sdes#ifdef HAVE_WINSOCK2_H 932255581Sdes#define FD_SET_T (u_int) 933255581Sdes#else 934255581Sdes#define FD_SET_T 935255581Sdes#endif 936255581Sdes 937255581Sdes 938255581Sdes#ifndef IPV6_MIN_MTU 939255581Sdes#define IPV6_MIN_MTU 1280 940255581Sdes#endif /* IPV6_MIN_MTU */ 941255581Sdes 942255581Sdes 943255581Sdes#ifdef MEMCMP_IS_BROKEN 944255581Sdes#include "compat/memcmp.h" 945255581Sdes#define memcmp memcmp_unbound 946255581Sdesint memcmp(const void *x, const void *y, size_t n); 947255581Sdes#endif 948255581Sdes 949255581Sdes 950255581Sdes 951255581Sdes#ifndef HAVE_CTIME_R 952255581Sdes#define ctime_r unbound_ctime_r 953255581Sdeschar *ctime_r(const time_t *timep, char *buf); 954255581Sdes#endif 955255581Sdes 956255581Sdes#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) 957255581Sdes#define strptime unbound_strptime 958255581Sdesstruct tm; 959255581Sdeschar *strptime(const char *s, const char *format, struct tm *tm); 960255581Sdes#endif 961255581Sdes 962285206Sdes#ifdef HAVE_LIBRESSL 963285206Sdes# if !HAVE_DECL_STRLCPY 964285206Sdessize_t strlcpy(char *dst, const char *src, size_t siz); 965285206Sdes# endif 966285206Sdes# if !HAVE_DECL_STRLCAT 967285206Sdessize_t strlcat(char *dst, const char *src, size_t siz); 968285206Sdes# endif 969285206Sdes# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM) 970285206Sdesuint32_t arc4random(void); 971285206Sdes# endif 972285206Sdes# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) 973285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 974285206Sdes# endif 975291767Sdes# if !HAVE_DECL_REALLOCARRAY 976291767Sdesvoid *reallocarray(void *ptr, size_t nmemb, size_t size); 977291767Sdes# endif 978285206Sdes#endif /* HAVE_LIBRESSL */ 979285206Sdes#ifndef HAVE_ARC4RANDOM 980285206Sdesvoid explicit_bzero(void* buf, size_t len); 981285206Sdesint getentropy(void* buf, size_t len); 982285206Sdesuint32_t arc4random(void); 983285206Sdesvoid arc4random_buf(void* buf, size_t n); 984285206Sdesvoid _ARC4_LOCK(void); 985285206Sdesvoid _ARC4_UNLOCK(void); 986285206Sdes#endif 987285206Sdes#ifndef HAVE_ARC4RANDOM_UNIFORM 988285206Sdesuint32_t arc4random_uniform(uint32_t upper_bound); 989285206Sdes#endif 990285206Sdes#ifdef COMPAT_SHA512 991285206Sdes#ifndef SHA512_DIGEST_LENGTH 992285206Sdes#define SHA512_BLOCK_LENGTH 128 993285206Sdes#define SHA512_DIGEST_LENGTH 64 994285206Sdes#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) 995285206Sdestypedef struct _SHA512_CTX { 996285206Sdes uint64_t state[8]; 997285206Sdes uint64_t bitcount[2]; 998285206Sdes uint8_t buffer[SHA512_BLOCK_LENGTH]; 999285206Sdes} SHA512_CTX; 1000285206Sdes#endif /* SHA512_DIGEST_LENGTH */ 1001285206Sdesvoid SHA512_Init(SHA512_CTX*); 1002285206Sdesvoid SHA512_Update(SHA512_CTX*, void*, size_t); 1003285206Sdesvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); 1004285206Sdesunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); 1005285206Sdes#endif /* COMPAT_SHA512 */ 1006285206Sdes 1007285206Sdes 1008285206Sdes 1009255581Sdes#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)) 1010255581Sdes /* using version of libevent that is not threadsafe. */ 1011255581Sdes# define LIBEVENT_SIGNAL_PROBLEM 1 1012255581Sdes#endif 1013255581Sdes 1014255581Sdes#ifndef CHECKED_INET6 1015255581Sdes# define CHECKED_INET6 1016255581Sdes# ifdef AF_INET6 1017255581Sdes# define INET6 1018255581Sdes# else 1019255581Sdes# define AF_INET6 28 1020255581Sdes# endif 1021255581Sdes#endif /* CHECKED_INET6 */ 1022255581Sdes 1023255581Sdes#ifndef HAVE_GETADDRINFO 1024255581Sdesstruct sockaddr_storage; 1025255581Sdes#include "compat/fake-rfc2553.h" 1026255581Sdes#endif 1027255581Sdes 1028255581Sdes#ifdef UNBOUND_ALLOC_STATS 1029255581Sdes# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) 1030255581Sdes# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) 1031255581Sdes# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) 1032255581Sdes# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) 1033255581Sdesvoid *unbound_stat_malloc(size_t size); 1034255581Sdesvoid *unbound_stat_calloc(size_t nmemb, size_t size); 1035255581Sdesvoid unbound_stat_free(void *ptr); 1036255581Sdesvoid *unbound_stat_realloc(void *ptr, size_t size); 1037255581Sdesvoid *unbound_stat_malloc_log(size_t size, const char* file, int line, 1038255581Sdes const char* func); 1039255581Sdesvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, 1040255581Sdes int line, const char* func); 1041255581Sdesvoid unbound_stat_free_log(void *ptr, const char* file, int line, 1042255581Sdes const char* func); 1043255581Sdesvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, 1044255581Sdes int line, const char* func); 1045255581Sdes#elif defined(UNBOUND_ALLOC_LITE) 1046255581Sdes# include "util/alloc.h" 1047255581Sdes#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ 1048255581Sdes 1049255581Sdes/** default port for DNS traffic. */ 1050255581Sdes#define UNBOUND_DNS_PORT 53 1051255581Sdes/** default port for unbound control traffic, registered port with IANA, 1052255581Sdes ub-dns-control 8953/tcp unbound dns nameserver control */ 1053255581Sdes#define UNBOUND_CONTROL_PORT 8953 1054255581Sdes/** the version of unbound-control that this software implements */ 1055255581Sdes#define UNBOUND_CONTROL_VERSION 1 1056255581Sdes 1057255581Sdes 1058