site.h revision 1.3 1 /* $NetBSD: site.h,v 1.3 2022/04/03 01:10:58 christos Exp $ */
2
3 /* Site-specific definitions.
4
5 For supported systems, you shouldn't need to make any changes here.
6 However, you may want to, in order to deal with site-specific
7 differences. */
8
9 /* Add any site-specific definitions and inclusions here... */
10
11 /* #include <site-foo-bar.h> */
12 /* #define SITE_FOOBAR */
13
14 /* Define this if you don't want dhcpd to run as a daemon and do want
15 to see all its output printed to stdout instead of being logged via
16 syslog(). This also makes dhcpd use the dhcpd.conf in its working
17 directory and write the dhcpd.leases file there. */
18
19 /* #define DEBUG */
20
21 /* Define this to see what the parser is parsing. You probably don't
22 want to see this. */
23
24 /* #define DEBUG_TOKENS */
25
26 /* Define this to see dumps of incoming and outgoing packets. This
27 slows things down quite a bit... */
28
29 /* #define DEBUG_PACKET */
30
31 /* Define this if you want to see dumps of expression evaluation. */
32
33 /* #define DEBUG_EXPRESSIONS */
34
35 /* Define this if you want to see dumps of find_lease() in action. */
36
37 /* #define DEBUG_FIND_LEASE */
38
39 /* Define this if you want to see dumps of parsed expressions. */
40
41 /* #define DEBUG_EXPRESSION_PARSE */
42
43 /* Define this if you want to watch the class matching process. */
44
45 /* #define DEBUG_CLASS_MATCHING */
46
47 /* Define this if you want to track memory usage for the purpose of
48 noticing memory leaks quickly. */
49
50 /* #define DEBUG_MEMORY_LEAKAGE */
51 /* #define DEBUG_MEMORY_LEAKAGE_ON_EXIT */
52
53 /* Define this if you want exhaustive (and very slow) checking of the
54 malloc pool for corruption. */
55
56 /* #define DEBUG_MALLOC_POOL */
57
58 /* Define this if you want to see a message every time a lease's state
59 changes. */
60 /* #define DEBUG_LEASE_STATE_TRANSITIONS */
61
62 /* Define this if you want to maintain a history of the last N operations
63 that changed reference counts on objects. This can be used to debug
64 cases where an object is dereferenced too often, or not often enough. */
65
66 /* #define DEBUG_RC_HISTORY */
67
68 /* Define this if you want to see the history every cycle. */
69
70 /* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
71
72 /* This is the number of history entries to maintain - by default, 256. */
73
74 /* #define RC_HISTORY_MAX 10240 */
75
76 /* Define this if you want dhcpd to dump core when a non-fatal memory
77 allocation error is detected (i.e., something that would cause a
78 memory leak rather than a memory smash). */
79
80 /* #define POINTER_DEBUG */
81
82 /* Define this if you want debugging output for DHCP failover protocol
83 messages. */
84
85 /* #define DEBUG_FAILOVER_MESSAGES */
86
87 /* Define this to include contact messages in failover message debugging.
88 The contact messages are sent once per second, so this can generate a
89 lot of log entries. */
90
91 /* #define DEBUG_FAILOVER_CONTACT_MESSAGES */
92
93 /* Define this if you want debugging output for DHCP failover protocol
94 event timeout timing. */
95
96 /* #define DEBUG_FAILOVER_TIMING */
97
98 /* Define this if you want to include contact message timing, which is
99 performed once per second and can generate a lot of log entries. */
100
101 /* #define DEBUG_FAILOVER_CONTACT_TIMING */
102
103 /* Define this if you want all leases written to the lease file, even if
104 they are free leases that have never been used. */
105
106 /* #define DEBUG_DUMP_ALL_LEASES */
107
108 /* Define this if you want to see the requests and replies between the
109 DHCP code and the DNS library code. */
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 to debug the binary leases (lease_chain) code */
116 /* #define DEBUG_BINARY_LEASES */
117
118 /* Define this if you want to debug checksum calculations */
119 /* #define DEBUG_CHECKSUM */
120
121 /* Define this if you want to verbosely debug checksum calculations */
122 /* #define DEBUG_CHECKSUM_VERBOSE */
123
124
125 /* Define this if you want DHCP failover protocol support in the DHCP
126 server. */
127
128 /* #define FAILOVER_PROTOCOL */
129
130 /* Define this if you want DNS update functionality to be available. */
131
132 #define NSUPDATE
133
134 /* Define this if you want to enable the DHCP server attempting to
135 find a nameserver to use for DDNS updates. */
136 #define DNS_ZONE_LOOKUP
137
138 /* Define this if you want the dhcpd.pid file to go somewhere other than
139 the default (which varies from system to system, but is usually either
140 /etc or /var/run. */
141
142 /* #define _PATH_DHCPD_PID "/var/run/dhcpd.pid" */
143
144 /* Define this if you want the dhcpd.leases file (the dynamic lease database)
145 to go somewhere other than the default location, which is normally
146 /etc/dhcpd.leases. */
147
148 /* #define _PATH_DHCPD_DB "/etc/dhcpd.leases" */
149
150 /* Define this if you want the dhcpd.conf file to go somewhere other than
151 the default location. By default, it goes in /etc/dhcpd.conf. */
152
153 /* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
154
155 /* Network API definitions. You do not need to choose one of these - if
156 you don't choose, one will be chosen for you in your system's config
157 header. DON'T MESS WITH THIS UNLESS YOU KNOW WHAT YOU'RE DOING!!! */
158
159 /* Define USE_SOCKETS to use the standard BSD socket API.
160
161 On many systems, the BSD socket API does not provide the ability to
162 send packets to the 255.255.255.255 broadcast address, which can
163 prevent some clients (e.g., Win95) from seeing replies. This is
164 not a problem on Solaris.
165
166 In addition, the BSD socket API will not work when more than one
167 network interface is configured on the server.
168
169 However, the BSD socket API is about as efficient as you can get, so if
170 the aforementioned problems do not matter to you, or if no other
171 API is supported for your system, you may want to go with it. */
172
173 /* #define USE_SOCKETS */
174
175 /* Define this to use the Sun Streams NIT API.
176
177 The Sun Streams NIT API is only supported on SunOS 4.x releases. */
178
179 /* #define USE_NIT */
180
181 /* Define this to use the Berkeley Packet Filter API.
182
183 The BPF API is available on all 4.4-BSD derivatives, including
184 NetBSD, FreeBSD and BSDI's BSD/OS. It's also available on
185 DEC Alpha OSF/1 in a compatibility mode supported by the Alpha OSF/1
186 packetfilter interface. */
187
188 /* #define USE_BPF */
189
190 /* Define this to use the raw socket API.
191
192 The raw socket API is provided on many BSD derivatives, and provides
193 a way to send out raw IP packets. It is only supported for sending
194 packets - packets must be received with the regular socket API.
195 This code is experimental - I've never gotten it to actually transmit
196 a packet to the 255.255.255.255 broadcast address - so use it at your
197 own risk. */
198
199 /* #define USE_RAW_SOCKETS */
200
201 /* Define this to keep the old program name (e.g., "dhcpd" for
202 the DHCP server) in place of the (base) name the program was
203 invoked with. */
204
205 /* #define OLD_LOG_NAME */
206
207 /* Define this to change the logging facility used by dhcpd. */
208
209 /* #define DHCPD_LOG_FACILITY LOG_DAEMON */
210
211
212 /* Define this if you want to be able to execute external commands
213 during conditional evaluation. */
214
215 /* #define ENABLE_EXECUTE */
216
217 /* Define this if you aren't debugging and you want to save memory
218 (potentially a _lot_ of memory) by allocating leases in chunks rather
219 than one at a time. */
220
221 #define COMPACT_LEASES
222
223 /* Define this if you want to be able to save and playback server operational
224 traces. */
225
226 /* #define TRACING */
227
228 /* Define this if you want the server to use the previous behavior
229 when determining the DDNS TTL. If the user has specified a ddns-ttl
230 option that is used to detemine the ttl. (If the user specifies
231 an option that references the lease structure it is only usable
232 for v4. In that case v6 will use the default.) Otherwise when
233 defined the defaults are: v4 - 1/2 the lease time,
234 v6 - DEFAULT_DDNS_TTL. When undefined the defaults are 1/2 the
235 (preferred) lease time for both but with a cap on the maximum. */
236
237 /* #define USE_OLD_DDNS_TTL */
238
239 /* Define this if you want a DHCPv6 server to send replies to the
240 source port of the message it received. This is useful for testing
241 but is only included for backwards compatibility. */
242 /* #define REPLY_TO_SOURCE_PORT */
243
244 /* Define this if you want to enable strict checks in DNS Updates mechanism.
245 Do not enable this unless are DHCP developer. */
246 /* #define DNS_UPDATES_MEMORY_CHECKS */
247
248 /* Define this if you want to allow domain list in domain-name option.
249 RFC2132 does not allow that behavior, but it is somewhat used due
250 to historic reasons. Note that it may be removed some time in the
251 future. */
252
253 #define ACCEPT_LIST_IN_DOMAIN_NAME
254
255 /* In previous versions of the code when the server generates a NAK
256 it doesn't attempt to determine if the configuration included a
257 server ID for that client. Defining this option causes the server
258 to make a modest effort to determine the server id when building
259 a NAK as a response. This effort will only check the first subnet
260 and pool associated with a shared subnet and will not check for
261 host declarations. With some configurations the server id
262 computed for a NAK may not match that computed for an ACK. */
263
264 #define SERVER_ID_FOR_NAK
265
266 /* NOTE: SERVER_ID_CHECK switch has been removed. Enabling server id
267 * checking is now done via the server-id-check statement. Please refer
268 * to the dhcpd manpage (server/dhcpd.conf.5) */
269
270 /* Include code to do a slow transition of DDNS records
271 from the interim to the standard version, or backwards.
272 The normal code will handle removing an old style record
273 when the name on a lease is being changed. This adds code
274 to handle the case where the name isn't being changed but
275 the old record should be removed to allow a new record to
276 be added. This is the slow transition as leases are only
277 updated as a client touches them. A fast transition would
278 entail updating all the records at once, probably at start
279 up. */
280 #define DDNS_UPDATE_SLOW_TRANSITION
281
282 /* Define the default prefix length passed from the client to
283 the script when modifying an IPv6 IA_NA or IA_TA address.
284 The two most useful values are 128 which is what the current
285 specifications call for or 64 which is what has been used in
286 the past. For most OSes 128 will indicate that the address
287 is a host address and doesn't include any on-link information.
288 64 indicates that the first 64 bits are the subnet or on-link
289 prefix. */
290 #define DHCLIENT_DEFAULT_PREFIX_LEN 128
291
292 /* Enable the gentle shutdown signal handling. Currently this
293 means that on SIGINT or SIGTERM a client will release its
294 address and a server in a failover pair will go through
295 partner down. Both of which can be undesireable in some
296 situations. We plan to revisit this feature and may
297 make non-backwards compatible changes including the
298 removal of this define. Use at your own risk. */
299 /* #define ENABLE_GENTLE_SHUTDOWN */
300
301 /* Include old error codes. This is provided in case you
302 are building an external program similar to omshell for
303 which you need the ISC_R_* error codes. You should switch
304 to DHCP_R_* error codes for those that have been defined
305 (see includes/omapip/result.h). The extra defines and
306 this option will be removed at some time. */
307 /* #define INCLUDE_OLD_DHCP_ISC_ERROR_CODES */
308
309 /* Use the older factors for scoring a lease in the v6 client code.
310 The new factors cause the client to choose more bindings (IAs)
311 over more addresse within a binding. Most uses will get a
312 single address in a single binding and only get an adverstise
313 from a single server and there won't be a difference. */
314 /* #define USE_ORIGINAL_CLIENT_LEASE_WEIGHTS */
315
316 /* Print out specific error messages for dhclient, dhcpd
317 or dhcrelay when processing an incorrect command line. This
318 is included for those that might require the exact error
319 messages, as we don't expect that is necessary it is on by
320 default. */
321 #define PRINT_SPECIFIC_CL_ERRORS
322
323 /* Limit the value of a file descriptor the serve will use
324 when accepting a connecting request. This can be used to
325 limit the number of TCP connections that the server will
326 allow at one time. A value of 0 means there is no limit.*/
327 #define MAX_FD_VALUE 200
328
329 /* Enable EUI-64 Address assignment policy. Instructs the server
330 * to use EUI-64 addressing instead of dynamic address allocation
331 * for IA_NA pools, if the parameter use-eui-64 is true for the
332 * pool. Can be at all scopes down to the pool level. Not
333 * supported by the configure script. */
334 /* #define EUI_64 */
335
336 /* Enable enforcement of the require option statement as documented
337 * in man page. Instructs the dhclient, when in -6 mode, to discard
338 * offered leases that do not contain all options specified as required
339 * in the client's configuration file. The client already enforces this
340 * in -4 mode. */
341 #define ENFORCE_DHCPV6_CLIENT_REQUIRE
342
343 /* Enable the invocation of the client script with a FAIL state code
344 * by dhclient when running in one-try mode (-T) and the attempt to
345 * obtain the desired lease(s) fails. Applies to IPv4 mode only. */
346 /* #define CALL_SCRIPT_ON_ONETRY_FAIL */
347
348 /* Include definitions for various options. In general these
349 should be left as is, but if you have already defined one
350 of these and prefer your definition you can comment the
351 RFC define out to avoid conflicts */
352 #define RFC2563_OPTIONS
353 #define RFC2937_OPTIONS
354 #define RFC4776_OPTIONS
355 #define RFC4578_OPTIONS
356 #define RFC4833_OPTIONS
357 #define RFC4994_OPTIONS
358 #define RFC5071_OPTIONS
359 #define RFC5192_OPTIONS
360 #define RFC5223_OPTIONS
361 #define RFC5417_OPTIONS
362 #define RFC5460_OPTIONS
363 #define RFC5859_OPTIONS
364 #define RFC5969_OPTIONS
365 #define RFC5970_OPTIONS
366 #define RFC5986_OPTIONS
367 #define RFC6011_OPTIONS
368 #define RFC6011_OPTIONS
369 #define RFC6153_OPTIONS
370 #define RFC6334_OPTIONS
371 #define RFC6440_OPTIONS
372 #define RFC6731_OPTIONS
373 #define RFC6939_OPTIONS
374 #define RFC6977_OPTIONS
375 #define RFC7083_OPTIONS
376 #define RFC7341_OPTIONS
377 #define RFC7618_OPTIONS
378 #define RFC7710_OPTIONS
379 #define RFC8925_OPTIONS
380