ISC DHCP  4.3.1
A reference DHCPv4 and DHCPv6 implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
site.h
Go to the documentation of this file.
1 /* Site-specific definitions.
2 
3  For supported systems, you shouldn't need to make any changes here.
4  However, you may want to, in order to deal with site-specific
5  differences. */
6 
7 /* Add any site-specific definitions and inclusions here... */
8 
9 /* #include <site-foo-bar.h> */
10 /* #define SITE_FOOBAR */
11 
12 /* Define this if you don't want dhcpd to run as a daemon and do want
13  to see all its output printed to stdout instead of being logged via
14  syslog(). This also makes dhcpd use the dhcpd.conf in its working
15  directory and write the dhcpd.leases file there. */
16 
17 /* #define DEBUG */
18 
19 /* Define this to see what the parser is parsing. You probably don't
20  want to see this. */
21 
22 /* #define DEBUG_TOKENS */
23 
24 /* Define this to see dumps of incoming and outgoing packets. This
25  slows things down quite a bit... */
26 
27 /* #define DEBUG_PACKET */
28 
29 /* Define this if you want to see dumps of expression evaluation. */
30 
31 /* #define DEBUG_EXPRESSIONS */
32 
33 /* Define this if you want to see dumps of find_lease() in action. */
34 
35 /* #define DEBUG_FIND_LEASE */
36 
37 /* Define this if you want to see dumps of parsed expressions. */
38 
39 /* #define DEBUG_EXPRESSION_PARSE */
40 
41 /* Define this if you want to watch the class matching process. */
42 
43 /* #define DEBUG_CLASS_MATCHING */
44 
45 /* Define this if you want to track memory usage for the purpose of
46  noticing memory leaks quickly. */
47 
48 /* #define DEBUG_MEMORY_LEAKAGE */
49 /* #define DEBUG_MEMORY_LEAKAGE_ON_EXIT */
50 
51 /* Define this if you want exhaustive (and very slow) checking of the
52  malloc pool for corruption. */
53 
54 /* #define DEBUG_MALLOC_POOL */
55 
56 /* Define this if you want to see a message every time a lease's state
57  changes. */
58 /* #define DEBUG_LEASE_STATE_TRANSITIONS */
59 
60 /* Define this if you want to maintain a history of the last N operations
61  that changed reference counts on objects. This can be used to debug
62  cases where an object is dereferenced too often, or not often enough. */
63 
64 /* #define DEBUG_RC_HISTORY */
65 
66 /* Define this if you want to see the history every cycle. */
67 
68 /* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
69 
70 /* This is the number of history entries to maintain - by default, 256. */
71 
72 /* #define RC_HISTORY_MAX 10240 */
73 
74 /* Define this if you want dhcpd to dump core when a non-fatal memory
75  allocation error is detected (i.e., something that would cause a
76  memory leak rather than a memory smash). */
77 
78 /* #define POINTER_DEBUG */
79 
80 /* Define this if you want debugging output for DHCP failover protocol
81  messages. */
82 
83 /* #define DEBUG_FAILOVER_MESSAGES */
84 
85 /* Define this to include contact messages in failover message debugging.
86  The contact messages are sent once per second, so this can generate a
87  lot of log entries. */
88 
89 /* #define DEBUG_FAILOVER_CONTACT_MESSAGES */
90 
91 /* Define this if you want debugging output for DHCP failover protocol
92  event timeout timing. */
93 
94 /* #define DEBUG_FAILOVER_TIMING */
95 
96 /* Define this if you want to include contact message timing, which is
97  performed once per second and can generate a lot of log entries. */
98 
99 /* #define DEBUG_FAILOVER_CONTACT_TIMING */
100 
101 /* Define this if you want all leases written to the lease file, even if
102  they are free leases that have never been used. */
103 
104 /* #define DEBUG_DUMP_ALL_LEASES */
105 
106 /* Define this if you want to see the requests and replies between the
107  DHCP code and the DNS library code. */
108 
109 /* #define DEBUG_DNS_UPDATES */
110 
111 /* Define this if you want to debug the host part of the inform processing */
112 /* #define DEBUG_INFORM_HOST */
113 
114 /* Define this if you want DHCP failover protocol support in the DHCP
115  server. */
116 
117 /* #define FAILOVER_PROTOCOL */
118 
119 /* Define this if you want DNS update functionality to be available. */
120 
121 #define NSUPDATE
122 
123 /* Define this if you want to enable the DHCP server attempting to
124  find a nameserver to use for DDNS updates. */
125 #define DNS_ZONE_LOOKUP
126 
127 /* Define this if you want the dhcpd.pid file to go somewhere other than
128  the default (which varies from system to system, but is usually either
129  /etc or /var/run. */
130 
131 /* #define _PATH_DHCPD_PID "/var/run/dhcpd.pid" */
132 
133 /* Define this if you want the dhcpd.leases file (the dynamic lease database)
134  to go somewhere other than the default location, which is normally
135  /etc/dhcpd.leases. */
136 
137 /* #define _PATH_DHCPD_DB "/etc/dhcpd.leases" */
138 
139 /* Define this if you want the dhcpd.conf file to go somewhere other than
140  the default location. By default, it goes in /etc/dhcpd.conf. */
141 
142 /* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
143 
144 /* Network API definitions. You do not need to choose one of these - if
145  you don't choose, one will be chosen for you in your system's config
146  header. DON'T MESS WITH THIS UNLESS YOU KNOW WHAT YOU'RE DOING!!! */
147 
148 /* Define USE_SOCKETS to use the standard BSD socket API.
149 
150  On many systems, the BSD socket API does not provide the ability to
151  send packets to the 255.255.255.255 broadcast address, which can
152  prevent some clients (e.g., Win95) from seeing replies. This is
153  not a problem on Solaris.
154 
155  In addition, the BSD socket API will not work when more than one
156  network interface is configured on the server.
157 
158  However, the BSD socket API is about as efficient as you can get, so if
159  the aforementioned problems do not matter to you, or if no other
160  API is supported for your system, you may want to go with it. */
161 
162 /* #define USE_SOCKETS */
163 
164 /* Define this to use the Sun Streams NIT API.
165 
166  The Sun Streams NIT API is only supported on SunOS 4.x releases. */
167 
168 /* #define USE_NIT */
169 
170 /* Define this to use the Berkeley Packet Filter API.
171 
172  The BPF API is available on all 4.4-BSD derivatives, including
173  NetBSD, FreeBSD and BSDI's BSD/OS. It's also available on
174  DEC Alpha OSF/1 in a compatibility mode supported by the Alpha OSF/1
175  packetfilter interface. */
176 
177 /* #define USE_BPF */
178 
179 /* Define this to use the raw socket API.
180 
181  The raw socket API is provided on many BSD derivatives, and provides
182  a way to send out raw IP packets. It is only supported for sending
183  packets - packets must be received with the regular socket API.
184  This code is experimental - I've never gotten it to actually transmit
185  a packet to the 255.255.255.255 broadcast address - so use it at your
186  own risk. */
187 
188 /* #define USE_RAW_SOCKETS */
189 
190 /* Define this to change the logging facility used by dhcpd. */
191 
192 /* #define DHCPD_LOG_FACILITY LOG_DAEMON */
193 
194 
195 /* Define this if you want to be able to execute external commands
196  during conditional evaluation. */
197 
198 /* #define ENABLE_EXECUTE */
199 
200 /* Define this if you aren't debugging and you want to save memory
201  (potentially a _lot_ of memory) by allocating leases in chunks rather
202  than one at a time. */
203 
204 #define COMPACT_LEASES
205 
206 /* Define this if you want to be able to save and playback server operational
207  traces. */
208 
209 /* #define TRACING */
210 
211 /* Define this if you want the server to use the previous behavior
212  when determining the DDNS TTL. If the user has specified a ddns-ttl
213  option that is used to detemine the ttl. (If the user specifies
214  an option that references the lease structure it is only usable
215  for v4. In that case v6 will use the default.) Otherwise when
216  defined the defaults are: v4 - 1/2 the lease time,
217  v6 - DEFAULT_DDNS_TTL. When undefined the defaults are 1/2 the
218  (preferred) lease time for both but with a cap on the maximum. */
219 
220 /* #define USE_OLD_DDNS_TTL */
221 
222 /* Define this if you want a DHCPv6 server to send replies to the
223  source port of the message it received. This is useful for testing
224  but is only included for backwards compatibility. */
225 /* #define REPLY_TO_SOURCE_PORT */
226 
227 /* Define this if you want to enable strict checks in DNS Updates mechanism.
228  Do not enable this unless are DHCP developer. */
229 /* #define DNS_UPDATES_MEMORY_CHECKS */
230 
231 /* Define this if you want to allow domain list in domain-name option.
232  RFC2132 does not allow that behavior, but it is somewhat used due
233  to historic reasons. Note that it may be removed some time in the
234  future. */
235 
236 #define ACCEPT_LIST_IN_DOMAIN_NAME
237 
238 /* In previous versions of the code when the server generates a NAK
239  it doesn't attempt to determine if the configuration included a
240  server ID for that client. Defining this option causes the server
241  to make a modest effort to determine the server id when building
242  a NAK as a response. This effort will only check the first subnet
243  and pool associated with a shared subnet and will not check for
244  host declarations. With some configurations the server id
245  computed for a NAK may not match that computed for an ACK. */
246 
247 #define SERVER_ID_FOR_NAK
248 
249 /* When processing a request do a simple check to compare the
250  server id the client sent with the one the server would send.
251  In order to minimize the complexity of the code the server
252  only checks for a server id option in the global and subnet
253  scopes. Complicated configurations may result in differnet
254  server ids for this check and when the server id for a reply
255  packet is determined, which would prohibit the server from
256  responding.
257 
258  The primary use for this option is when a client broadcasts
259  a request but requires the response to come from one of the
260  failover peers. An example of this would be when a client
261  reboots while its lease is still active - in this case both
262  servers will normally respond. Most of the time the client
263  won't check the server id and can use either of the responses.
264  However if the client does check the server id it may reject
265  the response if it came from the wrong peer. If the timing
266  is such that the "wrong" peer responds first most of the time
267  the client may not get an address for some time.
268 
269  Currently this option is only available when failover is in
270  use.
271 
272  Care should be taken before enabling this option. */
273 
274 /* #define SERVER_ID_CHECK */
275 
276 /* Include code to do a slow transition of DDNS records
277  from the interim to the standard version, or backwards.
278  The normal code will handle removing an old style record
279  when the name on a lease is being changed. This adds code
280  to handle the case where the name isn't being changed but
281  the old record should be removed to allow a new record to
282  be added. This is the slow transition as leases are only
283  updated as a client touches them. A fast transition would
284  entail updating all the records at once, probably at start
285  up. */
286 #define DDNS_UPDATE_SLOW_TRANSITION
287 
288 /* Define the default prefix length passed from the client to
289  the script when modifying an IPv6 IA_NA or IA_TA address.
290  The two most useful values are 128 which is what the current
291  specifications call for or 64 which is what has been used in
292  the past. For most OSes 128 will indicate that the address
293  is a host address and doesn't include any on-link information.
294  64 indicates that the first 64 bits are the subnet or on-link
295  prefix. */
296 #define DHCLIENT_DEFAULT_PREFIX_LEN 64
297 
298 /* Enable the gentle shutdown signal handling. Currently this
299  means that on SIGINT or SIGTERM a client will release its
300  address and a server in a failover pair will go through
301  partner down. Both of which can be undesireable in some
302  situations. We plan to revisit this feature and may
303  make non-backwards compatible changes including the
304  removal of this define. Use at your own risk. */
305 /* #define ENABLE_GENTLE_SHUTDOWN */
306 
307 /* Include definitions for various options. In general these
308  should be left as is, but if you have already defined one
309  of these and prefer your definition you can comment the
310  RFC define out to avoid conflicts */
311 #define RFC2937_OPTIONS
312 #define RFC4776_OPTIONS
313 #define RFC4833_OPTIONS
314 #define RFC4994_OPTIONS
315 #define RFC5192_OPTIONS
316 #define RFC5223_OPTIONS
317 #define RFC5417_OPTIONS
318 #define RFC5460_OPTIONS
319 #define RFC5969_OPTIONS
320 #define RFC5970_OPTIONS
321 #define RFC5986_OPTIONS
322 #define RFC6011_OPTIONS
323 #define RFC6334_OPTIONS
324 #define RFC6440_OPTIONS
325 #define RFC6731_OPTIONS
326 #define RFC6939_OPTIONS
327 #define RFC6977_OPTIONS
328 #define RFC7083_OPTIONS
329