00001 /* Site-specific definitions. 00002 00003 For supported systems, you shouldn't need to make any changes here. 00004 However, you may want to, in order to deal with site-specific 00005 differences. */ 00006 00007 /* Add any site-specific definitions and inclusions here... */ 00008 00009 /* #include <site-foo-bar.h> */ 00010 /* #define SITE_FOOBAR */ 00011 00012 /* Define this if you don't want dhcpd to run as a daemon and do want 00013 to see all its output printed to stdout instead of being logged via 00014 syslog(). This also makes dhcpd use the dhcpd.conf in its working 00015 directory and write the dhcpd.leases file there. */ 00016 00017 /* #define DEBUG */ 00018 00019 /* Define this to see what the parser is parsing. You probably don't 00020 want to see this. */ 00021 00022 /* #define DEBUG_TOKENS */ 00023 00024 /* Define this to see dumps of incoming and outgoing packets. This 00025 slows things down quite a bit... */ 00026 00027 /* #define DEBUG_PACKET */ 00028 00029 /* Define this if you want to see dumps of expression evaluation. */ 00030 00031 /* #define DEBUG_EXPRESSIONS */ 00032 00033 /* Define this if you want to see dumps of find_lease() in action. */ 00034 00035 /* #define DEBUG_FIND_LEASE */ 00036 00037 /* Define this if you want to see dumps of parsed expressions. */ 00038 00039 /* #define DEBUG_EXPRESSION_PARSE */ 00040 00041 /* Define this if you want to watch the class matching process. */ 00042 00043 /* #define DEBUG_CLASS_MATCHING */ 00044 00045 /* Define this if you want to track memory usage for the purpose of 00046 noticing memory leaks quickly. */ 00047 00048 /* #define DEBUG_MEMORY_LEAKAGE */ 00049 /* #define DEBUG_MEMORY_LEAKAGE_ON_EXIT */ 00050 00051 /* Define this if you want exhaustive (and very slow) checking of the 00052 malloc pool for corruption. */ 00053 00054 /* #define DEBUG_MALLOC_POOL */ 00055 00056 /* Define this if you want to see a message every time a lease's state 00057 changes. */ 00058 /* #define DEBUG_LEASE_STATE_TRANSITIONS */ 00059 00060 /* Define this if you want to maintain a history of the last N operations 00061 that changed reference counts on objects. This can be used to debug 00062 cases where an object is dereferenced too often, or not often enough. */ 00063 00064 /* #define DEBUG_RC_HISTORY */ 00065 00066 /* Define this if you want to see the history every cycle. */ 00067 00068 /* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */ 00069 00070 /* This is the number of history entries to maintain - by default, 256. */ 00071 00072 /* #define RC_HISTORY_MAX 10240 */ 00073 00074 /* Define this if you want dhcpd to dump core when a non-fatal memory 00075 allocation error is detected (i.e., something that would cause a 00076 memory leak rather than a memory smash). */ 00077 00078 /* #define POINTER_DEBUG */ 00079 00080 /* Define this if you want debugging output for DHCP failover protocol 00081 messages. */ 00082 00083 /* #define DEBUG_FAILOVER_MESSAGES */ 00084 00085 /* Define this to include contact messages in failover message debugging. 00086 The contact messages are sent once per second, so this can generate a 00087 lot of log entries. */ 00088 00089 /* #define DEBUG_FAILOVER_CONTACT_MESSAGES */ 00090 00091 /* Define this if you want debugging output for DHCP failover protocol 00092 event timeout timing. */ 00093 00094 /* #define DEBUG_FAILOVER_TIMING */ 00095 00096 /* Define this if you want to include contact message timing, which is 00097 performed once per second and can generate a lot of log entries. */ 00098 00099 /* #define DEBUG_FAILOVER_CONTACT_TIMING */ 00100 00101 /* Define this if you want all leases written to the lease file, even if 00102 they are free leases that have never been used. */ 00103 00104 /* #define DEBUG_DUMP_ALL_LEASES */ 00105 00106 /* Define this if you want to see the requests and replies between the 00107 DHCP code and the DNS library code. */ 00108 00109 /* #define DEBUG_DNS_UPDATES */ 00110 00111 /* Define this if you want to debug the host part of the inform processing */ 00112 /* #define DEBUG_INFORM_HOST */ 00113 00114 /* Define this if you want DHCP failover protocol support in the DHCP 00115 server. */ 00116 00117 /* #define FAILOVER_PROTOCOL */ 00118 00119 /* Define this if you want DNS update functionality to be available. */ 00120 00121 #define NSUPDATE 00122 00123 /* Define this if you want to enable the DHCP server attempting to 00124 find a nameserver to use for DDNS updates. */ 00125 #define DNS_ZONE_LOOKUP 00126 00127 /* Define this if you want the dhcpd.pid file to go somewhere other than 00128 the default (which varies from system to system, but is usually either 00129 /etc or /var/run. */ 00130 00131 /* #define _PATH_DHCPD_PID "/var/run/dhcpd.pid" */ 00132 00133 /* Define this if you want the dhcpd.leases file (the dynamic lease database) 00134 to go somewhere other than the default location, which is normally 00135 /etc/dhcpd.leases. */ 00136 00137 /* #define _PATH_DHCPD_DB "/etc/dhcpd.leases" */ 00138 00139 /* Define this if you want the dhcpd.conf file to go somewhere other than 00140 the default location. By default, it goes in /etc/dhcpd.conf. */ 00141 00142 /* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */ 00143 00144 /* Network API definitions. You do not need to choose one of these - if 00145 you don't choose, one will be chosen for you in your system's config 00146 header. DON'T MESS WITH THIS UNLESS YOU KNOW WHAT YOU'RE DOING!!! */ 00147 00148 /* Define USE_SOCKETS to use the standard BSD socket API. 00149 00150 On many systems, the BSD socket API does not provide the ability to 00151 send packets to the 255.255.255.255 broadcast address, which can 00152 prevent some clients (e.g., Win95) from seeing replies. This is 00153 not a problem on Solaris. 00154 00155 In addition, the BSD socket API will not work when more than one 00156 network interface is configured on the server. 00157 00158 However, the BSD socket API is about as efficient as you can get, so if 00159 the aforementioned problems do not matter to you, or if no other 00160 API is supported for your system, you may want to go with it. */ 00161 00162 /* #define USE_SOCKETS */ 00163 00164 /* Define this to use the Sun Streams NIT API. 00165 00166 The Sun Streams NIT API is only supported on SunOS 4.x releases. */ 00167 00168 /* #define USE_NIT */ 00169 00170 /* Define this to use the Berkeley Packet Filter API. 00171 00172 The BPF API is available on all 4.4-BSD derivatives, including 00173 NetBSD, FreeBSD and BSDI's BSD/OS. It's also available on 00174 DEC Alpha OSF/1 in a compatibility mode supported by the Alpha OSF/1 00175 packetfilter interface. */ 00176 00177 /* #define USE_BPF */ 00178 00179 /* Define this to use the raw socket API. 00180 00181 The raw socket API is provided on many BSD derivatives, and provides 00182 a way to send out raw IP packets. It is only supported for sending 00183 packets - packets must be received with the regular socket API. 00184 This code is experimental - I've never gotten it to actually transmit 00185 a packet to the 255.255.255.255 broadcast address - so use it at your 00186 own risk. */ 00187 00188 /* #define USE_RAW_SOCKETS */ 00189 00190 /* Define this to change the logging facility used by dhcpd. */ 00191 00192 /* #define DHCPD_LOG_FACILITY LOG_DAEMON */ 00193 00194 00195 /* Define this if you want to be able to execute external commands 00196 during conditional evaluation. */ 00197 00198 /* #define ENABLE_EXECUTE */ 00199 00200 /* Define this if you aren't debugging and you want to save memory 00201 (potentially a _lot_ of memory) by allocating leases in chunks rather 00202 than one at a time. */ 00203 00204 #define COMPACT_LEASES 00205 00206 /* Define this if you want to be able to save and playback server operational 00207 traces. */ 00208 00209 /* #define TRACING */ 00210 00211 /* Define this if you want the server to use the previous behavior 00212 when determining the DDNS TTL. If the user has specified a ddns-ttl 00213 option that is used to detemine the ttl. (If the user specifies 00214 an option that references the lease structure it is only usable 00215 for v4. In that case v6 will use the default.) Otherwise when 00216 defined the defaults are: v4 - 1/2 the lease time, 00217 v6 - DEFAULT_DDNS_TTL. When undefined the defaults are 1/2 the 00218 (preferred) lease time for both but with a cap on the maximum. */ 00219 00220 /* #define USE_OLD_DDNS_TTL */ 00221 00222 /* Define this if you want a DHCPv6 server to send replies to the 00223 source port of the message it received. This is useful for testing 00224 but is only included for backwards compatibility. */ 00225 /* #define REPLY_TO_SOURCE_PORT */ 00226 00227 /* Define this if you want to enable strict checks in DNS Updates mechanism. 00228 Do not enable this unless are DHCP developer. */ 00229 /* #define DNS_UPDATES_MEMORY_CHECKS */ 00230 00231 /* Define this if you want to allow domain list in domain-name option. 00232 RFC2132 does not allow that behavior, but it is somewhat used due 00233 to historic reasons. Note that it may be removed some time in the 00234 future. */ 00235 00236 #define ACCEPT_LIST_IN_DOMAIN_NAME 00237 00238 /* In RFC3315 section 17.2.2 stated that if the server was not going 00239 to be able to assign any addresses to any IAs in a subsequent Request 00240 from a client that the server should not include any IAs. This 00241 requirement was removed in an errata from August 2010. Define the 00242 following if you want the pre-errata version. 00243 You should only enable this option if you have clients that 00244 require the original functionality. */ 00245 00246 /* #define RFC3315_PRE_ERRATA_2010_08 */ 00247 00248 /* In previous versions of the code when the server generates a NAK 00249 it doesn't attempt to determine if the configuration included a 00250 server ID for that client. Defining this option causes the server 00251 to make a modest effort to determine the server id when building 00252 a NAK as a response. This effort will only check the first subnet 00253 and pool associated with a shared subnet and will not check for 00254 host declarations. With some configurations the server id 00255 computed for a NAK may not match that computed for an ACK. */ 00256 00257 #define SERVER_ID_FOR_NAK 00258 00259 /* When processing a request do a simple check to compare the 00260 server id the client sent with the one the server would send. 00261 In order to minimize the complexity of the code the server 00262 only checks for a server id option in the global and subnet 00263 scopes. Complicated configurations may result in differnet 00264 server ids for this check and when the server id for a reply 00265 packet is determined, which would prohibit the server from 00266 responding. 00267 00268 The primary use for this option is when a client broadcasts 00269 a request but requires the response to come from one of the 00270 failover peers. An example of this would be when a client 00271 reboots while its lease is still active - in this case both 00272 servers will normally respond. Most of the time the client 00273 won't check the server id and can use either of the responses. 00274 However if the client does check the server id it may reject 00275 the response if it came from the wrong peer. If the timing 00276 is such that the "wrong" peer responds first most of the time 00277 the client may not get an address for some time. 00278 00279 Currently this option is only available when failover is in 00280 use. 00281 00282 Care should be taken before enabling this option. */ 00283 00284 /* #define SERVER_ID_CHECK */ 00285 00286 /* Include code to do a slow transition of DDNS records 00287 from the interim to the standard version, or backwards. 00288 The normal code will handle removing an old style record 00289 when the name on a lease is being changed. This adds code 00290 to handle the case where the name isn't being changed but 00291 the old record should be removed to allow a new record to 00292 be added. This is the slow transition as leases are only 00293 updated as a client touches them. A fast transition would 00294 entail updating all the records at once, probably at start 00295 up. */ 00296 #define DDNS_UPDATE_SLOW_TRANSITION 00297 00298 /* Include definitions for various options. In general these 00299 should be left as is, but if you have already defined one 00300 of these and prefer your definition you can comment the 00301 RFC define out to avoid conflicts */ 00302 #define RFC2937_OPTIONS 00303 #define RFC4776_OPTIONS 00304 #define RFC4833_OPTIONS 00305 #define RFC4994_OPTIONS 00306 #define RFC5192_OPTIONS 00307 #define RFC5223_OPTIONS 00308 #define RFC5417_OPTIONS 00309 #define RFC5460_OPTIONS 00310 #define RFC5969_OPTIONS 00311 #define RFC5970_OPTIONS 00312 #define RFC5986_OPTIONS 00313 #define RFC6011_OPTIONS 00314 #define RFC6334_OPTIONS 00315 #define RFC6440_OPTIONS 00316 #define RFC6731_OPTIONS 00317 #define RFC6939_OPTIONS 00318 #define RFC6977_OPTIONS 00319 #define RFC7083_OPTIONS 00320