1/* config.h.in. Generated from configure.ac by autoheader. */ 2 3/* apply the noreturn attribute to a function that exits the program */ 4#undef ATTR_NORETURN 5 6/* apply the weak attribute to a symbol */ 7#undef ATTR_WEAK 8 9/* Directory to chroot to */ 10#undef CHROOT_DIR 11 12/* Define this to enable client subnet option. */ 13#undef CLIENT_SUBNET 14 15/* Do sha512 definitions in config.h */ 16#undef COMPAT_SHA512 17 18/* Command line arguments used with configure */ 19#undef CONFCMDLINE 20 21/* Pathname to the Unbound configuration file */ 22#undef CONFIGFILE 23 24/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work 25 */ 26#undef DARWIN_BROKEN_SETREUID 27 28/* Whether daemon is deprecated */ 29#undef DEPRECATED_DAEMON 30 31/* Deprecate RSA 1024 bit length, makes that an unsupported key */ 32#undef DEPRECATE_RSA_1024 33 34/* Define this to enable kernel based UDP source port randomization. */ 35#undef DISABLE_EXPLICIT_PORT_RANDOMISATION 36 37/* default dnstap socket path */ 38#undef DNSTAP_SOCKET_PATH 39 40/* Define if you want to use debug lock checking (slow). */ 41#undef ENABLE_LOCK_CHECKS 42 43/* Define this if you enabled-allsymbols from libunbound to link binaries to 44 it for smaller install size, but the libunbound export table is polluted by 45 internal symbols */ 46#undef EXPORT_ALL_SYMBOLS 47 48/* Define to 1 if you have the `accept4' function. */ 49#undef HAVE_ACCEPT4 50 51/* Define to 1 if you have the `arc4random' function. */ 52#undef HAVE_ARC4RANDOM 53 54/* Define to 1 if you have the `arc4random_uniform' function. */ 55#undef HAVE_ARC4RANDOM_UNIFORM 56 57/* Define to 1 if you have the <arpa/inet.h> header file. */ 58#undef HAVE_ARPA_INET_H 59 60/* Whether the C compiler accepts the "format" attribute */ 61#undef HAVE_ATTR_FORMAT 62 63/* Whether the C compiler accepts the "noreturn" attribute */ 64#undef HAVE_ATTR_NORETURN 65 66/* Whether the C compiler accepts the "unused" attribute */ 67#undef HAVE_ATTR_UNUSED 68 69/* Whether the C compiler accepts the "weak" attribute */ 70#undef HAVE_ATTR_WEAK 71 72/* If we have be64toh */ 73#undef HAVE_BE64TOH 74 75/* Define to 1 if you have the <bsd/stdlib.h> header file. */ 76#undef HAVE_BSD_STDLIB_H 77 78/* Define to 1 if you have the <bsd/string.h> header file. */ 79#undef HAVE_BSD_STRING_H 80 81/* Define to 1 if you have the `chown' function. */ 82#undef HAVE_CHOWN 83 84/* Define to 1 if you have the `chroot' function. */ 85#undef HAVE_CHROOT 86 87/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ 88#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 89 90/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ 91#undef HAVE_CRYPTO_THREADID_SET_CALLBACK 92 93/* Define to 1 if you have the `ctime_r' function. */ 94#undef HAVE_CTIME_R 95 96/* Define to 1 if you have the `daemon' function. */ 97#undef HAVE_DAEMON 98 99/* Define to 1 if you have the declaration of `arc4random', and to 0 if you 100 don't. */ 101#undef HAVE_DECL_ARC4RANDOM 102 103/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 104 if you don't. */ 105#undef HAVE_DECL_ARC4RANDOM_UNIFORM 106 107/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if 108 you don't. */ 109#undef HAVE_DECL_EVSIGNAL_ASSIGN 110 111/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you 112 don't. */ 113#undef HAVE_DECL_INET_NTOP 114 115/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you 116 don't. */ 117#undef HAVE_DECL_INET_PTON 118 119/* Define to 1 if you have the declaration of `nghttp2_session_server_new', 120 and to 0 if you don't. */ 121#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW 122 123/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you 124 don't. */ 125#undef HAVE_DECL_NID_ED25519 126 127/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you 128 don't. */ 129#undef HAVE_DECL_NID_ED448 130 131/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you 132 don't. */ 133#undef HAVE_DECL_NID_SECP384R1 134 135/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 136 if you don't. */ 137#undef HAVE_DECL_NID_X9_62_PRIME256V1 138 139/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you 140 don't. */ 141#undef HAVE_DECL_REALLOCARRAY 142 143/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you 144 don't. */ 145#undef HAVE_DECL_REDISCONNECT 146 147/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 148 if you don't. */ 149#undef HAVE_DECL_SK_SSL_COMP_POP_FREE 150 151/* Define to 1 if you have the declaration of 152 `SSL_COMP_get_compression_methods', and to 0 if you don't. */ 153#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 154 155/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to 156 0 if you don't. */ 157#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 158 159/* Define to 1 if you have the declaration of `strlcat', and to 0 if you 160 don't. */ 161#undef HAVE_DECL_STRLCAT 162 163/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you 164 don't. */ 165#undef HAVE_DECL_STRLCPY 166 167/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if 168 you don't. */ 169#undef HAVE_DECL_XML_STOPPARSER 170 171/* Define to 1 if you have the <dlfcn.h> header file. */ 172#undef HAVE_DLFCN_H 173 174/* Define to 1 if you have the `DSA_SIG_set0' function. */ 175#undef HAVE_DSA_SIG_SET0 176 177/* Define to 1 if you have the <endian.h> header file. */ 178#undef HAVE_ENDIAN_H 179 180/* Define to 1 if you have the `endprotoent' function. */ 181#undef HAVE_ENDPROTOENT 182 183/* Define to 1 if you have the `endpwent' function. */ 184#undef HAVE_ENDPWENT 185 186/* Define to 1 if you have the `endservent' function. */ 187#undef HAVE_ENDSERVENT 188 189/* Define to 1 if you have the `ENGINE_cleanup' function. */ 190#undef HAVE_ENGINE_CLEANUP 191 192/* Define to 1 if you have the `ERR_free_strings' function. */ 193#undef HAVE_ERR_FREE_STRINGS 194 195/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ 196#undef HAVE_ERR_LOAD_CRYPTO_STRINGS 197 198/* Define to 1 if you have the `event_assign' function. */ 199#undef HAVE_EVENT_ASSIGN 200 201/* Define to 1 if you have the `event_base_free' function. */ 202#undef HAVE_EVENT_BASE_FREE 203 204/* Define to 1 if you have the `event_base_get_method' function. */ 205#undef HAVE_EVENT_BASE_GET_METHOD 206 207/* Define to 1 if you have the `event_base_new' function. */ 208#undef HAVE_EVENT_BASE_NEW 209 210/* Define to 1 if you have the `event_base_once' function. */ 211#undef HAVE_EVENT_BASE_ONCE 212 213/* Define to 1 if you have the <event.h> header file. */ 214#undef HAVE_EVENT_H 215 216/* Define to 1 if you have the `EVP_aes_256_cbc' function. */ 217#undef HAVE_EVP_AES_256_CBC 218 219/* Define to 1 if you have the `EVP_cleanup' function. */ 220#undef HAVE_EVP_CLEANUP 221 222/* Define to 1 if you have the `EVP_DigestVerify' function. */ 223#undef HAVE_EVP_DIGESTVERIFY 224 225/* Define to 1 if you have the `EVP_dss1' function. */ 226#undef HAVE_EVP_DSS1 227 228/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ 229#undef HAVE_EVP_ENCRYPTINIT_EX 230 231/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */ 232#undef HAVE_EVP_MAC_CTX_SET_PARAMS 233 234/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ 235#undef HAVE_EVP_MD_CTX_NEW 236 237/* Define to 1 if you have the `EVP_sha1' function. */ 238#undef HAVE_EVP_SHA1 239 240/* Define to 1 if you have the `EVP_sha256' function. */ 241#undef HAVE_EVP_SHA256 242 243/* Define to 1 if you have the `EVP_sha512' function. */ 244#undef HAVE_EVP_SHA512 245 246/* Define to 1 if you have the `ev_default_loop' function. */ 247#undef HAVE_EV_DEFAULT_LOOP 248 249/* Define to 1 if you have the `ev_loop' function. */ 250#undef HAVE_EV_LOOP 251 252/* Define to 1 if you have the <expat.h> header file. */ 253#undef HAVE_EXPAT_H 254 255/* Define to 1 if you have the `explicit_bzero' function. */ 256#undef HAVE_EXPLICIT_BZERO 257 258/* Define to 1 if you have the `fcntl' function. */ 259#undef HAVE_FCNTL 260 261/* Define to 1 if you have the `FIPS_mode' function. */ 262#undef HAVE_FIPS_MODE 263 264/* Define to 1 if you have the `fork' function. */ 265#undef HAVE_FORK 266 267/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 268#undef HAVE_FSEEKO 269 270/* Define to 1 if you have the `fsync' function. */ 271#undef HAVE_FSYNC 272 273/* Whether getaddrinfo is available */ 274#undef HAVE_GETADDRINFO 275 276/* Define to 1 if you have the `getauxval' function. */ 277#undef HAVE_GETAUXVAL 278 279/* Define to 1 if you have the `getentropy' function. */ 280#undef HAVE_GETENTROPY 281 282/* Define to 1 if you have the `getifaddrs' function. */ 283#undef HAVE_GETIFADDRS 284 285/* Define to 1 if you have the <getopt.h> header file. */ 286#undef HAVE_GETOPT_H 287 288/* Define to 1 if you have the `getpwnam' function. */ 289#undef HAVE_GETPWNAM 290 291/* Define to 1 if you have the `getrlimit' function. */ 292#undef HAVE_GETRLIMIT 293 294/* Define to 1 if you have the `glob' function. */ 295#undef HAVE_GLOB 296 297/* Define to 1 if you have the <glob.h> header file. */ 298#undef HAVE_GLOB_H 299 300/* Define to 1 if you have the `gmtime_r' function. */ 301#undef HAVE_GMTIME_R 302 303/* Define to 1 if you have the <grp.h> header file. */ 304#undef HAVE_GRP_H 305 306/* Define to 1 if you have the <hiredis/hiredis.h> header file. */ 307#undef HAVE_HIREDIS_HIREDIS_H 308 309/* Define to 1 if you have the `HMAC_Init_ex' function. */ 310#undef HAVE_HMAC_INIT_EX 311 312/* If we have htobe64 */ 313#undef HAVE_HTOBE64 314 315/* Define to 1 if you have the <ifaddrs.h> header file. */ 316#undef HAVE_IFADDRS_H 317 318/* Define to 1 if you have the `inet_aton' function. */ 319#undef HAVE_INET_ATON 320 321/* Define to 1 if you have the `inet_ntop' function. */ 322#undef HAVE_INET_NTOP 323 324/* Define to 1 if you have the `inet_pton' function. */ 325#undef HAVE_INET_PTON 326 327/* Define to 1 if you have the `initgroups' function. */ 328#undef HAVE_INITGROUPS 329 330/* Define to 1 if you have the <inttypes.h> header file. */ 331#undef HAVE_INTTYPES_H 332 333/* if the function 'ioctlsocket' is available */ 334#undef HAVE_IOCTLSOCKET 335 336/* Define to 1 if you have the <iphlpapi.h> header file. */ 337#undef HAVE_IPHLPAPI_H 338 339/* Define to 1 if you have the `isblank' function. */ 340#undef HAVE_ISBLANK 341 342/* Define to 1 if you have the `kill' function. */ 343#undef HAVE_KILL 344 345/* Use portable libbsd functions */ 346#undef HAVE_LIBBSD 347 348/* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */ 349#undef HAVE_LIBKERN_OSBYTEORDER_H 350 351/* Define if we have LibreSSL */ 352#undef HAVE_LIBRESSL 353 354/* Define to 1 if you have the `localtime_r' function. */ 355#undef HAVE_LOCALTIME_R 356 357/* Define to 1 if you have the <login_cap.h> header file. */ 358#undef HAVE_LOGIN_CAP_H 359 360/* If have GNU libc compatible malloc */ 361#undef HAVE_MALLOC 362 363/* Define to 1 if you have the `memmove' function. */ 364#undef HAVE_MEMMOVE 365 366/* Define to 1 if you have the <memory.h> header file. */ 367#undef HAVE_MEMORY_H 368 369/* Define to 1 if you have the <netdb.h> header file. */ 370#undef HAVE_NETDB_H 371 372/* Define to 1 if you have the <netinet/in.h> header file. */ 373#undef HAVE_NETINET_IN_H 374 375/* Define to 1 if you have the <netinet/tcp.h> header file. */ 376#undef HAVE_NETINET_TCP_H 377 378/* Use libnettle for crypto */ 379#undef HAVE_NETTLE 380 381/* Define to 1 if you have the <nettle/dsa-compat.h> header file. */ 382#undef HAVE_NETTLE_DSA_COMPAT_H 383 384/* Define to 1 if you have the <nettle/eddsa.h> header file. */ 385#undef HAVE_NETTLE_EDDSA_H 386 387/* Define to 1 if you have the <net/if.h> header file. */ 388#undef HAVE_NET_IF_H 389 390/* Define this to use nghttp2 client. */ 391#undef HAVE_NGHTTP2 392 393/* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */ 394#undef HAVE_NGHTTP2_NGHTTP2_H 395 396/* Use libnss for crypto */ 397#undef HAVE_NSS 398 399/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ 400#undef HAVE_OPENSSL_ADD_ALL_DIGESTS 401 402/* Define to 1 if you have the <openssl/bn.h> header file. */ 403#undef HAVE_OPENSSL_BN_H 404 405/* Define to 1 if you have the `OPENSSL_config' function. */ 406#undef HAVE_OPENSSL_CONFIG 407 408/* Define to 1 if you have the <openssl/conf.h> header file. */ 409#undef HAVE_OPENSSL_CONF_H 410 411/* Define to 1 if you have the <openssl/core_names.h> header file. */ 412#undef HAVE_OPENSSL_CORE_NAMES_H 413 414/* Define to 1 if you have the <openssl/dh.h> header file. */ 415#undef HAVE_OPENSSL_DH_H 416 417/* Define to 1 if you have the <openssl/dsa.h> header file. */ 418#undef HAVE_OPENSSL_DSA_H 419 420/* Define to 1 if you have the <openssl/engine.h> header file. */ 421#undef HAVE_OPENSSL_ENGINE_H 422 423/* Define to 1 if you have the <openssl/err.h> header file. */ 424#undef HAVE_OPENSSL_ERR_H 425 426/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ 427#undef HAVE_OPENSSL_INIT_CRYPTO 428 429/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ 430#undef HAVE_OPENSSL_INIT_SSL 431 432/* Define to 1 if you have the <openssl/param_build.h> header file. */ 433#undef HAVE_OPENSSL_PARAM_BUILD_H 434 435/* Define to 1 if you have the <openssl/rand.h> header file. */ 436#undef HAVE_OPENSSL_RAND_H 437 438/* Define to 1 if you have the <openssl/rsa.h> header file. */ 439#undef HAVE_OPENSSL_RSA_H 440 441/* Define to 1 if you have the <openssl/ssl.h> header file. */ 442#undef HAVE_OPENSSL_SSL_H 443 444/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */ 445#undef HAVE_OSSL_PARAM_BLD_NEW 446 447/* Define if you have POSIX threads libraries and header files. */ 448#undef HAVE_PTHREAD 449 450/* Have PTHREAD_PRIO_INHERIT. */ 451#undef HAVE_PTHREAD_PRIO_INHERIT 452 453/* Define to 1 if the system has the type `pthread_rwlock_t'. */ 454#undef HAVE_PTHREAD_RWLOCK_T 455 456/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 457#undef HAVE_PTHREAD_SPINLOCK_T 458 459/* Define to 1 if you have the <pwd.h> header file. */ 460#undef HAVE_PWD_H 461 462/* Define if you have Python libraries and header files. */ 463#undef HAVE_PYTHON 464 465/* Define to 1 if you have the `random' function. */ 466#undef HAVE_RANDOM 467 468/* Define to 1 if you have the `RAND_cleanup' function. */ 469#undef HAVE_RAND_CLEANUP 470 471/* If we have reallocarray(3) */ 472#undef HAVE_REALLOCARRAY 473 474/* Define to 1 if you have the `recvmsg' function. */ 475#undef HAVE_RECVMSG 476 477/* Define to 1 if you have the `sendmsg' function. */ 478#undef HAVE_SENDMSG 479 480/* Define to 1 if you have the `setregid' function. */ 481#undef HAVE_SETREGID 482 483/* Define to 1 if you have the `setresgid' function. */ 484#undef HAVE_SETRESGID 485 486/* Define to 1 if you have the `setresuid' function. */ 487#undef HAVE_SETRESUID 488 489/* Define to 1 if you have the `setreuid' function. */ 490#undef HAVE_SETREUID 491 492/* Define to 1 if you have the `setrlimit' function. */ 493#undef HAVE_SETRLIMIT 494 495/* Define to 1 if you have the `setsid' function. */ 496#undef HAVE_SETSID 497 498/* Define to 1 if you have the `setusercontext' function. */ 499#undef HAVE_SETUSERCONTEXT 500 501/* Define to 1 if you have the `SHA512_Update' function. */ 502#undef HAVE_SHA512_UPDATE 503 504/* Define to 1 if you have the `shmget' function. */ 505#undef HAVE_SHMGET 506 507/* Define to 1 if you have the `sigprocmask' function. */ 508#undef HAVE_SIGPROCMASK 509 510/* Define to 1 if you have the `sleep' function. */ 511#undef HAVE_SLEEP 512 513/* Define to 1 if you have the `snprintf' function. */ 514#undef HAVE_SNPRINTF 515 516/* Define to 1 if you have the `socketpair' function. */ 517#undef HAVE_SOCKETPAIR 518 519/* Using Solaris threads */ 520#undef HAVE_SOLARIS_THREADS 521 522/* Define to 1 if you have the `srandom' function. */ 523#undef HAVE_SRANDOM 524 525/* Define if you have the SSL libraries installed. */ 526#undef HAVE_SSL 527 528/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */ 529#undef HAVE_SSL_CTX_SET_ALPN_PROTOS 530 531/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */ 532#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB 533 534/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ 535#undef HAVE_SSL_CTX_SET_CIPHERSUITES 536 537/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ 538#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL 539 540/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb' 541 function. */ 542#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 543 544/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ 545#undef HAVE_SSL_GET0_ALPN_SELECTED 546 547/* Define to 1 if you have the `SSL_get0_peername' function. */ 548#undef HAVE_SSL_GET0_PEERNAME 549 550/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */ 551#undef HAVE_SSL_GET1_PEER_CERTIFICATE 552 553/* Define to 1 if you have the `SSL_set1_host' function. */ 554#undef HAVE_SSL_SET1_HOST 555 556/* Define to 1 if you have the <stdarg.h> header file. */ 557#undef HAVE_STDARG_H 558 559/* Define to 1 if you have the <stdbool.h> header file. */ 560#undef HAVE_STDBOOL_H 561 562/* Define to 1 if you have the <stdint.h> header file. */ 563#undef HAVE_STDINT_H 564 565/* Define to 1 if you have the <stdlib.h> header file. */ 566#undef HAVE_STDLIB_H 567 568/* Define to 1 if you have the `strftime' function. */ 569#undef HAVE_STRFTIME 570 571/* Define to 1 if you have the <strings.h> header file. */ 572#undef HAVE_STRINGS_H 573 574/* Define to 1 if you have the <string.h> header file. */ 575#undef HAVE_STRING_H 576 577/* Define to 1 if you have the `strlcat' function. */ 578#undef HAVE_STRLCAT 579 580/* Define to 1 if you have the `strlcpy' function. */ 581#undef HAVE_STRLCPY 582 583/* Define to 1 if you have the `strptime' function. */ 584#undef HAVE_STRPTIME 585 586/* Define to 1 if you have the `strsep' function. */ 587#undef HAVE_STRSEP 588 589/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ 590#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 591 592/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ 593#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 594 595/* Define if you have Swig libraries and header files. */ 596#undef HAVE_SWIG 597 598/* Define to 1 if you have the <syslog.h> header file. */ 599#undef HAVE_SYSLOG_H 600 601/* Define to 1 if systemd should be used */ 602#undef HAVE_SYSTEMD 603 604/* Define to 1 if you have the <sys/endian.h> header file. */ 605#undef HAVE_SYS_ENDIAN_H 606 607/* Define to 1 if you have the <sys/ipc.h> header file. */ 608#undef HAVE_SYS_IPC_H 609 610/* Define to 1 if you have the <sys/param.h> header file. */ 611#undef HAVE_SYS_PARAM_H 612 613/* Define to 1 if you have the <sys/resource.h> header file. */ 614#undef HAVE_SYS_RESOURCE_H 615 616/* Define to 1 if you have the <sys/select.h> header file. */ 617#undef HAVE_SYS_SELECT_H 618 619/* Define to 1 if you have the <sys/sha2.h> header file. */ 620#undef HAVE_SYS_SHA2_H 621 622/* Define to 1 if you have the <sys/shm.h> header file. */ 623#undef HAVE_SYS_SHM_H 624 625/* Define to 1 if you have the <sys/socket.h> header file. */ 626#undef HAVE_SYS_SOCKET_H 627 628/* Define to 1 if you have the <sys/stat.h> header file. */ 629#undef HAVE_SYS_STAT_H 630 631/* Define to 1 if you have the <sys/sysctl.h> header file. */ 632#undef HAVE_SYS_SYSCTL_H 633 634/* Define to 1 if you have the <sys/types.h> header file. */ 635#undef HAVE_SYS_TYPES_H 636 637/* Define to 1 if you have the <sys/uio.h> header file. */ 638#undef HAVE_SYS_UIO_H 639 640/* Define to 1 if you have the <sys/un.h> header file. */ 641#undef HAVE_SYS_UN_H 642 643/* Define to 1 if you have the <sys/wait.h> header file. */ 644#undef HAVE_SYS_WAIT_H 645 646/* Define to 1 if you have the <TargetConditionals.h> header file. */ 647#undef HAVE_TARGETCONDITIONALS_H 648 649/* Define to 1 if you have the <time.h> header file. */ 650#undef HAVE_TIME_H 651 652/* Define to 1 if you have the `tzset' function. */ 653#undef HAVE_TZSET 654 655/* Define to 1 if you have the <unistd.h> header file. */ 656#undef HAVE_UNISTD_H 657 658/* Define to 1 if you have the `usleep' function. */ 659#undef HAVE_USLEEP 660 661/* Define to 1 if you have the `vfork' function. */ 662#undef HAVE_VFORK 663 664/* Define to 1 if you have the <vfork.h> header file. */ 665#undef HAVE_VFORK_H 666 667/* Define to 1 if you have the <windows.h> header file. */ 668#undef HAVE_WINDOWS_H 669 670/* Using Windows threads */ 671#undef HAVE_WINDOWS_THREADS 672 673/* Define to 1 if you have the <winsock2.h> header file. */ 674#undef HAVE_WINSOCK2_H 675 676/* Define to 1 if `fork' works. */ 677#undef HAVE_WORKING_FORK 678 679/* Define to 1 if `vfork' works. */ 680#undef HAVE_WORKING_VFORK 681 682/* Define to 1 if you have the `writev' function. */ 683#undef HAVE_WRITEV 684 685/* Define to 1 if you have the <ws2tcpip.h> header file. */ 686#undef HAVE_WS2TCPIP_H 687 688/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */ 689#undef HAVE_X509_VERIFY_PARAM_SET1_HOST 690 691/* Define to 1 if you have the `_beginthreadex' function. */ 692#undef HAVE__BEGINTHREADEX 693 694/* If HMAC_Init_ex() returns void */ 695#undef HMAC_INIT_EX_RETURNS_VOID 696 697/* if lex has yylex_destroy */ 698#undef LEX_HAS_YYLEX_DESTROY 699 700/* Define to the sub-directory where libtool stores uninstalled libraries. */ 701#undef LT_OBJDIR 702 703/* Define to the maximum message length to pass to syslog. */ 704#undef MAXSYSLOGMSGLEN 705 706/* Define if memcmp() does not compare unsigned bytes */ 707#undef MEMCMP_IS_BROKEN 708 709/* Define if mkdir has one argument. */ 710#undef MKDIR_HAS_ONE_ARG 711 712/* Define if the network stack does not fully support nonblocking io (causes 713 lower performance). */ 714#undef NONBLOCKING_IS_BROKEN 715 716/* Put -D_ALL_SOURCE define in config.h */ 717#undef OMITTED__D_ALL_SOURCE 718 719/* Put -D_BSD_SOURCE define in config.h */ 720#undef OMITTED__D_BSD_SOURCE 721 722/* Put -D_DEFAULT_SOURCE define in config.h */ 723#undef OMITTED__D_DEFAULT_SOURCE 724 725/* Put -D_GNU_SOURCE define in config.h */ 726#undef OMITTED__D_GNU_SOURCE 727 728/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ 729#undef OMITTED__D_LARGEFILE_SOURCE_1 730 731/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ 732#undef OMITTED__D_POSIX_C_SOURCE_200112 733 734/* Put -D_XOPEN_SOURCE=600 define in config.h */ 735#undef OMITTED__D_XOPEN_SOURCE_600 736 737/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ 738#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 739 740/* Put -D__EXTENSIONS__ define in config.h */ 741#undef OMITTED__D__EXTENSIONS__ 742 743/* Define to the address where bug reports for this package should be sent. */ 744#undef PACKAGE_BUGREPORT 745 746/* Define to the full name of this package. */ 747#undef PACKAGE_NAME 748 749/* Define to the full name and version of this package. */ 750#undef PACKAGE_STRING 751 752/* Define to the one symbol short name of this package. */ 753#undef PACKAGE_TARNAME 754 755/* Define to the home page for this package. */ 756#undef PACKAGE_URL 757 758/* Define to the version of this package. */ 759#undef PACKAGE_VERSION 760 761/* default pidfile location */ 762#undef PIDFILE 763 764/* Define to necessary symbol if this constant uses a non-standard name on 765 your system. */ 766#undef PTHREAD_CREATE_JOINABLE 767 768/* Return type of signal handlers, but autoconf 2.70 says 'your code may 769 safely assume C89 semantics that RETSIGTYPE is void.' */ 770#undef RETSIGTYPE 771 772/* if REUSEPORT is enabled by default */ 773#undef REUSEPORT_DEFAULT 774 775/* default rootkey location */ 776#undef ROOT_ANCHOR_FILE 777 778/* default rootcert location */ 779#undef ROOT_CERT_FILE 780 781/* version number for resource files */ 782#undef RSRC_PACKAGE_VERSION 783 784/* Directory to chdir to */ 785#undef RUN_DIR 786 787/* Shared data */ 788#undef SHARE_DIR 789 790/* The size of `size_t', as computed by sizeof. */ 791#undef SIZEOF_SIZE_T 792 793/* The size of `time_t', as computed by sizeof. */ 794#undef SIZEOF_TIME_T 795 796/* define if (v)snprintf does not return length needed, (but length used) */ 797#undef SNPRINTF_RET_BROKEN 798 799/* Define to 1 if libsodium supports sodium_set_misuse_handler */ 800#undef SODIUM_MISUSE_HANDLER 801 802/* Define to 1 if you have the ANSI C header files. */ 803#undef STDC_HEADERS 804 805/* use default strptime. */ 806#undef STRPTIME_WORKS 807 808/* Use win32 resources and API */ 809#undef UB_ON_WINDOWS 810 811/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ 812#undef UB_SYSLOG_FACILITY 813 814/* default username */ 815#undef UB_USERNAME 816 817/* use to enable lightweight alloc assertions, for debug use */ 818#undef UNBOUND_ALLOC_LITE 819 820/* use malloc not regions, for debug use */ 821#undef UNBOUND_ALLOC_NONREGIONAL 822 823/* use statistics for allocs and frees, for debug use */ 824#undef UNBOUND_ALLOC_STATS 825 826/* define this to enable debug checks. */ 827#undef UNBOUND_DEBUG 828 829/* Define to 1 to use cachedb support */ 830#undef USE_CACHEDB 831 832/* Define to 1 to enable dnscrypt support */ 833#undef USE_DNSCRYPT 834 835/* Define to 1 to enable dnscrypt with xchacha20 support */ 836#undef USE_DNSCRYPT_XCHACHA20 837 838/* Define to 1 to enable dnstap support */ 839#undef USE_DNSTAP 840 841/* Define this to enable DSA support. */ 842#undef USE_DSA 843 844/* Define this to enable ECDSA support. */ 845#undef USE_ECDSA 846 847/* Define this to enable an EVP workaround for older openssl */ 848#undef USE_ECDSA_EVP_WORKAROUND 849 850/* Define this to enable ED25519 support. */ 851#undef USE_ED25519 852 853/* Define this to enable ED448 support. */ 854#undef USE_ED448 855 856/* Define this to enable GOST support. */ 857#undef USE_GOST 858 859/* Define to 1 to use ipsecmod support. */ 860#undef USE_IPSECMOD 861 862/* Define to 1 to use ipset support */ 863#undef USE_IPSET 864 865/* Define if you enable libevent */ 866#undef USE_LIBEVENT 867 868/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a 869 default outgoing port range. This is only for the libunbound on Linux and 870 does not affect unbound resolving daemon itself. This may severely limit 871 the number of available outgoing ports and thus decrease randomness. Define 872 this only when the target system restricts (e.g. some of SELinux enabled 873 distributions) the use of non-ephemeral ports. */ 874#undef USE_LINUX_IP_LOCAL_PORT_RANGE 875 876/* Define if you want to use internal select based events */ 877#undef USE_MINI_EVENT 878 879/* Define this to enable client TCP Fast Open. */ 880#undef USE_MSG_FASTOPEN 881 882/* Define this to enable client TCP Fast Open. */ 883#undef USE_OSX_MSG_FASTOPEN 884 885/* Define this to use hiredis client. */ 886#undef USE_REDIS 887 888/* Define this to enable SHA1 support. */ 889#undef USE_SHA1 890 891/* Define this to enable SHA256 and SHA512 support. */ 892#undef USE_SHA2 893 894/* Enable extensions on AIX 3, Interix. */ 895#ifndef _ALL_SOURCE 896# undef _ALL_SOURCE 897#endif 898/* Enable GNU extensions on systems that have them. */ 899#ifndef _GNU_SOURCE 900# undef _GNU_SOURCE 901#endif 902/* Enable threading extensions on Solaris. */ 903#ifndef _POSIX_PTHREAD_SEMANTICS 904# undef _POSIX_PTHREAD_SEMANTICS 905#endif 906/* Enable extensions on HP NonStop. */ 907#ifndef _TANDEM_SOURCE 908# undef _TANDEM_SOURCE 909#endif 910/* Enable general extensions on Solaris. */ 911#ifndef __EXTENSIONS__ 912# undef __EXTENSIONS__ 913#endif 914 915 916/* Define this to enable server TCP Fast Open. */ 917#undef USE_TCP_FASTOPEN 918 919/* Whether the windows socket API is used */ 920#undef USE_WINSOCK 921 922/* the version of the windows API enabled */ 923#undef WINVER 924 925/* Define if you want dynlib module. */ 926#undef WITH_DYNLIBMODULE 927 928/* Define if you want Python module. */ 929#undef WITH_PYTHONMODULE 930 931/* Define if you want PyUnbound. */ 932#undef WITH_PYUNBOUND 933 934/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a 935 `char[]'. */ 936#undef YYTEXT_POINTER 937 938/* Enable large inode numbers on Mac OS X 10.5. */ 939#ifndef _DARWIN_USE_64_BIT_INODE 940# define _DARWIN_USE_64_BIT_INODE 1 941#endif 942 943/* Number of bits in a file offset, on hosts where this is settable. */ 944#undef _FILE_OFFSET_BITS 945 946/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 947#undef _LARGEFILE_SOURCE 948 949/* Define for large files, on AIX-style hosts. */ 950#undef _LARGE_FILES 951 952/* Define to 1 if on MINIX. */ 953#undef _MINIX 954 955/* Enable for compile on Minix */ 956#undef _NETBSD_SOURCE 957 958/* Define to 2 if the system does not provide POSIX.1 features except with 959 this defined. */ 960#undef _POSIX_1_SOURCE 961 962/* Define to 1 if you need to in order for `stat' and other things to work. */ 963#undef _POSIX_SOURCE 964 965/* Define to empty if `const' does not conform to ANSI C. */ 966#undef const 967 968/* Define to `int' if <sys/types.h> doesn't define. */ 969#undef gid_t 970 971/* in_addr_t */ 972#undef in_addr_t 973 974/* in_port_t */ 975#undef in_port_t 976 977/* Define to `__inline__' or `__inline' if that's what the C compiler 978 calls it, or to nothing if 'inline' is not supported under any name. */ 979#ifndef __cplusplus 980#undef inline 981#endif 982 983/* Define to `short' if <sys/types.h> does not define. */ 984#undef int16_t 985 986/* Define to `int' if <sys/types.h> does not define. */ 987#undef int32_t 988 989/* Define to `long long' if <sys/types.h> does not define. */ 990#undef int64_t 991 992/* Define to `signed char' if <sys/types.h> does not define. */ 993#undef int8_t 994 995/* Define if replacement function should be used. */ 996#undef malloc 997 998/* Define to `long int' if <sys/types.h> does not define. */ 999#undef off_t 1000 1001/* Define to `int' if <sys/types.h> does not define. */ 1002#undef pid_t 1003 1004/* Define to 'int' if not defined */ 1005#undef rlim_t 1006 1007/* Define to `unsigned int' if <sys/types.h> does not define. */ 1008#undef size_t 1009 1010/* Define to 'int' if not defined */ 1011#undef socklen_t 1012 1013/* Define to `int' if <sys/types.h> does not define. */ 1014#undef ssize_t 1015 1016/* Define to 'unsigned char if not defined */ 1017#undef u_char 1018 1019/* Define to `int' if <sys/types.h> doesn't define. */ 1020#undef uid_t 1021 1022/* Define to `unsigned short' if <sys/types.h> does not define. */ 1023#undef uint16_t 1024 1025/* Define to `unsigned int' if <sys/types.h> does not define. */ 1026#undef uint32_t 1027 1028/* Define to `unsigned long long' if <sys/types.h> does not define. */ 1029#undef uint64_t 1030 1031/* Define to `unsigned char' if <sys/types.h> does not define. */ 1032#undef uint8_t 1033 1034/* Define as `fork' if `vfork' does not work. */ 1035#undef vfork 1036 1037#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) 1038#define _GNU_SOURCE 1 1039#endif 1040 1041#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) 1042#define _BSD_SOURCE 1 1043#endif 1044 1045#if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE) 1046#define _DEFAULT_SOURCE 1 1047#endif 1048 1049#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) 1050#define __EXTENSIONS__ 1 1051#endif 1052 1053#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) 1054#define _POSIX_C_SOURCE 200112 1055#endif 1056 1057#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) 1058#define _XOPEN_SOURCE 600 1059#endif 1060 1061#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) 1062#define _XOPEN_SOURCE_EXTENDED 1 1063#endif 1064 1065#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) 1066#define _ALL_SOURCE 1 1067#endif 1068 1069#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) 1070#define _LARGEFILE_SOURCE 1 1071#endif 1072 1073 1074 1075 1076#ifndef _OPENBSD_SOURCE 1077#define _OPENBSD_SOURCE 1 1078#endif 1079 1080#ifndef UNBOUND_DEBUG 1081# ifndef NDEBUG 1082# define NDEBUG 1083# endif 1084#endif 1085 1086/** Use small-ldns codebase */ 1087#define USE_SLDNS 1 1088#ifdef HAVE_SSL 1089# define LDNS_BUILD_CONFIG_HAVE_SSL 1 1090#endif 1091 1092#include <stdio.h> 1093#include <string.h> 1094#include <unistd.h> 1095#include <assert.h> 1096 1097#if STDC_HEADERS 1098#include <stdlib.h> 1099#include <stddef.h> 1100#endif 1101 1102#ifdef HAVE_STDARG_H 1103#include <stdarg.h> 1104#endif 1105 1106#ifdef HAVE_STDINT_H 1107#include <stdint.h> 1108#endif 1109 1110#include <errno.h> 1111 1112#if HAVE_SYS_PARAM_H 1113#include <sys/param.h> 1114#endif 1115 1116#ifdef HAVE_SYS_SOCKET_H 1117#include <sys/socket.h> 1118#endif 1119 1120#ifdef HAVE_SYS_UIO_H 1121#include <sys/uio.h> 1122#endif 1123 1124#ifdef HAVE_NETINET_IN_H 1125#include <netinet/in.h> 1126#endif 1127 1128#ifdef HAVE_NETINET_TCP_H 1129#include <netinet/tcp.h> 1130#endif 1131 1132#ifdef HAVE_ARPA_INET_H 1133#include <arpa/inet.h> 1134#endif 1135 1136#ifdef HAVE_WINSOCK2_H 1137#include <winsock2.h> 1138#endif 1139 1140#ifdef HAVE_WS2TCPIP_H 1141#include <ws2tcpip.h> 1142#endif 1143 1144#ifndef USE_WINSOCK 1145#define ARG_LL "%ll" 1146#else 1147#define ARG_LL "%I64" 1148#endif 1149 1150#ifndef AF_LOCAL 1151#define AF_LOCAL AF_UNIX 1152#endif 1153 1154 1155 1156#ifdef HAVE_ATTR_FORMAT 1157# define ATTR_FORMAT(archetype, string_index, first_to_check) \ 1158 __attribute__ ((format (archetype, string_index, first_to_check))) 1159#else /* !HAVE_ATTR_FORMAT */ 1160# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ 1161#endif /* !HAVE_ATTR_FORMAT */ 1162 1163 1164#if defined(DOXYGEN) 1165# define ATTR_UNUSED(x) x 1166#elif defined(__cplusplus) 1167# define ATTR_UNUSED(x) 1168#elif defined(HAVE_ATTR_UNUSED) 1169# define ATTR_UNUSED(x) x __attribute__((unused)) 1170#else /* !HAVE_ATTR_UNUSED */ 1171# define ATTR_UNUSED(x) x 1172#endif /* !HAVE_ATTR_UNUSED */ 1173 1174 1175#ifndef HAVE_FSEEKO 1176#define fseeko fseek 1177#define ftello ftell 1178#endif /* HAVE_FSEEKO */ 1179 1180 1181#ifndef MAXHOSTNAMELEN 1182#define MAXHOSTNAMELEN 256 1183#endif 1184 1185#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) 1186#define snprintf snprintf_unbound 1187#define vsnprintf vsnprintf_unbound 1188#include <stdarg.h> 1189int snprintf (char *str, size_t count, const char *fmt, ...); 1190int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); 1191#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */ 1192 1193#ifndef HAVE_INET_PTON 1194#define inet_pton inet_pton_unbound 1195int inet_pton(int af, const char* src, void* dst); 1196#endif /* HAVE_INET_PTON */ 1197 1198 1199#ifndef HAVE_INET_NTOP 1200#define inet_ntop inet_ntop_unbound 1201const char *inet_ntop(int af, const void *src, char *dst, size_t size); 1202#endif 1203 1204 1205#ifndef HAVE_INET_ATON 1206#define inet_aton inet_aton_unbound 1207int inet_aton(const char *cp, struct in_addr *addr); 1208#endif 1209 1210 1211#ifndef HAVE_MEMMOVE 1212#define memmove memmove_unbound 1213void *memmove(void *dest, const void *src, size_t n); 1214#endif 1215 1216 1217#ifndef HAVE_STRLCAT 1218#define strlcat strlcat_unbound 1219size_t strlcat(char *dst, const char *src, size_t siz); 1220#endif 1221 1222 1223#ifndef HAVE_STRLCPY 1224#define strlcpy strlcpy_unbound 1225size_t strlcpy(char *dst, const char *src, size_t siz); 1226#endif 1227 1228 1229#ifndef HAVE_GMTIME_R 1230#define gmtime_r gmtime_r_unbound 1231struct tm *gmtime_r(const time_t *timep, struct tm *result); 1232#endif 1233 1234 1235#ifndef HAVE_REALLOCARRAY 1236#define reallocarray reallocarrayunbound 1237void* reallocarray(void *ptr, size_t nmemb, size_t size); 1238#endif 1239 1240 1241#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H) 1242#define sleep(x) Sleep((x)*1000) /* on win32 */ 1243#endif /* HAVE_SLEEP */ 1244 1245 1246#ifndef HAVE_USLEEP 1247#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ 1248#endif /* HAVE_USLEEP */ 1249 1250 1251#ifndef HAVE_RANDOM 1252#define random rand /* on win32, for tests only (bad random) */ 1253#endif /* HAVE_RANDOM */ 1254 1255 1256#ifndef HAVE_SRANDOM 1257#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ 1258#endif /* HAVE_SRANDOM */ 1259 1260 1261/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ 1262#ifdef HAVE_WINSOCK2_H 1263#define FD_SET_T (u_int) 1264#else 1265#define FD_SET_T 1266#endif 1267 1268 1269#ifndef IPV6_MIN_MTU 1270#define IPV6_MIN_MTU 1280 1271#endif /* IPV6_MIN_MTU */ 1272 1273 1274#ifdef MEMCMP_IS_BROKEN 1275#include "compat/memcmp.h" 1276#define memcmp memcmp_unbound 1277int memcmp(const void *x, const void *y, size_t n); 1278#endif 1279 1280 1281 1282#ifndef HAVE_CTIME_R 1283#define ctime_r unbound_ctime_r 1284char *ctime_r(const time_t *timep, char *buf); 1285#endif 1286 1287#ifndef HAVE_STRSEP 1288#define strsep unbound_strsep 1289char *strsep(char **stringp, const char *delim); 1290#endif 1291 1292#ifndef HAVE_ISBLANK 1293#define isblank unbound_isblank 1294int isblank(int c); 1295#endif 1296 1297#ifndef HAVE_EXPLICIT_BZERO 1298#define explicit_bzero unbound_explicit_bzero 1299void explicit_bzero(void* buf, size_t len); 1300#endif 1301 1302#if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP 1303const char *inet_ntop(int af, const void *src, char *dst, size_t size); 1304#endif 1305 1306#if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON 1307int inet_pton(int af, const char* src, void* dst); 1308#endif 1309 1310#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) 1311#define strptime unbound_strptime 1312struct tm; 1313char *strptime(const char *s, const char *format, struct tm *tm); 1314#endif 1315 1316#if !HAVE_DECL_REALLOCARRAY 1317void *reallocarray(void *ptr, size_t nmemb, size_t size); 1318#endif 1319 1320#ifdef HAVE_LIBBSD 1321#include <bsd/string.h> 1322#include <bsd/stdlib.h> 1323#endif 1324 1325#ifdef HAVE_LIBRESSL 1326# if !HAVE_DECL_STRLCPY 1327size_t strlcpy(char *dst, const char *src, size_t siz); 1328# endif 1329# if !HAVE_DECL_STRLCAT 1330size_t strlcat(char *dst, const char *src, size_t siz); 1331# endif 1332# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM) 1333uint32_t arc4random(void); 1334# endif 1335# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) 1336uint32_t arc4random_uniform(uint32_t upper_bound); 1337# endif 1338#endif /* HAVE_LIBRESSL */ 1339#ifndef HAVE_ARC4RANDOM 1340int getentropy(void* buf, size_t len); 1341uint32_t arc4random(void); 1342void arc4random_buf(void* buf, size_t n); 1343void _ARC4_LOCK(void); 1344void _ARC4_UNLOCK(void); 1345void _ARC4_LOCK_DESTROY(void); 1346#endif 1347#ifndef HAVE_ARC4RANDOM_UNIFORM 1348uint32_t arc4random_uniform(uint32_t upper_bound); 1349#endif 1350#ifdef COMPAT_SHA512 1351#ifndef SHA512_DIGEST_LENGTH 1352#define SHA512_BLOCK_LENGTH 128 1353#define SHA512_DIGEST_LENGTH 64 1354#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) 1355typedef struct _SHA512_CTX { 1356 uint64_t state[8]; 1357 uint64_t bitcount[2]; 1358 uint8_t buffer[SHA512_BLOCK_LENGTH]; 1359} SHA512_CTX; 1360#endif /* SHA512_DIGEST_LENGTH */ 1361void SHA512_Init(SHA512_CTX*); 1362void SHA512_Update(SHA512_CTX*, void*, size_t); 1363void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); 1364unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); 1365#endif /* COMPAT_SHA512 */ 1366 1367 1368 1369#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)) 1370 /* using version of libevent that is not threadsafe. */ 1371# define LIBEVENT_SIGNAL_PROBLEM 1 1372#endif 1373 1374#ifndef CHECKED_INET6 1375# define CHECKED_INET6 1376# ifdef AF_INET6 1377# define INET6 1378# else 1379# define AF_INET6 28 1380# endif 1381#endif /* CHECKED_INET6 */ 1382 1383#ifndef HAVE_GETADDRINFO 1384struct sockaddr_storage; 1385#include "compat/fake-rfc2553.h" 1386#endif 1387 1388#ifdef UNBOUND_ALLOC_STATS 1389# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) 1390# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) 1391# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) 1392# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) 1393void *unbound_stat_malloc(size_t size); 1394void *unbound_stat_calloc(size_t nmemb, size_t size); 1395void unbound_stat_free(void *ptr); 1396void *unbound_stat_realloc(void *ptr, size_t size); 1397void *unbound_stat_malloc_log(size_t size, const char* file, int line, 1398 const char* func); 1399void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, 1400 int line, const char* func); 1401void unbound_stat_free_log(void *ptr, const char* file, int line, 1402 const char* func); 1403void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, 1404 int line, const char* func); 1405#elif defined(UNBOUND_ALLOC_LITE) 1406# include "util/alloc.h" 1407#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ 1408 1409/** default port for DNS traffic. */ 1410#define UNBOUND_DNS_PORT 53 1411/** default port for DNS over TLS traffic. */ 1412#define UNBOUND_DNS_OVER_TLS_PORT 853 1413/** default port for DNS over HTTPS traffic. */ 1414#define UNBOUND_DNS_OVER_HTTPS_PORT 443 1415/** default port for unbound control traffic, registered port with IANA, 1416 ub-dns-control 8953/tcp unbound dns nameserver control */ 1417#define UNBOUND_CONTROL_PORT 8953 1418/** the version of unbound-control that this software implements */ 1419#define UNBOUND_CONTROL_VERSION 1 1420 1421 1422