acconfig.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. #ifndef _CONFIG_H_
  2. #define _CONFIG_H_
  3. /* ONLY EDIT acconfig.h, NEVER config.h or config.h.in!
  4. * config.h MAY BE OVERWRITTEN BY make, config.h.in by autoheader! */
  5. /* Define your Target here. Currently defined are TARGET_LINUX (any
  6. * architecture), TARGET_BSD (experimental; tested on FreeBSD, hopefully
  7. * works for other BSD variants) and TARGET_CYGWIN. */
  8. #define TARGET TARGET_LINUX
  9. /* change the #undef to #define if you do not want to compile with special
  10. * ISDN support for Linux. Note that the ISDN support will not compile ok on
  11. * unpatched kernerls earlier than 2.2.12 (if you did apply newer isdn patches,
  12. * it may work fine). This is not on by default because it will cause compile
  13. * problems on some systems */
  14. #undef ISDN_SUPPORT
  15. /* The following regulates the IP Protocol support. Supported types are IPv4
  16. * and IPv6 (aka IPng). You may enable either or both of these protocols.
  17. * Enabling in this context means that support for the respective protocol
  18. * will be in the binary. When running the binary, one of the protocols may
  19. * be activated via command line switches. Note that activating both IPv4 and
  20. * IPv6 is pointless (and will not work because two UDP and two TCP threads
  21. * will be started that concur for ports). Because of that, it is not allowed.
  22. * When pdnsd runs with IPv6 activated it should be able to service queries
  23. * from IPv6 as well as from IPv4 hosts, provided that you host is configured
  24. * properly.
  25. * For each of the protocols there are two options: ENABLE_IPV4 and ENABLE_IPV6
  26. * control whether support for the respective protocol is available in the
  27. * binary. DEFAULT_IPV4 selects which protocol is enabled on pdnsd
  28. * startup by default. 1 means IPv4, while 0 means IPv6. If support for
  29. * a protocol was included in the executable, you can specify command line
  30. * parameters to activate or deactivate that protocol (the options are -4 and
  31. * -6), but it makes more sense to use the run_ipv4=on/off option in the
  32. * configuration file.
  33. * Make your choice. Note that IPv6 support is experimental in pdnsd.
  34. * In normal operation, you will currently only need IPv4. */
  35. #undef ENABLE_IPV4
  36. #define DEFAULT_IPV4 1
  37. #undef ENABLE_IPV6
  38. /* In all pdnsd versions before 1.0.6, DNS queries were always done over
  39. * TCP. Now, you have the choice. You can control that behaviour using
  40. * the -m command line switch, and you can give a preset here. There
  41. * are 3 different modes:
  42. * UDP_ONLY: This is undoubtedly the fastest query method, because
  43. * no TCP negotiation needs to be done.
  44. * TCP_ONLY: This is slower than uo, but generally more secure
  45. * against DNS spoofing. Note that some name servers on the
  46. * internet do not support TCP queries, notably dnscache.
  47. * TCP_UDP: TCP, then UDP. If the TCP query fails with a "connection refused"-
  48. * error or times out, the query is retried using UDP.
  49. * UDP_TCP: UDP, then TCP. If the UDP reply is truncated (i.e. the tc flag is set),
  50. * the query is retried using TCP. */
  51. #define M_PRESET UDP_ONLY
  52. /* In addition to choosing the presets, you may also completely disable
  53. * one of the protocols (TCP for preset UDP_ONLY and UDP for preset TCP_ONLY).
  54. * This saves some executable space. */
  55. #undef NO_UDP_QUERIES
  56. #undef NO_TCP_QUERIES
  57. /* With the following option, you can disable the TCP server functionality
  58. * of pdnsd. Nearly no program does TCP queries, so you probably can do
  59. * this safely and save some executable space and one thread.
  60. * You also can turn off the TCP server at runtime with the --notcp option. */
  61. #undef NO_TCP_SERVER
  62. /* By undefining the following, you can disable the UDP source address
  63. * discovery code. This is not recommended, but you may need it when
  64. * running into compilation problems. */
  65. #undef SRC_ADDR_DISC
  66. /* NO_POLL specifies not to use poll(2), but select(2) instead. If you are
  67. * unsure about what this means, just leave this as it is.*/
  68. #undef NO_POLL
  69. /* Define this for "hard" RFC 2181 compliance: this RFC states that
  70. * implementations should discard answers whose RR sets have multiple
  71. * different time stamps. While correct answers are generated, incorrect
  72. * ones are normally tolerated and corrected. Full RFC compliance is
  73. * however only achieved by deactivating this behaviour and thus being
  74. * intolerant. */
  75. #undef RFC2181_ME_HARDER
  76. /* Define this to the device you want to use for getting random numbers.
  77. * Leave this undefined if you wand to use the standard C library random
  78. * function, which basically should be sufficient.
  79. * Linux and FreeBSD have two random number devices: /dev/random and
  80. * /dev/urandom. /dev/urandom might be less secure in some cases, but
  81. * should still be more than sufficient. The use of /dev/random is
  82. * discouraged, as reading from this device blocks when new random bits
  83. * need to be gathered. */
  84. #undef RANDOM_DEVICE
  85. #undef R_DEFAULT
  86. #undef R_RANDOM
  87. #undef R_ARC4RANDOM
  88. /*#define RANDOM_DEVICE "/dev/urandom"*/
  89. /* Designate which database manager to use for cacheing.
  90. * default: native; others: gdbm */
  91. #define CACHE_DBM DBM_NATIVE
  92. #define CACHEDIR "/var/cache/pdnsd"
  93. #define TEMPDIR "/tmp";
  94. /* This is for various debugging facilities that produce debug output and
  95. * double-check some values. You can enable debug messages with the -g option.
  96. * Normally, you can switch this off safely by setting the number after DEBUG
  97. * to 0. This will increase speed (although only marginally), save space
  98. * in the executable (only about 12kB) and some stack space per thread
  99. * (which may be significant if you have many threads running simultaneously).
  100. * However, it may be an aid when debugging config files.
  101. * The only defined debug levels by now are in the range 0 - 9.
  102. * Define this to 9 if you want hex dumps of all the queries and replies pdnsd
  103. * receives (you must also call pdnsd with -v9 to actually see the hex dumps).
  104. * When in doubt, leave it defined to 1. */
  105. #define DEBUG 1
  106. /* This defines the default verbosity of informational messages you will get.
  107. This has nothing to to with the debug option (-g), but may be set with -v
  108. option. 0 is for normal operation, up to 3 for debugging.
  109. Unlike the debug messages, these messages will also be written to the syslog.*/
  110. #define VERBOSITY 0
  111. /* Redefine this if you want another hash size.
  112. * The number of hash buckets is computed as power of two (1<<HASH_SZ);
  113. * so e.g. HASH_SZ set to 10 yields 1024 hash rows.
  114. * HASH_SZ may not be bigger than 32 (if you set it even close to that value,
  115. * you are nuts.) */
  116. #define HASH_SZ 10
  117. /* Set this to debug the hash tables. Turn this off normally, or you will get
  118. * flooded with diagnostic messages */
  119. #undef DEBUG_HASH
  120. /* Define if you have working C99 Variadic macro support */
  121. #undef CPP_C99_VARIADIC_MACROS
  122. /* Define as int if socklen_t typedef is missing */
  123. #undef socklen_t
  124. /* Lock the UDP socket before using it? */
  125. #undef SOCKET_LOCKING
  126. /* Default TCP timeout when receiving queries */
  127. #define TCP_TIMEOUT 30
  128. /* Allow subsequent TCP queries on one connection? */
  129. #undef TCP_SUBSEQ
  130. /* Default value for parallel query number */
  131. #define PAR_QUERIES 2
  132. /* Maximum number of IP addresses used per nameserver obtained from NS records. */
  133. #define MAXNAMESERVIPS 3
  134. /* These are the possible targets. Normally no need to touch these
  135. * definitions. */
  136. #define TARGET_LINUX 0
  137. #define TARGET_BSD 1
  138. #define TARGET_CYGWIN 2
  139. /* Assume the Native POSIX Thread Library instead of LinuxThreads ? */
  140. #undef THREADLIB_NPTL
  141. /* If we are using LinuxThreads, implement the fix needed for newer glibcs ? */
  142. #undef THREADLIB_LINUXTHREADS2
  143. /* The following is needed for using LinuxThreads. Better don't touch. */
  144. #define _REENTRANT 1
  145. #define _THREAD_SAFE 1
  146. /* It appears the newer versions of gcc won't convert a pointer to char into
  147. a pointer to unsigned char and vice versa without complaining.
  148. By using casts these warning messages can be suppressed, but at the cost
  149. of losing some type safety.
  150. Define charp and ucharp to be empty if you are a developer and find type
  151. safety more important.
  152. Leave the definitions unchanged to avoid distracting warning messages. */
  153. #define charp (char *)
  154. #define ucharp (unsigned char *)
  155. /* pdnsd version. DO NOT TOUCH THIS! It is replaced automatically by the
  156. * contents of ./version */
  157. #define VERSION "@VERSION@"
  158. #endif