xref: /minix/external/bsd/dhcp/dist/includes/site.h (revision 83ee113e)
1 /*	$NetBSD: site.h,v 1.1.1.3 2014/07/12 11:57:56 spz Exp $	*/
2 /* Site-specific definitions.
3 
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
6    differences. */
7 
8 /* Add any site-specific definitions and inclusions here... */
9 
10 /* #include <site-foo-bar.h> */
11 /* #define SITE_FOOBAR */
12 
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. */
17 
18 /* #define DEBUG */
19 
20 /* Define this to see what the parser is parsing.   You probably don't
21    want to see this. */
22 
23 /* #define DEBUG_TOKENS */
24 
25 /* Define this to see dumps of incoming and outgoing packets.    This
26    slows things down quite a bit... */
27 
28 /* #define DEBUG_PACKET */
29 
30 /* Define this if you want to see dumps of expression evaluation. */
31 
32 /* #define DEBUG_EXPRESSIONS */
33 
34 /* Define this if you want to see dumps of find_lease() in action. */
35 
36 /* #define DEBUG_FIND_LEASE */
37 
38 /* Define this if you want to see dumps of parsed expressions. */
39 
40 /* #define DEBUG_EXPRESSION_PARSE */
41 
42 /* Define this if you want to watch the class matching process. */
43 
44 /* #define DEBUG_CLASS_MATCHING */
45 
46 /* Define this if you want to track memory usage for the purpose of
47    noticing memory leaks quickly. */
48 
49 /* #define DEBUG_MEMORY_LEAKAGE */
50 /* #define DEBUG_MEMORY_LEAKAGE_ON_EXIT */
51 
52 /* Define this if you want exhaustive (and very slow) checking of the
53    malloc pool for corruption. */
54 
55 /* #define DEBUG_MALLOC_POOL */
56 
57 /* Define this if you want to see a message every time a lease's state
58    changes. */
59 /* #define DEBUG_LEASE_STATE_TRANSITIONS */
60 
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. */
64 
65 /* #define DEBUG_RC_HISTORY */
66 
67 /* Define this if you want to see the history every cycle. */
68 
69 /* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
70 
71 /* This is the number of history entries to maintain - by default, 256. */
72 
73 /* #define RC_HISTORY_MAX 10240 */
74 
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). */
78 
79 /* #define POINTER_DEBUG */
80 
81 /* Define this if you want debugging output for DHCP failover protocol
82    messages. */
83 
84 /* #define DEBUG_FAILOVER_MESSAGES */
85 
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. */
89 
90 /* #define DEBUG_FAILOVER_CONTACT_MESSAGES */
91 
92 /* Define this if you want debugging output for DHCP failover protocol
93    event timeout timing. */
94 
95 /* #define DEBUG_FAILOVER_TIMING */
96 
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. */
99 
100 /* #define DEBUG_FAILOVER_CONTACT_TIMING */
101 
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. */
104 
105 /* #define DEBUG_DUMP_ALL_LEASES */
106 
107 /* Define this if you want to see the requests and replies between the
108    DHCP code and the DNS library code. */
109 
110 /* #define DEBUG_DNS_UPDATES */
111 
112 /* Define this if you want to debug the host part of the inform processing */
113 /* #define DEBUG_INFORM_HOST */
114 
115 /* Define this if you want DHCP failover protocol support in the DHCP
116    server. */
117 
118 /* #define FAILOVER_PROTOCOL */
119 
120 /* Define this if you want DNS update functionality to be available. */
121 
122 #define NSUPDATE
123 
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
127 
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
130    /etc or /var/run. */
131 
132 /* #define _PATH_DHCPD_PID	"/var/run/dhcpd.pid" */
133 
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. */
137 
138 /* #define _PATH_DHCPD_DB	"/etc/dhcpd.leases" */
139 
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. */
142 
143 /* #define _PATH_DHCPD_CONF	"/etc/dhcpd.conf" */
144 
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!!! */
148 
149 /* Define USE_SOCKETS to use the standard BSD socket API.
150 
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.
155 
156    In addition, the BSD socket API will not work when more than one
157    network interface is configured on the server.
158 
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. */
162 
163 /* #define USE_SOCKETS */
164 
165 /* Define this to use the Sun Streams NIT API.
166 
167    The Sun Streams NIT API is only supported on SunOS 4.x releases. */
168 
169 /* #define USE_NIT */
170 
171 /* Define this to use the Berkeley Packet Filter API.
172 
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. */
177 
178 /* #define USE_BPF */
179 
180 /* Define this to use the raw socket API.
181 
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
187    own risk. */
188 
189 /* #define USE_RAW_SOCKETS */
190 
191 /* Define this to change the logging facility used by dhcpd. */
192 
193 /* #define DHCPD_LOG_FACILITY LOG_DAEMON */
194 
195 
196 /* Define this if you want to be able to execute external commands
197    during conditional evaluation. */
198 
199 /* #define ENABLE_EXECUTE */
200 
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. */
204 
205 #define COMPACT_LEASES
206 
207 /* Define this if you want to be able to save and playback server operational
208    traces. */
209 
210 /* #define TRACING */
211 
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. */
220 
221 /* #define USE_OLD_DDNS_TTL */
222 
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 */
227 
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 */
231 
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
235    future. */
236 
237 #define ACCEPT_LIST_IN_DOMAIN_NAME
238 
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. */
246 
247 /* #define RFC3315_PRE_ERRATA_2010_08 */
248 
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. */
257 
258 #define SERVER_ID_FOR_NAK
259 
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
267    responding.
268 
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.
279 
280    Currently this option is only available when failover is in
281    use.
282 
283    Care should be taken before enabling this option. */
284 
285 /* #define SERVER_ID_CHECK */
286 
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
296    up. */
297 #define DDNS_UPDATE_SLOW_TRANSITION
298 
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
321 
322