1 /* $NetBSD: site.h,v 1.1.1.3 2014/07/12 11:57:56 spz Exp $ */
2 /* Site-specific definitions.
4 For supported systems, you shouldn't need to make any changes here.
5 However, you may want to, in order to deal with site-specific
8 /* Add any site-specific definitions and inclusions here... */
10 /* #include <site-foo-bar.h> */
11 /* #define SITE_FOOBAR */
13 /* Define this if you don't want dhcpd to run as a daemon and do want
14 to see all its output printed to stdout instead of being logged via
15 syslog(). This also makes dhcpd use the dhcpd.conf in its working
16 directory and write the dhcpd.leases file there. */
20 /* Define this to see what the parser is parsing. You probably don't
23 /* #define DEBUG_TOKENS */
25 /* Define this to see dumps of incoming and outgoing packets. This
26 slows things down quite a bit... */
28 /* #define DEBUG_PACKET */
30 /* Define this if you want to see dumps of expression evaluation. */
32 /* #define DEBUG_EXPRESSIONS */
34 /* Define this if you want to see dumps of find_lease() in action. */
36 /* #define DEBUG_FIND_LEASE */
38 /* Define this if you want to see dumps of parsed expressions. */
40 /* #define DEBUG_EXPRESSION_PARSE */
42 /* Define this if you want to watch the class matching process. */
44 /* #define DEBUG_CLASS_MATCHING */
46 /* Define this if you want to track memory usage for the purpose of
47 noticing memory leaks quickly. */
49 /* #define DEBUG_MEMORY_LEAKAGE */
50 /* #define DEBUG_MEMORY_LEAKAGE_ON_EXIT */
52 /* Define this if you want exhaustive (and very slow) checking of the
53 malloc pool for corruption. */
55 /* #define DEBUG_MALLOC_POOL */
57 /* Define this if you want to see a message every time a lease's state
59 /* #define DEBUG_LEASE_STATE_TRANSITIONS */
61 /* Define this if you want to maintain a history of the last N operations
62 that changed reference counts on objects. This can be used to debug
63 cases where an object is dereferenced too often, or not often enough. */
65 /* #define DEBUG_RC_HISTORY */
67 /* Define this if you want to see the history every cycle. */
69 /* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
71 /* This is the number of history entries to maintain - by default, 256. */
73 /* #define RC_HISTORY_MAX 10240 */
75 /* Define this if you want dhcpd to dump core when a non-fatal memory
76 allocation error is detected (i.e., something that would cause a
77 memory leak rather than a memory smash). */
79 /* #define POINTER_DEBUG */
81 /* Define this if you want debugging output for DHCP failover protocol
84 /* #define DEBUG_FAILOVER_MESSAGES */
86 /* Define this to include contact messages in failover message debugging.
87 The contact messages are sent once per second, so this can generate a
88 lot of log entries. */
90 /* #define DEBUG_FAILOVER_CONTACT_MESSAGES */
92 /* Define this if you want debugging output for DHCP failover protocol
93 event timeout timing. */
95 /* #define DEBUG_FAILOVER_TIMING */
97 /* Define this if you want to include contact message timing, which is
98 performed once per second and can generate a lot of log entries. */
100 /* #define DEBUG_FAILOVER_CONTACT_TIMING */
102 /* Define this if you want all leases written to the lease file, even if
103 they are free leases that have never been used. */
105 /* #define DEBUG_DUMP_ALL_LEASES */
107 /* Define this if you want to see the requests and replies between the
108 DHCP code and the DNS library code. */
110 /* #define DEBUG_DNS_UPDATES */
112 /* Define this if you want to debug the host part of the inform processing */
113 /* #define DEBUG_INFORM_HOST */
115 /* Define this if you want DHCP failover protocol support in the DHCP
118 /* #define FAILOVER_PROTOCOL */
120 /* Define this if you want DNS update functionality to be available. */
124 /* Define this if you want to enable the DHCP server attempting to
125 find a nameserver to use for DDNS updates. */
126 #define DNS_ZONE_LOOKUP
128 /* Define this if you want the dhcpd.pid file to go somewhere other than
129 the default (which varies from system to system, but is usually either
132 /* #define _PATH_DHCPD_PID "/var/run/dhcpd.pid" */
134 /* Define this if you want the dhcpd.leases file (the dynamic lease database)
135 to go somewhere other than the default location, which is normally
136 /etc/dhcpd.leases. */
138 /* #define _PATH_DHCPD_DB "/etc/dhcpd.leases" */
140 /* Define this if you want the dhcpd.conf file to go somewhere other than
141 the default location. By default, it goes in /etc/dhcpd.conf. */
143 /* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
145 /* Network API definitions. You do not need to choose one of these - if
146 you don't choose, one will be chosen for you in your system's config
147 header. DON'T MESS WITH THIS UNLESS YOU KNOW WHAT YOU'RE DOING!!! */
149 /* Define USE_SOCKETS to use the standard BSD socket API.
151 On many systems, the BSD socket API does not provide the ability to
152 send packets to the 255.255.255.255 broadcast address, which can
153 prevent some clients (e.g., Win95) from seeing replies. This is
154 not a problem on Solaris.
156 In addition, the BSD socket API will not work when more than one
157 network interface is configured on the server.
159 However, the BSD socket API is about as efficient as you can get, so if
160 the aforementioned problems do not matter to you, or if no other
161 API is supported for your system, you may want to go with it. */
163 /* #define USE_SOCKETS */
165 /* Define this to use the Sun Streams NIT API.
167 The Sun Streams NIT API is only supported on SunOS 4.x releases. */
169 /* #define USE_NIT */
171 /* Define this to use the Berkeley Packet Filter API.
173 The BPF API is available on all 4.4-BSD derivatives, including
174 NetBSD, FreeBSD and BSDI's BSD/OS. It's also available on
175 DEC Alpha OSF/1 in a compatibility mode supported by the Alpha OSF/1
176 packetfilter interface. */
178 /* #define USE_BPF */
180 /* Define this to use the raw socket API.
182 The raw socket API is provided on many BSD derivatives, and provides
183 a way to send out raw IP packets. It is only supported for sending
184 packets - packets must be received with the regular socket API.
185 This code is experimental - I've never gotten it to actually transmit
186 a packet to the 255.255.255.255 broadcast address - so use it at your
189 /* #define USE_RAW_SOCKETS */
191 /* Define this to change the logging facility used by dhcpd. */
193 /* #define DHCPD_LOG_FACILITY LOG_DAEMON */
196 /* Define this if you want to be able to execute external commands
197 during conditional evaluation. */
199 /* #define ENABLE_EXECUTE */
201 /* Define this if you aren't debugging and you want to save memory
202 (potentially a _lot_ of memory) by allocating leases in chunks rather
203 than one at a time. */
205 #define COMPACT_LEASES
207 /* Define this if you want to be able to save and playback server operational
210 /* #define TRACING */
212 /* Define this if you want the server to use the previous behavior
213 when determining the DDNS TTL. If the user has specified a ddns-ttl
214 option that is used to detemine the ttl. (If the user specifies
215 an option that references the lease structure it is only usable
216 for v4. In that case v6 will use the default.) Otherwise when
217 defined the defaults are: v4 - 1/2 the lease time,
218 v6 - DEFAULT_DDNS_TTL. When undefined the defaults are 1/2 the
219 (preferred) lease time for both but with a cap on the maximum. */
221 /* #define USE_OLD_DDNS_TTL */
223 /* Define this if you want a DHCPv6 server to send replies to the
224 source port of the message it received. This is useful for testing
225 but is only included for backwards compatibility. */
226 /* #define REPLY_TO_SOURCE_PORT */
228 /* Define this if you want to enable strict checks in DNS Updates mechanism.
229 Do not enable this unless are DHCP developer. */
230 /* #define DNS_UPDATES_MEMORY_CHECKS */
232 /* Define this if you want to allow domain list in domain-name option.
233 RFC2132 does not allow that behavior, but it is somewhat used due
234 to historic reasons. Note that it may be removed some time in the
237 #define ACCEPT_LIST_IN_DOMAIN_NAME
239 /* In RFC3315 section 17.2.2 stated that if the server was not going
240 to be able to assign any addresses to any IAs in a subsequent Request
241 from a client that the server should not include any IAs. This
242 requirement was removed in an errata from August 2010. Define the
243 following if you want the pre-errata version.
244 You should only enable this option if you have clients that
245 require the original functionality. */
247 /* #define RFC3315_PRE_ERRATA_2010_08 */
249 /* In previous versions of the code when the server generates a NAK
250 it doesn't attempt to determine if the configuration included a
251 server ID for that client. Defining this option causes the server
252 to make a modest effort to determine the server id when building
253 a NAK as a response. This effort will only check the first subnet
254 and pool associated with a shared subnet and will not check for
255 host declarations. With some configurations the server id
256 computed for a NAK may not match that computed for an ACK. */
258 #define SERVER_ID_FOR_NAK
260 /* When processing a request do a simple check to compare the
261 server id the client sent with the one the server would send.
262 In order to minimize the complexity of the code the server
263 only checks for a server id option in the global and subnet
264 scopes. Complicated configurations may result in differnet
265 server ids for this check and when the server id for a reply
266 packet is determined, which would prohibit the server from
269 The primary use for this option is when a client broadcasts
270 a request but requires the response to come from one of the
271 failover peers. An example of this would be when a client
272 reboots while its lease is still active - in this case both
273 servers will normally respond. Most of the time the client
274 won't check the server id and can use either of the responses.
275 However if the client does check the server id it may reject
276 the response if it came from the wrong peer. If the timing
277 is such that the "wrong" peer responds first most of the time
278 the client may not get an address for some time.
280 Currently this option is only available when failover is in
283 Care should be taken before enabling this option. */
285 /* #define SERVER_ID_CHECK */
287 /* Include code to do a slow transition of DDNS records
288 from the interim to the standard version, or backwards.
289 The normal code will handle removing an old style record
290 when the name on a lease is being changed. This adds code
291 to handle the case where the name isn't being changed but
292 the old record should be removed to allow a new record to
293 be added. This is the slow transition as leases are only
294 updated as a client touches them. A fast transition would
295 entail updating all the records at once, probably at start
297 #define DDNS_UPDATE_SLOW_TRANSITION
299 /* Include definitions for various options. In general these
300 should be left as is, but if you have already defined one
301 of these and prefer your definition you can comment the
302 RFC define out to avoid conflicts */
303 #define RFC2937_OPTIONS
304 #define RFC4776_OPTIONS
305 #define RFC4833_OPTIONS
306 #define RFC4994_OPTIONS
307 #define RFC5192_OPTIONS
308 #define RFC5223_OPTIONS
309 #define RFC5417_OPTIONS
310 #define RFC5460_OPTIONS
311 #define RFC5969_OPTIONS
312 #define RFC5970_OPTIONS
313 #define RFC5986_OPTIONS
314 #define RFC6011_OPTIONS
315 #define RFC6334_OPTIONS
316 #define RFC6440_OPTIONS
317 #define RFC6731_OPTIONS
318 #define RFC6939_OPTIONS
319 #define RFC6977_OPTIONS
320 #define RFC7083_OPTIONS