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