ISC DHCP  4.4.2b1
A reference DHCPv4 and DHCPv6 implementation
dhcpd.h
Go to the documentation of this file.
1 /* dhcpd.h
2 
3  Definitions for dhcpd... */
4 
5 /*
6  * Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
7  * Copyright (c) 1996-2003 by Internet Software Consortium
8  *
9  * This Source Code Form is subject to the terms of the Mozilla Public
10  * License, v. 2.0. If a copy of the MPL was not distributed with this
11  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
16  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  *
21  * Internet Systems Consortium, Inc.
22  * 950 Charter Street
23  * Redwood City, CA 94063
24  * <info@isc.org>
25  * https://www.isc.org/
26  *
27  */
28 
31 #include "config.h"
32 
33 #ifndef __CYGWIN32__
34 #include <sys/types.h>
35 #include <netinet/in.h>
36 #include <sys/socket.h>
37 #include <sys/un.h>
38 #include <arpa/inet.h>
39 #include <errno.h>
40 
41 #include <netdb.h>
42 #else
43 #define fd_set cygwin_fd_set
44 #include <sys/types.h>
45 #endif
46 #include <stddef.h>
47 #include <fcntl.h>
48 #include <stdio.h>
49 #include <unistd.h>
50 #include <string.h>
51 #include <stdlib.h>
52 #include <sys/stat.h>
53 #include <sys/mman.h>
54 #include <ctype.h>
55 #include <time.h>
56 
57 #include <net/if.h>
58 #undef FDDI
59 #include <net/route.h>
60 #include <net/if_arp.h>
61 #if HAVE_NET_IF_DL_H
62 # include <net/if_dl.h>
63 #endif
64 
65 #include <setjmp.h>
66 
67 #include "cdefs.h"
68 #include "osdep.h"
69 
70 #include "arpa/nameser.h"
71 
72 #include "ns_name.h"
73 
74 struct hash_table;
75 typedef struct hash_table group_hash_t;
76 typedef struct hash_table universe_hash_t;
77 typedef struct hash_table option_name_hash_t;
78 typedef struct hash_table option_code_hash_t;
79 typedef struct hash_table dns_zone_hash_t;
80 typedef struct hash_table lease_ip_hash_t;
81 typedef struct hash_table lease_id_hash_t;
82 typedef struct hash_table host_hash_t;
83 typedef struct hash_table class_hash_t;
84 
85 typedef time_t TIME;
86 
87 #ifndef EOL
88 #define EOL '\n'
89 #endif
90 
91 #include <omapip/isclib.h>
92 #include <omapip/result.h>
93 
94 #include "dhcp.h"
95 #include "dhcp6.h"
96 #include "statement.h"
97 #include "tree.h"
98 #include "inet.h"
99 #include "dhctoken.h"
100 
101 #include <omapip/omapip_p.h>
102 
103 #if defined(LDAP_CONFIGURATION)
104 # include <ldap.h>
105 # include <sys/utsname.h> /* for uname() */
106 #endif
107 
108 #if !defined (BYTE_NAME_HASH_SIZE)
109 # define BYTE_NAME_HASH_SIZE 401 /* Default would be ridiculous. */
110 #endif
111 #if !defined (BYTE_CODE_HASH_SIZE)
112 # define BYTE_CODE_HASH_SIZE 254 /* Default would be ridiculous. */
113 #endif
114 
115 /* Although it is highly improbable that a 16-bit option space might
116  * actually use 2^16 actual defined options, it is the worst case
117  * scenario we must prepare for. Having 4 options per bucket in this
118  * case is pretty reasonable.
119  */
120 #if !defined (WORD_NAME_HASH_SIZE)
121 # define WORD_NAME_HASH_SIZE 20479
122 #endif
123 #if !defined (WORD_CODE_HASH_SIZE)
124 # define WORD_CODE_HASH_SIZE 16384
125 #endif
126 
127 /* Not only is it improbable that the 32-bit spaces might actually use 2^32
128  * defined options, it is infeasible. It would be best for this kind of
129  * space to be dynamically sized. Instead we size it at the word hash's
130  * level.
131  */
132 #if !defined (QUAD_NAME_HASH_SIZE)
133 # define QUAD_NAME_HASH_SIZE WORD_NAME_HASH_SIZE
134 #endif
135 #if !defined (QUAD_CODE_HASH_SIZE)
136 # define QUAD_CODE_HASH_SIZE WORD_CODE_HASH_SIZE
137 #endif
138 
139 #if !defined (DNS_HASH_SIZE)
140 # define DNS_HASH_SIZE 0 /* Default. */
141 #endif
142 
143 /* Default size to use for name/code hashes on user-defined option spaces. */
144 #if !defined (DEFAULT_SPACE_HASH_SIZE)
145 # define DEFAULT_SPACE_HASH_SIZE 11
146 #endif
147 
148 #if !defined (NWIP_HASH_SIZE)
149 # define NWIP_HASH_SIZE 17 /* A really small table. */
150 #endif
151 
152 #if !defined (FQDN_HASH_SIZE)
153 # define FQDN_HASH_SIZE 13 /* A ridiculously small table. */
154 #endif
155 
156 /* I really doubt a given installation is going to have more than a few
157  * hundred vendors involved.
158  */
159 #if !defined (VIVCO_HASH_SIZE)
160 # define VIVCO_HASH_SIZE 127
161 #endif
162 
163 #if !defined (VIVSO_HASH_SIZE)
164 # define VIVSO_HASH_SIZE VIVCO_HASH_SIZE
165 #endif
166 
167 #if !defined (VSIO_HASH_SIZE)
168 # define VSIO_HASH_SIZE VIVCO_HASH_SIZE
169 #endif
170 
171 #if !defined (VIV_ISC_HASH_SIZE)
172 # define VIV_ISC_HASH_SIZE 3 /* An incredulously small table. */
173 #endif
174 
175 #if !defined (UNIVERSE_HASH_SIZE)
176 # define UNIVERSE_HASH_SIZE 13 /* A really small table. */
177 #endif
178 
179 #if !defined (GROUP_HASH_SIZE)
180 # define GROUP_HASH_SIZE 0 /* Default. */
181 #endif
182 
183 /* At least one person has indicated they use ~20k host records.
184  */
185 #if !defined (HOST_HASH_SIZE)
186 # define HOST_HASH_SIZE 22501
187 #endif
188 
189 /* We have user reports of use of ISC DHCP numbering leases in the 200k's.
190  *
191  * We also have reports of folks using 10.0/8 as a dynamic range. The
192  * following is something of a compromise between the two. At the ~2-3
193  * hundred thousand leases, there's ~2-3 leases to search in each bucket.
194  */
195 #if !defined (LEASE_HASH_SIZE)
196 # define LEASE_HASH_SIZE 100003
197 #endif
198 
199 /* It is not known what the worst case subclass hash size is. We estimate
200  * high, I think.
201  */
202 #if !defined (SCLASS_HASH_SIZE)
203 # define SCLASS_HASH_SIZE 12007
204 #endif
205 
206 #if !defined (AGENT_HASH_SIZE)
207 # define AGENT_HASH_SIZE 11 /* A really small table. */
208 #endif
209 
210 /* The server hash size is used for both names and codes. There aren't
211  * many (roughly 50 at the moment), so we use a smaller table. If we
212  * use a 1:1 table size, then we get name collisions due to poor name
213  * hashing. So we use double the space we need, which drastically
214  * reduces collisions.
215  */
216 #if !defined (SERVER_HASH_SIZE)
217 # define SERVER_HASH_SIZE (2*(sizeof(server_options) / sizeof(struct option)))
218 #endif
219 
220 
221 /* How many options are likely to appear in a single packet? */
222 #if !defined (OPTION_HASH_SIZE)
223 # define OPTION_HASH_SIZE 17
224 # define OPTION_HASH_PTWO 32 /* Next power of two above option hash. */
225 # define OPTION_HASH_EXP 5 /* The exponent for that power of two. */
226 #endif
227 
228 #define compute_option_hash(x) \
229  (((x) & (OPTION_HASH_PTWO - 1)) + \
230  (((x) >> OPTION_HASH_EXP) & \
231  (OPTION_HASH_PTWO - 1))) % OPTION_HASH_SIZE;
232 
233 /* Lease queue information. We have two ways of storing leases.
234  * The original is a linear linked list which is slower but uses
235  * less memory while the other adds a binary array on top of that
236  * list to make insertions faster. We define several macros
237  * based on which is in use to allow the code to be cleaner by
238  * avoiding #ifdefs.
239  *
240  * POOL_DESTROYP is used for cleanup
241  */
242 
243 #if !defined (BINARY_LEASES)
244 #define LEASE_STRUCT struct lease *
245 #define LEASE_STRUCT_PTR struct lease **
246 #define LEASE_GET_FIRST(LQ) LQ
247 #define LEASE_GET_FIRSTP(LQ) *(LQ)
248 #define LEASE_GET_NEXT(LQ, LEASE) LEASE->next
249 #define LEASE_GET_NEXTP(LQ, LEASE) LEASE->next
250 #define LEASE_INSERTP(LQ, LEASE) lease_insert(LQ, LEASE)
251 #define LEASE_REMOVEP(LQ, LEASE) lease_remove(LQ, LEASE)
252 #define LEASE_NOT_EMPTY(LQ) LQ
253 #define LEASE_NOT_EMPTYP(LQ) *LQ
254 #define POOL_DESTROYP(LQ) lease_remove_all(LQ)
255 #else
256 #define LEASE_STRUCT struct leasechain
257 #define LEASE_STRUCT_PTR struct leasechain *
258 #define LEASE_GET_FIRST(LQ) lc_get_first_lease(&LQ)
259 #define LEASE_GET_FIRSTP(LQ) lc_get_first_lease(LQ)
260 #define LEASE_GET_NEXT(LQ, LEASE) lc_get_next(&LQ, LEASE)
261 #define LEASE_GET_NEXTP(LQ, LEASE) lc_get_next(LQ, LEASE)
262 #define LEASE_INSERTP(LQ, LEASE) lc_add_sorted_lease(LQ, LEASE)
263 #define LEASE_REMOVEP(LQ, LEASE) lc_unlink_lease(LQ, LEASE)
264 #define LEASE_NOT_EMPTY(LQ) lc_not_empty(&LQ)
265 #define LEASE_NOT_EMPTYP(LQ) lc_not_empty(LQ)
266 #define POOL_DESTROYP(LQ) lc_delete_all(LQ)
267 #endif
268 
275 };
276 
277 /* Client FQDN option, failover FQDN option, etc. */
278 typedef struct {
279  u_int8_t codes [2];
280  unsigned length;
281  u_int8_t *data;
282 } ddns_fqdn_t;
283 
284 #include "failover.h"
285 
286 /* A parsing context. */
287 
288 struct parse {
289  int lexline;
290  int lexchar;
291  char *token_line;
292  char *prev_line;
293  char *cur_line;
294  const char *tlname;
296 
297  /*
298  * In order to give nice output when we have a parsing error
299  * in our file, we keep track of where we are in the line so
300  * that we can show the user.
301  *
302  * We need to keep track of two lines, because we can look
303  * ahead, via the "peek" function, to the next line sometimes.
304  *
305  * The "line1" and "line2" variables act as buffers for this
306  * information. The "lpos" variable tells us where we are in the
307  * line.
308  *
309  * When we "put back" a character from the parsing context, we
310  * do not want to have the character appear twice in the error
311  * output. So, we set a flag, the "ugflag", which the
312  * get_char() function uses to check for this condition.
313  */
314  char line1 [81];
315  char line2 [81];
316  int lpos;
317  int line;
318  int tlpos;
319  int tline;
320  enum dhcp_token token;
321  int ugflag;
322  char *tval;
323  int tlen;
324  char tokbuf [1500];
325 
327  int file;
328  char *inbuf;
329  size_t bufix, buflen;
330  size_t bufsiz;
331 
333 
334 #if defined(LDAP_CONFIGURATION)
335  /*
336  * LDAP configuration uses a call-back to iteratively read config
337  * off of the LDAP repository.
338  * XXX: The token stream can not be rewound reliably, so this must
339  * be addressed for DHCPv6 support.
340  */
341  int (*read_function)(struct parse *);
342 #endif
343 };
344 
345 /* Variable-length array of data. */
346 
347 struct string_list {
348  struct string_list *next;
349  char string [1];
350 };
351 
352 /* A name server, from /etc/resolv.conf. */
353 struct name_server {
354  struct name_server *next;
355  struct sockaddr_in addr;
357 };
358 
359 /* A domain search list element. */
362  char *domain;
364 };
365 
366 /* Option tag structures are used to build chains of option tags, for
367  when we're sure we're not going to have enough of them to justify
368  maintaining an array. */
369 
370 struct option_tag {
371  struct option_tag *next;
372  u_int8_t data [1];
373 };
374 
375 /* An agent option structure. We need a special structure for the
376  Relay Agent Information option because if more than one appears in
377  a message, we have to keep them separate. */
378 
381  int length;
382  struct option_tag *first;
383 };
384 
385 struct option_cache {
386  int refcnt;
389  struct option *option;
390  struct data_string data;
391 
392  #define OPTION_HAD_NULLS 0x00000001
393  u_int32_t flags;
394 };
395 
396 struct option_state {
397  int refcnt;
401  void *universes [1];
402 };
403 
404 /* A dhcp packet and the pointers to its option values. */
405 struct packet {
406  struct dhcp_packet *raw;
407  int refcnt;
408  unsigned packet_length;
410 
411  unsigned char dhcpv6_msg_type; /* DHCPv6 message type */
412 
413  /* DHCPv6 transaction ID */
414  unsigned char dhcpv6_transaction_id[3];
415 
416  /* DHCPv6 relay information */
417  unsigned char dhcpv6_hop_count;
418  struct in6_addr dhcpv6_link_address;
419  struct in6_addr dhcpv6_peer_address;
420 
421  /* DHCPv6 packet containing this one, or NULL if none */
423 
424  /* DHCPv4-over-DHCPv6 flags */
425  unsigned char dhcp4o6_flags[3];
426 
427  /* DHCPv4-over-DHCPv6 response, or NULL */
429 
432  struct iaddr client_addr;
433  struct interface_info *interface; /* Interface on which packet
434  was received. */
435  struct hardware *haddr; /* Physical link address
436  of local sender (maybe gateway). */
437 
438  /* Information for relay agent options (see
439  draft-ietf-dhc-agent-options-xx.txt). */
440  u_int8_t *circuit_id; /* Circuit ID of client connection. */
442  u_int8_t *remote_id; /* Remote ID of client. */
444 
445  int got_requested_address; /* True if client sent the
446  dhcp-requested-address option. */
447 
450 
451 #if !defined (PACKET_MAX_CLASSES)
452 # define PACKET_MAX_CLASSES 5
453 #endif
456 
457  int known;
459 
460  /* If we stash agent options onto the packet option state, to pretend
461  * options we got in a previous exchange were still there, we need
462  * to signal this in a reliable way.
463  */
465 
466  /*
467  * ISC_TRUE if packet received unicast (as opposed to multicast).
468  * Only used in DHCPv6.
469  */
471 
472  /* Propagates server value SV_ECHO_CLIENT_ID so it is available
473  * in cons_options() */
475 
476  /* Relay port check */
478 };
479 
480 /*
481  * A network interface's MAC address.
482  * 20 bytes for the hardware address
483  * and 1 byte for the type tag
484  */
485 
486 #define HARDWARE_ADDR_LEN 20
487 
488 /* ioctl limits hardware addresses to 8 bytes */
489 #define HARDWARE_ADDR_LEN_IOCTL 8
490 
491 struct hardware {
492  u_int8_t hlen;
493  u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
494 };
495 
496 #if defined(LDAP_CONFIGURATION)
497 # define LDAP_BUFFER_SIZE 8192
498 # define LDAP_METHOD_STATIC 0
499 # define LDAP_METHOD_DYNAMIC 1
500 #if defined (LDAP_USE_SSL)
501 # define LDAP_SSL_OFF 0
502 # define LDAP_SSL_ON 1
503 # define LDAP_SSL_TLS 2
504 # define LDAP_SSL_LDAPS 3
505 #endif
506 
507 /* This is a tree of the current configuration we are building from LDAP */
508 struct ldap_config_stack {
509  LDAPMessage * res; /* Pointer returned from ldap_search */
510  LDAPMessage * ldent; /* Current item in LDAP that we're processing.
511  in res */
512  int close_brace; /* Put a closing } after we're through with
513  this item */
514  int processed; /* We set this flag if this base item has been
515  processed. After this base item is processed,
516  we can start processing the children */
517  struct ldap_config_stack *children;
518  struct ldap_config_stack *next;
519 };
520 #endif
521 
522 typedef enum {
530 
531 typedef struct {
535 
536 /* Lease states: */
537 #define FTS_FREE 1
538 #define FTS_ACTIVE 2
539 #define FTS_EXPIRED 3
540 #define FTS_RELEASED 4
541 #define FTS_ABANDONED 5
542 #define FTS_RESET 6
543 #define FTS_BACKUP 7
544 typedef u_int8_t binding_state_t;
545 
546 /* FTS_LAST is the highest value that is valid for a lease binding state. */
547 #define FTS_LAST FTS_BACKUP
548 
549 /*
550  * A block for the on statements so we can share the structure
551  * between v4 and v6
552  */
553 struct on_star {
557 };
558 
559 /* A dhcp lease declaration structure. */
560 struct lease {
562  struct lease *next;
563 #if defined (BINARY_LEASES)
564  struct lease *prev;
565  struct leasechain *lc;
566 #endif
567  struct lease *n_uid, *n_hw;
568 
569  struct iaddr ip_addr;
571 #if defined (BINARY_LEASES)
572  long int sort_tiebreaker;
573 #endif
576  struct host_decl *host;
577  struct subnet *subnet;
578  struct pool *pool;
581 
582  /* insert the structure directly */
583  struct on_star on_star;
584 
585  unsigned char *uid;
586  unsigned short uid_len;
587  unsigned short uid_max;
588  unsigned char uid_buf [7];
589  struct hardware hardware_addr;
590 
591  u_int8_t flags;
592 # define STATIC_LEASE 1
593 # define BOOTP_LEASE 2
594 # define RESERVED_LEASE 4
595 # define MS_NULL_TERMINATION 8
596 # define ON_UPDATE_QUEUE 16
597 # define ON_ACK_QUEUE 32
598 # define ON_QUEUE (ON_UPDATE_QUEUE | ON_ACK_QUEUE)
599 # define UNICAST_BROADCAST_HACK 64
600 # define ON_DEFERRED_QUEUE 128
601 
602 /* Persistent flags are to be preserved on a given lease structure. */
603 # define PERSISTENT_FLAGS (ON_ACK_QUEUE | ON_UPDATE_QUEUE)
604 /* Ephemeral flags are to be preserved on a given lease (copied etc). */
605 # define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
606  UNICAST_BROADCAST_HACK | \
607  RESERVED_LEASE | \
608  BOOTP_LEASE)
609 
610  /*
611  * The lease's binding state is its current state. The next binding
612  * state is the next state this lease will move into by expiration,
613  * or timers in general. The desired binding state is used on lease
614  * updates; the caller is attempting to move the lease to the desired
615  * binding state (and this may either succeed or fail, so the binding
616  * state must be preserved).
617  *
618  * The 'rewind' binding state is used in failover processing. It
619  * is used for an optimization when out of communications; it allows
620  * the server to "rewind" a lease to the previous state acknowledged
621  * by the peer, and progress forward from that point.
622  */
627 
629 
630  /*
631  * 'tsfp' is more of an 'effective' tsfp. It may be calculated from
632  * stos+mclt for example if it's an expired lease and the server is
633  * in partner-down state. 'atsfp' is zeroed whenever a lease is
634  * updated - and only set when the peer acknowledges it. This
635  * ensures every state change is transmitted.
636  */
637  TIME tstp; /* Time sent to partner. */
638  TIME tsfp; /* Time sent from partner. */
639  TIME atsfp; /* Actual time sent from partner. */
640  TIME cltt; /* Client last transaction time. */
641  u_int32_t last_xid; /* XID we sent in this lease's BNDUPD */
643 
644  /*
645  * A pointer to the state of the ddns update for this lease.
646  * It should be set while the update is in progress and cleared
647  * when the update finishes. It can be used to cancel the
648  * update if we want to do a different update.
649  */
651 
652  /* Set when a lease has been disqualified for cache-threshold reuse */
653  unsigned short cannot_reuse;
654 };
655 
656 struct lease_state {
657  struct lease_state *next;
658 
660 
661  struct packet *packet; /* The incoming packet. */
662 
664 
668  unsigned char expiry[4], renewal[4], rebind[4];
669  struct data_string filename, server_name;
672  struct shared_network *shared_network; /* Shared network of interface
673  on which request arrived. */
674 
675  u_int32_t xid;
676  u_int16_t secs;
677  u_int16_t bootp_flags;
678  struct in_addr ciaddr;
679  struct in_addr siaddr;
680  struct in_addr giaddr;
681  u_int8_t hops;
682  u_int8_t offer;
683  struct iaddr from;
684 };
685 
686 #define ROOT_GROUP 0
687 #define HOST_DECL 1
688 #define SHARED_NET_DECL 2
689 #define SUBNET_DECL 3
690 #define CLASS_DECL 4
691 #define GROUP_DECL 5
692 #define POOL_DECL 6
693 
694 /* Possible modes in which discover_interfaces can run. */
695 
696 #define DISCOVER_RUNNING 0
697 #define DISCOVER_SERVER 1
698 #define DISCOVER_UNCONFIGURED 2
699 #define DISCOVER_RELAY 3
700 #define DISCOVER_SERVER46 4
701 #define DISCOVER_REQUESTED 5
702 
703 /* DDNS_UPDATE_STYLE enumerations. */
704 #define DDNS_UPDATE_STYLE_NONE 0
705 #define DDNS_UPDATE_STYLE_AD_HOC 1
706 #define DDNS_UPDATE_STYLE_INTERIM 2
707 #define DDNS_UPDATE_STYLE_STANDARD 3
708 
709 /* Server option names. */
710 
711 #define SV_DEFAULT_LEASE_TIME 1
712 #define SV_MAX_LEASE_TIME 2
713 #define SV_MIN_LEASE_TIME 3
714 #define SV_BOOTP_LEASE_CUTOFF 4
715 #define SV_BOOTP_LEASE_LENGTH 5
716 #define SV_BOOT_UNKNOWN_CLIENTS 6
717 #define SV_DYNAMIC_BOOTP 7
718 #define SV_ALLOW_BOOTP 8
719 #define SV_ALLOW_BOOTING 9
720 #define SV_ONE_LEASE_PER_CLIENT 10
721 #define SV_GET_LEASE_HOSTNAMES 11
722 #define SV_USE_HOST_DECL_NAMES 12
723 #define SV_USE_LEASE_ADDR_FOR_DEFAULT_ROUTE 13
724 #define SV_MIN_SECS 14
725 #define SV_FILENAME 15
726 #define SV_SERVER_NAME 16
727 #define SV_NEXT_SERVER 17
728 #define SV_AUTHORITATIVE 18
729 #define SV_VENDOR_OPTION_SPACE 19
730 #define SV_ALWAYS_REPLY_RFC1048 20
731 #define SV_SITE_OPTION_SPACE 21
732 #define SV_ALWAYS_BROADCAST 22
733 #define SV_DDNS_DOMAIN_NAME 23
734 #define SV_DDNS_HOST_NAME 24
735 #define SV_DDNS_REV_DOMAIN_NAME 25
736 #define SV_LEASE_FILE_NAME 26
737 #define SV_PID_FILE_NAME 27
738 #define SV_DUPLICATES 28
739 #define SV_DECLINES 29
740 #define SV_DDNS_UPDATES 30
741 #define SV_OMAPI_PORT 31
742 #define SV_LOCAL_PORT 32
743 #define SV_LIMITED_BROADCAST_ADDRESS 33
744 #define SV_REMOTE_PORT 34
745 #define SV_LOCAL_ADDRESS 35
746 #define SV_OMAPI_KEY 36
747 #define SV_STASH_AGENT_OPTIONS 37
748 #define SV_DDNS_TTL 38
749 #define SV_DDNS_UPDATE_STYLE 39
750 #define SV_CLIENT_UPDATES 40
751 #define SV_UPDATE_OPTIMIZATION 41
752 #define SV_PING_CHECKS 42
753 #define SV_UPDATE_STATIC_LEASES 43
754 #define SV_LOG_FACILITY 44
755 #define SV_DO_FORWARD_UPDATES 45
756 #define SV_PING_TIMEOUT 46
757 #define SV_RESERVE_INFINITE 47
758 #define SV_DDNS_CONFLICT_DETECT 48
759 #define SV_LEASEQUERY 49
760 #define SV_ADAPTIVE_LEASE_TIME_THRESHOLD 50
761 #define SV_DO_REVERSE_UPDATES 51
762 #define SV_FQDN_REPLY 52
763 #define SV_PREFER_LIFETIME 53
764 #define SV_DHCPV6_LEASE_FILE_NAME 54
765 #define SV_DHCPV6_PID_FILE_NAME 55
766 #define SV_LIMIT_ADDRS_PER_IA 56
767 #define SV_LIMIT_PREFS_PER_IA 57
768 #define SV_DELAYED_ACK 58
769 #define SV_MAX_ACK_DELAY 59
770 #if defined(LDAP_CONFIGURATION)
771 # define SV_LDAP_SERVER 60
772 # define SV_LDAP_PORT 61
773 # define SV_LDAP_USERNAME 62
774 # define SV_LDAP_PASSWORD 63
775 # define SV_LDAP_BASE_DN 64
776 # define SV_LDAP_METHOD 65
777 # define SV_LDAP_DEBUG_FILE 66
778 # define SV_LDAP_DHCP_SERVER_CN 67
779 # define SV_LDAP_REFERRALS 68
780 #if defined (LDAP_USE_SSL)
781 # define SV_LDAP_SSL 69
782 # define SV_LDAP_TLS_REQCERT 70
783 # define SV_LDAP_TLS_CA_FILE 71
784 # define SV_LDAP_TLS_CA_DIR 72
785 # define SV_LDAP_TLS_CERT 73
786 # define SV_LDAP_TLS_KEY 74
787 # define SV_LDAP_TLS_CRLCHECK 75
788 # define SV_LDAP_TLS_CIPHERS 76
789 # define SV_LDAP_TLS_RANDFILE 77
790 #endif
791 # define SV_LDAP_INIT_RETRY 178
792 #if defined (LDAP_USE_GSSAPI)
793 # define SV_LDAP_GSSAPI_KEYTAB 179
794 # define SV_LDAP_GSSAPI_PRINCIPAL 180
795 #endif
796 #endif
797 #define SV_CACHE_THRESHOLD 78
798 #define SV_DONT_USE_FSYNC 79
799 #define SV_DDNS_LOCAL_ADDRESS4 80
800 #define SV_DDNS_LOCAL_ADDRESS6 81
801 #define SV_IGNORE_CLIENT_UIDS 82
802 #define SV_LOG_THRESHOLD_LOW 83
803 #define SV_LOG_THRESHOLD_HIGH 84
804 #define SV_ECHO_CLIENT_ID 85
805 #define SV_SERVER_ID_CHECK 86
806 #define SV_PREFIX_LEN_MODE 87
807 #define SV_DHCPV6_SET_TEE_TIMES 88
808 #define SV_ABANDON_LEASE_TIME 89
809 #ifdef EUI_64
810 #define SV_USE_EUI_64 90
811 #define SV_PERSIST_EUI_64_LEASES 91
812 #endif
813 #if defined (FAILOVER_PROTOCOL)
814 #define SV_CHECK_SECS_BYTE_ORDER 92
815 #endif
816 #define SV_DDNS_DUAL_STACK_MIXED_MODE 93
817 #define SV_DDNS_GUARD_ID_MUST_MATCH 94
818 #define SV_DDNS_OTHER_GUARD_IS_DYNAMIC 95
819 #define SV_RELEASE_ON_ROAM 96
820 #define SV_LOCAL_ADDRESS6 97
821 #define SV_BIND_LOCAL_ADDRESS6 98
822 #define SV_PING_CLTT_SECS 99
823 #define SV_PING_TIMEOUT_MS 100
824 
825 #if !defined (DEFAULT_PING_TIMEOUT)
826 # define DEFAULT_PING_TIMEOUT 1
827 #endif
828 
829 #if !defined (DEFAULT_PING_TIMEOUT_MS)
830 # define DEFAULT_PING_TIMEOUT_MS 0
831 #endif
832 
833 #if !defined (DEFAULT_PING_CLTT_SECS)
834 # define DEFAULT_PING_CLTT_SECS 60 /* in seconds */
835 #endif
836 
837 #if !defined (DEFAULT_DELAYED_ACK)
838 # define DEFAULT_DELAYED_ACK 0 /* default 0 disables delayed acking */
839 #endif
840 
841 #if !defined (DEFAULT_ACK_DELAY_SECS)
842 # define DEFAULT_ACK_DELAY_SECS 0
843 #endif
844 
845 #if !defined (DEFAULT_ACK_DELAY_USECS)
846 # define DEFAULT_ACK_DELAY_USECS 250000 /* 1/4 of a second */
847 #endif
848 
849 #if !defined (DEFAULT_MIN_ACK_DELAY_USECS)
850 # define DEFAULT_MIN_ACK_DELAY_USECS 10000 /* 1/100 second */
851 #endif
852 
853 #if !defined (DEFAULT_CACHE_THRESHOLD)
854 # define DEFAULT_CACHE_THRESHOLD 25
855 #endif
856 
857 #if !defined (DEFAULT_DEFAULT_LEASE_TIME)
858 # define DEFAULT_DEFAULT_LEASE_TIME 43200
859 #endif
860 
861 #if !defined (DEFAULT_MIN_LEASE_TIME)
862 # define DEFAULT_MIN_LEASE_TIME 300
863 #endif
864 
865 #if !defined (DEFAULT_MAX_LEASE_TIME)
866 # define DEFAULT_MAX_LEASE_TIME 86400
867 #endif
868 
869 #if !defined (DEFAULT_DDNS_TTL)
870 # define DEFAULT_DDNS_TTL 3600
871 #endif
872 #if !defined (MAX_DEFAULT_DDNS_TTL)
873 # define MAX_DEFAULT_DDNS_TTL 3600
874 #endif
875 
876 #if !defined (MIN_LEASE_WRITE)
877 # define MIN_LEASE_WRITE 15
878 #endif
879 
880 #if !defined (DEFAULT_ABANDON_LEASE_TIME)
881 # define DEFAULT_ABANDON_LEASE_TIME 86400
882 #endif
883 
884 #define PLM_IGNORE 0
885 #define PLM_PREFER 1
886 #define PLM_EXACT 2
887 #define PLM_MINIMUM 3
888 #define PLM_MAXIMUM 4
889 
890 /* Client option names */
891 
892 #define CL_TIMEOUT 1
893 #define CL_SELECT_INTERVAL 2
894 #define CL_REBOOT_TIMEOUT 3
895 #define CL_RETRY_INTERVAL 4
896 #define CL_BACKOFF_CUTOFF 5
897 #define CL_INITIAL_INTERVAL 6
898 #define CL_BOOTP_POLICY 7
899 #define CL_SCRIPT_NAME 8
900 #define CL_REQUESTED_OPTIONS 9
901 #define CL_REQUESTED_LEASE_TIME 10
902 #define CL_SEND_OPTIONS 11
903 #define CL_MEDIA 12
904 #define CL_REJECT_LIST 13
905 
906 #ifndef CL_DEFAULT_TIMEOUT
907 # define CL_DEFAULT_TIMEOUT 60
908 #endif
909 
910 #ifndef CL_DEFAULT_SELECT_INTERVAL
911 # define CL_DEFAULT_SELECT_INTERVAL 0
912 #endif
913 
914 #ifndef CL_DEFAULT_REBOOT_TIMEOUT
915 # define CL_DEFAULT_REBOOT_TIMEOUT 10
916 #endif
917 
918 #ifndef CL_DEFAULT_RETRY_INTERVAL
919 # define CL_DEFAULT_RETRY_INTERVAL 300
920 #endif
921 
922 #ifndef CL_DEFAULT_BACKOFF_CUTOFF
923 # define CL_DEFAULT_BACKOFF_CUTOFF 120
924 #endif
925 
926 #ifndef CL_DEFAULT_INITIAL_INTERVAL
927 # define CL_DEFAULT_INITIAL_INTERVAL 10
928 #endif
929 
930 #ifndef CL_DEFAULT_BOOTP_POLICY
931 # define CL_DEFAULT_BOOTP_POLICY P_ACCEPT
932 #endif
933 
934 #ifndef CL_DEFAULT_REQUESTED_OPTIONS
935 # define CL_DEFAULT_REQUESTED_OPTIONS \
936  { DHO_SUBNET_MASK, \
937  DHO_BROADCAST_ADDRESS, \
938  DHO_TIME_OFFSET, \
939  DHO_ROUTERS, \
940  DHO_DOMAIN_NAME, \
941  DHO_DOMAIN_NAME_SERVERS, \
942  DHO_HOST_NAME }
943 #endif
944 
945 struct group_object {
947 
949  struct group *group;
950  char *name;
951  int flags;
952 #define GROUP_OBJECT_DELETED 1
953 #define GROUP_OBJECT_DYNAMIC 2
954 #define GROUP_OBJECT_STATIC 4
955 };
956 
957 /* Group of declarations that share common parameters. */
958 struct group {
959  struct group *next;
960 
961  int refcnt;
963  struct subnet *subnet;
967 };
968 
969 /* A dhcp host declaration structure. */
970 struct host_decl {
974  char *name;
975  struct hardware interface;
978  struct data_string host_id;
979  /* XXXSK: fixed_addr should be an array of iaddr values,
980  not an option_cache, but it's referenced in a lot of
981  places, so we'll leave it for now. */
984  struct group *group;
986  struct data_string auth_key_id;
987  int flags;
988 #define HOST_DECL_DELETED 1
989 #define HOST_DECL_DYNAMIC 2
990 #define HOST_DECL_STATIC 4
991  /* For v6 the host-identifer option can specify which relay
992  to use when trying to look up an option. We store the
993  value here. */
994  int relays;
995 };
996 
997 struct permit {
998  struct permit *next;
999  enum {
1007  permit_after
1008  } type;
1009  struct class *class;
1010  TIME after; /* date after which this clause applies */
1011 };
1012 
1013 #if defined (BINARY_LEASES)
1014 struct leasechain {
1015  struct lease **list; /* lease list */
1016  size_t total; /* max number of elements in this list,
1017  * including free pointers at the end if any */
1018  size_t nelem; /* the number of elements, also the next index to use */
1019  size_t growth; /* the growth factor to use when increase an array
1020  * this is set after parsing the pools and before
1021  * creatin an array. */
1022 };
1023 #endif
1024 
1025 struct pool {
1027  struct pool *next;
1028  struct group *group;
1042  int index;
1043  TIME valid_from; /* deny pool use before this date */
1044  TIME valid_until; /* deny pool use after this date */
1045 
1046 #if defined (FAILOVER_PROTOCOL)
1047  dhcp_failover_state_t *failover_peer;
1048 #endif
1049  int logged; /* already logged a message */
1050  int low_threshold; /* low threshold to restart logging */
1051 };
1052 
1056  char *name;
1057 
1058 #define SHARED_IMPLICIT 1 /* This network was synthesized. */
1059  int flags;
1060 
1061  struct subnet *subnets;
1063  struct pool *pools;
1065  struct group *group;
1066 #if defined (FAILOVER_PROTOCOL)
1067  dhcp_failover_state_t *failover_peer;
1068 #endif
1069 };
1070 
1071 struct subnet {
1077  struct iaddr interface_address;
1078  struct iaddr net;
1079  struct iaddr netmask;
1080  int prefix_len; /* XXX: currently for IPv6 only */
1081  struct group *group;
1082 };
1083 
1084 struct collection {
1085  struct collection *next;
1086 
1087  const char *name;
1088  struct class *classes;
1089 };
1090 
1091 /* Used as an argument to parse_clasS_decl() */
1092 #define CLASS_TYPE_VENDOR 0
1093 #define CLASS_TYPE_USER 1
1094 #define CLASS_TYPE_CLASS 2
1095 #define CLASS_TYPE_SUBCLASS 3
1096 
1097 /* XXX classes must be reference-counted. */
1098 struct class {
1100  struct class *nic; /* Next in collection. */
1101  struct class *superclass; /* Set for spawned classes only. */
1102  char *name; /* Not set for spawned classes. */
1103 
1104  /* A class may be configured to permit a limited number of leases. */
1108 
1109  /* If nonzero, class has not been saved since it was last
1110  modified. */
1111  int dirty;
1112 
1113  /* Hash table containing subclasses. */
1115  struct data_string hash_string;
1116 
1117  /* Expression used to match class. */
1118  struct expression *expr;
1119 
1120  /* Expression used to compute subclass identifiers for spawning
1121  and to do subclass matching. */
1124 
1125  struct group *group;
1126 
1127  /* Statements to execute if class matches. */
1129 
1130 #define CLASS_DECL_DELETED 1
1131 #define CLASS_DECL_DYNAMIC 2
1132 #define CLASS_DECL_STATIC 4
1133 #define CLASS_DECL_SUBCLASS 8
1134 
1135  int flags;
1136 };
1137 
1138 /* DHCP client lease structure... */
1140  struct client_lease *next; /* Next lease in list. */
1141  TIME expiry, renewal, rebind; /* Lease timeouts. */
1142  struct iaddr address; /* Address being leased. */
1143  char *server_name; /* Name of boot server. */
1144  char *filename; /* Name of file we're supposed to boot. */
1145  struct string_list *medium; /* Network medium. */
1146  struct auth_key *key; /* Key used in basic DHCP authentication. */
1147 
1148  unsigned int is_static : 1; /* If set, lease is from config file. */
1149  unsigned int is_bootp: 1; /* If set, lease was acquired with BOOTP. */
1150 
1151  struct option_state *options; /* Options supplied with lease. */
1152  struct iaddr next_srv_addr; /* Address of the next server to use */
1153 };
1154 
1155 /* DHCPv6 lease structures */
1156 struct dhc6_addr {
1157  struct dhc6_addr *next;
1158  struct iaddr address;
1159  u_int8_t plen;
1160 
1161  /* Address state flags. */
1162  #define DHC6_ADDR_DEPREFFED 0x01
1163  #define DHC6_ADDR_EXPIRED 0x02
1164  #define DHC6_ADDR_DECLINED 0x04
1165  u_int8_t flags;
1166 
1168  u_int32_t preferred_life;
1169  u_int32_t max_life;
1170 
1172 };
1173 
1174 struct dhc6_ia {
1175  struct dhc6_ia *next;
1176  unsigned char iaid[4];
1177  u_int16_t ia_type;
1178 
1180  u_int32_t renew;
1181  u_int32_t rebind;
1182  struct dhc6_addr *addrs;
1183 
1185 };
1186 
1187 struct dhc6_lease {
1188  struct dhc6_lease *next;
1189  struct data_string server_id;
1190 
1192  int score;
1193  u_int8_t pref;
1194 
1195  unsigned char dhcpv6_transaction_id[3];
1197 
1199 };
1200 
1201 /* Possible states in which the client can be. */
1204  S_INIT = 2,
1207  S_BOUND = 5,
1211  S_STOPPED = 9
1212 };
1213 
1214 /* Possible pending client operations. */
1216  P_NONE = 0,
1218  P_RELEASE = 2
1219 };
1220 
1221 /* Authentication and BOOTP policy possibilities (not all values work
1222  for each). */
1224 
1225 /* Configuration information from the config file... */
1227  /*
1228  * When a message has been received, run these statements
1229  * over it.
1230  */
1232 
1233  /*
1234  * When a message is sent, run these statements.
1235  */
1237 
1238  struct option **required_options; /* Options that MUST be present. */
1239  struct option **requested_options; /* Options to request (ORO/PRL). */
1240 
1241  TIME timeout; /* Start to panic if we don't get a
1242  lease in this time period when
1243  SELECTING. */
1244  TIME initial_delay; /* Set initial delay before first
1245  transmission. */
1246  TIME initial_interval; /* All exponential backoff intervals
1247  start here. */
1248  TIME retry_interval; /* If the protocol failed to produce
1249  an address before the timeout,
1250  try the protocol again after this
1251  many seconds. */
1252  TIME select_interval; /* Wait this many seconds from the
1253  first DHCPDISCOVER before
1254  picking an offered lease. */
1255  TIME reboot_timeout; /* When in INIT-REBOOT, wait this
1256  long before giving up and going
1257  to INIT. */
1258  TIME backoff_cutoff; /* When doing exponential backoff,
1259  never back off to an interval
1260  longer than this amount. */
1261  u_int32_t requested_lease; /* Requested lease time, if user
1262  doesn't configure one. */
1263  struct string_list *media; /* Possible network media values. */
1264  char *script_name; /* Name of config script. */
1265  char *vendor_space_name; /* Name of config script. */
1266  enum policy bootp_policy;
1267  /* Ignore, accept or prefer BOOTP
1268  responses. */
1269  enum policy auth_policy;
1270  /* Require authentication, prefer
1271  authentication, or don't try to
1272  authenticate. */
1273  struct string_list *medium; /* Current network medium. */
1274 
1275  struct iaddrmatchlist *reject_list; /* Servers to reject. */
1276 
1277  int omapi_port; /* port on which to accept OMAPI
1278  connections, or -1 for no
1279  listener. */
1280  int do_forward_update; /* If nonzero, and if we have the
1281  information we need, update the
1282  A record for the address we get. */
1283 
1284  int lease_id_format; /* format for IDs in lease file,
1285  TOKEN_OCTAL or TOKEN_HEX */
1286 
1287  int bootp_broadcast_always; /* If nonzero, always set the BOOTP_BROADCAST
1288  flag in requests */
1289 };
1290 
1291 /* Per-interface state used in the dhcp client... */
1292 /* XXX: consider union {}'ing this for v4/v6. */
1296  char *name;
1297 
1298  /* Common values. */
1299  struct client_config *config; /* Client configuration. */
1300  struct string_list *env; /* Client script environment. */
1301  int envc; /* Number of entries in environment. */
1302  struct option_state *sent_options; /* Options we sent. */
1303  enum dhcp_state state; /* Current state for this interface. */
1304  TIME last_write; /* Last time this state was written. */
1305  enum dhcp_pending pending; /* Current pending operation. */
1306 
1307  /* DHCPv4 values. */
1308  struct client_lease *active; /* Currently active lease. */
1309  struct client_lease *new; /* New lease. */
1310  struct client_lease *offered_leases; /* Leases offered to us. */
1311  struct client_lease *leases; /* Leases we currently hold. */
1312  struct client_lease *alias; /* Alias lease. */
1313 
1314  struct iaddr destination; /* Where to send packet. */
1315  u_int32_t xid; /* Transaction ID. */
1316  u_int16_t secs; /* secs value from DHCPDISCOVER. */
1317  TIME first_sending; /* When was first copy sent? */
1318  TIME interval; /* What's the current resend interval? */
1319  struct string_list *medium; /* Last media type tried. */
1320  struct dhcp_packet packet; /* Outgoing DHCP packet. */
1321  unsigned packet_length; /* Actual length of generated packet. */
1322 
1323  struct iaddr requested_address; /* Address we would like to get. */
1324 
1325  /* DHCPv6 values. */
1326  unsigned char dhcpv6_transaction_id[3];
1327  u_int8_t refresh_type;
1328 
1334 
1335  struct timeval start_time;
1336  u_int16_t elapsed;
1337  int txcount;
1338 
1339  /* See RFC3315 section 14. */
1340  TIME RT; /* In hundredths of seconds. */
1341  TIME IRT; /* In hundredths of seconds. */
1342  TIME MRC; /* Count. */
1343  TIME MRT; /* In hundredths of seconds. */
1344  TIME MRD; /* In seconds, relative. */
1345  TIME next_MRD; /* In seconds, absolute. */
1346 
1347  /* Rather than a state, we use a function that shifts around
1348  * depending what stage of life the v6 state machine is in.
1349  * This is where incoming packets are dispatched to (sometimes
1350  * a no-op).
1351  */
1352  void (*v6_handler)(struct packet *, struct client_state *);
1353 
1354  /*
1355  * A pointer to the state of the ddns update for this lease.
1356  * It should be set while the update is in progress and cleared
1357  * when the update finishes. It can be used to cancel the
1358  * update if we want to do a different update.
1359  */
1361 };
1362 
1365  const char *prefix;
1366 };
1367 
1370  struct iaddr address;
1372 };
1373 
1374 /* Information about each network interface. */
1375 
1378  struct interface_info *next; /* Next interface in list... */
1380  /* Networks connected to this interface. */
1381  struct hardware hw_address; /* Its physical address. */
1382  u_int8_t bcast_addr[20]; /* Infiniband broadcast address */
1383  struct in_addr *addresses; /* Addresses associated with this
1384  * interface.
1385  */
1386  int address_count; /* Number of addresses stored. */
1387  int address_max; /* Size of addresses buffer. */
1388  struct in6_addr *v6addresses; /* IPv6 addresses associated with
1389  this interface. */
1390  int v6address_count; /* Number of IPv6 addresses associated
1391  with this interface. */
1392  int v6address_max; /* Maximum number of IPv6 addresses
1393  we can store in current buffer. */
1394 
1395  u_int8_t *circuit_id; /* Circuit ID associated with this
1396  interface. */
1397  unsigned circuit_id_len; /* Length of Circuit ID, if there
1398  is one. */
1399  u_int8_t *remote_id; /* Remote ID associated with this
1400  interface (if any). */
1401  unsigned remote_id_len; /* Length of Remote ID. */
1402 
1403  char name [IFNAMSIZ]; /* Its name... */
1404 
1405  int index; /* Its if_nametoindex(). */
1406  int rfdesc; /* Its read file descriptor. */
1407  int wfdesc; /* Its write file descriptor, if
1408  different. */
1409  unsigned char *rbuf; /* Read buffer, if required. */
1410  unsigned int rbuf_max; /* Size of read buffer. */
1411  size_t rbuf_offset; /* Current offset into buffer. */
1412  size_t rbuf_len; /* Length of data in buffer. */
1413 
1414  struct ifreq *ifp; /* Pointer to ifreq struct. */
1415  int configured; /* If set to 1, interface has at least
1416  * one valid IP address.
1417  */
1418  u_int32_t flags; /* Control flags... */
1419 #define INTERFACE_REQUESTED 1
1420 #define INTERFACE_AUTOMATIC 2
1421 #define INTERFACE_RUNNING 4
1422 #define INTERFACE_DOWNSTREAM 8
1423 #define INTERFACE_UPSTREAM 16
1424 #define INTERFACE_STREAMS (INTERFACE_DOWNSTREAM | INTERFACE_UPSTREAM)
1425 
1426  /* Only used by DHCP client code. */
1428 # if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE) || \
1429  defined(USE_DLPI_HWADDR)
1430  int dlpi_sap_length;
1431  struct hardware dlpi_broadcast_addr;
1432 # endif /* DLPI_SEND || DLPI_RECEIVE */
1433  struct hardware anycast_mac_addr;
1434 };
1435 
1438  char name [IFNAMSIZ];
1439  struct hardware address;
1440 };
1441 
1442 struct leasequeue {
1443  struct leasequeue *prev;
1444  struct leasequeue *next;
1445  struct lease *lease;
1446 };
1447 
1448 typedef void (*tvref_t)(void *, void *, const char *, int);
1449 typedef void (*tvunref_t)(void *, const char *, int);
1450 struct timeout {
1451  struct timeout *next;
1452  struct timeval when;
1453  void (*func) (void *);
1454  void *what;
1457  isc_timer_t *isc_timeout;
1458 };
1459 
1460 struct eventqueue {
1461  struct eventqueue *next;
1462  void (*handler)(void *);
1463 };
1464 
1465 struct protocol {
1466  struct protocol *next;
1467  int fd;
1468  void (*handler) (struct protocol *);
1469  void *local;
1470 };
1471 
1472 struct dns_query; /* forward */
1473 
1474 struct dns_wakeup {
1475  struct dns_wakeup *next; /* Next wakeup in chain. */
1476  void (*func) (struct dns_query *);
1477 };
1478 
1480  u_int16_t type; /* Type of query. */
1481  u_int16_t class; /* Class of query. */
1482  unsigned char data [1]; /* Query data. */
1483 };
1484 
1485 struct dns_answer {
1486  u_int16_t type; /* Type of answer. */
1487  u_int16_t class; /* Class of answer. */
1488  int count; /* Number of answers. */
1489  unsigned char *answers[1]; /* Pointers to answers. */
1490 };
1491 
1492 struct dns_query {
1493  struct dns_query *next; /* Next query in hash bucket. */
1494  u_int32_t hash; /* Hash bucket index. */
1495  TIME expiry; /* Query expiry time (zero if not yet
1496  answered. */
1497  u_int16_t id; /* Query ID (also hash table index) */
1498  caddr_t waiters; /* Pointer to list of things waiting
1499  on this query. */
1500 
1501  struct dns_question *question; /* Question, internal format. */
1502  struct dns_answer *answer; /* Answer, internal format. */
1503 
1504  unsigned char *query; /* Query formatted for DNS server. */
1505  unsigned len; /* Length of entire query. */
1506  int sent; /* The query has been sent. */
1507  struct dns_wakeup *wakeups; /* Wakeups to call if this query is
1508  answered. */
1509  struct name_server *next_server; /* Next server to try. */
1510  int backoff; /* Current backoff, in seconds. */
1511 };
1512 
1513 #define DNS_ZONE_ACTIVE 0
1514 #define DNS_ZONE_INACTIVE 1
1515 struct dns_zone {
1516  int refcnt;
1518  char *name;
1523  struct auth_key *key;
1524  u_int16_t flags;
1525 };
1526 
1527 struct icmp_state {
1529  int socket;
1530  void (*icmp_handler) (struct iaddr, u_int8_t *, int);
1531 };
1532 
1533 #include "ctrace.h"
1534 
1535 /* Bitmask of dhcp option codes. */
1536 typedef unsigned char option_mask [16];
1537 
1538 /* DHCP Option mask manipulation macros... */
1539 #define OPTION_ZERO(mask) (memset (mask, 0, 16))
1540 #define OPTION_SET(mask, bit) (mask [bit >> 8] |= (1 << (bit & 7)))
1541 #define OPTION_CLR(mask, bit) (mask [bit >> 8] &= ~(1 << (bit & 7)))
1542 #define OPTION_ISSET(mask, bit) (mask [bit >> 8] & (1 << (bit & 7)))
1543 #define OPTION_ISCLR(mask, bit) (!OPTION_ISSET (mask, bit))
1544 
1545 /* An option occupies its length plus two header bytes (code and
1546  length) for every 255 bytes that must be stored. */
1547 #define OPTION_SPACE(x) ((x) + 2 * ((x) / 255 + 1))
1548 
1549 /* Default path to dhcpd config file. */
1550 #ifdef DEBUG
1551 #undef _PATH_DHCPD_CONF
1552 #define _PATH_DHCPD_CONF "dhcpd.conf"
1553 #undef _PATH_DHCPD_DB
1554 #define _PATH_DHCPD_DB "dhcpd.leases"
1555 #undef _PATH_DHCPD6_DB
1556 #define _PATH_DHCPD6_DB "dhcpd6.leases"
1557 #undef _PATH_DHCPD_PID
1558 #define _PATH_DHCPD_PID "dhcpd.pid"
1559 #undef _PATH_DHCPD6_PID
1560 #define _PATH_DHCPD6_PID "dhcpd6.pid"
1561 #else /* !DEBUG */
1562 
1563 #ifndef _PATH_DHCPD_CONF
1564 #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
1565 #endif /* DEBUG */
1566 
1567 #ifndef _PATH_DHCPD_DB
1568 #define _PATH_DHCPD_DB LOCALSTATEDIR"/db/dhcpd.leases"
1569 #endif
1570 
1571 #ifndef _PATH_DHCPD6_DB
1572 #define _PATH_DHCPD6_DB LOCALSTATEDIR"/db/dhcpd6.leases"
1573 #endif
1574 
1575 #ifndef _PATH_DHCPD_PID
1576 #define _PATH_DHCPD_PID LOCALSTATEDIR"/run/dhcpd.pid"
1577 #endif
1578 
1579 #ifndef _PATH_DHCPD6_PID
1580 #define _PATH_DHCPD6_PID LOCALSTATEDIR"/run/dhcpd6.pid"
1581 #endif
1582 
1583 #endif /* DEBUG */
1584 
1585 #ifndef _PATH_DHCLIENT_CONF
1586 #define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
1587 #endif
1588 
1589 #ifndef _PATH_DHCLIENT_SCRIPT
1590 #define _PATH_DHCLIENT_SCRIPT "/usr/sbin/dhclient-script"
1591 #endif
1592 
1593 #ifndef _PATH_DHCLIENT_PID
1594 #define _PATH_DHCLIENT_PID LOCALSTATEDIR"/run/dhclient.pid"
1595 #endif
1596 
1597 #ifndef _PATH_DHCLIENT6_PID
1598 #define _PATH_DHCLIENT6_PID LOCALSTATEDIR"/run/dhclient6.pid"
1599 #endif
1600 
1601 #ifndef _PATH_DHCLIENT_DB
1602 #define _PATH_DHCLIENT_DB LOCALSTATEDIR"/db/dhclient.leases"
1603 #endif
1604 
1605 #ifndef _PATH_DHCLIENT6_DB
1606 #define _PATH_DHCLIENT6_DB LOCALSTATEDIR"/db/dhclient6.leases"
1607 #endif
1608 
1609 #ifndef _PATH_RESOLV_CONF
1610 #define _PATH_RESOLV_CONF "/etc/resolv.conf"
1611 #endif
1612 
1613 #ifndef _PATH_DHCRELAY_PID
1614 #define _PATH_DHCRELAY_PID LOCALSTATEDIR"/run/dhcrelay.pid"
1615 #endif
1616 
1617 #ifndef _PATH_DHCRELAY6_PID
1618 #define _PATH_DHCRELAY6_PID LOCALSTATEDIR"/run/dhcrelay6.pid"
1619 #endif
1620 
1621 #ifndef DHCPD_LOG_FACILITY
1622 #define DHCPD_LOG_FACILITY LOG_DAEMON
1623 #endif
1624 
1625 #define INFINITE_TIME 0xffffffff
1626 #define MAX_TIME 0x7fffffff
1627 #define MIN_TIME 0
1628 
1629 #ifdef USE_LOG_PID
1630 /* include the pid in the syslog messages */
1631 #define DHCP_LOG_OPTIONS LOG_NDELAY | LOG_PID
1632 #else
1633 #define DHCP_LOG_OPTIONS LOG_NDELAY
1634 #endif
1635  /* these are referenced */
1636 typedef struct hash_table ia_hash_t;
1637 typedef struct hash_table iasubopt_hash_t;
1638 
1639  /* IAADDR/IAPREFIX lease */
1640 
1641 struct iasubopt {
1642  int refcnt; /* reference count */
1643  struct in6_addr addr; /* IPv6 address/prefix */
1644  u_int8_t plen; /* iaprefix prefix length */
1645  binding_state_t state; /* state */
1646  struct binding_scope *scope; /* "set var = value;" */
1647  time_t hard_lifetime_end_time; /* time address expires */
1648  time_t soft_lifetime_end_time; /* time ephemeral expires */
1649  u_int32_t prefer; /* cached preferred lifetime */
1650  u_int32_t valid; /* cached valid lifetime */
1651  struct ia_xx *ia; /* IA for this lease */
1652  struct ipv6_pool *ipv6_pool; /* pool for this lease */
1653 /*
1654  * For now, just pick an arbitrary time to keep old hard leases
1655  * around (value in seconds).
1656  */
1657 #define EXPIRED_IPV6_CLEANUP_TIME (60*60)
1658 
1659  /* index into heaps, or -1 (internal use only) */
1662 
1663  /*
1664  * A pointer to the state of the ddns update for this lease.
1665  * It should be set while the update is in progress and cleared
1666  * when the update finishes. It can be used to cancel the
1667  * update if we want to do a different update.
1668  */
1670 
1671  /* space for the on * executable statements */
1672  struct on_star on_star;
1674 };
1675 
1676 struct ia_xx {
1677  int refcnt; /* reference count */
1678  struct data_string iaid_duid; /* from the client */
1679  u_int16_t ia_type; /* IA_XX */
1680  int num_iasubopt; /* number of IAADDR/PREFIX */
1681  int max_iasubopt; /* space available for IAADDR/PREFIX */
1682  time_t cltt; /* client last transaction time */
1683  struct iasubopt **iasubopt; /* pointers to the IAADDR/IAPREFIXs */
1684 };
1685 
1686 extern ia_hash_t *ia_na_active;
1687 extern ia_hash_t *ia_ta_active;
1688 extern ia_hash_t *ia_pd_active;
1689 
1710 struct ipv6_pool {
1711  int refcnt; /* reference count */
1712  u_int16_t pool_type; /* IA_xx */
1713  struct in6_addr start_addr; /* first IPv6 address */
1714  int bits; /* number of bits, CIDR style */
1715  int units; /* allocation unit in bits */
1716  iasubopt_hash_t *leases; /* non-free leases */
1717  isc_uint64_t num_active; /* count of active leases */
1718  isc_uint64_t num_abandoned; /* count of abandoned leases */
1719  isc_heap_t *active_timeouts; /* timeouts for active leases */
1720  int num_inactive; /* count of inactive leases */
1721  isc_heap_t *inactive_timeouts; /* timeouts for expired or
1722  released leases */
1723  struct shared_network *shared_network; /* shared_network for
1724  this pool */
1725  struct subnet *subnet; /* subnet for this pool */
1726  struct ipv6_pond *ipv6_pond; /* pond for this pool */
1727 };
1728 
1740 struct ipv6_pond {
1741  int refcnt;
1742  struct ipv6_pond *next;
1743  struct group *group;
1744  struct shared_network *shared_network; /* backpointer to the enclosing
1745  shared network */
1746  struct permit *permit_list; /* allow clients from this list */
1747  struct permit *prohibit_list; /* deny clients from this list */
1748  TIME valid_from; /* deny pool use before this date */
1749  TIME valid_until; /* deny pool use after this date */
1750 
1751  struct ipv6_pool **ipv6_pools; /* NULL-terminated array */
1752  int last_ipv6_pool; /* offset of last IPv6 pool
1753  used to issue a lease */
1754  isc_uint64_t num_total; /* Total number of elements in the pond */
1755  isc_uint64_t num_active; /* Number of elements in the pond in use */
1756  isc_uint64_t num_abandoned; /* count of abandoned leases */
1757  int logged; /* already logged a message */
1758  isc_uint64_t low_threshold; /* low threshold to restart logging */
1760 #ifdef EUI_64
1761  int use_eui_64; /* use EUI-64 address assignment when true */
1762 #endif
1763 };
1764 
1765 /*
1766  * Max addresses in a pond that can be supported by log threshold
1767  * Currently based on max value supported by isc_uint64_t.
1768 */
1769 #define POND_TRACK_MAX ISC_UINT64_MAX
1770 
1771 /* Flags for dhcp_ddns_cb_t */
1772 #define DDNS_UPDATE_ADDR 0x0001
1773 #define DDNS_UPDATE_PTR 0x0002
1774 #define DDNS_INCLUDE_RRSET 0x0004
1775 #define DDNS_CONFLICT_DETECTION 0x0008
1776 #define DDNS_CLIENT_DID_UPDATE 0x0010
1777 #define DDNS_EXECUTE_NEXT 0x0020
1778 #define DDNS_ABORT 0x0040
1779 #define DDNS_STATIC_LEASE 0x0080
1780 #define DDNS_ACTIVE_LEASE 0x0100
1781 #define DDNS_DUAL_STACK_MIXED_MODE 0x0200
1782 #define DDNS_GUARD_ID_MUST_MATCH 0x0400
1783 #define DDNS_OTHER_GUARD_IS_DYNAMIC 0x0800
1784 
1785 #define CONFLICT_BITS (DDNS_CONFLICT_DETECTION|\
1786  DDNS_DUAL_STACK_MIXED_MODE|\
1787  DDNS_GUARD_ID_MUST_MATCH|\
1788  DDNS_OTHER_GUARD_IS_DYNAMIC)
1789 
1790 /* States for dhcp_ddns_cb_t */
1791 #define DDNS_STATE_CLEANUP 0 /* startup or the previous step failed, cleanup */
1792 
1793 #define DDNS_STATE_ADD_FW_NXDOMAIN 1
1794 #define DDNS_STATE_ADD_FW_YXDHCID 2
1795 #define DDNS_STATE_ADD_PTR 3
1796 #define DDNS_STATE_DSMM_FW_ADD3 4
1797 
1798 #define DDNS_STATE_REM_FW_YXDHCID 17
1799 #define DDNS_STATE_REM_FW_NXRR 18
1800 #define DDNS_STATE_REM_PTR 19
1801 #define DDNS_STATE_REM_FW_DSMM_OTHER 20
1802 
1803 /*
1804  * Flags for the dns print function
1805  */
1806 #define DDNS_PRINT_INBOUND 1
1807 #define DDNS_PRINT_OUTBOUND 0
1808 
1809 struct dhcp_ddns_cb;
1810 
1811 typedef void (*ddns_action_t)(struct dhcp_ddns_cb *ddns_cb,
1812  isc_result_t result);
1813 
1814 typedef struct dhcp_ddns_cb {
1815  struct data_string fwd_name;
1816  struct data_string rev_name;
1817  struct data_string dhcid;
1818  struct iaddr address;
1820 
1821  unsigned long ttl;
1822 
1823  unsigned char zone_name[DHCP_MAXDNS_WIRE];
1824  isc_sockaddrlist_t zone_server_list;
1825  isc_sockaddr_t zone_addrs[DHCP_MAXNS];
1827  struct dns_zone *zone;
1828 
1829  u_int16_t flags;
1831  int state;
1833 
1835 
1836  /* Lease or client state that triggered the ddns operation */
1837  void *lease;
1839 
1841  void *dataspace;
1842 
1843  dns_rdataclass_t dhcid_class;
1844  dns_rdataclass_t other_dhcid_class;
1845  char *lease_tag;
1846  struct ia_xx *fixed6_ia;
1848 
1849 extern struct ipv6_pool **pools;
1850 
1851 
1852 /* External definitions... */
1853 
1854 HASH_FUNCTIONS_DECL (group, const char *, struct group_object, group_hash_t)
1855 HASH_FUNCTIONS_DECL (universe, const char *, struct universe, universe_hash_t)
1856 HASH_FUNCTIONS_DECL (option_name, const char *, struct option,
1858 HASH_FUNCTIONS_DECL (option_code, const unsigned *, struct option,
1860 HASH_FUNCTIONS_DECL (dns_zone, const char *, struct dns_zone, dns_zone_hash_t)
1861 HASH_FUNCTIONS_DECL(lease_ip, const unsigned char *, struct lease,
1863 HASH_FUNCTIONS_DECL(lease_id, const unsigned char *, struct lease,
1865 HASH_FUNCTIONS_DECL (host, const unsigned char *, struct host_decl, host_hash_t)
1866 HASH_FUNCTIONS_DECL (class, const char *, struct class, class_hash_t)
1867 
1868 /* options.c */
1869 
1870 extern struct option *vendor_cfg_option;
1871 int parse_options (struct packet *);
1872 int parse_option_buffer (struct option_state *, const unsigned char *,
1873  unsigned, struct universe *);
1874 struct universe *find_option_universe (struct option *, const char *);
1875 int parse_encapsulated_suboptions (struct option_state *, struct option *,
1876  const unsigned char *, unsigned,
1877  struct universe *, const char *);
1878 int cons_options (struct packet *, struct dhcp_packet *, struct lease *,
1879  struct client_state *,
1880  int, struct option_state *, struct option_state *,
1881  struct binding_scope **,
1882  int, int, int, struct data_string *, const char *);
1883 int fqdn_universe_decode (struct option_state *,
1884  const unsigned char *, unsigned, struct universe *);
1885 struct option_cache *
1886 lookup_fqdn6_option(struct universe *universe, struct option_state *options,
1887  unsigned code);
1888 void
1889 save_fqdn6_option(struct universe *universe, struct option_state *options,
1890  struct option_cache *oc, isc_boolean_t appendp);
1891 void
1892 delete_fqdn6_option(struct universe *universe, struct option_state *options,
1893  int code);
1894 void
1896  struct client_state *client_state,
1897  struct option_state *in_options,
1898  struct option_state *cfg_options,
1899  struct binding_scope **scope,
1900  struct universe *u, void *stuff,
1901  void (*func)(struct option_cache *,
1902  struct packet *,
1903  struct lease *,
1904  struct client_state *,
1905  struct option_state *,
1906  struct option_state *,
1907  struct binding_scope **,
1908  struct universe *, void *));
1909 int
1911  struct packet *packet, struct lease *lease,
1912  struct client_state *client_state,
1913  struct option_state *in_options,
1914  struct option_state *cfg_options,
1915  struct binding_scope **scope,
1916  struct universe *universe);
1917 int
1918 fqdn6_universe_decode(struct option_state *options,
1919  const unsigned char *buffer, unsigned length,
1920  struct universe *u);
1921 int append_option(struct data_string *dst, struct universe *universe,
1922  struct option *option, struct data_string *src);
1923 int
1924 store_options(int *ocount,
1925  unsigned char *buffer, unsigned buflen, unsigned index,
1926  struct packet *packet, struct lease *lease,
1927  struct client_state *client_state,
1928  struct option_state *in_options,
1929  struct option_state *cfg_options,
1930  struct binding_scope **scope,
1931  unsigned *priority_list, int priority_len,
1932  unsigned first_cutoff, int second_cutoff, int terminate,
1933  const char *vuname);
1934 int store_options6(char *, int, struct option_state *, struct packet *,
1935  const int *, struct data_string *);
1936 int format_has_text(const char *);
1937 int format_min_length(const char *, struct option_cache *);
1938 const char *pretty_print_option (struct option *, const unsigned char *,
1939  unsigned, int, int);
1940 int pretty_escape(char **, char *, const unsigned char **,
1941  const unsigned char *);
1942 int get_option (struct data_string *, struct universe *,
1943  struct packet *, struct lease *, struct client_state *,
1944  struct option_state *, struct option_state *,
1945  struct option_state *, struct binding_scope **, unsigned,
1946  const char *, int);
1947 int get_option_int (int *, struct universe *,
1948  struct packet *, struct lease *, struct client_state *,
1949  struct option_state *, struct option_state *,
1950  struct option_state *, struct binding_scope **, unsigned,
1951  const char *, int);
1952 void set_option (struct universe *, struct option_state *,
1953  struct option_cache *, enum statement_op);
1954 struct option_cache *lookup_option (struct universe *,
1955  struct option_state *, unsigned);
1956 struct option_cache *lookup_hashed_option (struct universe *,
1957  struct option_state *,
1958  unsigned);
1960  struct option_state *,
1961  struct option_cache *);
1962 int save_option_buffer (struct universe *, struct option_state *,
1963  struct buffer *, unsigned char *, unsigned,
1964  unsigned, int);
1965 int append_option_buffer(struct universe *, struct option_state *,
1966  struct buffer *, unsigned char *, unsigned,
1967  unsigned, int);
1968 void build_server_oro(struct data_string *, struct option_state *,
1969  const char *, int);
1970 void save_option(struct universe *, struct option_state *,
1971  struct option_cache *);
1972 void also_save_option(struct universe *, struct option_state *,
1973  struct option_cache *);
1974 void save_hashed_option(struct universe *, struct option_state *,
1975  struct option_cache *, isc_boolean_t appendp);
1976 void delete_option (struct universe *, struct option_state *, int);
1977 void delete_hashed_option (struct universe *,
1978  struct option_state *, int);
1979 int option_cache_dereference (struct option_cache **,
1980  const char *, int);
1982  struct option_state *,
1983  const char *, int);
1984 int store_option (struct data_string *,
1985  struct universe *, struct packet *, struct lease *,
1986  struct client_state *,
1987  struct option_state *, struct option_state *,
1988  struct binding_scope **, struct option_cache *);
1990  struct packet *, struct lease *,
1991  struct client_state *,
1992  struct option_state *,
1993  struct option_state *,
1994  struct binding_scope **,
1995  struct data_string *);
1997  struct packet *, struct lease *,
1998  struct client_state *,
1999  struct option_state *,
2000  struct option_state *,
2001  struct binding_scope **,
2002  struct universe *);
2004  struct packet *, struct lease *,
2005  struct client_state *,
2006  struct option_state *,
2007  struct option_state *,
2008  struct binding_scope **,
2009  struct universe *);
2011  struct packet *, struct lease *,
2012  struct client_state *,
2013  struct option_state *,
2014  struct option_state *,
2015  struct binding_scope **,
2016  struct universe *);
2017 void suboption_foreach (struct packet *, struct lease *, struct client_state *,
2018  struct option_state *, struct option_state *,
2019  struct binding_scope **, struct universe *, void *,
2020  void (*) (struct option_cache *, struct packet *,
2021  struct lease *, struct client_state *,
2022  struct option_state *, struct option_state *,
2023  struct binding_scope **,
2024  struct universe *, void *),
2025  struct option_cache *, const char *);
2026 void option_space_foreach (struct packet *, struct lease *,
2027  struct client_state *,
2028  struct option_state *,
2029  struct option_state *,
2030  struct binding_scope **,
2031  struct universe *, void *,
2032  void (*) (struct option_cache *,
2033  struct packet *,
2034  struct lease *, struct client_state *,
2035  struct option_state *,
2036  struct option_state *,
2037  struct binding_scope **,
2038  struct universe *, void *));
2039 void hashed_option_space_foreach (struct packet *, struct lease *,
2040  struct client_state *,
2041  struct option_state *,
2042  struct option_state *,
2043  struct binding_scope **,
2044  struct universe *, void *,
2045  void (*) (struct option_cache *,
2046  struct packet *,
2047  struct lease *,
2048  struct client_state *,
2049  struct option_state *,
2050  struct option_state *,
2051  struct binding_scope **,
2052  struct universe *, void *));
2053 int linked_option_get (struct data_string *, struct universe *,
2054  struct packet *, struct lease *,
2055  struct client_state *,
2056  struct option_state *, struct option_state *,
2057  struct option_state *, struct binding_scope **,
2058  unsigned);
2060  struct option_state *,
2061  const char *, int);
2062 void save_linked_option(struct universe *, struct option_state *,
2063  struct option_cache *, isc_boolean_t appendp);
2064 void linked_option_space_foreach (struct packet *, struct lease *,
2065  struct client_state *,
2066  struct option_state *,
2067  struct option_state *,
2068  struct binding_scope **,
2069  struct universe *, void *,
2070  void (*) (struct option_cache *,
2071  struct packet *,
2072  struct lease *,
2073  struct client_state *,
2074  struct option_state *,
2075  struct option_state *,
2076  struct binding_scope **,
2077  struct universe *, void *));
2078 int linked_option_space_encapsulate (struct data_string *, struct packet *,
2079  struct lease *, struct client_state *,
2080  struct option_state *,
2081  struct option_state *,
2082  struct binding_scope **,
2083  struct universe *);
2084 void delete_linked_option (struct universe *, struct option_state *, int);
2085 struct option_cache *lookup_linked_option (struct universe *,
2086  struct option_state *, unsigned);
2087 void do_packet (struct interface_info *,
2088  struct dhcp_packet *, unsigned,
2089  unsigned int, struct iaddr, struct hardware *);
2090 void do_packet6(struct interface_info *, const char *,
2091  int, int, const struct iaddr *, isc_boolean_t);
2092 int packet6_len_okay(const char *, int);
2093 
2094 int validate_packet(struct packet *);
2095 
2096 int add_option(struct option_state *options,
2097  unsigned int option_num,
2098  void *data,
2099  unsigned int data_len);
2100 
2101 void parse_vendor_option(struct packet *packet,
2102  struct lease *lease,
2103  struct client_state *client_state,
2104  struct option_state *in_options,
2105  struct option_state *out_options,
2106  struct binding_scope **scope);
2107 
2108 /* dhcp4o6.c */
2109 #if defined(DHCP4o6)
2110 extern int dhcp4o6_fd;
2111 extern omapi_object_t *dhcp4o6_object;
2112 extern omapi_object_type_t *dhcp4o6_type;
2113 extern void dhcp4o6_setup(u_int16_t);
2114 
2115 /* dependency */
2116 extern isc_result_t dhcpv4o6_handler(omapi_object_t *);
2117 
2118 #endif
2119 /* dhcpd.c */
2120 extern struct timeval cur_tv;
2121 #define cur_time cur_tv.tv_sec
2122 
2123 extern int ddns_update_style;
2124 #if defined (NSUPDATE)
2125 extern u_int16_t ddns_conflict_mask;
2126 #endif
2127 extern int dont_use_fsync;
2128 extern int server_id_check;
2129 
2130 #ifdef EUI_64
2131 extern int persist_eui64;
2132 #endif
2133 
2134 #ifdef DHCPv6
2135 extern int prefix_length_mode;
2136 extern int do_release_on_roam;
2137 #endif
2138 
2139 extern int authoring_byte_order;
2140 extern int lease_id_format;
2141 extern u_int32_t abandon_lease_time;
2142 
2143 extern const char *path_dhcpd_conf;
2144 extern const char *path_dhcpd_db;
2145 extern const char *path_dhcpd_pid;
2146 
2148 extern struct eventqueue *rw_queue_empty;
2149 
2150 #if defined (PARANOIA)
2151 extern uid_t set_uid;
2152 extern gid_t set_gid;
2153 #endif
2154 
2155 int main(int, char **);
2156 void postconf_initialization(int);
2157 void postdb_startup(void);
2158 void cleanup (void);
2159 void lease_pinged (struct iaddr, u_int8_t *, int);
2160 void lease_ping_timeout (void *);
2161 int dhcpd_interface_setup_hook (struct interface_info *ip, struct iaddr *ia);
2163 isc_result_t dhcp_io_shutdown (omapi_object_t *, void *);
2164 isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
2165  control_object_state_t newstate);
2166 
2167 #if defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
2168 void relinquish_ackqueue(void);
2169 #endif
2170 
2171 /* conflex.c */
2172 isc_result_t new_parse (struct parse **, int,
2173  char *, unsigned, const char *, int);
2174 isc_result_t end_parse (struct parse **);
2175 isc_result_t save_parse_state(struct parse *cfile);
2176 isc_result_t restore_parse_state(struct parse *cfile);
2177 enum dhcp_token next_token (const char **, unsigned *, struct parse *);
2178 enum dhcp_token peek_token (const char **, unsigned *, struct parse *);
2179 enum dhcp_token next_raw_token(const char **rval, unsigned *rlen,
2180  struct parse *cfile);
2181 enum dhcp_token peek_raw_token(const char **rval, unsigned *rlen,
2182  struct parse *cfile);
2183 /*
2184  * Use skip_token when we are skipping a token we have previously
2185  * used peek_token on as we know what the result will be in this case.
2186  */
2187 #define skip_token(a,b,c) ((void) next_token((a),(b),(c)))
2188 
2189 
2190 /* confpars.c */
2191 void parse_trace_setup (void);
2192 isc_result_t readconf (void);
2193 isc_result_t read_conf_file (const char *, struct group *, int, int);
2194 #if defined (TRACING)
2195 void trace_conf_input (trace_type_t *, unsigned, char *);
2197 #endif
2198 isc_result_t conf_file_subparse (struct parse *, struct group *, int);
2199 isc_result_t lease_file_subparse (struct parse *);
2200 int parse_statement (struct parse *, struct group *, int,
2201  struct host_decl *, int);
2202 #if defined (FAILOVER_PROTOCOL)
2203 void parse_failover_peer (struct parse *, struct group *, int);
2205  dhcp_failover_state_t *);
2207  enum failover_state *, TIME *);
2208 #endif
2209 int permit_list_match (struct permit *, struct permit *);
2210 void parse_pool_statement (struct parse *, struct group *, int);
2211 int parse_lbrace (struct parse *);
2212 void parse_host_declaration (struct parse *, struct group *);
2213 int parse_class_declaration (struct class **, struct parse *,
2214  struct group *, int);
2215 void parse_shared_net_declaration (struct parse *, struct group *);
2216 void parse_subnet_declaration (struct parse *,
2217  struct shared_network *);
2218 void parse_subnet6_declaration (struct parse *,
2219  struct shared_network *);
2220 void parse_group_declaration (struct parse *, struct group *);
2221 int parse_fixed_addr_param (struct option_cache **,
2222  struct parse *, enum dhcp_token);
2223 int parse_lease_declaration (struct lease **, struct parse *);
2224 int parse_ip6_addr(struct parse *, struct iaddr *);
2225 int parse_ip6_addr_expr(struct expression **, struct parse *);
2226 int parse_ip6_prefix(struct parse *, struct iaddr *, u_int8_t *);
2227 void parse_address_range (struct parse *, struct group *, int,
2228  struct pool *, struct lease **);
2229 void parse_address_range6(struct parse *cfile, struct group *group,
2230  struct ipv6_pond *);
2231 void parse_prefix6(struct parse *cfile, struct group *group,
2232  struct ipv6_pond *);
2233 void parse_fixed_prefix6(struct parse *cfile, struct host_decl *host_decl);
2234 void parse_ia_na_declaration(struct parse *);
2235 void parse_ia_ta_declaration(struct parse *);
2236 void parse_ia_pd_declaration(struct parse *);
2237 void parse_server_duid(struct parse *cfile);
2238 void parse_server_duid_conf(struct parse *cfile);
2239 void parse_pool6_statement (struct parse *, struct group *, int);
2240 uint32_t parse_byte_order_uint32(const void *source);
2241 
2242 /* ddns.c */
2243 int ddns_updates(struct packet *, struct lease *, struct lease *,
2244  struct iasubopt *, struct iasubopt *, struct option_state *);
2245 isc_result_t ddns_removals(struct lease *, struct iasubopt *,
2246  struct dhcp_ddns_cb *, isc_boolean_t);
2247 u_int16_t get_conflict_mask(struct option_state *input_options);
2248 #if defined (TRACING)
2249 void trace_ddns_init(void);
2250 #endif
2251 
2252 /* parse.c */
2253 void add_enumeration (struct enumeration *);
2254 struct enumeration *find_enumeration (const char *, int);
2255 struct enumeration_value *find_enumeration_value (const char *, int,
2256  unsigned *,
2257  const char *);
2258 void skip_to_semi (struct parse *);
2259 void skip_to_rbrace (struct parse *, int);
2260 int parse_semi (struct parse *);
2261 int parse_string (struct parse *, char **, unsigned *);
2262 char *parse_host_name (struct parse *);
2263 int parse_ip_addr_or_hostname (struct expression **,
2264  struct parse *, int);
2265 void parse_hardware_param (struct parse *, struct hardware *);
2266 void parse_lease_time (struct parse *, TIME *);
2267 unsigned char *parse_numeric_aggregate (struct parse *,
2268  unsigned char *, unsigned *,
2269  int, int, unsigned);
2270 void convert_num (struct parse *, unsigned char *, const char *,
2271  int, unsigned);
2272 TIME parse_date (struct parse *);
2273 TIME parse_date_core(struct parse *);
2274 isc_result_t parse_option_name (struct parse *, int, int *,
2275  struct option **);
2276 void parse_option_space_decl (struct parse *);
2277 int parse_option_code_definition (struct parse *, struct option *);
2278 int parse_base64 (struct data_string *, struct parse *);
2279 int parse_cshl (struct data_string *, struct parse *);
2281  struct parse *, int *,
2282  enum expression_context);
2284  struct parse *, int *,
2285  enum expression_context);
2286 int parse_zone (struct dns_zone *, struct parse *);
2287 int parse_key (struct parse *);
2289  struct parse *, int *);
2291  struct parse *, int *);
2293  struct parse *, int *,
2294  enum expression_context);
2296  struct parse *, int *);
2297 int parse_boolean_expression (struct expression **,
2298  struct parse *, int *);
2299 int parse_boolean (struct parse *);
2300 int parse_data_expression (struct expression **,
2301  struct parse *, int *);
2302 int parse_numeric_expression (struct expression **,
2303  struct parse *, int *);
2304 int parse_dns_expression (struct expression **, struct parse *, int *);
2305 int parse_non_binary (struct expression **, struct parse *, int *,
2306  enum expression_context);
2307 int parse_expression (struct expression **, struct parse *, int *,
2308  enum expression_context,
2309  struct expression **, enum expr_op);
2310 int parse_option_data(struct expression **expr, struct parse *cfile,
2311  int lookups, struct option *option);
2313  struct parse *, int,
2314  struct option *, enum statement_op);
2315 int parse_option_token (struct expression **, struct parse *,
2316  const char **, struct expression *, int, int);
2317 int parse_allow_deny (struct option_cache **, struct parse *, int);
2318 int parse_auth_key (struct data_string *, struct parse *);
2319 int parse_warn (struct parse *, const char *, ...)
2320  __attribute__((__format__(__printf__,2,3)));
2321 struct expression *parse_domain_list(struct parse *cfile, int);
2322 struct expression *parse_domain_name(struct parse *cfile);
2323 
2324 /* tree.c */
2325 extern struct binding_scope *global_scope;
2326 pair cons (caddr_t, pair);
2327 int make_const_option_cache (struct option_cache **, struct buffer **,
2328  u_int8_t *, unsigned, struct option *,
2329  const char *, int);
2330 int make_host_lookup (struct expression **, const char *);
2331 int enter_dns_host (struct dns_host_entry **, const char *);
2332 int make_const_data (struct expression **,
2333  const unsigned char *, unsigned, int, int,
2334  const char *, int);
2335 int make_const_int (struct expression **, unsigned long);
2336 int make_concat (struct expression **,
2337  struct expression *, struct expression *);
2338 int make_encapsulation (struct expression **, struct data_string *);
2339 int make_substring (struct expression **, struct expression *,
2340  struct expression *, struct expression *);
2341 int make_limit (struct expression **, struct expression *, int);
2342 int make_let (struct executable_statement **, const char *);
2343 int option_cache (struct option_cache **, struct data_string *,
2344  struct expression *, struct option *,
2345  const char *, int);
2346 int evaluate_expression (struct binding_value **, struct packet *,
2347  struct lease *, struct client_state *,
2348  struct option_state *, struct option_state *,
2349  struct binding_scope **, struct expression *,
2350  const char *, int);
2351 int binding_value_dereference (struct binding_value **, const char *, int);
2352 int evaluate_boolean_expression (int *,
2353  struct packet *, struct lease *,
2354  struct client_state *,
2355  struct option_state *,
2356  struct option_state *,
2357  struct binding_scope **,
2358  struct expression *);
2360  struct packet *, struct lease *,
2361  struct client_state *,
2362  struct option_state *,
2363  struct option_state *,
2364  struct binding_scope **,
2365  struct expression *,
2366  const char *, int);
2367 int evaluate_numeric_expression (unsigned long *, struct packet *,
2368  struct lease *, struct client_state *,
2369  struct option_state *, struct option_state *,
2370  struct binding_scope **,
2371  struct expression *);
2372 int evaluate_option_cache (struct data_string *,
2373  struct packet *, struct lease *,
2374  struct client_state *,
2375  struct option_state *, struct option_state *,
2376  struct binding_scope **,
2377  struct option_cache *,
2378  const char *, int);
2380  struct packet *, struct lease *,
2381  struct client_state *,
2382  struct option_state *,
2383  struct option_state *,
2384  struct binding_scope **,
2385  struct option_cache *,
2386  const char *, int);
2388  struct packet *, struct lease *,
2389  struct client_state *,
2390  struct option_state *,
2391  struct option_state *,
2392  struct binding_scope **,
2393  struct expression *);
2394 void expression_dereference (struct expression **, const char *, int);
2396 int is_boolean_expression (struct expression *);
2397 int is_data_expression (struct expression *);
2398 int is_numeric_expression (struct expression *);
2399 int is_compound_expression (struct expression *);
2400 int op_precedence (enum expr_op, enum expr_op);
2403 int write_expression (FILE *, struct expression *, int, int, int);
2404 struct binding *find_binding (struct binding_scope *, const char *);
2405 int free_bindings (struct binding_scope *, const char *, int);
2407  const char *, int);
2408 int fundef_dereference (struct fundef **, const char *, int);
2411 struct binding *create_binding (struct binding_scope **, const char *);
2412 int bind_ds_value (struct binding_scope **,
2413  const char *, struct data_string *);
2414 int find_bound_string (struct data_string *,
2415  struct binding_scope *, const char *);
2416 int unset (struct binding_scope *, const char *);
2417 int data_string_sprintfa(struct data_string *ds, const char *fmt, ...);
2418 int concat_dclists (struct data_string *, struct data_string *,
2419  struct data_string *);
2420 
2421 /* dhcp.c */
2422 extern int outstanding_pings;
2423 extern int max_outstanding_acks;
2424 extern int max_ack_delay_secs;
2425 extern int max_ack_delay_usecs;
2426 
2427 void dhcp (struct packet *);
2428 void dhcpdiscover (struct packet *, int);
2429 void dhcprequest (struct packet *, int, struct lease *);
2430 void dhcprelease (struct packet *, int);
2431 void dhcpdecline (struct packet *, int);
2432 void dhcpinform (struct packet *, int);
2433 void nak_lease (struct packet *, struct iaddr *cip, struct group*);
2434 void ack_lease (struct packet *, struct lease *,
2435  unsigned int, TIME, char *, int, struct host_decl *);
2436 void echo_client_id(struct packet*, struct lease*, struct option_state*,
2437  struct option_state*);
2438 
2439 void dhcp_reply (struct lease *);
2440 int find_lease (struct lease **, struct packet *,
2441  struct shared_network *, int *, int *, struct lease *,
2442  const char *, int);
2443 int mockup_lease (struct lease **, struct packet *,
2444  struct shared_network *,
2445  struct host_decl *);
2446 void static_lease_dereference (struct lease *, const char *, int);
2447 
2448 int allocate_lease (struct lease **, struct packet *,
2449  struct pool *, int *);
2450 int permitted (struct packet *, struct permit *);
2451 int locate_network (struct packet *);
2452 int parse_agent_information_option (struct packet *, int, u_int8_t *);
2453 unsigned cons_agent_information_options (struct option_state *,
2454  struct dhcp_packet *,
2455  unsigned, unsigned);
2456 void get_server_source_address(struct in_addr *from,
2457  struct option_state *options,
2458  struct option_state *out_options,
2459  struct packet *packet);
2460 
2461 void eval_network_statements(struct option_state **options,
2462  struct packet *packet,
2463  struct group *network_group);
2464 
2466 
2467 /* dhcpleasequery.c */
2468 void dhcpleasequery (struct packet *, int);
2469 void dhcpv6_leasequery (struct data_string *, struct packet *);
2470 
2471 /* dhcpv6.c */
2473 void copy_server_duid(struct data_string *ds, const char *file, int line);
2474 void set_server_duid(struct data_string *new_duid);
2475 isc_result_t set_server_duid_from_option(void);
2476 void set_server_duid_type(int type);
2477 isc_result_t generate_new_server_duid(void);
2478 isc_result_t get_client_id(struct packet *, struct data_string *);
2479 void dhcpv6(struct packet *);
2480 
2481 /* bootp.c */
2482 void bootp(struct packet *);
2483 void use_host_decl_name(struct packet *, struct lease* , struct option_state *);
2484 
2485 /* memory.c */
2486 extern int (*group_write_hook) (struct group_object *);
2487 extern struct group *root_group;
2489 isc_result_t delete_group (struct group_object *, int);
2490 isc_result_t supersede_group (struct group_object *, int);
2491 int clone_group (struct group **, struct group *, const char *, int);
2492 int write_group (struct group_object *);
2493 
2494 /* salloc.c */
2496 struct lease *new_leases (unsigned, const char *, int);
2497 #if defined (DEBUG_MEMORY_LEAKAGE) || \
2498  defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
2499 void relinquish_free_lease_states (void);
2500 #endif
2502 OMAPI_OBJECT_ALLOC_DECL (class, struct class, dhcp_type_class)
2503 OMAPI_OBJECT_ALLOC_DECL (subclass, struct class, dhcp_type_subclass)
2506 
2507 /* alloc.c */
2512 OMAPI_OBJECT_ALLOC_DECL (dhcp_control,
2514 
2515 #if defined (DEBUG_MEMORY_LEAKAGE) || \
2516  defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
2517 void relinquish_free_pairs (void);
2518 void relinquish_free_expressions (void);
2519 void relinquish_free_binding_values (void);
2520 void relinquish_free_option_caches (void);
2521 void relinquish_free_packets (void);
2522 #endif
2523 
2525  const char *, int);
2527  struct option_chain_head *,
2528  const char *, int);
2530  const char *, int);
2531 int group_allocate (struct group **, const char *, int);
2532 int group_reference (struct group **, struct group *, const char *, int);
2533 int group_dereference (struct group **, const char *, int);
2534 struct dhcp_packet *new_dhcp_packet (const char *, int);
2535 struct protocol *new_protocol (const char *, int);
2536 struct lease_state *new_lease_state (const char *, int);
2537 struct domain_search_list *new_domain_search_list (const char *, int);
2538 struct name_server *new_name_server (const char *, int);
2539 void free_name_server (struct name_server *, const char *, int);
2540 struct option *new_option (const char *, const char *, int);
2541 int option_reference(struct option **dest, struct option *src,
2542  const char * file, int line);
2543 int option_dereference(struct option **dest, const char *file, int line);
2544 struct universe *new_universe (const char *, int);
2545 void free_universe (struct universe *, const char *, int);
2547  const char *, int);
2548 void free_lease_state (struct lease_state *, const char *, int);
2549 void free_protocol (struct protocol *, const char *, int);
2550 void free_dhcp_packet (struct dhcp_packet *, const char *, int);
2551 struct client_lease *new_client_lease (const char *, int);
2552 void free_client_lease (struct client_lease *, const char *, int);
2553 struct permit *new_permit (const char *, int);
2554 void free_permit (struct permit *, const char *, int);
2555 pair new_pair (const char *, int);
2556 void free_pair (pair, const char *, int);
2557 int expression_allocate (struct expression **, const char *, int);
2558 int expression_reference (struct expression **,
2559  struct expression *, const char *, int);
2560 void free_expression (struct expression *, const char *, int);
2561 int binding_value_allocate (struct binding_value **,
2562  const char *, int);
2563 int binding_value_reference (struct binding_value **,
2564  struct binding_value *,
2565  const char *, int);
2566 void free_binding_value (struct binding_value *, const char *, int);
2567 int fundef_allocate (struct fundef **, const char *, int);
2568 int fundef_reference (struct fundef **,
2569  struct fundef *, const char *, int);
2570 int option_cache_allocate (struct option_cache **, const char *, int);
2571 int option_cache_reference (struct option_cache **,
2572  struct option_cache *, const char *, int);
2573 int buffer_allocate (struct buffer **, unsigned, const char *, int);
2574 int buffer_reference (struct buffer **, struct buffer *,
2575  const char *, int);
2576 int buffer_dereference (struct buffer **, const char *, int);
2578  const char *, const char *, int);
2580  struct dns_host_entry *,
2581  const char *, int);
2583  const char *, int);
2584 int option_state_allocate (struct option_state **, const char *, int);
2585 int option_state_reference (struct option_state **,
2586  struct option_state *, const char *, int);
2587 int option_state_dereference (struct option_state **,
2588  const char *, int);
2589 int data_string_new(struct data_string *, const char *, unsigned int,
2590  const char *, int);
2591 void data_string_copy(struct data_string *, const struct data_string *,
2592  const char *, int);
2593 void data_string_forget (struct data_string *, const char *, int);
2594 void data_string_truncate (struct data_string *, int);
2595 int data_string_terminate (struct data_string *, const char *, int);
2597  const char *, int);
2599  struct executable_statement *,
2600  const char *, int);
2601 int packet_allocate (struct packet **, const char *, int);
2602 int packet_reference (struct packet **,
2603  struct packet *, const char *, int);
2604 int packet_dereference (struct packet **, const char *, int);
2605 int binding_scope_allocate (struct binding_scope **,
2606  const char *, int);
2607 int binding_scope_reference (struct binding_scope **,
2608  struct binding_scope *,
2609  const char *, int);
2610 int dns_zone_allocate (struct dns_zone **, const char *, int);
2611 int dns_zone_reference (struct dns_zone **,
2612  struct dns_zone *, const char *, int);
2613 /* print.c */
2614 #define DEFAULT_TIME_FORMAT 0
2615 #define LOCAL_TIME_FORMAT 1
2616 extern int db_time_format;
2617 char *quotify_string (const char *, const char *, int);
2618 char *quotify_buf (const unsigned char *, unsigned, const char,
2619  const char *, int);
2620 char *print_base64 (const unsigned char *, unsigned, const char *, int);
2621 char *print_hw_addr (const int, const int, const unsigned char *);
2622 void print_lease (struct lease *);
2623 void dump_raw (const unsigned char *, unsigned);
2624 void dump_packet_option (struct option_cache *, struct packet *,
2625  struct lease *, struct client_state *,
2626  struct option_state *, struct option_state *,
2627  struct binding_scope **, struct universe *, void *);
2628 void dump_packet (struct packet *);
2629 void hash_dump (struct hash_table *);
2630 char *print_hex (unsigned, const u_int8_t *, unsigned, unsigned);
2631 void print_hex_only (unsigned, const u_int8_t *, unsigned, char *);
2632 void print_hex_or_string (unsigned, const u_int8_t *, unsigned, char *);
2633 #define print_hex_1(len, data, limit) print_hex(len, data, limit, 0)
2634 #define print_hex_2(len, data, limit) print_hex(len, data, limit, 1)
2635 #define print_hex_3(len, data, limit) print_hex(len, data, limit, 2)
2636 char *print_dotted_quads (unsigned, const u_int8_t *);
2637 char *print_dec_1 (unsigned long);
2638 char *print_dec_2 (unsigned long);
2639 void print_expression (const char *, struct expression *);
2640 int token_print_indent_concat (FILE *, int, int,
2641  const char *, const char *, ...);
2642 int token_indent_data_string (FILE *, int, int, const char *, const char *,
2643  struct data_string *);
2644 int token_print_indent (FILE *, int, int,
2645  const char *, const char *, const char *);
2646 void indent_spaces (FILE *, int);
2647 #if defined (NSUPDATE)
2648 void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t);
2649 #endif
2650 const char *print_time(TIME);
2651 
2652 
2653 void get_hw_addr(struct interface_info *info);
2654 void try_hw_addr(struct interface_info *info);
2655 isc_result_t get_hw_addr2(struct interface_info *info);
2656 char *buf_to_hex (const unsigned char *s, unsigned len,
2657  const char *file, int line);
2658 char *format_lease_id(const unsigned char *s, unsigned len, int format,
2659  const char *file, int line);
2660 char *absolute_path(const char *orgpath);
2661 /* socket.c */
2662 #if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \
2663  || defined (USE_SOCKET_FALLBACK)
2664 int if_register_socket(struct interface_info *, int, int *, struct in6_addr *);
2665 
2666 void set_multicast_hop_limit(struct interface_info* info, int hop_limit);
2667 #endif
2668 
2669 #if defined (USE_SOCKET_FALLBACK) && !defined (USE_SOCKET_SEND)
2672 ssize_t send_fallback (struct interface_info *,
2673  struct packet *, struct dhcp_packet *, size_t,
2674  struct in_addr,
2675  struct sockaddr_in *, struct hardware *);
2676 ssize_t send_fallback6(struct interface_info *, struct packet *,
2677  struct dhcp_packet *, size_t, struct in6_addr *,
2678  struct sockaddr_in6 *, struct hardware *);
2679 #endif
2680 
2681 #ifdef USE_SOCKET_SEND
2682 void if_reinitialize_send (struct interface_info *);
2683 void if_register_send (struct interface_info *);
2684 void if_deregister_send (struct interface_info *);
2685 ssize_t send_packet (struct interface_info *,
2686  struct packet *, struct dhcp_packet *, size_t,
2687  struct in_addr,
2688  struct sockaddr_in *, struct hardware *);
2689 #endif
2690 ssize_t send_packet6(struct interface_info *, const unsigned char *, size_t,
2691  struct sockaddr_in6 *);
2692 #ifdef USE_SOCKET_RECEIVE
2693 void if_reinitialize_receive (struct interface_info *);
2694 void if_register_receive (struct interface_info *);
2695 void if_deregister_receive (struct interface_info *);
2696 ssize_t receive_packet (struct interface_info *,
2697  unsigned char *, size_t,
2698  struct sockaddr_in *, struct hardware *);
2699 #endif
2700 
2701 #if defined (USE_SOCKET_FALLBACK)
2703 #endif
2704 
2705 #if defined (USE_SOCKET_SEND)
2709 void maybe_setup_fallback (void);
2710 #endif
2711 
2712 void if_register6(struct interface_info *info, int do_multicast);
2714 ssize_t receive_packet6(struct interface_info *interface,
2715  unsigned char *buf, size_t len,
2716  struct sockaddr_in6 *from, struct in6_addr *to_addr,
2717  unsigned int *if_index);
2718 void if_deregister6(struct interface_info *info);
2719 
2720 
2721 /* bpf.c */
2722 #if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE)
2723 int if_register_bpf (struct interface_info *);
2724 #endif
2725 #ifdef USE_BPF_SEND
2726 void if_reinitialize_send (struct interface_info *);
2727 void if_register_send (struct interface_info *);
2728 void if_deregister_send (struct interface_info *);
2729 ssize_t send_packet (struct interface_info *,
2730  struct packet *, struct dhcp_packet *, size_t,
2731  struct in_addr,
2732  struct sockaddr_in *, struct hardware *);
2733 #endif
2734 #ifdef USE_BPF_RECEIVE
2735 void if_reinitialize_receive (struct interface_info *);
2736 void if_register_receive (struct interface_info *);
2737 void if_deregister_receive (struct interface_info *);
2738 ssize_t receive_packet (struct interface_info *,
2739  unsigned char *, size_t,
2740  struct sockaddr_in *, struct hardware *);
2741 #endif
2742 #if defined (USE_BPF_SEND)
2746 void maybe_setup_fallback (void);
2747 #endif
2748 
2749 /* lpf.c */
2750 #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
2752 #endif
2753 #ifdef USE_LPF_SEND
2757 ssize_t send_packet (struct interface_info *,
2758  struct packet *, struct dhcp_packet *, size_t,
2759  struct in_addr,
2760  struct sockaddr_in *, struct hardware *);
2761 #endif
2762 #ifdef USE_LPF_RECEIVE
2766 ssize_t receive_packet (struct interface_info *,
2767  unsigned char *, size_t,
2768  struct sockaddr_in *, struct hardware *);
2769 #endif
2770 #if defined (USE_LPF_SEND)
2775 #endif
2776 
2777 /* nit.c */
2778 #if defined (USE_NIT_SEND) || defined (USE_NIT_RECEIVE)
2779 int if_register_nit (struct interface_info *);
2780 #endif
2781 
2782 #ifdef USE_NIT_SEND
2783 void if_reinitialize_send (struct interface_info *);
2784 void if_register_send (struct interface_info *);
2785 void if_deregister_send (struct interface_info *);
2786 ssize_t send_packet (struct interface_info *,
2787  struct packet *, struct dhcp_packet *, size_t,
2788  struct in_addr,
2789  struct sockaddr_in *, struct hardware *);
2790 #endif
2791 #ifdef USE_NIT_RECEIVE
2792 void if_reinitialize_receive (struct interface_info *);
2793 void if_register_receive (struct interface_info *);
2794 void if_deregister_receive (struct interface_info *);
2795 ssize_t receive_packet (struct interface_info *,
2796  unsigned char *, size_t,
2797  struct sockaddr_in *, struct hardware *);
2798 #endif
2799 #if defined (USE_NIT_SEND)
2803 void maybe_setup_fallback (void);
2804 #endif
2805 
2806 /* dlpi.c */
2807 #if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE)
2808 int if_register_dlpi (struct interface_info *);
2809 #endif
2810 
2811 #ifdef USE_DLPI_SEND
2814 void if_reinitialize_send (struct interface_info *);
2815 void if_register_send (struct interface_info *);
2816 void if_deregister_send (struct interface_info *);
2817 ssize_t send_packet (struct interface_info *,
2818  struct packet *, struct dhcp_packet *, size_t,
2819  struct in_addr,
2820  struct sockaddr_in *, struct hardware *);
2822 void maybe_setup_fallback (void);
2823 #endif
2824 #ifdef USE_DLPI_RECEIVE
2825 void if_reinitialize_receive (struct interface_info *);
2826 void if_register_receive (struct interface_info *);
2827 void if_deregister_receive (struct interface_info *);
2828 ssize_t receive_packet (struct interface_info *,
2829  unsigned char *, size_t,
2830  struct sockaddr_in *, struct hardware *);
2831 #endif
2832 
2833 
2834 /* raw.c */
2835 #ifdef USE_RAW_SEND
2836 void if_reinitialize_send (struct interface_info *);
2837 void if_register_send (struct interface_info *);
2838 void if_deregister_send (struct interface_info *);
2839 ssize_t send_packet (struct interface_info *, struct packet *,
2840  struct dhcp_packet *, size_t, struct in_addr,
2841  struct sockaddr_in *, struct hardware *);
2845 void maybe_setup_fallback (void);
2846 #endif
2847 
2848 /* discover.c */
2849 extern struct interface_info *interfaces,
2851 extern struct protocol *protocols;
2852 extern int quiet_interface_discovery;
2853 isc_result_t interface_setup (void);
2855 
2856 extern struct in_addr limited_broadcast;
2857 extern int local_family;
2858 extern struct in_addr local_address;
2859 extern struct in6_addr local_address6;
2860 extern int bind_local_address6;
2861 
2862 extern u_int16_t local_port;
2863 extern u_int16_t remote_port;
2864 extern u_int16_t relay_port;
2865 extern int dhcpv4_over_dhcpv6;
2866 extern int (*dhcp_interface_setup_hook) (struct interface_info *,
2867  struct iaddr *);
2868 extern int (*dhcp_interface_discovery_hook) (struct interface_info *);
2869 extern isc_result_t (*dhcp_interface_startup_hook) (struct interface_info *);
2870 
2871 extern void (*bootp_packet_handler) (struct interface_info *,
2872  struct dhcp_packet *, unsigned,
2873  unsigned int,
2874  struct iaddr, struct hardware *);
2875 extern void (*dhcpv6_packet_handler)(struct interface_info *,
2876  const char *, int,
2877  int, const struct iaddr *, isc_boolean_t);
2878 extern struct timeout *timeouts;
2880 #if defined (TRACING)
2884 #endif
2885 extern struct interface_info **interface_vector;
2886 extern int interface_count;
2887 extern int interface_max;
2888 isc_result_t interface_initialize(omapi_object_t *, const char *, int);
2889 void discover_interfaces(int);
2890 int setup_fallback (struct interface_info **, const char *, int);
2892 void reinitialize_interfaces (void);
2893 
2894 /* dispatch.c */
2895 void set_time(TIME);
2896 struct timeval *process_outstanding_timeouts (struct timeval *);
2897 void dispatch (void);
2898 isc_result_t got_one(omapi_object_t *);
2899 isc_result_t got_one_v6(omapi_object_t *);
2904 isc_result_t interface_destroy (omapi_object_t *, const char *, int);
2906  const char *, va_list);
2908  omapi_object_t *,
2909  omapi_object_t *);
2910 
2911 void add_timeout (struct timeval *, void (*) (void *), void *,
2912  tvref_t, tvunref_t);
2913 void cancel_timeout (void (*) (void *), void *);
2916 
2919 
2920 /* tables.c */
2921 extern char *default_option_format;
2922 extern struct universe dhcp_universe;
2923 extern struct universe dhcpv6_universe;
2924 extern struct universe nwip_universe;
2925 extern struct universe fqdn_universe;
2926 extern struct universe vsio_universe;
2927 extern int dhcp_option_default_priority_list [];
2929 extern const char *hardware_types [256];
2931 extern struct universe **universes;
2934 extern struct universe *config_universe;
2935 
2936 /* stables.c */
2937 #if defined (FAILOVER_PROTOCOL)
2938 extern failover_option_t null_failover_option;
2939 extern failover_option_t skip_failover_option;
2940 extern struct failover_option_info ft_options [];
2941 extern u_int32_t fto_allowed [];
2942 extern int ft_sizes [];
2943 extern const char *dhcp_flink_state_names [];
2944 #endif
2945 extern const char *binding_state_names [];
2946 
2947 extern struct universe agent_universe;
2948 extern struct universe server_universe;
2949 
2950 extern struct enumeration ddns_styles;
2951 extern struct enumeration syslog_enum;
2953 
2954 extern struct enumeration prefix_length_modes;
2955 
2956 /* inet.c */
2957 struct iaddr subnet_number (struct iaddr, struct iaddr);
2958 struct iaddr ip_addr (struct iaddr, struct iaddr, u_int32_t);
2959 struct iaddr broadcast_addr (struct iaddr, struct iaddr);
2960 u_int32_t host_addr (struct iaddr, struct iaddr);
2961 int addr_eq (struct iaddr, struct iaddr);
2962 int addr_match(struct iaddr *, struct iaddrmatch *);
2963 int addr_cmp(const struct iaddr *a1, const struct iaddr *a2);
2964 int addr_or(struct iaddr *result,
2965  const struct iaddr *a1, const struct iaddr *a2);
2966 int addr_and(struct iaddr *result,
2967  const struct iaddr *a1, const struct iaddr *a2);
2968 isc_boolean_t is_cidr_mask_valid(const struct iaddr *addr, int bits);
2969 isc_result_t range2cidr(struct iaddrcidrnetlist **result,
2970  const struct iaddr *lo, const struct iaddr *hi);
2971 isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
2972 const char *piaddr (struct iaddr);
2973 const char *pdestdesc (struct iaddr);
2974 char *piaddrmask(struct iaddr *, struct iaddr *);
2975 char *piaddrcidr(const struct iaddr *, unsigned int);
2976 u_int16_t validate_port(char *);
2977 u_int16_t validate_port_pair(char *);
2978 #if defined(DHCPv6)
2979 const char *pin6_addr (const struct in6_addr*);
2980 #endif
2981 
2982 /* dhclient.c */
2983 extern int nowait;
2984 
2985 extern int wanted_ia_na;
2986 extern int wanted_ia_ta;
2987 extern int wanted_ia_pd;
2988 extern int require_all_ias;
2989 
2990 extern const char *path_dhclient_conf;
2991 extern const char *path_dhclient_db;
2992 extern const char *path_dhclient_pid;
2993 extern char *path_dhclient_script;
2994 extern int interfaces_requested;
2995 extern struct data_string default_duid;
2996 extern int duid_type;
2997 extern const char *path_dhclient_duid;
2998 
2999 extern struct client_config top_level_config;
3000 
3001 void dhcpoffer (struct packet *);
3002 void dhcpack (struct packet *);
3003 void dhcpnak (struct packet *);
3004 
3005 void send_discover (void *);
3006 void send_request (void *);
3007 void send_release (void *);
3008 void send_decline (void *);
3009 
3010 void state_reboot (void *);
3011 void state_init (void *);
3012 void state_selecting (void *);
3013 void state_requesting (void *);
3014 void state_bound (void *);
3015 void state_stop (void *);
3016 void state_panic (void *);
3017 
3018 void bind_lease (struct client_state *);
3019 
3020 void make_client_options (struct client_state *,
3021  struct client_lease *, u_int8_t *,
3022  struct option_cache *, struct iaddr *,
3023  struct option **, struct option_state **);
3024 void make_discover (struct client_state *, struct client_lease *);
3025 void make_request (struct client_state *, struct client_lease *);
3026 void make_decline (struct client_state *, struct client_lease *);
3027 void make_release (struct client_state *, struct client_lease *);
3028 
3029 void destroy_client_lease (struct client_lease *);
3030 void rewrite_client_leases (void);
3031 void write_lease_option (struct option_cache *, struct packet *,
3032  struct lease *, struct client_state *,
3033  struct option_state *, struct option_state *,
3034  struct binding_scope **, struct universe *, void *);
3035 int write_client_lease (struct client_state *, struct client_lease *, int, int);
3036 isc_result_t write_client6_lease(struct client_state *client,
3037  struct dhc6_lease *lease,
3038  int rewrite, int sync);
3039 int dhcp_option_ev_name (char *, size_t, struct option *);
3040 
3041 void script_init (struct client_state *, const char *,
3042  struct string_list *);
3043 void client_option_envadd (struct option_cache *, struct packet *,
3044  struct lease *, struct client_state *,
3045  struct option_state *, struct option_state *,
3046  struct binding_scope **, struct universe *, void *);
3047 void script_write_params (struct client_state *, const char *,
3048  struct client_lease *);
3049 void script_write_requested (struct client_state *);
3050 int script_go (struct client_state *);
3052  const char *, const char *, const char *, ...)
3053  __attribute__((__format__(__printf__,4,5)));
3054 
3055 struct client_lease *packet_to_lease (struct packet *, struct client_state *);
3056 void finish (char);
3057 void detach (void);
3058 void write_client_pid_file (void);
3059 void client_location_changed (void);
3060 void do_release (struct client_state *);
3063 isc_result_t dhclient_interface_startup_hook (struct interface_info *);
3065  struct iaddr *addr, int offset);
3067 isc_result_t client_dns_update(struct client_state *client,
3068  dhcp_ddns_cb_t *ddns_cb);
3069 void client_dns_remove(struct client_state *client, struct iaddr *addr);
3070 
3071 void dhcpv4_client_assignments(void);
3073 isc_result_t form_duid(struct data_string *duid, const char *file, int line);
3074 
3075 void dhcp4o6_start(void);
3076 
3077 /* dhc6.c */
3078 void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line);
3079 void start_init6(struct client_state *client);
3080 void start_info_request6(struct client_state *client);
3081 void start_confirm6(struct client_state *client);
3082 void start_release6(struct client_state *client);
3083 void start_selecting6(struct client_state *client);
3084 void unconfigure6(struct client_state *client, const char *reason);
3085 
3086 /* db.c */
3087 int write_lease (struct lease *);
3088 int write_host (struct host_decl *);
3090 #if defined (FAILOVER_PROTOCOL)
3091 int write_failover_state (dhcp_failover_state_t *);
3092 #endif
3093 int db_printable (const unsigned char *);
3094 int db_printable_len (const unsigned char *, unsigned);
3095 isc_result_t write_named_billing_class(const void *, unsigned, void *);
3096 void write_billing_classes (void);
3097 int write_billing_class (struct class *);
3098 void commit_leases_timeout (void *);
3099 int commit_leases (void);
3100 int commit_leases_timed (void);
3101 void db_startup (int);
3102 int new_lease_file (int test_mode);
3103 int group_writer (struct group_object *);
3104 int write_ia(const struct ia_xx *);
3105 
3106 /* packet.c */
3107 u_int32_t checksum (unsigned char *, unsigned, u_int32_t);
3108 u_int32_t wrapsum (u_int32_t);
3109 void assemble_hw_header (struct interface_info *, unsigned char *,
3110  unsigned *, struct hardware *);
3111 void assemble_udp_ip_header (struct interface_info *, unsigned char *,
3112  unsigned *, u_int32_t, u_int32_t,
3113  u_int32_t, unsigned char *, unsigned);
3114 ssize_t decode_hw_header (struct interface_info *, unsigned char *,
3115  unsigned, struct hardware *);
3116 ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
3117  unsigned, struct sockaddr_in *,
3118  unsigned, unsigned *, int);
3119 
3120 /* ethernet.c */
3121 void assemble_ethernet_header (struct interface_info *, unsigned char *,
3122  unsigned *, struct hardware *);
3124  unsigned char *,
3125  unsigned, struct hardware *);
3126 
3127 /* tr.c */
3128 void assemble_tr_header (struct interface_info *, unsigned char *,
3129  unsigned *, struct hardware *);
3131  unsigned char *,
3132  unsigned, struct hardware *);
3133 
3134 /* dhxpxlt.c */
3135 void convert_statement (struct parse *);
3140 void convert_lease_time (struct parse *, jrefproto, char *);
3154 void convert_date (struct parse *, jrefproto, char *);
3155 void convert_numeric_aggregate (struct parse *, jrefproto, int, int, int, int);
3156 void indent (int);
3157 
3158 /* route.c */
3159 void add_route_direct (struct interface_info *, struct in_addr);
3160 void add_route_net (struct interface_info *, struct in_addr, struct in_addr);
3161 void add_route_default_gateway (struct interface_info *, struct in_addr);
3162 void remove_routes (struct in_addr);
3163 void remove_if_route (struct interface_info *, struct in_addr);
3165 void set_netmask (struct interface_info *, struct in_addr);
3166 void set_broadcast_addr (struct interface_info *, struct in_addr);
3167 void set_ip_address (struct interface_info *, struct in_addr);
3168 
3169 /* clparse.c */
3170 isc_result_t read_client_conf (void);
3171 int read_client_conf_file (const char *,
3172  struct interface_info *, struct client_config *);
3173 void read_client_leases (void);
3174 void read_client_duid (void);
3175 void parse_client_statement (struct parse *, struct interface_info *,
3176  struct client_config *);
3177 int parse_X (struct parse *, u_int8_t *, unsigned);
3178 int parse_option_list (struct parse *, struct option ***);
3179 void parse_interface_declaration (struct parse *,
3180  struct client_config *, char *);
3181 int interface_or_dummy (struct interface_info **, const char *);
3182 void make_client_state (struct client_state **);
3183 void make_client_config (struct client_state *, struct client_config *);
3184 void parse_client_lease_statement (struct parse *, int);
3185 void parse_client_lease_declaration (struct parse *,
3186  struct client_lease *,
3187  struct interface_info **,
3188  struct client_state **);
3189 int parse_option_decl (struct option_cache **, struct parse *);
3190 void parse_string_list (struct parse *, struct string_list **, int);
3191 int parse_ip_addr (struct parse *, struct iaddr *);
3192 int parse_destination_descriptor (struct parse *, struct iaddr *);
3193 int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
3194 void parse_reject_statement (struct parse *, struct client_config *);
3195 
3196 /* icmp.c */
3197 OMAPI_OBJECT_ALLOC_DECL (icmp_state, struct icmp_state, dhcp_type_icmp)
3198 extern struct icmp_state *icmp_state;
3199 void icmp_startup (int, void (*) (struct iaddr, u_int8_t *, int));
3201 int icmp_echorequest (struct iaddr *);
3202 isc_result_t icmp_echoreply (omapi_object_t *);
3203 
3204 /* dns.c */
3205 isc_result_t enter_dns_zone (struct dns_zone *);
3206 isc_result_t dns_zone_lookup (struct dns_zone **, const char *);
3207 int dns_zone_dereference (struct dns_zone **, const char *, int);
3208 #if defined (NSUPDATE)
3209 #define FIND_FORWARD 0
3210 #define FIND_REVERSE 1
3211 isc_result_t find_cached_zone (dhcp_ddns_cb_t *, int);
3212 void forget_zone (struct dns_zone **);
3213 void repudiate_zone (struct dns_zone **);
3214 int get_dhcid (dhcp_ddns_cb_t *, int, const u_int8_t *, unsigned);
3215 void dhcid_tolease (struct data_string *, struct data_string *);
3216 isc_result_t dhcid_fromlease (struct data_string *, struct data_string *);
3217 isc_result_t ddns_update_fwd(struct data_string *, struct iaddr,
3218  struct data_string *, unsigned long, unsigned,
3219  unsigned);
3220 isc_result_t ddns_remove_fwd(struct data_string *,
3221  struct iaddr, struct data_string *);
3222 char *ddns_state_name(int state);
3223 #endif /* NSUPDATE */
3224 
3226 void ddns_cb_free (dhcp_ddns_cb_t *ddns_cb, const char *file, int line);
3228 isc_result_t
3229 ddns_modify_fwd(dhcp_ddns_cb_t *ddns_cb, const char *file, int line);
3230 isc_result_t
3231 ddns_modify_ptr(dhcp_ddns_cb_t *ddns_cb, const char *file, int line);
3232 void
3233 ddns_cancel(dhcp_ddns_cb_t *ddns_cb, const char *file, int line);
3234 
3235 /* resolv.c */
3236 extern char path_resolv_conf [];
3237 extern struct name_server *name_servers;
3238 extern struct domain_search_list *domains;
3239 
3240 void read_resolv_conf (TIME);
3241 struct name_server *first_name_server (void);
3242 
3243 /* inet_addr.c */
3244 #ifdef NEED_INET_ATON
3245 int inet_aton (const char *, struct in_addr *);
3246 #endif
3247 
3248 /* class.c */
3249 extern int have_billing_classes;
3250 extern struct class unknown_class;
3251 extern struct class known_class;
3252 extern struct collection default_collection;
3253 extern struct collection *collections;
3255 
3256 void classification_setup (void);
3257 void classify_client (struct packet *);
3258 int check_collection (struct packet *, struct lease *, struct collection *);
3259 void classify (struct packet *, struct class *);
3260 isc_result_t unlink_class (struct class **class);
3261 isc_result_t find_class (struct class **, const char *,
3262  const char *, int);
3263 void unbill_class (struct lease *);
3264 int bill_class (struct lease *, struct class *);
3265 
3266 /* execute.c */
3267 int execute_statements (struct binding_value **result,
3268  struct packet *, struct lease *,
3269  struct client_state *,
3270  struct option_state *, struct option_state *,
3271  struct binding_scope **,
3272  struct executable_statement *,
3273  struct on_star *);
3274 void execute_statements_in_scope (struct binding_value **result,
3275  struct packet *, struct lease *,
3276  struct client_state *,
3277  struct option_state *,
3278  struct option_state *,
3279  struct binding_scope **,
3280  struct group *, struct group *,
3281  struct on_star *);
3283  const char *, int);
3284 void write_statements (FILE *, struct executable_statement *, int);
3286  struct packet *, struct lease *, struct client_state *,
3287  struct option_state *, struct option_state *,
3288  struct binding_scope **,
3289  struct expression *, struct executable_statement *);
3291  int (*) (struct executable_statement *,
3292  void *, int), void *, int);
3293 
3294 /* comapi.c */
3300 
3302 
3305  omapi_typed_data_t *);
3308  omapi_value_t **);
3309 isc_result_t dhcp_group_destroy (omapi_object_t *, const char *, int);
3311  const char *, va_list);
3312 isc_result_t dhcp_group_stuff_values (omapi_object_t *,
3313  omapi_object_t *,
3314  omapi_object_t *);
3315 isc_result_t dhcp_group_lookup (omapi_object_t **,
3317 isc_result_t dhcp_group_create (omapi_object_t **,
3318  omapi_object_t *);
3319 isc_result_t dhcp_group_remove (omapi_object_t *,
3320  omapi_object_t *);
3321 
3324  omapi_typed_data_t *);
3327  omapi_value_t **);
3328 isc_result_t dhcp_control_destroy (omapi_object_t *, const char *, int);
3330  const char *, va_list);
3332  omapi_object_t *,
3333  omapi_object_t *);
3334 isc_result_t dhcp_control_lookup (omapi_object_t **,
3336 isc_result_t dhcp_control_create (omapi_object_t **,
3337  omapi_object_t *);
3338 isc_result_t dhcp_control_remove (omapi_object_t *,
3339  omapi_object_t *);
3340 
3343  omapi_typed_data_t *);
3346  omapi_value_t **);
3347 isc_result_t dhcp_subnet_destroy (omapi_object_t *, const char *, int);
3349  const char *, va_list);
3351  omapi_object_t *,
3352  omapi_object_t *);
3353 isc_result_t dhcp_subnet_lookup (omapi_object_t **,
3355 isc_result_t dhcp_subnet_create (omapi_object_t **,
3356  omapi_object_t *);
3357 isc_result_t dhcp_subnet_remove (omapi_object_t *,
3358  omapi_object_t *);
3359 
3361  omapi_object_t *,
3363  omapi_typed_data_t *);
3365  omapi_object_t *,
3367  omapi_value_t **);
3368 isc_result_t dhcp_shared_network_destroy (omapi_object_t *, const char *, int);
3370  const char *, va_list);
3372  omapi_object_t *,
3373  omapi_object_t *);
3377  omapi_object_t *);
3379  omapi_object_t *);
3380 
3381 /* omapi.c */
3382 extern int (*dhcp_interface_shutdown_hook) (struct interface_info *);
3383 
3388 
3389 #if defined (FAILOVER_PROTOCOL)
3393 #endif
3394 
3395 void dhcp_db_objects_setup (void);
3396 
3399  omapi_typed_data_t *);
3402  omapi_value_t **);
3403 isc_result_t dhcp_lease_destroy (omapi_object_t *, const char *, int);
3405  const char *, va_list);
3406 isc_result_t dhcp_lease_stuff_values (omapi_object_t *,
3407  omapi_object_t *,
3408  omapi_object_t *);
3409 isc_result_t dhcp_lease_lookup (omapi_object_t **,
3411 isc_result_t dhcp_lease_create (omapi_object_t **,
3412  omapi_object_t *);
3413 isc_result_t dhcp_lease_remove (omapi_object_t *,
3414  omapi_object_t *);
3417  omapi_typed_data_t *);
3420  omapi_value_t **);
3421 isc_result_t dhcp_host_destroy (omapi_object_t *, const char *, int);
3423  const char *, va_list);
3424 isc_result_t dhcp_host_stuff_values (omapi_object_t *,
3425  omapi_object_t *,
3426  omapi_object_t *);
3427 isc_result_t dhcp_host_lookup (omapi_object_t **,
3429 isc_result_t dhcp_host_create (omapi_object_t **,
3430  omapi_object_t *);
3431 isc_result_t dhcp_host_remove (omapi_object_t *,
3432  omapi_object_t *);
3435  omapi_typed_data_t *);
3438  omapi_value_t **);
3439 isc_result_t dhcp_pool_destroy (omapi_object_t *, const char *, int);
3441  const char *, va_list);
3442 isc_result_t dhcp_pool_stuff_values (omapi_object_t *,
3443  omapi_object_t *,
3444  omapi_object_t *);
3445 isc_result_t dhcp_pool_lookup (omapi_object_t **,
3447 isc_result_t dhcp_pool_create (omapi_object_t **,
3448  omapi_object_t *);
3449 isc_result_t dhcp_pool_remove (omapi_object_t *,
3450  omapi_object_t *);
3453  omapi_typed_data_t *);
3456  omapi_value_t **);
3457 isc_result_t dhcp_class_destroy (omapi_object_t *, const char *, int);
3459  const char *, va_list);
3460 isc_result_t dhcp_class_stuff_values (omapi_object_t *,
3461  omapi_object_t *,
3462  omapi_object_t *);
3463 isc_result_t dhcp_class_lookup (omapi_object_t **,
3465 isc_result_t dhcp_class_create (omapi_object_t **,
3466  omapi_object_t *);
3467 isc_result_t dhcp_class_remove (omapi_object_t *,
3468  omapi_object_t *);
3471  omapi_typed_data_t *);
3474  omapi_value_t **);
3475 isc_result_t dhcp_subclass_destroy (omapi_object_t *, const char *, int);
3477  const char *, va_list);
3479  omapi_object_t *,
3480  omapi_object_t *);
3481 isc_result_t dhcp_subclass_lookup (omapi_object_t **,
3483 isc_result_t dhcp_subclass_create (omapi_object_t **,
3484  omapi_object_t *);
3485 isc_result_t dhcp_subclass_remove (omapi_object_t *,
3486  omapi_object_t *);
3488  omapi_object_t *,
3490  omapi_typed_data_t *);
3492  omapi_object_t *,
3494  omapi_value_t **);
3495 isc_result_t dhcp_interface_destroy (omapi_object_t *,
3496  const char *, int);
3498  const char *,
3499  va_list ap);
3501  omapi_object_t *,
3502  omapi_object_t *);
3503 isc_result_t dhcp_interface_lookup (omapi_object_t **,
3504  omapi_object_t *,
3505  omapi_object_t *);
3506 isc_result_t dhcp_interface_create (omapi_object_t **,
3507  omapi_object_t *);
3508 isc_result_t dhcp_interface_remove (omapi_object_t *,
3509  omapi_object_t *);
3510 void interface_stash (struct interface_info *);
3511 void interface_snorf (struct interface_info *, int);
3512 
3513 isc_result_t binding_scope_set_value (struct binding_scope *, int,
3515  omapi_typed_data_t *);
3516 isc_result_t binding_scope_get_value (omapi_value_t **,
3517  struct binding_scope *,
3520  struct binding_scope *);
3521 
3522 void register_eventhandler(struct eventqueue **, void (*handler)(void *));
3523 void unregister_eventhandler(struct eventqueue **, void (*handler)(void *));
3524 void trigger_event(struct eventqueue **);
3525 
3526 /* mdb.c */
3527 
3528 extern struct subnet *subnets;
3529 extern struct shared_network *shared_networks;
3531 extern host_hash_t *host_uid_hash;
3532 extern host_hash_t *host_name_hash;
3536 
3538 
3539 extern int numclasseswritten;
3540 
3541 
3542 isc_result_t enter_class (struct class *, int, int);
3543 isc_result_t delete_class (struct class *, int);
3544 isc_result_t enter_host (struct host_decl *, int, int);
3545 isc_result_t delete_host (struct host_decl *, int);
3546 void change_host_uid(struct host_decl *host, const char *data, int len);
3547 int find_hosts_by_haddr (struct host_decl **, int,
3548  const unsigned char *, unsigned,
3549  const char *, int);
3550 int find_hosts_by_uid (struct host_decl **, const unsigned char *,
3551  unsigned, const char *, int);
3552 int find_hosts_by_option(struct host_decl **, struct packet *,
3553  struct option_state *, const char *, int);
3554 int find_host_for_network (struct subnet **, struct host_decl **,
3555  struct iaddr *, struct shared_network *);
3556 
3557 void new_address_range (struct parse *, struct iaddr, struct iaddr,
3558  struct subnet *, struct pool *,
3559  struct lease **);
3560 isc_result_t dhcp_lease_free (omapi_object_t *, const char *, int);
3561 isc_result_t dhcp_lease_get (omapi_object_t **, const char *, int);
3562 int find_grouped_subnet (struct subnet **, struct shared_network *,
3563  struct iaddr, const char *, int);
3564 int find_subnet(struct subnet **, struct iaddr, const char *, int);
3565 void enter_shared_network (struct shared_network *);
3566 void new_shared_network_interface (struct parse *,
3567  struct shared_network *,
3568  const char *);
3569 int subnet_inner_than(const struct subnet *, const struct subnet *, int);
3570 void enter_subnet (struct subnet *);
3571 void enter_lease (struct lease *);
3572 int supersede_lease (struct lease *, struct lease *, int, int, int, int);
3573 void make_binding_state_transition (struct lease *);
3574 int lease_copy (struct lease **, struct lease *, const char *, int);
3575 void release_lease (struct lease *, struct packet *);
3576 void abandon_lease (struct lease *, const char *);
3577 #if 0
3578 /* this appears to be unused and I plan to remove it SAR */
3579 void dissociate_lease (struct lease *);
3580 #endif
3581 void pool_timer (void *);
3582 int find_lease_by_uid (struct lease **, const unsigned char *,
3583  unsigned, const char *, int);
3584 int find_lease_by_hw_addr (struct lease **, const unsigned char *,
3585  unsigned, const char *, int);
3586 int find_lease_by_ip_addr (struct lease **, struct iaddr,
3587  const char *, int);
3588 void uid_hash_add (struct lease *);
3589 void uid_hash_delete (struct lease *);
3590 void hw_hash_add (struct lease *);
3591 void hw_hash_delete (struct lease *);
3592 int write_leases (void);
3593 int write_leases6(void);
3594 #if !defined(BINARY_LEASES)
3595 void lease_insert(struct lease **, struct lease *);
3596 void lease_remove(struct lease **, struct lease *);
3597 void lease_remove_all(struct lease **);
3598 #endif
3599 int lease_enqueue (struct lease *);
3600 isc_result_t lease_instantiate(const void *, unsigned, void *);
3601 void expire_all_pools (void);
3602 void dump_subnets (void);
3603 #if defined (DEBUG_MEMORY_LEAKAGE) || \
3604  defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
3605 void free_everything (void);
3606 #endif
3607 
3608 /* failover.c */
3609 #if defined (FAILOVER_PROTOCOL)
3610 extern dhcp_failover_state_t *failover_states;
3614 isc_result_t enter_failover_peer (dhcp_failover_state_t *);
3615 isc_result_t find_failover_peer (dhcp_failover_state_t **,
3616  const char *, const char *, int);
3619  const char *, va_list);
3621  omapi_object_t *,
3623  omapi_typed_data_t *);
3625  omapi_object_t *,
3627  omapi_value_t **);
3629  const char *, int);
3631  omapi_object_t *,
3632  omapi_object_t *);
3634 
3636  const char *,
3637  va_list);
3639  omapi_object_t *,
3641  omapi_typed_data_t *);
3643  omapi_object_t *,
3645  omapi_value_t **);
3647  const char *, int);
3649  omapi_object_t *,
3650  omapi_object_t *);
3653  const char *, va_list);
3654 isc_result_t dhcp_failover_state_transition (dhcp_failover_state_t *,
3655  const char *);
3656 isc_result_t dhcp_failover_set_service_state (dhcp_failover_state_t *state);
3657 void dhcp_failover_rescind_updates (dhcp_failover_state_t *);
3658 isc_result_t dhcp_failover_set_state (dhcp_failover_state_t *,
3659  enum failover_state);
3660 isc_result_t dhcp_failover_peer_state_changed (dhcp_failover_state_t *,
3661  failover_message_t *);
3664 int dhcp_failover_state_pool_check (dhcp_failover_state_t *);
3667 isc_result_t dhcp_failover_send_state (dhcp_failover_state_t *);
3668 isc_result_t dhcp_failover_send_updates (dhcp_failover_state_t *);
3669 int dhcp_failover_queue_update (struct lease *, int);
3670 int dhcp_failover_send_acks (dhcp_failover_state_t *);
3672 int dhcp_failover_queue_ack (dhcp_failover_state_t *, failover_message_t *msg);
3673 void dhcp_failover_ack_queue_remove (dhcp_failover_state_t *, struct lease *);
3675  omapi_object_t *,
3677  omapi_typed_data_t *);
3685  omapi_object_t *,
3687  omapi_value_t **);
3689  const char *, int);
3691  omapi_object_t *,
3692  omapi_object_t *);
3694  omapi_object_t *,
3695  omapi_object_t *);
3697  omapi_object_t *);
3699  omapi_object_t *);
3700 int dhcp_failover_state_match (dhcp_failover_state_t *, u_int8_t *, unsigned);
3701 int dhcp_failover_state_match_by_name(dhcp_failover_state_t *,
3702  failover_option_t *);
3705 const char *dhcp_failover_message_name (unsigned);
3706 const char *dhcp_failover_option_name (unsigned);
3707 failover_option_t *dhcp_failover_option_printf (unsigned, char *,
3708  unsigned *,
3709  unsigned,
3710  const char *, ...)
3711  __attribute__((__format__(__printf__,5,6)));
3712 failover_option_t *dhcp_failover_make_option (unsigned, char *,
3713  unsigned *, unsigned, ...);
3714 isc_result_t dhcp_failover_put_message (dhcp_failover_link_t *,
3715  omapi_object_t *, int, u_int32_t, ...);
3718  dhcp_failover_state_t *,
3719  int, const char *);
3721  int, const char *);
3722 isc_result_t dhcp_failover_send_bind_update (dhcp_failover_state_t *,
3723  struct lease *);
3724 isc_result_t dhcp_failover_send_bind_ack (dhcp_failover_state_t *,
3725  failover_message_t *,
3726  int, const char *);
3727 isc_result_t dhcp_failover_send_poolreq (dhcp_failover_state_t *);
3728 isc_result_t dhcp_failover_send_poolresp (dhcp_failover_state_t *, int);
3729 isc_result_t dhcp_failover_send_update_request (dhcp_failover_state_t *);
3730 isc_result_t dhcp_failover_send_update_request_all (dhcp_failover_state_t *);
3731 isc_result_t dhcp_failover_send_update_done (dhcp_failover_state_t *);
3732 isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *,
3733  failover_message_t *);
3734 isc_result_t dhcp_failover_process_bind_ack (dhcp_failover_state_t *,
3735  failover_message_t *);
3736 isc_result_t dhcp_failover_generate_update_queue (dhcp_failover_state_t *,
3737  int);
3738 isc_result_t dhcp_failover_process_update_request (dhcp_failover_state_t *,
3739  failover_message_t *);
3740 isc_result_t dhcp_failover_process_update_request_all (dhcp_failover_state_t *,
3741  failover_message_t *);
3742 isc_result_t dhcp_failover_process_update_done (dhcp_failover_state_t *,
3743  failover_message_t *);
3744 void ia_remove_all_lease(struct ia_xx *ia, const char *file, int line);
3746 void failover_print (char *, unsigned *, unsigned, const char *);
3747 void update_partner (struct lease *);
3748 int load_balance_mine (struct packet *, dhcp_failover_state_t *);
3749 int peer_wants_lease (struct lease *);
3751  dhcp_failover_state_t *,
3753  u_int32_t);
3756  dhcp_failover_state_t *,
3757  binding_state_t, u_int32_t);
3759 
3760 OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_state, dhcp_failover_state_t,
3764 OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_link, dhcp_failover_link_t,
3766 #endif /* FAILOVER_PROTOCOL */
3767 
3768 const char *binding_state_print (enum failover_state);
3769 
3770 /* ldap.c */
3771 #if defined(LDAP_CONFIGURATION)
3772 extern struct enumeration ldap_methods;
3773 #if defined (LDAP_USE_SSL)
3774 extern struct enumeration ldap_ssl_usage_enum;
3775 extern struct enumeration ldap_tls_reqcert_enum;
3776 extern struct enumeration ldap_tls_crlcheck_enum;
3777 #endif
3778 isc_result_t ldap_read_config (void);
3779 int find_haddr_in_ldap (struct host_decl **, int, unsigned,
3780  const unsigned char *, const char *, int);
3781 int find_subclass_in_ldap (struct class *, struct class **,
3782  struct data_string *);
3783 int find_client_in_ldap (struct host_decl **, struct packet*,
3784  struct option_state *, const char *, int);
3785 #endif
3786 
3787 /* mdb6.c */
3788 HASH_FUNCTIONS_DECL(ia, unsigned char *, struct ia_xx, ia_hash_t)
3789 HASH_FUNCTIONS_DECL(iasubopt, struct in6_addr *, struct iasubopt,
3791 
3792 isc_result_t iasubopt_allocate(struct iasubopt **iasubopt,
3793  const char *file, int line);
3794 isc_result_t iasubopt_reference(struct iasubopt **iasubopt,
3795  struct iasubopt *src,
3796  const char *file, int line);
3797 isc_result_t iasubopt_dereference(struct iasubopt **iasubopt,
3798  const char *file, int line);
3799 
3800 isc_result_t ia_make_key(struct data_string *key, u_int32_t iaid,
3801  const char *duid, unsigned int duid_len,
3802  const char *file, int line);
3803 isc_result_t ia_allocate(struct ia_xx **ia, u_int32_t iaid,
3804  const char *duid, unsigned int duid_len,
3805  const char *file, int line);
3806 isc_result_t ia_reference(struct ia_xx **ia, struct ia_xx *src,
3807  const char *file, int line);
3808 isc_result_t ia_dereference(struct ia_xx **ia,
3809  const char *file, int line);
3810 isc_result_t ia_add_iasubopt(struct ia_xx *ia, struct iasubopt *iasubopt,
3811  const char *file, int line);
3812 void ia_remove_iasubopt(struct ia_xx *ia, struct iasubopt *iasubopt,
3813  const char *file, int line);
3814 isc_boolean_t ia_equal(const struct ia_xx *a, const struct ia_xx *b);
3815 
3816 isc_result_t ipv6_pool_allocate(struct ipv6_pool **pool, u_int16_t type,
3817  const struct in6_addr *start_addr,
3818  int bits, int units,
3819  const char *file, int line);
3820 isc_result_t ipv6_pool_reference(struct ipv6_pool **pool,
3821  struct ipv6_pool *src,
3822  const char *file, int line);
3823 isc_result_t ipv6_pool_dereference(struct ipv6_pool **pool,
3824  const char *file, int line);
3825 isc_result_t create_lease6(struct ipv6_pool *pool,
3826  struct iasubopt **addr,
3827  unsigned int *attempts,
3828  const struct data_string *uid,
3829  time_t soft_lifetime_end_time);
3830 #ifdef EUI_64
3831 int valid_eui_64_duid(const struct data_string* uid, int duid_beg);
3832 int valid_for_eui_64_pool(struct ipv6_pool*, struct data_string* uid,
3833  int duid_beg, struct in6_addr* ia_addr);
3834 isc_result_t create_lease6_eui_64(struct ipv6_pool *pool,
3835  struct iasubopt **addr,
3836  const struct data_string *iaid_uid,
3837  time_t soft_lifetime_end_time);
3838 #endif
3839 isc_result_t add_lease6(struct ipv6_pool *pool,
3840  struct iasubopt *lease,
3841  time_t valid_lifetime_end_time);
3842 isc_result_t renew_lease6(struct ipv6_pool *pool, struct iasubopt *lease);
3843 isc_result_t expire_lease6(struct iasubopt **leasep,
3844  struct ipv6_pool *pool, time_t now);
3845 isc_result_t release_lease6(struct ipv6_pool *pool, struct iasubopt *lease);
3846 isc_result_t decline_lease6(struct ipv6_pool *pool, struct iasubopt *lease);
3848  const struct in6_addr *addr);
3850 isc_result_t cleanup_lease6(ia_hash_t *ia_table,
3851  struct ipv6_pool *pool,
3852  struct iasubopt *lease,
3853  struct ia_xx *ia);
3854 isc_result_t mark_lease_unavailble(struct ipv6_pool *pool,
3855  const struct in6_addr *addr);
3856 isc_result_t create_prefix6(struct ipv6_pool *pool,
3857  struct iasubopt **pref,
3858  unsigned int *attempts,
3859  const struct data_string *uid,
3860  time_t soft_lifetime_end_time);
3862  const struct in6_addr *pref, u_int8_t plen);
3863 
3864 isc_result_t add_ipv6_pool(struct ipv6_pool *pool);
3865 isc_result_t find_ipv6_pool(struct ipv6_pool **pool, u_int16_t type,
3866  const struct in6_addr *addr);
3867 isc_boolean_t ipv6_in_pool(const struct in6_addr *addr,
3868  const struct ipv6_pool *pool);
3869 isc_result_t ipv6_pond_allocate(struct ipv6_pond **pond,
3870  const char *file, int line);
3871 isc_result_t ipv6_pond_reference(struct ipv6_pond **pond,
3872  struct ipv6_pond *src,
3873  const char *file, int line);
3874 isc_result_t ipv6_pond_dereference(struct ipv6_pond **pond,
3875  const char *file, int line);
3876 
3877 isc_result_t renew_leases(struct ia_xx *ia);
3878 isc_result_t release_leases(struct ia_xx *ia);
3879 isc_result_t decline_leases(struct ia_xx *ia);
3880 void schedule_lease_timeout(struct ipv6_pool *pool);
3882 
3883 void mark_hosts_unavailable(void);
3884 void mark_phosts_unavailable(void);
3885 void mark_interfaces_unavailable(void);
3886 void report_jumbo_ranges();
3887 
3888 #if defined(DHCPv6)
3889 int find_hosts6(struct host_decl** host, struct packet* packet,
3890  const struct data_string* client_id, char* file, int line);
3891 #endif
3892 
3893 #if defined (BINARY_LEASES)
3894 /* leasechain.c */
3895 int lc_not_empty(struct leasechain *lc);
3896 void lc_add_sorted_lease(struct leasechain *lc, struct lease *lp);
3897 void lc_unlink_lease(struct leasechain *lc, struct lease *lp);
3899 struct lease *lc_get_next(struct leasechain *lc, struct lease *lp);
3900 void lc_init_growth(struct leasechain *lc, size_t growth);
3902 #endif /* BINARY_LEASES */
3903 
3904 #define MAX_ADDRESS_STRING_LEN \
3905  (sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"))
3906 
3907 /* Find the percentage of count. We need to try two different
3908  * ways to avoid rounding mistakes.
3909  */
3910 #define FIND_PERCENT(count, percent) \
3911  ((count) > (INT_MAX / 100) ? \
3912  ((count) / 100) * (percent) : ((count) * (percent)) / 100)
3913 
3914 #define FIND_POND6_PERCENT(count, percent) \
3915  ((count) > (POND_TRACK_MAX / 100) ? \
3916  ((count) / 100) * (percent) : ((count) * (percent)) / 100)
3917 
parse::line1
char line1[81]
Definition: dhcpd.h:314
initialize_server_option_spaces
void initialize_server_option_spaces(void)
Definition: stables.c:454
parse::tval
char * tval
Definition: dhcpd.h:322
dhcp_failover_state_stuff
isc_result_t dhcp_failover_state_stuff(omapi_object_t *, omapi_object_t *, omapi_object_t *)
ddns_updates
int ddns_updates(struct packet *, struct lease *, struct lease *, struct iasubopt *, struct iasubopt *, struct option_state *)
first_name_server
struct name_server * first_name_server(void)
Definition: resolv.c:169
jrefproto
#define jrefproto
Definition: osdep.h:203
parse_option_decl
int parse_option_decl(struct option_cache **, struct parse *)
Definition: parse.c:5290
token_indent_data_string
int token_indent_data_string(FILE *, int, int, const char *, const char *, struct data_string *)
Definition: print.c:1219
dhcp_failover_link_stuff_values
isc_result_t dhcp_failover_link_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
group_write_hook
int(* group_write_hook)(struct group_object *)
Definition: memory.c:33
parse_group_declaration
void parse_group_declaration(struct parse *, struct group *)
Definition: confpars.c:2977
new_permit
struct permit * new_permit(const char *, int)
host_hw_addr_hash
host_hash_t * host_hw_addr_hash
Definition: mdb.c:34
interface_stuff_values
isc_result_t interface_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
lease::starts
TIME starts
Definition: dhcpd.h:570
commit_leases
int commit_leases(void)
Definition: dhclient.c:2104
group_object::name
char * name
Definition: dhcpd.h:950
concat_dclists
int concat_dclists(struct data_string *, struct data_string *, struct data_string *)
Adds two Dc-formatted lists into a single Dc-formatted list.
Definition: tree.c:4177
option_state
Definition: dhcpd.h:396
dhcp_ddns_cb
Definition: dhcpd.h:1814
ddns_cancel
void ddns_cancel(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
dhcp_token
dhcp_token
Definition: dhctoken.h:34
dhcp_control_lookup
isc_result_t dhcp_control_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:557
dhcp_shared_network_remove
isc_result_t dhcp_shared_network_remove(omapi_object_t *, omapi_object_t *)
Definition: comapi.c:902
unset
int unset(struct binding_scope *, const char *)
Definition: tree.c:4134
set_ip_address
void set_ip_address(struct interface_info *, struct in_addr)
append_option_buffer
int append_option_buffer(struct universe *, struct option_state *, struct buffer *, unsigned char *, unsigned, unsigned, int)
Definition: options.c:2569
send_packet
ssize_t send_packet(struct interface_info *, struct packet *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *)
next_raw_token
enum dhcp_token next_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
Definition: conflex.c:380
dhcp_failover_process_bind_ack
isc_result_t dhcp_failover_process_bind_ack(dhcp_failover_state_t *, failover_message_t *)
pool::group
struct group * group
Definition: dhcpd.h:1028
dhcpack
void dhcpack(struct packet *)
Definition: dhclient.c:1774
eval_network_statements
void eval_network_statements(struct option_state **options, struct packet *packet, struct group *network_group)
Builds option set from statements at the global and network scope.
Definition: dhcp.c:5573
subnet::next_sibling
struct subnet * next_sibling
Definition: dhcpd.h:1074
enter_host
isc_result_t enter_host(struct host_decl *, int, int)
Definition: mdb.c:221
permit::permit_class
@ permit_class
Definition: dhcpd.h:1006
interface_count
int interface_count
Definition: discover.c:87
client_state::MRD
TIME MRD
Definition: dhcpd.h:1344
also_save_option
void also_save_option(struct universe *, struct option_state *, struct option_cache *)
Definition: options.c:2829
lc_add_sorted_lease
void lc_add_sorted_lease(struct leasechain *lc, struct lease *lp)
dhcp_pool_create
isc_result_t dhcp_pool_create(omapi_object_t **, omapi_object_t *)
Definition: omapi.c:1777
parse_prefix6
void parse_prefix6(struct parse *cfile, struct group *group, struct ipv6_pond *)
dhc6_ia::rebind
u_int32_t rebind
Definition: dhcpd.h:1181
host_decl::flags
int flags
Definition: dhcpd.h:987
HASH_FUNCTIONS_DECL
HASH_FUNCTIONS_DECL(option_name, const char *, struct option, option_name_hash_t) HASH_FUNCTIONS_DECL(option_code
option_state::refcnt
int refcnt
Definition: dhcpd.h:397
set_server_duid
void set_server_duid(struct data_string *new_duid)
classify_client
void classify_client(struct packet *)
Definition: class.c:55
indent
void indent(int)
rewrite_client_leases
void rewrite_client_leases(void)
Definition: dhclient.c:4054
uid_hash_add
void uid_hash_add(struct lease *)
Definition: mdb.c:2134
lease
Definition: dhcpd.h:560
parse_pool_statement
void parse_pool_statement(struct parse *, struct group *, int)
Parse a pool statement.
Definition: confpars.c:1732
dhcp_failover_state_destroy
isc_result_t dhcp_failover_state_destroy(omapi_object_t *, const char *, int)
cur_tv
struct timeval cur_tv
Definition: dispatch.c:35
ip_addr
struct iaddr ip_addr(struct iaddr, struct iaddr, u_int32_t)
Definition: inet.c:63
dhc6_ia::addrs
struct dhc6_addr * addrs
Definition: dhcpd.h:1182
parse::prev_line
char * prev_line
Definition: dhcpd.h:292
bootp
void bootp(struct packet *)
Definition: dhclient.c:2126
pool::next
struct pool * next
Definition: dhcpd.h:1027
packet::relay_source_port
isc_boolean_t relay_source_port
Definition: dhcpd.h:477
convert_subnet_decl
void convert_subnet_decl(struct parse *, jrefproto)
assemble_tr_header
void assemble_tr_header(struct interface_info *, unsigned char *, unsigned *, struct hardware *)
lease_state::giaddr
struct in_addr giaddr
Definition: dhcpd.h:680
dhcp_failover_message_name
const char * dhcp_failover_message_name(unsigned)
dhcp_class_create
isc_result_t dhcp_class_create(omapi_object_t **, omapi_object_t *)
Definition: omapi.c:2252
dhcp_interface_signal_handler
isc_result_t dhcp_interface_signal_handler(omapi_object_t *, const char *, va_list ap)
Definition: discover.c:1296
server_universe
struct universe server_universe
Definition: stables.c:176
new_leases
struct lease * new_leases(unsigned, const char *, int)
make_discover
void make_discover(struct client_state *, struct client_lease *)
Definition: dhclient.c:3768
dns_query::next_server
struct name_server * next_server
Definition: dhcpd.h:1509
binding_scope_reference
int binding_scope_reference(struct binding_scope **, struct binding_scope *, const char *, int)
Definition: alloc.c:1227
execute_statements_in_scope
void execute_statements_in_scope(struct binding_value **result, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct group *, struct group *, struct on_star *)
Definition: execute.c:570
option_state::universe_count
int universe_count
Definition: dhcpd.h:398
dhcp_failover_state_match
int dhcp_failover_state_match(dhcp_failover_state_t *, u_int8_t *, unsigned)
print_lease
void print_lease(struct lease *)
Definition: print.c:194
dhcp_subnet_signal_handler
isc_result_t dhcp_subnet_signal_handler(omapi_object_t *, const char *, va_list)
Definition: comapi.c:675
dhcp_failover_listener_restart
void dhcp_failover_listener_restart(void *)
store_options6
int store_options6(char *, int, struct option_state *, struct packet *, const int *, struct data_string *)
Definition: options.c:1048
write_statements
void write_statements(FILE *, struct executable_statement *, int)
Definition: execute.c:759
dhcp_control_set_value
isc_result_t dhcp_control_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: comapi.c:434
iasubopt::inactive_index
int inactive_index
Definition: dhcpd.h:1661
client_config::retry_interval
TIME retry_interval
Definition: dhcpd.h:1248
ipv6_pond::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:1744
shared_network::group
struct group * group
Definition: dhcpd.h:1065
omapip_p.h
isc_heap_t
struct isc_heap isc_heap_t
Definition: heap.h:47
relay_port
u_int16_t relay_port
Definition: discover.c:47
ddns_modify_fwd
isc_result_t ddns_modify_fwd(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
interface_info::bcast_addr
u_int8_t bcast_addr[20]
Definition: dhcpd.h:1382
db_time_format
int db_time_format
Definition: print.c:31
binding_scope_set_value
isc_result_t binding_scope_set_value(struct binding_scope *, int, omapi_data_string_t *, omapi_typed_data_t *)
Definition: omapi.c:2395
class::expr
struct expression * expr
Definition: dhcpd.h:1118
lease::n_uid
struct lease * n_uid
Definition: dhcpd.h:567
parse_warn
int parse_warn(struct parse *, const char *,...) __attribute__((__format__(__printf__
dhcp_io_shutdown
isc_result_t dhcp_io_shutdown(omapi_object_t *, void *)
Definition: dhcpd.c:1640
dhcp_failover_state_remove
isc_result_t dhcp_failover_state_remove(omapi_object_t *, omapi_object_t *)
dhcp_option_ev_name
int dhcp_option_ev_name(char *, size_t, struct option *)
Definition: dhclient.c:5035
ipv6_pond::permit_list
struct permit * permit_list
Definition: dhcpd.h:1746
dhc6_lease::next
struct dhc6_lease * next
Definition: dhcpd.h:1188
interface_info::configured
int configured
Definition: dhcpd.h:1415
shared_network::flags
int flags
Definition: dhcpd.h:1059
free_dhcp_packet
void free_dhcp_packet(struct dhcp_packet *, const char *, int)
Definition: alloc.c:353
universes
struct universe ** universes
Definition: tables.c:972
dns_zone::name
char * name
Definition: dhcpd.h:1518
dhcp_subnet_set_value
isc_result_t dhcp_subnet_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: comapi.c:603
fto_allowed
u_int32_t fto_allowed[]
interface_info::name
char name[IFNAMSIZ]
Definition: dhcpd.h:1403
dhcp_lease_signal_handler
isc_result_t dhcp_lease_signal_handler(omapi_object_t *, const char *, va_list)
Definition: omapi.c:541
dhcp_ddns_cb::lease_tag
char * lease_tag
Definition: dhcpd.h:1845
interface_max
int interface_max
Definition: discover.c:88
ia_remove_all_lease
void ia_remove_all_lease(struct ia_xx *ia, const char *file, int line)
Definition: mdb6.c:504
dns_wakeup
Definition: dhcpd.h:1474
parse::ugflag
int ugflag
Definition: dhcpd.h:321
server_hibernate
@ server_hibernate
Definition: dhcpd.h:526
if_register_socket
int if_register_socket(struct interface_info *, int, int *, struct in6_addr *)
got_one
isc_result_t got_one(omapi_object_t *)
Definition: discover.c:1090
interface_info::ifp
struct ifreq * ifp
Definition: dhcpd.h:1414
on_star::on_expiry
struct executable_statement * on_expiry
Definition: dhcpd.h:554
quotify_string
char * quotify_string(const char *, const char *, int)
Definition: print.c:33
lease::subnet
struct subnet * subnet
Definition: dhcpd.h:577
pool::backup
LEASE_STRUCT backup
Definition: dhcpd.h:1035
dhcp_lease_lookup
isc_result_t dhcp_lease_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:748
db_startup
void db_startup(int)
Definition: dhclient.c:2121
interface_info::rfdesc
int rfdesc
Definition: dhcpd.h:1406
rw_queue_empty
struct eventqueue * rw_queue_empty
Definition: dispatch.c:37
dhcid_tolease
void dhcid_tolease(struct data_string *, struct data_string *)
dhcp_group_lookup
isc_result_t dhcp_group_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:333
client_config::backoff_cutoff
TIME backoff_cutoff
Definition: dhcpd.h:1258
delete_group
isc_result_t delete_group(struct group_object *, int)
Definition: memory.c:35
parse_failover_state
void parse_failover_state(struct parse *, enum failover_state *, TIME *)
lease::next
struct lease * next
Definition: dhcpd.h:562
create_binding
struct binding * create_binding(struct binding_scope **, const char *)
Definition: tree.c:4049
find_lease_by_ip_addr
int find_lease_by_ip_addr(struct lease **, struct iaddr, const char *, int)
Definition: mdb.c:2052
client_lease
Definition: dhcpd.h:1139
dhc6_lease::bindings
struct dhc6_ia * bindings
Definition: dhcpd.h:1196
hardware
Definition: dhcpd.h:491
lease::uid_len
unsigned short uid_len
Definition: dhcpd.h:586
interface_info::index
int index
Definition: dhcpd.h:1405
dhc6_addr::options
struct option_state * options
Definition: dhcpd.h:1171
convert_numeric_aggregate
void convert_numeric_aggregate(struct parse *, jrefproto, int, int, int, int)
add_lease6
isc_result_t add_lease6(struct ipv6_pool *pool, struct iasubopt *lease, time_t valid_lifetime_end_time)
Definition: mdb6.c:1416
iasubopt::ia
struct ia_xx * ia
Definition: dhcpd.h:1651
get_client_id
isc_result_t get_client_id(struct packet *, struct data_string *)
expr_op
expr_op
Definition: tree.h:131
dns_zone_reference
int dns_zone_reference(struct dns_zone **, struct dns_zone *, const char *, int)
Definition: alloc.c:1166
remote_port
u_int16_t remote_port
Definition: dhclient.c:97
interface_setup
isc_result_t interface_setup(void)
Definition: discover.c:92
inet.h
dns_query::len
unsigned len
Definition: dhcpd.h:1505
lease::ends
TIME ends
Definition: dhcpd.h:570
decline_leases
isc_result_t decline_leases(struct ia_xx *ia)
Definition: mdb6.c:2368
shutdown_state
enum dhcp_shutdown_state shutdown_state
Definition: dhcpd.c:1638
nameser.h
make_client_options
void make_client_options(struct client_state *, struct client_lease *, u_int8_t *, struct option_cache *, struct iaddr *, struct option **, struct option_state **)
Definition: dhclient.c:3618
local_address6
struct in6_addr local_address6
dhc6_addr::plen
u_int8_t plen
Definition: dhcpd.h:1159
parse_client_lease_declaration
void parse_client_lease_declaration(struct parse *, struct client_lease *, struct interface_info **, struct client_state **)
Definition: clparse.c:1258
line
const char int line
Definition: dhcpd.h:3793
is_compound_expression
int is_compound_expression(struct expression *)
Definition: tree.c:3097
S_INIT
@ S_INIT
Definition: dhcpd.h:1204
lease_file_subparse
isc_result_t lease_file_subparse(struct parse *)
Definition: confpars.c:277
client_state::pending
enum dhcp_pending pending
Definition: dhcpd.h:1305
lease::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:561
print_hw_addr
char * print_hw_addr(const int, const int, const unsigned char *)
set_option
void set_option(struct universe *, struct option_state *, struct option_cache *, enum statement_op)
Definition: options.c:2403
skip_to_semi
void skip_to_semi(struct parse *)
Definition: parse.c:81
dhcp_failover_register
isc_result_t dhcp_failover_register(omapi_object_t *)
lease_remove
void lease_remove(struct lease **lq, struct lease *comp)
Definition: mdb.c:2581
lease_hw_addr_hash
lease_id_hash_t * lease_hw_addr_hash
Definition: mdb.c:39
fqdn_universe
struct universe fqdn_universe
Definition: tables.c:315
if_register_receive
void if_register_receive(struct interface_info *)
new_address_range
void new_address_range(struct parse *, struct iaddr, struct iaddr, struct subnet *, struct pool *, struct lease **)
Definition: mdb.c:782
__omapi_object_type_t
Definition: omapip.h:93
interface_get_value
isc_result_t interface_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
dhcp_failover_send_state
isc_result_t dhcp_failover_send_state(dhcp_failover_state_t *)
dhcp_failover_listener_destroy
isc_result_t dhcp_failover_listener_destroy(omapi_object_t *, const char *, int)
ia_add_iasubopt
isc_result_t ia_add_iasubopt(struct ia_xx *ia, struct iasubopt *iasubopt, const char *file, int line)
Definition: mdb6.c:439
expression_context
expression_context
Definition: tree.h:83
interface_info::anycast_mac_addr
struct hardware anycast_mac_addr
Definition: dhcpd.h:1433
dhcp_ddns_cb::flags
u_int16_t flags
Definition: dhcpd.h:1829
dhclient_interface_discovery_hook
int dhclient_interface_discovery_hook(struct interface_info *)
Definition: dhclient.c:5274
dns_zone::secondary6
struct option_cache * secondary6
Definition: dhcpd.h:1522
host_decl::relays
int relays
Definition: dhcpd.h:994
dns_zone_lookup
isc_result_t dns_zone_lookup(struct dns_zone **, const char *)
Definition: dns.c:665
dhcp_ddns_cb::transaction
void * transaction
Definition: dhcpd.h:1840
pool::failover_peer
dhcp_failover_state_t * failover_peer
Definition: dhcpd.h:1047
agent_options::length
int length
Definition: dhcpd.h:381
default_option_format
char * default_option_format
Definition: tables.c:985
server_duid_isset
isc_boolean_t server_duid_isset(void)
dhcp_interface_remove
isc_result_t dhcp_interface_remove(omapi_object_t *, omapi_object_t *)
Definition: discover.c:1466
delete_host
isc_result_t delete_host(struct host_decl *, int)
Definition: mdb.c:490
cons_agent_information_options
unsigned cons_agent_information_options(struct option_state *, struct dhcp_packet *, unsigned, unsigned)
Definition: dhclient.c:5379
detach
void detach(void)
Definition: dhclient.c:5086
dhcp_class_signal_handler
isc_result_t dhcp_class_signal_handler(omapi_object_t *, const char *, va_list)
Definition: omapi.c:2100
dhc6_lease
Definition: dhcpd.h:1187
enter_dns_host
int enter_dns_host(struct dns_host_entry **, const char *)
Definition: tree.c:204
evaluate_option_cache
int evaluate_option_cache(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct option_cache *, const char *, int)
Definition: tree.c:2699
is_data_expression
int is_data_expression(struct expression *)
Definition: tree.c:3048
known_class
struct class known_class
Definition: dhcpd.c:61
packet
Definition: dhcpd.h:405
lease::sort_time
TIME sort_time
Definition: dhcpd.h:570
dhc6_addr::flags
u_int8_t flags
Definition: dhcpd.h:1165
hashed_option_space_foreach
void hashed_option_space_foreach(struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *, void(*)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
Definition: options.c:3832
dhcp_host_set_value
isc_result_t dhcp_host_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: omapi.c:926
new_lease_file
int new_lease_file(int test_mode)
Definition: db.c:1133
evaluate_boolean_option_cache
int evaluate_boolean_option_cache(int *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct option_cache *, const char *, int)
Definition: tree.c:2733
client_state::last_write
TIME last_write
Definition: dhcpd.h:1304
dhclient_interface_shutdown_hook
int dhclient_interface_shutdown_hook(struct interface_info *)
Definition: dhclient.c:5267
ia_make_key
isc_result_t ia_make_key(struct data_string *key, u_int32_t iaid, const char *duid, unsigned int duid_len, const char *file, int line)
Definition: mdb6.c:311
convert_num
void convert_num(struct parse *, unsigned char *, const char *, int, unsigned)
Definition: parse.c:840
name_server::rcdate
TIME rcdate
Definition: dhcpd.h:356
dhcp_failover_make_option
failover_option_t failover_option_t * dhcp_failover_make_option(unsigned, char *, unsigned *, unsigned,...)
parse_option_space_decl
void parse_option_space_decl(struct parse *)
Definition: parse.c:1349
lease_enqueue
int lease_enqueue(struct lease *)
Definition: mdb.c:2679
client_state::secs
u_int16_t secs
Definition: dhcpd.h:1316
P_DONT
@ P_DONT
Definition: dhcpd.h:1223
dhc6_addr::starts
TIME starts
Definition: dhcpd.h:1167
leasechain::total
size_t total
Definition: dhcpd.h:1016
client_config::vendor_space_name
char * vendor_space_name
Definition: dhcpd.h:1265
on_star::on_commit
struct executable_statement * on_commit
Definition: dhcpd.h:555
packet::dhcpv6_peer_address
struct in6_addr dhcpv6_peer_address
Definition: dhcpd.h:419
timeout::unref
tvunref_t unref
Definition: dhcpd.h:1456
lease::sort_tiebreaker
long int sort_tiebreaker
Definition: dhcpd.h:572
dhcp_class_lookup
isc_result_t dhcp_class_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:2246
if_reinitialize_fallback
void if_reinitialize_fallback(struct interface_info *)
find_ipv6_pool
isc_result_t find_ipv6_pool(struct ipv6_pool **pool, u_int16_t type, const struct in6_addr *addr)
Definition: mdb6.c:2291
parse_option_list
int parse_option_list(struct parse *, struct option ***)
Definition: clparse.c:915
omapi_data_string_t
Definition: omapip.h:80
supersede_lease
int supersede_lease(struct lease *, struct lease *, int, int, int, int)
Definition: mdb.c:1155
group::next
struct group * next
Definition: dhcpd.h:959
state_reboot
void state_reboot(void *)
Definition: dhclient.c:1610
dhcp_failover_process_update_done
isc_result_t dhcp_failover_process_update_done(dhcp_failover_state_t *, failover_message_t *)
convert_date
void convert_date(struct parse *, jrefproto, char *)
renew_leases
isc_result_t renew_leases(struct ia_xx *ia)
Definition: mdb6.c:2352
convert_class_statement
void convert_class_statement(struct parse *, jrefproto, int)
subnet::prefix_len
int prefix_len
Definition: dhcpd.h:1080
dhcp_ddns_cb::ttl
unsigned long ttl
Definition: dhcpd.h:1821
packet::client_port
int client_port
Definition: dhcpd.h:431
new_option
struct option * new_option(const char *, const char *, int)
ia_reference
isc_result_t ia_reference(struct ia_xx **ia, struct ia_xx *src, const char *file, int line)
Definition: mdb6.c:377
convert_host_name
void convert_host_name(struct parse *, jrefproto)
dhcpdiscover
void dhcpdiscover(struct packet *, int)
Definition: dhcp.c:330
have_billing_classes
int have_billing_classes
Definition: class.c:33
dns_zone::refcnt
int refcnt
Definition: dhcpd.h:1516
data_string_new
int data_string_new(struct data_string *, const char *, unsigned int, const char *, int)
Constructs a null-terminated data_string from a char* and length.
Definition: alloc.c:1272
op_precedence
int op_precedence(enum expr_op, enum expr_op)
Definition: tree.c:3200
dhcpv6_universe
struct universe dhcpv6_universe
Definition: tables.c:348
start_selecting6
void start_selecting6(struct client_state *client)
remove_if_route
void remove_if_route(struct interface_info *, struct in_addr)
get_hw_addr2
isc_result_t get_hw_addr2(struct interface_info *info)
dhcp_subnet_stuff_values
isc_result_t dhcp_subnet_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:698
path_dhcpd_pid
const char * path_dhcpd_pid
Definition: dhcpd.c:103
dns_query::waiters
caddr_t waiters
Definition: dhcpd.h:1498
client_state::RT
TIME RT
Definition: dhcpd.h:1340
option_state_reference
int option_state_reference(struct option_state **, struct option_state *, const char *, int)
Definition: alloc.c:883
interface_snorf
void interface_snorf(struct interface_info *, int)
Definition: discover.c:1571
parse_hardware_param
void parse_hardware_param(struct parse *, struct hardware *)
Definition: parse.c:615
expression
Definition: tree.h:197
binding_value
Definition: tree.h:99
new_lease_state
struct lease_state * new_lease_state(const char *, int)
parse::tokbuf
char tokbuf[1500]
Definition: dhcpd.h:324
client_config::lease_id_format
int lease_id_format
Definition: dhcpd.h:1284
convert_shared_net_statement
void convert_shared_net_statement(struct parse *, jrefproto)
ipv6_pond
ipv6_pond structure
Definition: dhcpd.h:1740
P_RELEASE
@ P_RELEASE
Definition: dhcpd.h:1218
dhcp_ddns_cb::zone_addrs
isc_sockaddr_t zone_addrs[DHCP_MAXNS]
Definition: dhcpd.h:1825
envadd_state::client
struct client_state * client
Definition: dhcpd.h:1364
print_dotted_quads
char * print_dotted_quads(unsigned, const u_int8_t *)
Definition: print.c:493
dns_host_entry_allocate
int dns_host_entry_allocate(struct dns_host_entry **, const char *, const char *, int)
Definition: alloc.c:768
state_requesting
void state_requesting(void *)
send_decline
void send_decline(void *)
Definition: dhclient.c:3336
domain_search_list
Definition: dhcpd.h:360
executable_statement_allocate
int executable_statement_allocate(struct executable_statement **, const char *, int)
Definition: alloc.c:958
subnet_number
struct iaddr subnet_number(struct iaddr, struct iaddr)
Definition: inet.c:34
option_tag::data
u_int8_t data[1]
Definition: dhcpd.h:372
ddns_update_style
int ddns_update_style
Definition: dhcpd.c:84
client_config::required_options
struct option ** required_options
Definition: dhcpd.h:1238
lc_init_growth
void lc_init_growth(struct leasechain *lc, size_t growth)
cancel_all_timeouts
void cancel_all_timeouts(void)
root_group
struct group * root_group
Definition: memory.c:31
dhcp_type_subnet
omapi_object_type_t * dhcp_type_subnet
dhcp_subnet_destroy
isc_result_t dhcp_subnet_destroy(omapi_object_t *, const char *, int)
Definition: comapi.c:652
ddns_state_name
char * ddns_state_name(int state)
client_config::on_transmission
struct group * on_transmission
Definition: dhcpd.h:1236
parse_vendor_option
void parse_vendor_option(struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *out_options, struct binding_scope **scope)
Parse a vendor option (option 43)
Definition: options.c:4611
ft_options
struct failover_option_info ft_options[]
agent_universe
struct universe agent_universe
Definition: stables.c:165
new_shared_network_interface
void new_shared_network_interface(struct parse *, struct shared_network *, const char *)
Definition: mdb.c:1066
parse_fixed_prefix6
void parse_fixed_prefix6(struct parse *cfile, struct host_decl *host_decl)
lease::pool
struct pool * pool
Definition: dhcpd.h:578
dhcp_ddns_cb::cur_func
ddns_action_t cur_func
Definition: dhcpd.h:1832
add_route_net
void add_route_net(struct interface_info *, struct in_addr, struct in_addr)
convert_hardware_addr
void convert_hardware_addr(struct parse *, jrefproto)
host_decl::fixed_addr
struct option_cache * fixed_addr
Definition: dhcpd.h:982
pool::low_threshold
int low_threshold
Definition: dhcpd.h:1050
LEASE_STRUCT
#define LEASE_STRUCT
Definition: dhcpd.h:256
pool::backup_leases
int backup_leases
Definition: dhcpd.h:1041
lookup_linked_option
struct option_cache * lookup_linked_option(struct universe *, struct option_state *, unsigned)
Definition: options.c:3978
domains
struct domain_search_list * domains
Definition: resolv.c:32
osdep.h
dns_answer::answers
unsigned char * answers[1]
Definition: dhcpd.h:1489
free_universe
void free_universe(struct universe *, const char *, int)
Definition: alloc.c:329
global_scope
struct binding_scope * global_scope
Definition: tree.c:38
pretty_escape
int pretty_escape(char **, char *, const unsigned char **, const unsigned char *)
Definition: options.c:4287
control_object_state_t
control_object_state_t
Definition: dhcpd.h:522
dhcp_interface_lookup
isc_result_t dhcp_interface_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: discover.c:1366
packet::got_requested_address
int got_requested_address
Definition: dhcpd.h:445
subnet::net
struct iaddr net
Definition: dhcpd.h:1078
dhc6_ia::iaid
unsigned char iaid[4]
Definition: dhcpd.h:1176
lease::cannot_reuse
unsigned short cannot_reuse
Definition: dhcpd.h:653
dhcp_failover_queue_update
int dhcp_failover_queue_update(struct lease *, int)
lease_state::server_name
struct data_string filename server_name
Definition: dhcpd.h:669
add_ipv6_pool
isc_result_t add_ipv6_pool(struct ipv6_pool *pool)
Definition: mdb6.c:2024
option_chain_head_allocate
dhcp_type_control int option_chain_head_allocate(struct option_chain_head **, const char *, int)
Definition: alloc.c:35
dns_question
Definition: dhcpd.h:1479
if_deregister6
void if_deregister6(struct interface_info *info)
read_conf_file
isc_result_t read_conf_file(const char *, struct group *, int, int)
Definition: confpars.c:79
send_discover
void send_discover(void *)
Definition: dhclient.c:2786
option_dereference
int option_dereference(struct option **dest, const char *file, int line)
Definition: tables.c:1011
iasubopt::addr
struct in6_addr addr
Definition: dhcpd.h:1643
dhcp_failover_keepalive
void dhcp_failover_keepalive(void *)
hashed_option_state_dereference
int hashed_option_state_dereference(struct universe *, struct option_state *, const char *, int)
Definition: options.c:3003
interfaces
struct interface_info * interfaces
Definition: discover.c:42
lease_pinged
void lease_pinged(struct iaddr, u_int8_t *, int)
Definition: dhcpd.c:1506
isc_boolean_t
isc_boolean_t
Definition: data.h:150
client_state::start_time
struct timeval start_time
Definition: dhcpd.h:1335
timeout::what
void * what
Definition: dhcpd.h:1454
assemble_hw_header
void assemble_hw_header(struct interface_info *, unsigned char *, unsigned *, struct hardware *)
dhcp_pool_lookup
isc_result_t dhcp_pool_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:1765
dhcp_failover_set_service_state
isc_result_t dhcp_failover_set_service_state(dhcp_failover_state_t *state)
dhcp_interface_destroy
isc_result_t dhcp_interface_destroy(omapi_object_t *, const char *, int)
Definition: discover.c:1267
dhcp_failover_reject_reason_print
const char * dhcp_failover_reject_reason_print(int)
binding
Definition: tree.h:117
dhcp_control_create
isc_result_t dhcp_control_create(omapi_object_t **, omapi_object_t *)
Definition: comapi.c:588
peek_token
enum dhcp_token peek_token(const char **, unsigned *, struct parse *)
Definition: conflex.c:443
outpacket_trace
trace_type_t * outpacket_trace
dhcp_failover_send_contact
void dhcp_failover_send_contact(void *)
prefix6_exists
isc_boolean_t prefix6_exists(const struct ipv6_pool *pool, const struct in6_addr *pref, u_int8_t plen)
Definition: mdb6.c:1983
dns_query::question
struct dns_question * question
Definition: dhcpd.h:1501
dns_zone::timeout
TIME timeout
Definition: dhcpd.h:1517
group_allocate
int group_allocate(struct group **, const char *, int)
Definition: alloc.c:145
packet::authenticated
int authenticated
Definition: dhcpd.h:458
host_decl::auth_key_id
struct data_string auth_key_id
Definition: dhcpd.h:986
decode_tr_header
ssize_t decode_tr_header(struct interface_info *, unsigned char *, unsigned, struct hardware *)
ia_xx::cltt
time_t cltt
Definition: dhcpd.h:1682
dhcp_class_set_value
isc_result_t dhcp_class_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: omapi.c:1948
option_chain_head
Definition: tree.h:35
dhcp_group_signal_handler
isc_result_t dhcp_group_signal_handler(omapi_object_t *, const char *, va_list)
Definition: comapi.c:256
permit::permit_all_clients
@ permit_all_clients
Definition: dhcpd.h:1004
new_client_lease
struct client_lease * new_client_lease(const char *, int)
class::submatch
struct expression * submatch
Definition: dhcpd.h:1122
dhcp_subnet_create
isc_result_t dhcp_subnet_create(omapi_object_t **, omapi_object_t *)
Definition: comapi.c:735
host_addr
u_int32_t host_addr(struct iaddr, struct iaddr)
Definition: inet.c:138
find_bound_string
int find_bound_string(struct data_string *, struct binding_scope *, const char *)
Definition: tree.c:4103
interface_info::rbuf_offset
size_t rbuf_offset
Definition: dhcpd.h:1411
ft_sizes
int ft_sizes[]
name_server
Definition: dhcpd.h:353
state_selecting
void state_selecting(void *)
Definition: dhclient.c:1689
dhcp_failover_send_update_done
isc_result_t dhcp_failover_send_update_done(dhcp_failover_state_t *)
bill_class
int bill_class(struct lease *, struct class *)
Definition: class.c:296
dhcp_interface_get_value
isc_result_t dhcp_interface_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: discover.c:1259
validate_port_pair
u_int16_t validate_port_pair(char *)
Definition: inet.c:685
dhcp
void dhcp(struct packet *)
Definition: dhclient.c:2159
outstanding_pings
int outstanding_pings
Definition: dhcp.c:49
leasequeue
Definition: dhcpd.h:1442
set_gid
gid_t set_gid
lease_mine_to_reallocate
int lease_mine_to_reallocate(struct lease *)
ipv6_pool::ipv6_pond
struct ipv6_pond * ipv6_pond
Definition: dhcpd.h:1726
collection
Definition: dhcpd.h:1084
dhcp_failover_send_bind_update
isc_result_t dhcp_failover_send_bind_update(dhcp_failover_state_t *, struct lease *)
prefix_length_modes
struct enumeration prefix_length_modes
Definition: stables.c:378
read_client_leases
void read_client_leases(void)
Definition: clparse.c:369
dns_zone::secondary
struct option_cache * secondary
Definition: dhcpd.h:1520
path_dhclient_script
char * path_dhclient_script
Definition: dhclient.c:61
lease_state::got_server_identifier
int got_server_identifier
Definition: dhcpd.h:671
get_server_source_address
void get_server_source_address(struct in_addr *from, struct option_state *options, struct option_state *out_options, struct packet *packet)
Definition: dhcp.c:5487
dhcp_interface_set_value
isc_result_t dhcp_interface_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: discover.c:1222
lease::ddns_cb
struct dhcp_ddns_cb * ddns_cb
Definition: dhcpd.h:650
is_boolean_expression
int is_boolean_expression(struct expression *)
Definition: tree.c:3031
dhcp_max_agent_option_packet_length
int dhcp_max_agent_option_packet_length
Definition: dhclient.c:69
packet::dhcp4o6_response
struct data_string * dhcp4o6_response
Definition: dhcpd.h:428
report_jumbo_ranges
void report_jumbo_ranges()
Definition: mdb6.c:2739
ipv6_pond::logged
int logged
Definition: dhcpd.h:1757
write_ia
int write_ia(const struct ia_xx *)
Definition: db.c:518
parse_option_buffer
int parse_option_buffer(struct option_state *, const unsigned char *, unsigned, struct universe *)
Definition: options.c:119
read_client_conf
isc_result_t read_client_conf(void)
Definition: clparse.c:58
packet6_len_okay
int packet6_len_okay(const char *, int)
Definition: options.c:4135
parse_auth_key
int parse_auth_key(struct data_string *, struct parse *)
subnet::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:1072
dhcp_control_object_t
Definition: dhcpd.h:531
add_enumeration
void add_enumeration(struct enumeration *)
Definition: parse.c:41
state_stop
void state_stop(void *)
Definition: dhclient.c:2080
find_class
isc_result_t find_class(struct class **, const char *, const char *, int)
Definition: dhclient.c:1527
skip_to_rbrace
void skip_to_rbrace(struct parse *, int)
Definition: parse.c:98
state_bound
void state_bound(void *)
Definition: dhclient.c:2038
parse_string
int parse_string(struct parse *, char **, unsigned *)
Definition: parse.c:156
script_write_params
void script_write_params(struct client_state *, const char *, struct client_lease *)
Adds parameters to environment variables for a script.
Definition: dhclient.c:4764
free_permit
void free_permit(struct permit *, const char *, int)
Definition: salloc.c:245
ipv6_pond::refcnt
int refcnt
Definition: dhcpd.h:1741
option_cache
Definition: dhcpd.h:385
ia_dereference
isc_result_t ia_dereference(struct ia_xx **ia, const char *file, int line)
Definition: mdb6.c:403
ia_equal
isc_boolean_t ia_equal(const struct ia_xx *a, const struct ia_xx *b)
Definition: mdb6.c:518
iasubopt::prefer
u_int32_t prefer
Definition: dhcpd.h:1649
parse_option_token
int parse_option_token(struct expression **, struct parse *, const char **, struct expression *, int, int)
Definition: parse.c:4978
client_option_envadd
void client_option_envadd(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *)
Definition: dhclient.c:4703
range2cidr
isc_result_t range2cidr(struct iaddrcidrnetlist **result, const struct iaddr *lo, const struct iaddr *hi)
Definition: inet.c:360
trigger_event
void trigger_event(struct eventqueue **)
Definition: dispatch.c:91
permitted
int permitted(struct packet *, struct permit *)
Definition: dhcp.c:5178
client_state::state
enum dhcp_state state
Definition: dhcpd.h:1303
change_host_uid
void change_host_uid(struct host_decl *host, const char *data, int len)
Definition: mdb.c:184
add_timeout
void add_timeout(struct timeval *, void(*)(void *), void *, tvref_t, tvunref_t)
Definition: dispatch.c:206
dhcp_failover_state_signal
isc_result_t dhcp_failover_state_signal(omapi_object_t *, const char *, va_list)
dhcp4o6_start
void dhcp4o6_start(void)
dhcp_pending
dhcp_pending
Definition: dhcpd.h:1215
path_dhclient_conf
const char * path_dhclient_conf
Definition: dhclient.c:57
unregister_eventhandler
void unregister_eventhandler(struct eventqueue **, void(*handler)(void *))
Definition: dispatch.c:70
save_fqdn6_option
void save_fqdn6_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
Definition: options.c:3545
data_string_copy
void data_string_copy(struct data_string *, const struct data_string *, const char *, int)
Definition: alloc.c:1323
parse_class_declaration
int parse_class_declaration(struct class **, struct parse *, struct group *, int)
Definition: confpars.c:2226
dns_answer::type
u_int16_t type
Definition: dhcpd.h:1486
ipv6_pond::last_ipv6_pool
int last_ipv6_pool
Definition: dhcpd.h:1752
parse::tline
int tline
Definition: dhcpd.h:319
lease::next_pending
struct lease * next_pending
Definition: dhcpd.h:642
lease_state::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:672
end_parse
isc_result_t end_parse(struct parse **)
Definition: conflex.c:103
can_unicast_without_arp
int can_unicast_without_arp(struct interface_info *)
dhcp_state
dhcp_state
Definition: dhcpd.h:1202
expression_reference
int expression_reference(struct expression **, struct expression *, const char *, int)
Definition: alloc.c:446
client_lease::renewal
TIME renewal
Definition: dhcpd.h:1141
shutdown_dhcp
@ shutdown_dhcp
Definition: dhcpd.h:273
hash_table
Definition: hash.h:59
parse_destination_descriptor
int parse_destination_descriptor(struct parse *, struct iaddr *)
Definition: parse.c:354
validate_port
u_int16_t validate_port(char *)
Definition: inet.c:659
dhcp_type_host
omapi_object_type_t * dhcp_type_host
Definition: mdb.c:70
ia_ta_active
ia_hash_t * ia_ta_active
enter_subnet
void enter_subnet(struct subnet *)
Definition: mdb.c:1008
is_numeric_expression
int is_numeric_expression(struct expression *)
Definition: tree.c:3078
dhcp_failover_send_poolresp
isc_result_t dhcp_failover_send_poolresp(dhcp_failover_state_t *, int)
dhc6_lease::score
int score
Definition: dhcpd.h:1192
interface_trace
trace_type_t * interface_trace
client_state::next_MRD
TIME next_MRD
Definition: dhcpd.h:1345
parse::lexline
int lexline
Definition: dhcpd.h:289
quiet_interface_discovery
int quiet_interface_discovery
Definition: discover.c:44
binding_scope_dereference
int binding_scope_dereference(struct binding_scope **, const char *, int)
Definition: tree.c:3786
PACKET_MAX_CLASSES
#define PACKET_MAX_CLASSES
Definition: dhcpd.h:452
lc_get_next
struct lease * lc_get_next(struct leasechain *lc, struct lease *lp)
ddns_fqdn_t::data
u_int8_t * data
Definition: dhcpd.h:281
lease_state::packet
struct packet * packet
Definition: dhcpd.h:661
clone_group
int clone_group(struct group **, struct group *, const char *, int)
Definition: memory.c:130
ack_lease
void ack_lease(struct packet *, struct lease *, unsigned int, TIME, char *, int, struct host_decl *)
Definition: dhcp.c:2201
ia_xx::max_iasubopt
int max_iasubopt
Definition: dhcpd.h:1681
repudiate_zone
void repudiate_zone(struct dns_zone **)
parse_options
int parse_options(struct packet *)
Definition: options.c:49
parse_allow_deny
int parse_allow_deny(struct option_cache **, struct parse *, int)
Definition: clparse.c:2339
lease_state::hops
u_int8_t hops
Definition: dhcpd.h:681
dump_packet_option
void dump_packet_option(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *)
client_state::requested_address
struct iaddr requested_address
Definition: dhcpd.h:1323
ipv6_pool::units
int units
Definition: dhcpd.h:1715
S_BOUND
@ S_BOUND
Definition: dhcpd.h:1207
parse::warnings_occurred
int warnings_occurred
Definition: dhcpd.h:326
client_state::selected_lease
struct dhc6_lease * selected_lease
Definition: dhcpd.h:1332
make_binding_state_transition
void make_binding_state_transition(struct lease *)
Definition: mdb.c:1503
server_time_changed
@ server_time_changed
Definition: dhcpd.h:528
start_release6
void start_release6(struct client_state *client)
dhcp_host_create
isc_result_t dhcp_host_create(omapi_object_t **, omapi_object_t *)
Definition: omapi.c:1576
new_pair
pair new_pair(const char *, int)
enter_dns_zone
isc_result_t enter_dns_zone(struct dns_zone *)
Definition: dns.c:640
dhcp_subclass_create
isc_result_t dhcp_subclass_create(omapi_object_t **, omapi_object_t *)
Definition: omapi.c:2360
assemble_ethernet_header
void assemble_ethernet_header(struct interface_info *, unsigned char *, unsigned *, struct hardware *)
new_parse
isc_result_t new_parse(struct parse **, int, char *, unsigned, const char *, int)
Definition: conflex.c:41
universe
Definition: tree.h:301
require_all_ias
int require_all_ias
Definition: dhclient.c:112
if_register_linklocal6
void if_register_linklocal6(struct interface_info *info)
option_tag::next
struct option_tag * next
Definition: dhcpd.h:371
group_object::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:946
client_lease::is_static
unsigned int is_static
Definition: dhcpd.h:1148
enter_shared_network
void enter_shared_network(struct shared_network *)
Definition: mdb.c:1055
client_config::reject_list
struct iaddrmatchlist * reject_list
Definition: dhcpd.h:1275
dhcp_failover_ack_queue_remove
void dhcp_failover_ack_queue_remove(dhcp_failover_state_t *, struct lease *)
dhcp_control_object
dhcp_control_object_t * dhcp_control_object
lookup_hashed_option
struct option_cache * lookup_hashed_option(struct universe *, struct option_state *, unsigned)
Definition: options.c:2518
enter_lease
void enter_lease(struct lease *)
Definition: mdb.c:1112
if_register_send
void if_register_send(struct interface_info *)
leasechain
Definition: dhcpd.h:1014
client_state::active_lease
struct dhc6_lease * active_lease
Definition: dhcpd.h:1329
lease::lc
struct leasechain * lc
Definition: dhcpd.h:565
dhcp_group_get_value
isc_result_t dhcp_group_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: comapi.c:201
lease_remove_all
void lease_remove_all(struct lease **lq)
Definition: mdb.c:2542
option_tag
Definition: dhcpd.h:370
next_hashed_option
struct option_cache * next_hashed_option(struct universe *, struct option_state *, struct option_cache *)
write_expression
int write_expression(FILE *, struct expression *, int, int, int)
Definition: tree.c:3298
shared_network
Definition: dhcpd.h:1053
dns_question::data
unsigned char data[1]
Definition: dhcpd.h:1482
isclib.h
path_dhcpd_conf
const char * path_dhcpd_conf
Definition: dhcpd.c:101
P_ACCEPT
@ P_ACCEPT
Definition: dhcpd.h:1223
dhcp_shared_network_get_value
isc_result_t dhcp_shared_network_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: comapi.c:773
client_lease::rebind
TIME rebind
Definition: dhcpd.h:1141
dhcp_type_failover_listener
omapi_object_type_t * dhcp_type_failover_listener
permit::permit_unauthenticated_clients
@ permit_unauthenticated_clients
Definition: dhcpd.h:1003
cleanup
void cleanup(void)
dhcp_shared_network_create
isc_result_t dhcp_shared_network_create(omapi_object_t **, omapi_object_t *)
Definition: comapi.c:896
dhcp_control_destroy
isc_result_t dhcp_control_destroy(omapi_object_t *, const char *, int)
Definition: comapi.c:494
client_config
Definition: dhcpd.h:1226
ddns_update_fwd
isc_result_t ddns_update_fwd(struct data_string *, struct iaddr, struct data_string *, unsigned long, unsigned, unsigned)
packet::agent_options_stashed
isc_boolean_t agent_options_stashed
Definition: dhcpd.h:464
make_const_data
int make_const_data(struct expression **, const unsigned char *, unsigned, int, int, const char *, int)
Definition: tree.c:219
static_lease_dereference
void static_lease_dereference(struct lease *, const char *, int)
ipv6_pool::start_addr
struct in6_addr start_addr
Definition: dhcpd.h:1713
binding_value_allocate
int binding_value_allocate(struct binding_value **, const char *, int)
Definition: alloc.c:500
token_print_indent_concat
int token_print_indent_concat(FILE *, int, int, const char *, const char *,...)
Definition: print.c:1181
packet::packet_type
int packet_type
Definition: dhcpd.h:409
addr_cmp
int addr_cmp(const struct iaddr *a1, const struct iaddr *a2)
Definition: inet.c:211
leasechain::growth
size_t growth
Definition: dhcpd.h:1019
domain_search_list::next
struct domain_search_list * next
Definition: dhcpd.h:361
create_lease6
isc_result_t create_lease6(struct ipv6_pool *pool, struct iasubopt **addr, unsigned int *attempts, const struct data_string *uid, time_t soft_lifetime_end_time)
Definition: mdb6.c:1032
convert_address_range
void convert_address_range(struct parse *, jrefproto)
set_server_duid_from_option
isc_result_t set_server_duid_from_option(void)
linked_option_space_encapsulate
int linked_option_space_encapsulate(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
Definition: options.c:3913
path_dhclient_db
const char * path_dhclient_db
Definition: dhclient.c:58
print_hex_or_string
void print_hex_or_string(unsigned, const u_int8_t *, unsigned, char *)
Definition: print.c:419
dhcp_pool_destroy
isc_result_t dhcp_pool_destroy(omapi_object_t *, const char *, int)
Definition: omapi.c:1654
iasubopt::soft_lifetime_end_time
time_t soft_lifetime_end_time
Definition: dhcpd.h:1648
group::subnet
struct subnet * subnet
Definition: dhcpd.h:963
dns_update_state::dns_update_timeout
int dns_update_timeout
Definition: dhcpd.h:1371
S_RENEWING
@ S_RENEWING
Definition: dhcpd.h:1208
timeout::isc_timeout
isc_timer_t * isc_timeout
Definition: dhcpd.h:1457
lease_state::siaddr
struct in_addr siaddr
Definition: dhcpd.h:679
parse_X
int parse_X(struct parse *, u_int8_t *, unsigned)
Definition: parse.c:5593
dhc6_lease::server_id
struct data_string server_id
Definition: dhcpd.h:1189
dhcp_host_remove
isc_result_t dhcp_host_remove(omapi_object_t *, omapi_object_t *)
Definition: omapi.c:1592
dhcp_group_destroy
isc_result_t dhcp_group_destroy(omapi_object_t *, const char *, int)
Definition: comapi.c:226
update_partner
void update_partner(struct lease *)
parse_dns_expression
int parse_dns_expression(struct expression **, struct parse *, int *)
lc_unlink_lease
void lc_unlink_lease(struct leasechain *lc, struct lease *lp)
dns_wakeup::next
struct dns_wakeup * next
Definition: dhcpd.h:1475
shutdown_listeners
@ shutdown_listeners
Definition: dhcpd.h:270
supports_multiple_interfaces
int supports_multiple_interfaces(struct interface_info *)
dhcp_reply
void dhcp_reply(struct lease *)
Definition: dhcp.c:3924
convert_filename_decl
void convert_filename_decl(struct parse *, jrefproto)
lease_insert
void lease_insert(struct lease **lq, struct lease *comp)
Definition: mdb.c:2619
group_name_hash
group_hash_t * group_name_hash
Definition: memory.c:32
format_lease_id
char * format_lease_id(const unsigned char *s, unsigned len, int format, const char *file, int line)
Definition: print.c:1427
dispatch
void dispatch(void)
Definition: dispatch.c:109
wrapsum
u_int32_t wrapsum(u_int32_t)
Definition: packet.c:83
dhcp_failover_process_update_request_all
isc_result_t dhcp_failover_process_update_request_all(dhcp_failover_state_t *, failover_message_t *)
permit::type
enum permit::@0 type
hashed_option_space_encapsulate
int hashed_option_space_encapsulate(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
Definition: options.c:3249
packet::remote_id_len
int remote_id_len
Definition: dhcpd.h:443
permit::permit_unknown_clients
@ permit_unknown_clients
Definition: dhcpd.h:1000
option_cache::option
struct option * option
Definition: dhcpd.h:389
parse_encapsulated_suboptions
int parse_encapsulated_suboptions(struct option_state *, struct option *, const unsigned char *, unsigned, struct universe *, const char *)
Definition: options.c:337
unknown_class
struct class unknown_class
Definition: dhcpd.c:60
dhcpv6_client_assignments
void dhcpv6_client_assignments(void)
failover_state
failover_state
Definition: failover.h:288
dhcp_pool_stuff_values
isc_result_t dhcp_pool_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:1719
send_fallback
ssize_t send_fallback(struct interface_info *, struct packet *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *)
packet::dhcpv6_hop_count
unsigned char dhcpv6_hop_count
Definition: dhcpd.h:417
dhclient_interface_startup_hook
isc_result_t dhclient_interface_startup_hook(struct interface_info *)
Definition: dhclient.c:5317
ipv6_pond::prohibit_list
struct permit * prohibit_list
Definition: dhcpd.h:1747
dhcp_check_relayport
u_int16_t dhcp_check_relayport(struct packet *packet)
dhcpv6
void dhcpv6(struct packet *)
find_enumeration_value
struct enumeration_value * find_enumeration_value(const char *, int, unsigned *, const char *)
Definition: parse.c:58
dhcp_shared_network_signal_handler
isc_result_t dhcp_shared_network_signal_handler(omapi_object_t *, const char *, va_list)
Definition: comapi.c:835
iasubopt::static_lease
int static_lease
Definition: dhcpd.h:1673
path_dhcpd_db
const char * path_dhcpd_db
Definition: dhcpd.c:102
dhcp_flink_state_names
const char * dhcp_flink_state_names[]
icmp_state::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:1528
piaddrmask
char * piaddrmask(struct iaddr *, struct iaddr *)
Definition: inet.c:606
dhcp_interface_discovery_hook
int(* dhcp_interface_discovery_hook)(struct interface_info *)
Definition: discover.c:50
release_leases
isc_result_t release_leases(struct ia_xx *ia)
Definition: mdb6.c:2360
data_string
Definition: tree.h:76
pool::prohibit_list
struct permit * prohibit_list
Definition: dhcpd.h:1031
lease::ip_addr
struct iaddr ip_addr
Definition: dhcpd.h:569
dhcp_host_signal_handler
isc_result_t dhcp_host_signal_handler(omapi_object_t *, const char *, va_list)
Definition: omapi.c:1218
max_ack_delay_secs
int max_ack_delay_secs
local_port
u_int16_t local_port
Definition: dhclient.c:96
interface_stash
void interface_stash(struct interface_info *)
Definition: discover.c:1528
delete_option
void delete_option(struct universe *, struct option_state *, int)
Definition: options.c:2906
expire_all_pools
void expire_all_pools(void)
Definition: mdb.c:2835
lease_instantiate
isc_result_t lease_instantiate(const void *, unsigned, void *)
Definition: mdb.c:2765
fqdn_universe_decode
int fqdn_universe_decode(struct option_state *, const unsigned char *, unsigned, struct universe *)
Definition: options.c:366
P_NONE
@ P_NONE
Definition: dhcpd.h:1216
decode_udp_ip_header
ssize_t decode_udp_ip_header(struct interface_info *, unsigned char *, unsigned, struct sockaddr_in *, unsigned, unsigned *, int)
parse_domain_list
int struct expression * parse_domain_list(struct parse *cfile, int)
Definition: parse.c:5704
permit::permit_authenticated_clients
@ permit_authenticated_clients
Definition: dhcpd.h:1002
universe_hash
universe_hash_t * universe_hash
Definition: tables.c:971
start_info_request6
void start_info_request6(struct client_state *client)
dns_zone::key
struct auth_key * key
Definition: dhcpd.h:1523
client_config::bootp_broadcast_always
int bootp_broadcast_always
Definition: dhcpd.h:1287
abandon_lease_time
u_int32_t abandon_lease_time
Definition: dhcpd.c:99
dhcp_failover_auto_partner_down
void dhcp_failover_auto_partner_down(void *vs)
save_option_buffer
int save_option_buffer(struct universe *, struct option_state *, struct buffer *, unsigned char *, unsigned, unsigned, int)
Definition: options.c:2545
dhcp_type_shared_network
omapi_object_type_t * dhcp_type_shared_network
dhcp_ddns_cb::zone_name
unsigned char zone_name[DHCP_MAXDNS_WIRE]
Definition: dhcpd.h:1823
executable_statement_foreach
int executable_statement_foreach(struct executable_statement *, int(*)(struct executable_statement *, void *, int), void *, int)
Definition: execute.c:1120
parse_ia_na_declaration
void parse_ia_na_declaration(struct parse *)
Definition: confpars.c:4752
cons
pair cons(caddr_t, pair)
Definition: tree.c:137
uid_hash_delete
void uid_hash_delete(struct lease *)
Definition: mdb.c:2201
make_let
int make_let(struct executable_statement **, const char *)
Definition: tree.c:377
dhcp_lease_stuff_values
isc_result_t dhcp_lease_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:563
parse_byte_order_uint32
uint32_t parse_byte_order_uint32(const void *source)
evaluate_boolean_expression
int evaluate_boolean_expression(int *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *)
Definition: tree.c:694
script_init
void script_init(struct client_state *, const char *, struct string_list *)
Initializes basic variables for a script.
Definition: dhclient.c:4670
interface_info::rbuf_len
size_t rbuf_len
Definition: dhcpd.h:1412
icmp_state::icmp_handler
void(* icmp_handler)(struct iaddr, u_int8_t *, int)
Definition: dhcpd.h:1530
dhcp_pool_set_value
isc_result_t dhcp_pool_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: omapi.c:1607
on_star
Definition: dhcpd.h:553
if_deregister_receive
void if_deregister_receive(struct interface_info *)
parse::cur_line
char * cur_line
Definition: dhcpd.h:293
use_host_decl_name
void use_host_decl_name(struct packet *, struct lease *, struct option_state *)
Adds hostname option when use-host-decl-names is enabled.
Definition: dhcp.c:5732
client_state::xid
u_int32_t xid
Definition: dhcpd.h:1315
dhcp_failover_listener_t
dhcp_failover_listener_t
Definition: dhcpd.h:3762
packet_reference
int packet_reference(struct packet **, struct packet *, const char *, int)
Definition: alloc.c:1053
lease_state::xid
u_int32_t xid
Definition: dhcpd.h:675
prefix_length_mode
int prefix_length_mode
packet::class_count
int class_count
Definition: dhcpd.h:454
parse_executable_statements
int parse_executable_statements(struct executable_statement **, struct parse *, int *, enum expression_context)
Definition: parse.c:2117
hash_dump
void hash_dump(struct hash_table *)
Definition: print.c:344
interface_destroy
isc_result_t interface_destroy(omapi_object_t *, const char *, int)
pool::lease_count
int lease_count
Definition: dhcpd.h:1039
get_dhcid
int get_dhcid(dhcp_ddns_cb_t *, int, const u_int8_t *, unsigned)
lease::uid_max
unsigned short uid_max
Definition: dhcpd.h:587
dhcp_pool_remove
isc_result_t dhcp_pool_remove(omapi_object_t *, omapi_object_t *)
Definition: omapi.c:1783
lease_state::ciaddr
struct in_addr ciaddr
Definition: dhcpd.h:678
ia_xx::iaid_duid
struct data_string iaid_duid
Definition: dhcpd.h:1678
iasubopt::active_index
int active_index
Definition: dhcpd.h:1660
parse
Definition: dhcpd.h:288
lease_id_format
int lease_id_format
Definition: dhcpd.c:98
dhcp_failover_send_updates
isc_result_t dhcp_failover_send_updates(dhcp_failover_state_t *)
packet::circuit_id
u_int8_t * circuit_id
Definition: dhcpd.h:440
lease::scope
struct binding_scope * scope
Definition: dhcpd.h:575
dhcp_ddns_cb::next_op
struct dhcp_ddns_cb * next_op
Definition: dhcpd.h:1834
DHCP_MAXDNS_WIRE
#define DHCP_MAXDNS_WIRE
Definition: isclib.h:114
print_dec_1
char * print_dec_1(unsigned long)
Definition: print.c:524
parse::tlpos
int tlpos
Definition: dhcpd.h:318
parse_client_statement
void parse_client_statement(struct parse *, struct interface_info *, struct client_config *)
Definition: clparse.c:438
parse_host_declaration
void parse_host_declaration(struct parse *, struct group *)
Definition: confpars.c:1959
class::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:1099
domain_search_list::domain
char * domain
Definition: dhcpd.h:362
parse_string_list
void parse_string_list(struct parse *, struct string_list **, int)
Definition: clparse.c:2225
script_write_requested
void script_write_requested(struct client_state *)
Write out the environent variable the client requested. Write out the environment variables for the o...
Definition: dhclient.c:4887
dhcp_ddns_cb::dhcid
struct data_string dhcid
Definition: dhcpd.h:1817
client_lease::options
struct option_state * options
Definition: dhcpd.h:1151
ddns_modify_ptr
isc_result_t ddns_modify_ptr(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
dhcp_failover_state_match_by_name
int dhcp_failover_state_match_by_name(dhcp_failover_state_t *, failover_option_t *)
ia_allocate
isc_result_t ia_allocate(struct ia_xx **ia, u_int32_t iaid, const char *duid, unsigned int duid_len, const char *file, int line)
Definition: mdb6.c:339
normal_binding_state_transition_check
binding_state_t normal_binding_state_transition_check(struct lease *, dhcp_failover_state_t *, binding_state_t, u_int32_t)
lease_state::from
struct iaddr from
Definition: dhcpd.h:683
dhcp_failover_startup_timeout
void dhcp_failover_startup_timeout(void *)
default_classification_rules
struct executable_statement * default_classification_rules
Definition: class.c:31
write_lease_option
void write_lease_option(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *)
Definition: dhclient.c:4116
S_SELECTING
@ S_SELECTING
Definition: dhcpd.h:1205
dump_raw
void dump_raw(const unsigned char *, unsigned)
send_request
void send_request(void *)
Definition: dhclient.c:3124
commit_leases_timeout
void commit_leases_timeout(void *)
Definition: db.c:1024
dhcp_failover_put_message
isc_result_t dhcp_failover_put_message(dhcp_failover_link_t *, omapi_object_t *, int, u_int32_t,...)
class::nic
struct class * nic
Definition: dhcpd.h:1100
client_state::sent_options
struct option_state * sent_options
Definition: dhcpd.h:1302
dhc6_ia::next
struct dhc6_ia * next
Definition: dhcpd.h:1175
trace_conf_input
void trace_conf_input(trace_type_t *, unsigned, char *)
abandon_lease
void abandon_lease(struct lease *, const char *)
Definition: mdb.c:1830
interface_info::v6address_count
int v6address_count
Definition: dhcpd.h:1390
TIME
time_t TIME
Definition: dhcpd.h:85
suboption_foreach
void suboption_foreach(struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *, void(*)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *), struct option_cache *, const char *)
Definition: options.c:3808
expression_allocate
int expression_allocate(struct expression **, const char *, int)
Definition: alloc.c:426
dhcp_failover_state_name_print
const char * dhcp_failover_state_name_print(enum failover_state)
parse_key
int parse_key(struct parse *)
Definition: parse.c:2996
client_state::MRC
TIME MRC
Definition: dhcpd.h:1342
interface_info::wfdesc
int wfdesc
Definition: dhcpd.h:1407
ipv6_pool::num_inactive
int num_inactive
Definition: dhcpd.h:1720
if_readsocket
int if_readsocket(omapi_object_t *)
Definition: discover.c:1045
parse_subnet6_declaration
void parse_subnet6_declaration(struct parse *, struct shared_network *)
Definition: confpars.c:2852
dhcprequest
void dhcprequest(struct packet *, int, struct lease *)
Definition: dhcp.c:488
data_string_terminate
int data_string_terminate(struct data_string *, const char *, int)
Definition: alloc.c:1382
print_hex_only
void print_hex_only(unsigned, const u_int8_t *, unsigned, char *)
Definition: print.c:380
write_failover_state
int write_failover_state(dhcp_failover_state_t *)
buf_to_hex
char * buf_to_hex(const unsigned char *s, unsigned len, const char *file, int line)
Definition: print.c:1372
dump_subnets
void dump_subnets(void)
Definition: mdb.c:2933
addr_or
int addr_or(struct iaddr *result, const struct iaddr *a1, const struct iaddr *a2)
Definition: inet.c:238
iaddrmatch
Definition: inet.h:53
default_duid
struct data_string default_duid
Definition: dhclient.c:78
if_reinitialize_receive
void if_reinitialize_receive(struct interface_info *)
packet::dhcp4o6_flags
unsigned char dhcp4o6_flags[3]
Definition: dhcpd.h:425
packet_allocate
int packet_allocate(struct packet **, const char *, int)
Definition: alloc.c:1015
lc_delete_all
void lc_delete_all(struct leasechain *lc)
host_decl
Definition: dhcpd.h:970
binding_scope_stuff_values
isc_result_t binding_scope_stuff_values(omapi_object_t *, struct binding_scope *)
Definition: omapi.c:2541
dhcp_failover_send_bind_ack
isc_result_t dhcp_failover_send_bind_ack(dhcp_failover_state_t *, failover_message_t *, int, const char *)
dhcp_control_object_t::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:532
pool::valid_until
TIME valid_until
Definition: dhcpd.h:1044
path_dhclient_duid
const char * path_dhclient_duid
Definition: dhclient.c:62
ipv6_pool::bits
int bits
Definition: dhcpd.h:1714
failover_states
dhcp_failover_state_t * failover_states
dhcp_lease_free
isc_result_t dhcp_lease_free(omapi_object_t *, const char *, int)
subnet::next_subnet
struct subnet * next_subnet
Definition: dhcpd.h:1073
interface_info::circuit_id_len
unsigned circuit_id_len
Definition: dhcpd.h:1397
set_multicast_hop_limit
void set_multicast_hop_limit(struct interface_info *info, int hop_limit)
interface_initialize
isc_result_t interface_initialize(omapi_object_t *, const char *, int)
Definition: discover.c:130
addr_and
int addr_and(struct iaddr *result, const struct iaddr *a1, const struct iaddr *a2)
Definition: inet.c:267
lease_state::max_message_size
int max_message_size
Definition: dhcpd.h:667
parse_data_expression
int parse_data_expression(struct expression **, struct parse *, int *)
Definition: parse.c:3542
lease::uid
unsigned char * uid
Definition: dhcpd.h:585
timeout::when
struct timeval when
Definition: dhcpd.h:1452
set_broadcast_addr
void set_broadcast_addr(struct interface_info *, struct in_addr)
client_lease::key
struct auth_key * key
Definition: dhcpd.h:1146
dhcp_subnet_lookup
isc_result_t dhcp_subnet_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:722
parse::bufix
size_t bufix
Definition: dhcpd.h:329
dhcp_subclass_signal_handler
isc_result_t dhcp_subclass_signal_handler(omapi_object_t *, const char *, va_list)
Definition: omapi.c:2324
group_writer
int group_writer(struct group_object *)
Definition: db.c:1280
shared_network::failover_peer
dhcp_failover_state_t * failover_peer
Definition: dhcpd.h:1067
write_lease
int write_lease(struct lease *)
Definition: dhclient.c:2109
client_config::medium
struct string_list * medium
Definition: dhcpd.h:1273
convert_fixed_addr_decl
void convert_fixed_addr_decl(struct parse *, jrefproto)
option_state_dereference
int option_state_dereference(struct option_state **, const char *, int)
Definition: alloc.c:911
parse_statement
int parse_statement(struct parse *, struct group *, int, struct host_decl *, int)
Definition: confpars.c:364
group
Definition: dhcpd.h:958
dhcp_failover_link_destroy
isc_result_t dhcp_failover_link_destroy(omapi_object_t *, const char *, int)
host_decl::client_identifier
struct data_string client_identifier
Definition: dhcpd.h:976
convert_host_statement
void convert_host_statement(struct parse *, jrefproto)
schedule_lease_timeout
void schedule_lease_timeout(struct ipv6_pool *pool)
Definition: mdb6.c:2165
parse::lpos
int lpos
Definition: dhcpd.h:316
find_lease_by_hw_addr
int find_lease_by_hw_addr(struct lease **, const unsigned char *, unsigned, const char *, int)
Definition: mdb.c:2067
timeout
Definition: dhcpd.h:1450
packet::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:448
client_config::reboot_timeout
TIME reboot_timeout
Definition: dhcpd.h:1255
if_register_fallback
void if_register_fallback(struct interface_info *)
iasubopt::ddns_cb
struct dhcp_ddns_cb * ddns_cb
Definition: dhcpd.h:1669
protocol::handler
void(* handler)(struct protocol *)
Definition: dhcpd.h:1468
dhcp_failover_write_all_states
int dhcp_failover_write_all_states(void)
ia_xx::ia_type
u_int16_t ia_type
Definition: dhcpd.h:1679
dhcp_failover_state_set_value
isc_result_t dhcp_failover_state_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
write_client6_lease
isc_result_t write_client6_lease(struct client_state *client, struct dhc6_lease *lease, int rewrite, int sync)
Definition: dhclient.c:4360
ddns_cb_forget_zone
void ddns_cb_forget_zone(dhcp_ddns_cb_t *ddns_cb)
make_const_option_cache
int make_const_option_cache(struct option_cache **, struct buffer **, u_int8_t *, unsigned, struct option *, const char *, int)
Definition: tree.c:149
option_chain_head_dereference
int option_chain_head_dereference(struct option_chain_head **, const char *, int)
Definition: alloc.c:95
dhcpv6_leasequery
void dhcpv6_leasequery(struct data_string *, struct packet *)
dhcp_interface_shutdown_hook
int(* dhcp_interface_shutdown_hook)(struct interface_info *)
Definition: discover.c:52
dhcp_ddns_cb::zone_addr_count
int zone_addr_count
Definition: dhcpd.h:1826
dhcp_type_interface
omapi_object_type_t * dhcp_type_interface
Definition: discover.c:80
skip_failover_option
failover_option_t skip_failover_option
parse_lease_time
void parse_lease_time(struct parse *, TIME *)
Definition: parse.c:690
client_state::first_sending
TIME first_sending
Definition: dhcpd.h:1317
add_route_default_gateway
void add_route_default_gateway(struct interface_info *, struct in_addr)
P_REBOOT
@ P_REBOOT
Definition: dhcpd.h:1217
make_decline
void make_decline(struct client_state *, struct client_lease *)
Definition: dhclient.c:3923
client_lease::next_srv_addr
struct iaddr next_srv_addr
Definition: dhcpd.h:1152
packet::dhcpv6_container_packet
struct packet * dhcpv6_container_packet
Definition: dhcpd.h:422
parse::file
int file
Definition: dhcpd.h:327
packet::known
int known
Definition: dhcpd.h:457
append_option
int append_option(struct data_string *dst, struct universe *universe, struct option *option, struct data_string *src)
Definition: options.c:3041
lease_copy
int lease_copy(struct lease **, struct lease *, const char *, int)
Definition: mdb.c:1681
fundef_allocate
int fundef_allocate(struct fundef **, const char *, int)
Definition: alloc.c:572
db_printable_len
int db_printable_len(const unsigned char *, unsigned)
send_fallback6
ssize_t send_fallback6(struct interface_info *, struct packet *, struct dhcp_packet *, size_t, struct in6_addr *, struct sockaddr_in6 *, struct hardware *)
bind_local_address6
int bind_local_address6
addr_match
int addr_match(struct iaddr *, struct iaddrmatch *)
Definition: inet.c:184
dhcp_failover_toack_queue_timeout
void dhcp_failover_toack_queue_timeout(void *)
ipv6_pool_dereference
isc_result_t ipv6_pool_dereference(struct ipv6_pool **pool, const char *file, int line)
de-reference an IPv6 pool structure.
Definition: mdb6.c:777
permit_list_match
int permit_list_match(struct permit *, struct permit *)
Definition: confpars.c:1688
dump_packet
void dump_packet(struct packet *)
dhcp_failover_listener_get_value
isc_result_t dhcp_failover_listener_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
ia_pd_active
ia_hash_t * ia_pd_active
make_release
void make_release(struct client_state *, struct client_lease *)
Definition: dhclient.c:3983
dhcp_failover_listen
isc_result_t dhcp_failover_listen(omapi_object_t *)
print_time
const char * print_time(TIME)
Definition: print.c:1312
relinquish_lease_hunks
void relinquish_lease_hunks(void)
client_state
Definition: dhcpd.h:1293
dns_query::answer
struct dns_answer * answer
Definition: dhcpd.h:1502
dhcp_ddns_cb::zone_server_list
isc_sockaddrlist_t zone_server_list
Definition: dhcpd.h:1824
pool::free
LEASE_STRUCT free
Definition: dhcpd.h:1034
receive_packet6
ssize_t receive_packet6(struct interface_info *interface, unsigned char *buf, size_t len, struct sockaddr_in6 *from, struct in6_addr *to_addr, unsigned int *if_index)
parse_case_statement
int parse_case_statement(struct executable_statement **, struct parse *, int *, enum expression_context)
Definition: parse.c:3292
interface_info::flags
u_int32_t flags
Definition: dhcpd.h:1418
class::statements
struct executable_statement * statements
Definition: dhcpd.h:1128
ia_xx::refcnt
int refcnt
Definition: dhcpd.h:1677
leasequeue::lease
struct lease * lease
Definition: dhcpd.h:1445
dhcp_ddns_cb::timeout
TIME timeout
Definition: dhcpd.h:1830
client_state::held_leases
struct dhc6_lease * held_leases
Definition: dhcpd.h:1333
create_prefix6
isc_result_t create_prefix6(struct ipv6_pool *pool, struct iasubopt **pref, unsigned int *attempts, const struct data_string *uid, time_t soft_lifetime_end_time)
Definition: mdb6.c:1894
client_state::old_lease
struct dhc6_lease * old_lease
Definition: dhcpd.h:1330
pool::valid_from
TIME valid_from
Definition: dhcpd.h:1043
parse_ia_pd_declaration
void parse_ia_pd_declaration(struct parse *)
Definition: confpars.c:5637
option_space_encapsulate
int option_space_encapsulate(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct data_string *)
Definition: options.c:3161
dns_zone::primary6
struct option_cache * primary6
Definition: dhcpd.h:1521
interface_info::next
struct interface_info * next
Definition: dhcpd.h:1378
parse::eol_token
int eol_token
Definition: dhcpd.h:295
dns_query::next
struct dns_query * next
Definition: dhcpd.h:1493
iasubopt::ipv6_pool
struct ipv6_pool * ipv6_pool
Definition: dhcpd.h:1652
make_const_int
int make_const_int(struct expression **, unsigned long)
Definition: tree.c:254
dhcp_failover_pool_rebalance
void dhcp_failover_pool_rebalance(void *)
renew_lease6
isc_result_t renew_lease6(struct ipv6_pool *pool, struct iasubopt *lease)
Renew a lease in the pool.
Definition: mdb6.c:1625
free_pair
void free_pair(pair, const char *, int)
Definition: alloc.c:400
lease::last_xid
u_int32_t last_xid
Definition: dhcpd.h:641
protocols
struct protocol * protocols
add_option
int add_option(struct option_state *options, unsigned int option_num, void *data, unsigned int data_len)
Definition: options.c:4480
shutdown_done
@ shutdown_done
Definition: dhcpd.h:274
name_servers
struct name_server * name_servers
Definition: resolv.c:31
find_hosts_by_option
int find_hosts_by_option(struct host_decl **, struct packet *, struct option_state *, const char *, int)
Definition: mdb.c:660
convert_hardware_decl
void convert_hardware_decl(struct parse *, jrefproto)
option_cache::next
struct option_cache * next
Definition: dhcpd.h:387
top_level_config
struct client_config top_level_config
Definition: clparse.c:32
client_config::bootp_policy
enum policy bootp_policy
Definition: dhcpd.h:1266
packet::unicast
isc_boolean_t unicast
Definition: dhcpd.h:470
find_hosts_by_uid
int find_hosts_by_uid(struct host_decl **, const unsigned char *, unsigned, const char *, int)
Definition: mdb.c:652
dhc6_ia::ia_type
u_int16_t ia_type
Definition: dhcpd.h:1177
expire_lease6
isc_result_t expire_lease6(struct iasubopt **leasep, struct ipv6_pool *pool, time_t now)
Definition: mdb6.c:1742
option_state_allocate
int option_state_allocate(struct option_state **, const char *, int)
Definition: alloc.c:846
print_dns_status
void print_dns_status(int, struct dhcp_ddns_cb *, isc_result_t)
host_uid_hash
host_hash_t * host_uid_hash
Definition: mdb.c:35
client_lease::is_bootp
unsigned int is_bootp
Definition: dhcpd.h:1149
enumeration
Definition: tree.h:45
dhcp_ddns_cb::lease
void * lease
Definition: dhcpd.h:1837
path_dhclient_pid
const char * path_dhclient_pid
Definition: dhclient.c:59
S_REBOOTING
@ S_REBOOTING
Definition: dhcpd.h:1203
dhcp_type_failover_link
omapi_object_type_t * dhcp_type_failover_link
parse::line2
char line2[81]
Definition: dhcpd.h:315
parse::buflen
size_t buflen
Definition: dhcpd.h:329
client_dns_update_timeout
void client_dns_update_timeout(void *cp)
parse_switch_statement
int parse_switch_statement(struct executable_statement **, struct parse *, int *)
Definition: parse.c:3224
ipv6_pond::jumbo_range
int jumbo_range
Definition: dhcpd.h:1759
dhcp_lease_get_value
isc_result_t dhcp_lease_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: omapi.c:391
parse::saved_state
struct parse * saved_state
Definition: dhcpd.h:332
permit::permit_dynamic_bootp_clients
@ permit_dynamic_bootp_clients
Definition: dhcpd.h:1005
dhcp_failover_process_update_request
isc_result_t dhcp_failover_process_update_request(dhcp_failover_state_t *, failover_message_t *)
dhc6_lease_destroy
void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line)
bind_ds_value
int bind_ds_value(struct binding_scope **, const char *, struct data_string *)
Definition: tree.c:4080
parse_trace_setup
void parse_trace_setup(void)
failover_print
void failover_print(char *, unsigned *, unsigned, const char *)
OMAPI_OBJECT_ALLOC_DECL
OMAPI_OBJECT_ALLOC_DECL(shared_network, struct shared_network, dhcp_type_shared_network) OMAPI_OBJECT_ALLOC_DECL(dhcp_control
host_decl::n_ipaddr
struct host_decl * n_ipaddr
Definition: dhcpd.h:972
convert_lease_time
void convert_lease_time(struct parse *, jrefproto, char *)
name_server::addr
struct sockaddr_in addr
Definition: dhcpd.h:355
dhc6_ia::renew
u_int32_t renew
Definition: dhcpd.h:1180
dhcp_host_stuff_values
isc_result_t dhcp_host_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:1266
client_lease::address
struct iaddr address
Definition: dhcpd.h:1142
P_PREFER
@ P_PREFER
Definition: dhcpd.h:1223
forget_zone
void forget_zone(struct dns_zone **)
packet_dereference
int packet_dereference(struct packet **, const char *, int)
Definition: alloc.c:1081
lease::cltt
TIME cltt
Definition: dhcpd.h:640
dns_update_state
Definition: dhcpd.h:1368
dns_host_entry_reference
int dns_host_entry_reference(struct dns_host_entry **, struct dns_host_entry *, const char *, int)
Definition: alloc.c:785
class::dirty
int dirty
Definition: dhcpd.h:1111
db_printable
int db_printable(const unsigned char *)
S_REBINDING
@ S_REBINDING
Definition: dhcpd.h:1209
convert_class_decl
void convert_class_decl(struct parse *, jrefproto)
lease::client_hostname
char * client_hostname
Definition: dhcpd.h:574
receive_packet
ssize_t receive_packet(struct interface_info *, unsigned char *, size_t, struct sockaddr_in *, struct hardware *)
pools
struct ipv6_pool ** pools
class::name
char * name
Definition: dhcpd.h:1102
ia_xx::num_iasubopt
int num_iasubopt
Definition: dhcpd.h:1680
dhcp_failover_send_update_request
isc_result_t dhcp_failover_send_update_request(dhcp_failover_state_t *)
dhcp_interface_startup_hook
isc_result_t(* dhcp_interface_startup_hook)(struct interface_info *)
Definition: discover.c:51
ipv6_pond::ipv6_pools
struct ipv6_pool ** ipv6_pools
Definition: dhcpd.h:1751
eventqueue::handler
void(* handler)(void *)
Definition: dhcpd.h:1462
option_reference
int option_reference(struct option **dest, struct option *src, const char *file, int line)
Definition: tables.c:989
dhcid_fromlease
isc_result_t dhcid_fromlease(struct data_string *, struct data_string *)
mark_phosts_unavailable
void mark_phosts_unavailable(void)
Definition: mdb6.c:2521
data_string_forget
void data_string_forget(struct data_string *, const char *, int)
Definition: alloc.c:1339
dhcp_failover_send_connect
isc_result_t dhcp_failover_send_connect(omapi_object_t *)
group_object::group
struct group * group
Definition: dhcpd.h:949
dhcp_failover_recover_done
void dhcp_failover_recover_done(void *)
group::refcnt
int refcnt
Definition: dhcpd.h:961
icmp_echorequest
int icmp_echorequest(struct iaddr *)
Definition: icmp.c:128
duid_type
int duid_type
Definition: dhclient.c:79
dhcp_ddns_cb_t
struct dhcp_ddns_cb dhcp_ddns_cb_t
parse_date_core
TIME parse_date_core(struct parse *)
Definition: parse.c:978
dhcp_failover_link_get_value
isc_result_t dhcp_failover_link_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
client_dns_remove
void client_dns_remove(struct client_state *client, struct iaddr *addr)
icmp_state
struct icmp_state * icmp_state
Definition: icmp.c:34
iaddr
Definition: inet.h:31
permit::permit_after
@ permit_after
Definition: dhcpd.h:1007
dhcpleasequery
void dhcpleasequery(struct packet *, int)
Definition: dhcpleasequery.c:128
hardware::hlen
u_int8_t hlen
Definition: dhcpd.h:492
convert_host_decl
void convert_host_decl(struct parse *, jrefproto)
subnet::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:1075
default_collection
struct collection default_collection
Definition: parse.c:33
executable_statement_reference
int executable_statement_reference(struct executable_statement **, struct executable_statement *, const char *, int)
Definition: alloc.c:972
syslog_enum
struct enumeration syslog_enum
Definition: stables.c:448
free_expression
void free_expression(struct expression *, const char *, int)
Definition: alloc.c:474
host_decl::named_group
struct group_object * named_group
Definition: dhcpd.h:985
dhc6_ia::options
struct option_state * options
Definition: dhcpd.h:1184
lease::tstp
TIME tstp
Definition: dhcpd.h:637
dhcp_failover_listener_stuff
isc_result_t dhcp_failover_listener_stuff(omapi_object_t *, omapi_object_t *, omapi_object_t *)
find_lease_by_uid
int find_lease_by_uid(struct lease **, const unsigned char *, unsigned, const char *, int)
Definition: mdb.c:2059
class::billed_leases
struct lease ** billed_leases
Definition: dhcpd.h:1107
dhc6_lease::options
struct option_state * options
Definition: dhcpd.h:1198
option_cache::data
struct data_string data
Definition: dhcpd.h:390
find_lease
int find_lease(struct lease **, struct packet *, struct shared_network *, int *, int *, struct lease *, const char *, int)
Definition: dhcp.c:4213
ddns_action_t
void(* ddns_action_t)(struct dhcp_ddns_cb *ddns_cb, isc_result_t result)
Definition: dhcpd.h:1811
fallback_interface
struct interface_info * fallback_interface
Definition: dhcpd.h:2850
interface_info::address_count
int address_count
Definition: dhcpd.h:1386
dhcp_shared_network_lookup
isc_result_t dhcp_shared_network_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:883
binding_value_dereference
int binding_value_dereference(struct binding_value **, const char *, int)
Definition: tree.c:652
icmp_state
Definition: dhcpd.h:1527
expr_valid_for_context
int expr_valid_for_context(struct expression *, enum expression_context)
P_REQUIRE
@ P_REQUIRE
Definition: dhcpd.h:1223
dhclient_schedule_updates
void dhclient_schedule_updates(struct client_state *client, struct iaddr *addr, int offset)
wanted_ia_na
int wanted_ia_na
Definition: dhclient.c:109
indent_spaces
void indent_spaces(FILE *, int)
Definition: print.c:1300
lease_ip_addr_hash
lease_ip_hash_t * lease_ip_addr_hash
Definition: mdb.c:38
pool::free_leases
int free_leases
Definition: dhcpd.h:1040
parse_expression
int parse_expression(struct expression **, struct parse *, int *, enum expression_context, struct expression **, enum expr_op)
Definition: parse.c:4501
dhcp_ddns_cb::dataspace
void * dataspace
Definition: dhcpd.h:1841
lookup_fqdn6_option
struct option_cache * lookup_fqdn6_option(struct universe *universe, struct option_state *options, unsigned code)
Definition: options.c:3534
hw_hash_delete
void hw_hash_delete(struct lease *)
Definition: mdb.c:2331
echo_client_id
void echo_client_id(struct packet *, struct lease *, struct option_state *, struct option_state *)
Adds a dhcp-client-id option to a set of options Given a set of input options, it searches for echo-c...
Definition: dhcp.c:2058
host_decl::name
char * name
Definition: dhcpd.h:974
mark_hosts_unavailable
void mark_hosts_unavailable(void)
Definition: mdb6.c:2471
parse_executable_statement
int parse_executable_statement(struct executable_statement **, struct parse *, int *, enum expression_context)
Definition: parse.c:2133
dns_query
Definition: dhcpd.h:1492
dhcp_ddns_cb::fixed6_ia
struct ia_xx * fixed6_ia
Definition: dhcpd.h:1846
iasubopt_reference
isc_result_t iasubopt_reference(struct iasubopt **iasubopt, struct iasubopt *src, const char *file, int line)
Definition: mdb6.c:234
client_state::envc
int envc
Definition: dhcpd.h:1301
linked_option_space_foreach
void linked_option_space_foreach(struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *, void(*)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
Definition: options.c:4014
buffer
Definition: tree.h:60
ia_na_active
ia_hash_t * ia_na_active
new_dhcp_packet
struct dhcp_packet * new_dhcp_packet(const char *, int)
parse_address_range6
void parse_address_range6(struct parse *cfile, struct group *group, struct ipv6_pond *)
client_state::advertised_leases
struct dhc6_lease * advertised_leases
Definition: dhcpd.h:1331
if_register6
void if_register6(struct interface_info *info, int do_multicast)
dhcp_interface_stuff_values
isc_result_t dhcp_interface_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: discover.c:1332
max_ack_delay_usecs
int max_ack_delay_usecs
option_state::universes
void * universes[1]
Definition: dhcpd.h:401
vsio_universe
struct universe vsio_universe
Definition: tables.c:698
delete_fqdn6_option
void delete_fqdn6_option(struct universe *universe, struct option_state *options, int code)
Definition: options.c:3555
convert_servername_decl
void convert_servername_decl(struct parse *, jrefproto)
string_list
Definition: dhcpd.h:347
protocol
Definition: dhcpd.h:1465
agent_options::first
struct option_tag * first
Definition: dhcpd.h:382
print_dec_2
char * print_dec_2(unsigned long)
Definition: print.c:532
dhcpd_interface_setup_hook
int dhcpd_interface_setup_hook(struct interface_info *ip, struct iaddr *ia)
Definition: dhcpd.c:1578
parse_ia_ta_declaration
void parse_ia_ta_declaration(struct parse *)
Definition: confpars.c:5200
find_host_for_network
int find_host_for_network(struct subnet **, struct host_decl **, struct iaddr *, struct shared_network *)
Definition: mdb.c:736
dhcpdecline
void dhcpdecline(struct packet *, int)
Definition: dhcp.c:964
quotify_buf
char * quotify_buf(const unsigned char *, unsigned, const char, const char *, int)
Definition: print.c:71
lease::n_hw
struct lease * n_hw
Definition: dhcpd.h:567
server_id_check
int server_id_check
Definition: dhcpd.c:86
fqdn6_option_space_encapsulate
int fqdn6_option_space_encapsulate(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *universe)
Definition: options.c:3591
interface_info::hw_address
struct hardware hw_address
Definition: dhcpd.h:1381
interface_trace_setup
void interface_trace_setup(void)
int
const char int
Definition: omapip.h:442
dhcpv4_over_dhcpv6
int dhcpv4_over_dhcpv6
Definition: discover.c:48
dhcp_subnet_get_value
isc_result_t dhcp_subnet_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: comapi.c:629
interface_set_value
isc_result_t interface_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
permit::permit_known_clients
@ permit_known_clients
Definition: dhcpd.h:1001
interface_signal_handler
isc_result_t interface_signal_handler(omapi_object_t *, const char *, va_list)
collection::name
const char * name
Definition: dhcpd.h:1087
dhcp_failover_set_state
isc_result_t dhcp_failover_set_state(dhcp_failover_state_t *, enum failover_state)
discover_interfaces
void discover_interfaces(int)
Definition: discover.c:568
leasequeue::prev
struct leasequeue * prev
Definition: dhcpd.h:1443
ipv6_pool::inactive_timeouts
isc_heap_t * inactive_timeouts
Definition: dhcpd.h:1721
parse_interface_declaration
void parse_interface_declaration(struct parse *, struct client_config *, char *)
Definition: clparse.c:989
iasubopt
Definition: dhcpd.h:1641
dhcp_class_destroy
isc_result_t dhcp_class_destroy(omapi_object_t *, const char *, int)
Definition: omapi.c:1984
ipv6_pond_reference
isc_result_t ipv6_pond_reference(struct ipv6_pond **pond, struct ipv6_pond *src, const char *file, int line)
reference an IPv6 pond structure.
Definition: mdb6.c:2613
dhcp_subclass_set_value
isc_result_t dhcp_subclass_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: omapi.c:2287
option_space_foreach
void option_space_foreach(struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *, void(*)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
Definition: options.c:3789
dhcp_failover_generate_update_queue
isc_result_t dhcp_failover_generate_update_queue(dhcp_failover_state_t *, int)
dhcp_ddns_cb::fwd_name
struct data_string fwd_name
Definition: dhcpd.h:1815
convert_ip_addr_or_hostname
void convert_ip_addr_or_hostname(struct parse *, jrefproto, int)
statement.h
option_cache_dereference
int option_cache_dereference(struct option_cache **, const char *, int)
Definition: options.c:2953
client_state::MRT
TIME MRT
Definition: dhcpd.h:1343
checksum
u_int32_t checksum(unsigned char *, unsigned, u_int32_t)
Definition: packet.c:44
classify
void classify(struct packet *, struct class *)
Definition: dhclient.c:1541
S_STOPPED
@ S_STOPPED
Definition: dhcpd.h:1211
evaluate_numeric_expression
int evaluate_numeric_expression(unsigned long *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *)
Definition: tree.c:2229
lease_state::got_requested_address
int got_requested_address
Definition: dhcpd.h:670
dhcp_lease_set_value
isc_result_t dhcp_lease_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: omapi.c:200
parse_client_lease_statement
void parse_client_lease_statement(struct parse *, int)
Definition: clparse.c:1140
packet::dhcpv6_msg_type
unsigned char dhcpv6_msg_type
Definition: dhcpd.h:411
conflict_binding_state_transition_check
binding_state_t conflict_binding_state_transition_check(struct lease *, dhcp_failover_state_t *, binding_state_t, u_int32_t)
free_lease_state
void free_lease_state(struct lease_state *, const char *, int)
Definition: salloc.c:198
state_init
void state_init(void *)
Definition: dhclient.c:1663
interface_info::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:1377
client_config::auth_policy
enum policy auth_policy
Definition: dhcpd.h:1269
dhcp_ddns_cb::address
struct iaddr address
Definition: dhcpd.h:1818
icmp_state::socket
int socket
Definition: dhcpd.h:1529
postdb_startup
void postdb_startup(void)
Definition: dhcpd.c:1488
binding_state_t
u_int8_t binding_state_t
Definition: dhcpd.h:544
shared_network::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:1054
client_state::config
struct client_config * config
Definition: dhcpd.h:1299
parse_ip_addr_or_hostname
int parse_ip_addr_or_hostname(struct expression **, struct parse *, int)
Definition: parse.c:268
dhcp_failover_pool_check
void dhcp_failover_pool_check(struct pool *)
ipv6_pool::refcnt
int refcnt
Definition: dhcpd.h:1711
dummy_interfaces
struct interface_info * dummy_interfaces
Definition: dhcpd.h:2850
dhcp_ddns_cb::state
int state
Definition: dhcpd.h:1831
client_lease::server_name
char * server_name
Definition: dhcpd.h:1143
group::object
struct group_object * object
Definition: dhcpd.h:962
lease::desired_binding_state
binding_state_t desired_binding_state
Definition: dhcpd.h:625
group_object::flags
int flags
Definition: dhcpd.h:951
save_hashed_option
void save_hashed_option(struct universe *, struct option_state *, struct option_cache *, isc_boolean_t appendp)
Definition: options.c:2839
file
const char * file
Definition: dhcpd.h:3793
class::spawning
int spawning
Definition: dhcpd.h:1123
lease::atsfp
TIME atsfp
Definition: dhcpd.h:639
dhc6_addr::next
struct dhc6_addr * next
Definition: dhcpd.h:1157
supersede_group
isc_result_t supersede_group(struct group_object *, int)
Definition: memory.c:74
dhcp_failover_state_create
isc_result_t dhcp_failover_state_create(omapi_object_t **, omapi_object_t *)
iasubopt::plen
u_int8_t plen
Definition: dhcpd.h:1644
dhcp_subclass_lookup
isc_result_t dhcp_subclass_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:2351
format_has_text
int format_has_text(const char *)
interface_info::circuit_id
u_int8_t * circuit_id
Definition: dhcpd.h:1395
start_confirm6
void start_confirm6(struct client_state *client)
lookup_option
struct option_cache * lookup_option(struct universe *, struct option_state *, unsigned)
Definition: options.c:2503
dhcp6.h
dns_query::query
unsigned char * query
Definition: dhcpd.h:1504
tree.h
shared_network::interface
struct interface_info * interface
Definition: dhcpd.h:1062
parse_failover_peer
void parse_failover_peer(struct parse *, struct group *, int)
parse_ip_addr_with_subnet
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *)
Definition: parse.c:522
dhcp_shared_network_destroy
isc_result_t dhcp_shared_network_destroy(omapi_object_t *, const char *, int)
Definition: comapi.c:797
copy_server_duid
void copy_server_duid(struct data_string *ds, const char *file, int line)
interface_vector
struct interface_info ** interface_vector
Definition: discover.c:86
statement_op
statement_op
Definition: keama.h:161
mark_lease_unavailble
isc_result_t mark_lease_unavailble(struct ipv6_pool *pool, const struct in6_addr *addr)
class::group
struct group * group
Definition: dhcpd.h:1125
subnet::group
struct group * group
Definition: dhcpd.h:1081
write_host
int write_host(struct host_decl *)
Definition: dhclient.c:2115
vendor_cfg_option
lease_id_hash_t extern struct option * vendor_cfg_option
Definition: dhcpd.h:1870
hw_hash_add
void hw_hash_add(struct lease *)
Definition: mdb.c:2251
unbill_class
void unbill_class(struct lease *)
Definition: dhclient.c:1547
parse_shared_net_declaration
void parse_shared_net_declaration(struct parse *, struct group *)
Definition: confpars.c:2606
iasubopt_dereference
isc_result_t iasubopt_dereference(struct iasubopt **iasubopt, const char *file, int line)
Definition: mdb6.c:261
make_client_state
void make_client_state(struct client_state **)
Definition: clparse.c:1106
ipv6_pool::num_abandoned
isc_uint64_t num_abandoned
Definition: dhcpd.h:1718
ipv6_pool_reference
isc_result_t ipv6_pool_reference(struct ipv6_pool **pool, struct ipv6_pool *src, const char *file, int line)
reference an IPv6 pool structure.
Definition: mdb6.c:706
get_conflict_mask
u_int16_t get_conflict_mask(struct option_state *input_options)
timeout::next
struct timeout * next
Definition: dhcpd.h:1451
state_panic
void state_panic(void *)
Definition: dhclient.c:3009
lease_state
Definition: dhcpd.h:656
lease_state::expiry
unsigned char expiry[4]
Definition: dhcpd.h:668
write_client_pid_file
void write_client_pid_file(void)
Definition: dhclient.c:5128
timeouts
struct timeout * timeouts
Definition: dispatch.c:33
allocate_lease
int allocate_lease(struct lease **, struct packet *, struct pool *, int *)
Definition: dhcp.c:5019
hardware_types
const char * hardware_types[256]
Definition: tables.c:713
set_time
void set_time(TIME)
Definition: dispatch.c:36
eventqueue::next
struct eventqueue * next
Definition: dhcpd.h:1461
icmp_startup
void icmp_startup(int, void(*)(struct iaddr, u_int8_t *, int))
dhcp.h
dhcp_option_default_priority_list
int dhcp_option_default_priority_list[]
auth_key
Definition: omapip.h:147
dhcp_failover_send_acks
int dhcp_failover_send_acks(dhcp_failover_state_t *)
find_enumeration
struct enumeration * find_enumeration(const char *, int)
Definition: parse.c:47
dhcp_failover_peer_state_changed
isc_result_t dhcp_failover_peer_state_changed(dhcp_failover_state_t *, failover_message_t *)
client_config::select_interval
TIME select_interval
Definition: dhcpd.h:1252
packet_to_lease
void struct client_lease * packet_to_lease(struct packet *, struct client_state *)
Definition: dhclient.c:2584
dhcp_failover_link_signal
isc_result_t dhcp_failover_link_signal(omapi_object_t *, const char *, va_list)
option_cache_reference
int option_cache_reference(struct option_cache **, struct option_cache *, const char *, int)
Definition: alloc.c:651
lease_state::options
struct option_state * options
Definition: dhcpd.h:665
permit::after
TIME after
Definition: dhcpd.h:1010
evaluate_data_expression
int evaluate_data_expression(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *, const char *, int)
Definition: tree.c:1126
ip
Definition: ip.h:47
dhcp_failover_link_startup_timeout
void dhcp_failover_link_startup_timeout(void *)
result.h
maybe_setup_fallback
void maybe_setup_fallback(void)
dhcpv6_packet_handler
void(* dhcpv6_packet_handler)(struct interface_info *, const char *, int, int, const struct iaddr *, isc_boolean_t)
new_name_server
struct name_server * new_name_server(const char *, int)
protocol::local
void * local
Definition: dhcpd.h:1469
client_state::name
char * name
Definition: dhcpd.h:1296
dhcp_lease_remove
isc_result_t dhcp_lease_remove(omapi_object_t *, omapi_object_t *)
Definition: omapi.c:920
dhcp_failover_state_lookup
isc_result_t dhcp_failover_state_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
peek_raw_token
enum dhcp_token peek_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
Definition: conflex.c:454
binding_scope_get_value
isc_result_t binding_scope_get_value(omapi_value_t **, struct binding_scope *, omapi_data_string_t *)
Definition: omapi.c:2471
dns_answer::count
int count
Definition: dhcpd.h:1488
numclasseswritten
int numclasseswritten
Definition: mdb.c:68
lease::state
struct lease_state * state
Definition: dhcpd.h:628
binding_scope_allocate
int binding_scope_allocate(struct binding_scope **, const char *, int)
Definition: alloc.c:1194
commit_leases_timed
int commit_leases_timed(void)
Definition: db.c:1064
protocol::fd
int fd
Definition: dhcpd.h:1467
ipv6_pool::num_active
isc_uint64_t num_active
Definition: dhcpd.h:1717
print_expression
void print_expression(const char *, struct expression *)
dns_query::sent
int sent
Definition: dhcpd.h:1506
parse_option_name
isc_result_t parse_option_name(struct parse *, int, int *, struct option **)
Definition: parse.c:1208
dhcp_failover_timeout
void dhcp_failover_timeout(void *)
limited_broadcast
struct in_addr limited_broadcast
Definition: discover.c:54
make_limit
int make_limit(struct expression **, struct expression *, int)
Definition: tree.c:331
write_client_lease
int write_client_lease(struct client_state *, struct client_lease *, int, int)
Definition: dhclient.c:4514
permit
Definition: dhcpd.h:997
mark_interfaces_unavailable
void mark_interfaces_unavailable(void)
Definition: mdb6.c:2526
ddns_conflict_mask
u_int16_t ddns_conflict_mask
read_client_conf_file
int read_client_conf_file(const char *, struct interface_info *, struct client_config *)
Definition: clparse.c:294
config_universe
struct universe * config_universe
Definition: tables.c:979
eventqueue
Definition: dhcpd.h:1460
permit::next
struct permit * next
Definition: dhcpd.h:998
tvref_t
void(* tvref_t)(void *, void *, const char *, int)
Definition: dhcpd.h:1448
parse_reject_statement
void parse_reject_statement(struct parse *, struct client_config *)
Definition: clparse.c:2275
dhcpnak
void dhcpnak(struct packet *)
Definition: dhclient.c:2707
lease_state::parameter_request_list
struct data_string parameter_request_list
Definition: dhcpd.h:666
parse::lexchar
int lexchar
Definition: dhcpd.h:290
find_grouped_subnet
int find_grouped_subnet(struct subnet **, struct shared_network *, struct iaddr, const char *, int)
Definition: mdb.c:953
ipv6_pool_allocate
isc_result_t ipv6_pool_allocate(struct ipv6_pool **pool, u_int16_t type, const struct in6_addr *start_addr, int bits, int units, const char *file, int line)
Create a new IPv6 lease pool structure.
Definition: mdb6.c:640
write_billing_classes
void write_billing_classes(void)
Definition: db.c:975
evaluate_expression
int evaluate_expression(struct binding_value **, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *, const char *, int)
Definition: tree.c:500
make_concat
int make_concat(struct expression **, struct expression *, struct expression *)
Definition: tree.c:268
parse_failover_state_declaration
void parse_failover_state_declaration(struct parse *, dhcp_failover_state_t *)
dhcp_failover_startup
void dhcp_failover_startup(void)
binding_scope
Definition: tree.h:123
parse_date
TIME parse_date(struct parse *)
Definition: parse.c:1188
lease::flags
u_int8_t flags
Definition: dhcpd.h:591
parse_zone
int parse_zone(struct dns_zone *, struct parse *)
Definition: parse.c:2816
dhcp_control_signal_handler
isc_result_t dhcp_control_signal_handler(omapi_object_t *, const char *, va_list)
Definition: comapi.c:504
generate_new_server_duid
isc_result_t generate_new_server_duid(void)
client_state::interval
TIME interval
Definition: dhcpd.h:1318
ipv6_pond::num_abandoned
isc_uint64_t num_abandoned
Definition: dhcpd.h:1756
inpacket_trace
trace_type_t * inpacket_trace
parse_ip_addr
int parse_ip_addr(struct parse *, struct iaddr *)
Definition: parse.c:336
pool::next_event_time
TIME next_event_time
Definition: dhcpd.h:1038
timeout::ref
tvref_t ref
Definition: dhcpd.h:1455
dhcprelease
void dhcprelease(struct packet *, int)
Definition: dhcp.c:810
group::statements
struct executable_statement * statements
Definition: dhcpd.h:966
ddns_cb_alloc
dhcp_ddns_cb_t * ddns_cb_alloc(const char *file, int line)
wanted_ia_ta
int wanted_ia_ta
Definition: dhclient.c:110
parse_server_duid_conf
void parse_server_duid_conf(struct parse *cfile)
Definition: confparse.c:3790
packet::refcnt
int refcnt
Definition: dhcpd.h:407
wanted_ia_pd
int wanted_ia_pd
Definition: dhclient.c:111
dhc6_ia
Definition: dhcpd.h:1174
print_hex
char * print_hex(unsigned, const u_int8_t *, unsigned, unsigned)
Definition: print.c:456
ctrace.h
ddns_removals
isc_result_t ddns_removals(struct lease *, struct iasubopt *, struct dhcp_ddns_cb *, isc_boolean_t)
bootp_packet_handler
void(* bootp_packet_handler)(struct interface_info *, struct dhcp_packet *, unsigned, unsigned int, struct iaddr, struct hardware *)
Definition: discover.c:67
omapi_typed_data_t
Definition: omapip.h:48
envadd_state::prefix
const char * prefix
Definition: dhcpd.h:1365
lease::prev
struct lease * prev
Definition: dhcpd.h:564
dhc6_addr::max_life
u_int32_t max_life
Definition: dhcpd.h:1169
pool_timer
void pool_timer(void *)
Definition: mdb.c:1914
local_address
struct in_addr local_address
Definition: discover.c:57
client_state::active
struct client_lease * active
Definition: dhcpd.h:1308
option
Definition: tree.h:345
HARDWARE_ADDR_LEN
#define HARDWARE_ADDR_LEN
Definition: dhcpd.h:486
iaddrmatchlist
Definition: inet.h:60
dhcp_type_lease
omapi_object_type_t * dhcp_type_lease
Definition: omapi.c:46
ipv6_pond::valid_until
TIME valid_until
Definition: dhcpd.h:1749
executable_statement_dereference
int executable_statement_dereference(struct executable_statement **, const char *, int)
Definition: execute.c:630
option_state::site_universe
int site_universe
Definition: dhcpd.h:399
buffer_reference
int buffer_reference(struct buffer **, struct buffer *, const char *, int)
Definition: alloc.c:698
dhc6_addr::preferred_life
u_int32_t preferred_life
Definition: dhcpd.h:1168
free_domain_search_list
void free_domain_search_list(struct domain_search_list *, const char *, int)
Definition: alloc.c:337
client_location_changed
void client_location_changed(void)
Definition: dhclient.c:5155
universe_count
int universe_count
Definition: tables.c:973
hardware::hbuf
u_int8_t hbuf[HARDWARE_ADDR_LEN+1]
Definition: dhcpd.h:493
dns_update_state::address
struct iaddr address
Definition: dhcpd.h:1370
read_resolv_conf
void read_resolv_conf(TIME)
Definition: resolv.c:35
dhcp_control_remove
isc_result_t dhcp_control_remove(omapi_object_t *, omapi_object_t *)
Definition: comapi.c:595
trace_type
Definition: trace.h:65
host_decl::host_id
struct data_string host_id
Definition: dhcpd.h:978
universe_max
int universe_max
Definition: dhcpd.h:2930
lease_state::next
struct lease_state * next
Definition: dhcpd.h:657
dhcp_type_subclass
omapi_object_type_t * dhcp_type_subclass
Definition: omapi.c:49
convert_statement
void convert_statement(struct parse *)
enter_class
isc_result_t enter_class(struct class *, int, int)
Definition: mdb.c:72
set_netmask
void set_netmask(struct interface_info *, struct in_addr)
convert_option_decl
void convert_option_decl(struct parse *, jrefproto)
shared_network::next
struct shared_network * next
Definition: dhcpd.h:1055
parse_on_statement
int parse_on_statement(struct executable_statement **, struct parse *, int *)
Definition: parse.c:3144
packet::classes
struct class * classes[PACKET_MAX_CLASSES]
Definition: dhcpd.h:455
icmp_readsocket
int icmp_readsocket(omapi_object_t *)
Definition: icmp.c:119
dhcp_ddns_cb::other_dhcid_class
dns_rdataclass_t other_dhcid_class
Definition: dhcpd.h:1844
agent_options
Definition: dhcpd.h:379
client_config::requested_lease
u_int32_t requested_lease
Definition: dhcpd.h:1261
dhcp_lease_get
isc_result_t dhcp_lease_get(omapi_object_t **, const char *, int)
fqdn6_universe_decode
int fqdn6_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
Definition: options.c:3690
ipv6_pool::leases
iasubopt_hash_t * leases
Definition: dhcpd.h:1716
max_outstanding_acks
int max_outstanding_acks
fundef
Definition: tree.h:93
assemble_udp_ip_header
void assemble_udp_ip_header(struct interface_info *, unsigned char *, unsigned *, u_int32_t, u_int32_t, u_int32_t, unsigned char *, unsigned)
dont_use_fsync
int dont_use_fsync
Definition: dhcpd.c:85
parse_numeric_expression
int parse_numeric_expression(struct expression **, struct parse *, int *)
Definition: parse.c:3569
iasubopt::scope
struct binding_scope * scope
Definition: dhcpd.h:1646
class::hash_string
struct data_string hash_string
Definition: dhcpd.h:1115
free_binding_value
void free_binding_value(struct binding_value *, const char *, int)
Definition: alloc.c:548
host_decl::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:971
ipv6_pond_dereference
isc_result_t ipv6_pond_dereference(struct ipv6_pond **pond, const char *file, int line)
de-reference an IPv6 pond structure.
Definition: mdb6.c:2653
get_hw_addr
void get_hw_addr(struct interface_info *info)
parse_server_duid
void parse_server_duid(struct parse *cfile)
op_context
enum expression_context op_context(enum expr_op)
Definition: tree.c:3217
interface_info::rbuf_max
unsigned int rbuf_max
Definition: dhcpd.h:1410
get_option
int get_option(struct data_string *, struct universe *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct option_state *, struct binding_scope **, unsigned, const char *, int)
Definition: options.c:2323
lease_uid_hash
lease_id_hash_t * lease_uid_hash
Definition: mdb.c:37
collection::classes
struct class * classes
Definition: dhcpd.h:1088
relinquish_timeouts
void relinquish_timeouts(void)
parse_option_data
int parse_option_data(struct expression **expr, struct parse *cfile, int lookups, struct option *option)
Definition: parse.c:4812
lease::tsfp
TIME tsfp
Definition: dhcpd.h:638
shared_networks
struct shared_network * shared_networks
Definition: mdb.c:33
lease::next_binding_state
binding_state_t next_binding_state
Definition: dhcpd.h:624
subnet::netmask
struct iaddr netmask
Definition: dhcpd.h:1079
group_reference
int group_reference(struct group **, struct group *, const char *, int)
Definition: alloc.c:177
parse_agent_information_option
int parse_agent_information_option(struct packet *, int, u_int8_t *)
Definition: dhclient.c:5369
lease::uid_buf
unsigned char uid_buf[7]
Definition: dhcpd.h:588
lease_state::bootp_flags
u_int16_t bootp_flags
Definition: dhcpd.h:677
decode_hw_header
ssize_t decode_hw_header(struct interface_info *, unsigned char *, unsigned, struct hardware *)
print_base64
char * print_base64(const unsigned char *, unsigned, const char *, int)
Definition: print.c:121
class::superclass
struct class * superclass
Definition: dhcpd.h:1101
trace_ddns_init
void trace_ddns_init(void)
parse::tlen
int tlen
Definition: dhcpd.h:323
client_state::next
struct client_state * next
Definition: dhcpd.h:1294
delete_hashed_option
void delete_hashed_option(struct universe *, struct option_state *, int)
Definition: options.c:2918
interface_info::v6address_max
int v6address_max
Definition: dhcpd.h:1392
dhctoken.h
dhcp_class_remove
isc_result_t dhcp_class_remove(omapi_object_t *, omapi_object_t *)
Definition: omapi.c:2271
piaddr
const char * piaddr(struct iaddr)
Definition: inet.c:579
interface_info::v6addresses
struct in6_addr * v6addresses
Definition: dhcpd.h:1388
client_state::interface
struct interface_info * interface
Definition: dhcpd.h:1295
subnets
struct subnet * subnets
Definition: mdb.c:32
dns_host_entry_dereference
int dns_host_entry_dereference(struct dns_host_entry **, const char *, int)
Definition: alloc.c:813
leasequeue::next
struct leasequeue * next
Definition: dhcpd.h:1444
fqdn6_option_space_foreach
void fqdn6_option_space_foreach(struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *u, void *stuff, void(*func)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
Definition: options.c:3569
piaddrcidr
char * piaddrcidr(const struct iaddr *, unsigned int)
Definition: inet.c:637
class::hash
class_hash_t * hash
Definition: dhcpd.h:1114
client_state::alias
struct client_lease * alias
Definition: dhcpd.h:1312
class::flags
int flags
Definition: dhcpd.h:1135
packet::options
struct option_state * options
Definition: dhcpd.h:449
ia_xx
Definition: dhcpd.h:1676
interface_info::address_max
int address_max
Definition: dhcpd.h:1387
finish
void finish(char)
Definition: dhclient.c:5075
is_dns_expression
int is_dns_expression(struct expression *)
ipv6_pond::low_threshold
isc_uint64_t low_threshold
Definition: dhcpd.h:1758
dhcpoffer
void dhcpoffer(struct packet *)
Definition: dhclient.c:2446
dns_update_state::client
struct client_state * client
Definition: dhcpd.h:1369
option_mask
unsigned char option_mask[16]
Definition: dhcpd.h:1536
make_request
void make_request(struct client_state *, struct client_lease *)
Definition: dhclient.c:3833
dhc6_lease::released
isc_boolean_t released
Definition: dhcpd.h:1191
client_config::initial_interval
TIME initial_interval
Definition: dhcpd.h:1246
dhcp_failover_state_pool_check
int dhcp_failover_state_pool_check(dhcp_failover_state_t *)
__omapi_object
Definition: omapip.h:127
dhcp_ddns_cb::zone
struct dns_zone * zone
Definition: dhcpd.h:1827
dhcp_type_failover_state
omapi_object_type_t * dhcp_type_failover_state
dns_wakeup::func
void(* func)(struct dns_query *)
Definition: dhcpd.h:1476
server_running
@ server_running
Definition: dhcpd.h:524
group_object::n_dynamic
struct group_object * n_dynamic
Definition: dhcpd.h:948
initialize_common_option_spaces
void initialize_common_option_spaces(void)
Definition: tables.c:1058
envadd_state
Definition: dhcpd.h:1363
host_decl::n_dynamic
struct host_decl * n_dynamic
Definition: dhcpd.h:973
dhcp_host_destroy
isc_result_t dhcp_host_destroy(omapi_object_t *, const char *, int)
Definition: omapi.c:1190
dhcp_packet
Definition: dhcp.h:47
find_binding
struct binding * find_binding(struct binding_scope *, const char *)
Definition: tree.c:3755
find_hosts_by_haddr
int find_hosts_by_haddr(struct host_decl **, int, const unsigned char *, unsigned, const char *, int)
Definition: mdb.c:632
remove_routes
void remove_routes(struct in_addr)
subnet
Definition: dhcpd.h:1071
execute_statements
int execute_statements(struct binding_value **result, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct executable_statement *, struct on_star *)
Definition: execute.c:35
lease_state::renewal
unsigned char renewal[4]
Definition: dhcpd.h:668
dhcp_group_set_value
isc_result_t dhcp_group_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: comapi.c:127
client_config::script_name
char * script_name
Definition: dhcpd.h:1264
dhcp_group_remove
isc_result_t dhcp_group_remove(omapi_object_t *, omapi_object_t *)
Definition: comapi.c:414
dhcp_option_default_priority_list_count
int dhcp_option_default_priority_list_count
parse_boolean
int parse_boolean(struct parse *)
Definition: parse.c:3498
_pair
Definition: tree.h:30
host_decl::interface
struct hardware interface
Definition: dhcpd.h:975
dhcp_failover_listener_signal
isc_result_t dhcp_failover_listener_signal(omapi_object_t *, const char *, va_list)
packet::circuit_id_len
int circuit_id_len
Definition: dhcpd.h:441
nwip_option_space_encapsulate
int nwip_option_space_encapsulate(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
Definition: options.c:3292
dhcp_failover_queue_ack
int dhcp_failover_queue_ack(dhcp_failover_state_t *, failover_message_t *msg)
dhcp_lease_destroy
isc_result_t dhcp_lease_destroy(omapi_object_t *, const char *, int)
Definition: omapi.c:467
ipv6_pool::pool_type
u_int16_t pool_type
Definition: dhcpd.h:1712
S_DECLINING
@ S_DECLINING
Definition: dhcpd.h:1210
server_awaken
@ server_awaken
Definition: dhcpd.h:527
dhcp_subclass_remove
isc_result_t dhcp_subclass_remove(omapi_object_t *, omapi_object_t *)
Definition: omapi.c:2378
dhcp_type_pool
omapi_object_type_t * dhcp_type_pool
Definition: omapi.c:47
parse_lbrace
int parse_lbrace(struct parse *)
Definition: confparse.c:1269
parse::token_line
char * token_line
Definition: dhcpd.h:291
on_star::on_release
struct executable_statement * on_release
Definition: dhcpd.h:556
format_min_length
int format_min_length(const char *, struct option_cache *)
shutdown_omapi_connections
@ shutdown_omapi_connections
Definition: dhcpd.h:271
cons_options
int cons_options(struct packet *, struct dhcp_packet *, struct lease *, struct client_state *, int, struct option_state *, struct option_state *, struct binding_scope **, int, int, int, struct data_string *, const char *)
Definition: options.c:538
cdefs.h
dhcpv4_client_assignments
void dhcpv4_client_assignments(void)
Definition: dhclient.c:5863
string_list::next
struct string_list * next
Definition: dhcpd.h:348
parse_non_binary
int parse_non_binary(struct expression **, struct parse *, int *, enum expression_context)
Definition: parse.c:3592
interface_info::remote_id_len
unsigned remote_id_len
Definition: dhcpd.h:1401
find_subnet
int find_subnet(struct subnet **, struct iaddr, const char *, int)
Definition: dhclient.c:1552
main
int main(int, char **)
Definition: dhclient.c:240
path_resolv_conf
char path_resolv_conf[]
Definition: resolv.c:33
linked_option_state_dereference
int linked_option_state_dereference(struct universe *, struct option_state *, const char *, int)
Definition: options.c:4003
host_decl::host_id_option
struct option * host_id_option
Definition: dhcpd.h:977
save_parse_state
isc_result_t save_parse_state(struct parse *cfile)
Definition: conflex.c:128
S_REQUESTING
@ S_REQUESTING
Definition: dhcpd.h:1206
interface_info::rbuf
unsigned char * rbuf
Definition: dhcpd.h:1409
dns_zone::flags
u_int16_t flags
Definition: dhcpd.h:1524
pool::abandoned
LEASE_STRUCT abandoned
Definition: dhcpd.h:1036
parse_lease_declaration
int parse_lease_declaration(struct lease **, struct parse *)
Definition: confpars.c:3141
lease_state::secs
u_int16_t secs
Definition: dhcpd.h:676
timeout::func
void(* func)(void *)
Definition: dhcpd.h:1453
client_config::omapi_port
int omapi_port
Definition: dhcpd.h:1277
release_lease6
isc_result_t release_lease6(struct ipv6_pool *pool, struct iasubopt *lease)
Definition: mdb6.c:1801
ipv6_pond_allocate
isc_result_t ipv6_pond_allocate(struct ipv6_pond **pond, const char *file, int line)
Create a new IPv6 pond structure.
Definition: mdb6.c:2570
ipv6_pond::num_total
isc_uint64_t num_total
Definition: dhcpd.h:1754
lease_state::offered_expiry
TIME offered_expiry
Definition: dhcpd.h:663
interface_info::remote_id
u_int8_t * remote_id
Definition: dhcpd.h:1399
client_config::initial_delay
TIME initial_delay
Definition: dhcpd.h:1244
pool::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:1029
do_release_on_roam
int do_release_on_roam
failover.h
client_lease::expiry
TIME expiry
Definition: dhcpd.h:1141
pretty_print_option
const char * pretty_print_option(struct option *, const unsigned char *, unsigned, int, int)
Definition: options.c:1793
enumeration_value
Definition: tree.h:40
interface_info::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:1379
destroy_client_lease
void destroy_client_lease(struct client_lease *)
Definition: dhclient.c:4040
data_string_truncate
void data_string_truncate(struct data_string *, int)
Definition: alloc.c:1352
client_config::media
struct string_list * media
Definition: dhcpd.h:1263
lease::rewind_binding_state
binding_state_t rewind_binding_state
Definition: dhcpd.h:626
write_named_billing_class
isc_result_t write_named_billing_class(const void *, unsigned, void *)
Definition: db.c:879
client_state::medium
struct string_list * medium
Definition: dhcpd.h:1319
pool::active
LEASE_STRUCT active
Definition: dhcpd.h:1032
packet::haddr
struct hardware * haddr
Definition: dhcpd.h:435
lease::agent_options
struct option_chain_head * agent_options
Definition: dhcpd.h:580
packet::dhcpv6_transaction_id
unsigned char dhcpv6_transaction_id[3]
Definition: dhcpd.h:414
release_lease
void release_lease(struct lease *, struct packet *)
Definition: mdb.c:1755
client_state::packet_length
unsigned packet_length
Definition: dhcpd.h:1321
ipv6_pond::group
struct group * group
Definition: dhcpd.h:1743
save_linked_option
void save_linked_option(struct universe *, struct option_state *, struct option_cache *, isc_boolean_t appendp)
Definition: options.c:3869
script_go
int script_go(struct client_state *)
Calls external script.
Definition: dhclient.c:4917
dhcp_failover_option_printf
failover_option_t * dhcp_failover_option_printf(unsigned, char *, unsigned *, unsigned, const char *,...) __attribute__((__format__(__printf__
buffer_dereference
int buffer_dereference(struct buffer **, const char *, int)
Definition: alloc.c:726
host_decl::group
struct group * group
Definition: dhcpd.h:984
validate_packet
int validate_packet(struct packet *)
Definition: options.c:4531
config.h
dhcp_ddns_cb::scope
struct binding_scope ** scope
Definition: dhcpd.h:1838
fundef_reference
int fundef_reference(struct fundef **, struct fundef *, const char *, int)
Definition: alloc.c:586
ddns_styles
struct enumeration ddns_styles
Definition: stables.c:363
addr_eq
int addr_eq(struct iaddr, struct iaddr)
Definition: inet.c:166
dns_query::wakeups
struct dns_wakeup * wakeups
Definition: dhcpd.h:1507
dhcp_failover_sanity_check
void dhcp_failover_sanity_check(void)
pin6_addr
const char * pin6_addr(const struct in6_addr *)
convert_subnet_statement
void convert_subnet_statement(struct parse *, jrefproto)
lease_ping_timeout
void lease_ping_timeout(void *)
Definition: dhcpd.c:1555
binding_state_print
const char * binding_state_print(enum failover_state state)
Definition: failover.c:6505
pool
Definition: dhcpd.h:1025
setup_fallback
int setup_fallback(struct interface_info **, const char *, int)
Definition: discover.c:1056
dhcp_set_control_state
isc_result_t dhcp_set_control_state(control_object_state_t oldstate, control_object_state_t newstate)
Definition: dhclient.c:5467
dhcp_type_control
omapi_object_type_t * dhcp_type_control
locate_network
int locate_network(struct packet *)
Definition: dhcp.c:5363
parse_numeric_aggregate
unsigned char * parse_numeric_aggregate(struct parse *, unsigned char *, unsigned *, int, int, unsigned)
Definition: parse.c:734
host_decl::fixed_prefix
struct iaddrcidrnetlist * fixed_prefix
Definition: dhcpd.h:983
peer_wants_lease
int peer_wants_lease(struct lease *)
client_config::timeout
TIME timeout
Definition: dhcpd.h:1241
lc_get_first_lease
struct lease * lc_get_first_lease(struct leasechain *lc)
option_state::site_code_min
int site_code_min
Definition: dhcpd.h:400
iaddrcidrnetlist
Definition: inet.h:75
dhcp_failover_state_transition
isc_result_t dhcp_failover_state_transition(dhcp_failover_state_t *, const char *)
dhcp_class_stuff_values
isc_result_t dhcp_class_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:2146
buffer_allocate
int buffer_allocate(struct buffer **, unsigned, const char *, int)
Definition: alloc.c:679
ipv6_in_pool
isc_boolean_t ipv6_in_pool(const struct in6_addr *addr, const struct ipv6_pool *pool)
Definition: mdb6.c:2273
is_cidr_mask_valid
isc_boolean_t is_cidr_mask_valid(const struct iaddr *addr, int bits)
Definition: inet.c:303
cleanup_lease6
isc_result_t cleanup_lease6(ia_hash_t *ia_table, struct ipv6_pool *pool, struct iasubopt *lease, struct ia_xx *ia)
Cleans up leases when reading from a lease file.
Definition: mdb6.c:1306
option_cache::expression
struct expression * expression
Definition: dhcpd.h:388
dns_query::expiry
TIME expiry
Definition: dhcpd.h:1495
find_cached_zone
isc_result_t find_cached_zone(dhcp_ddns_cb_t *, int)
evaluate_boolean_expression_result
int evaluate_boolean_expression_result(int *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *)
Definition: tree.c:2780
ddns_fqdn_t
Definition: dhcpd.h:278
dns_zone_dereference
int dns_zone_dereference(struct dns_zone **, const char *, int)
Definition: dns.c:698
dhcp_control_get_value
isc_result_t dhcp_control_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: comapi.c:469
write_leases6
int write_leases6(void)
parse_ip6_addr
int parse_ip6_addr(struct parse *, struct iaddr *)
Definition: parse.c:405
nwip_universe
struct universe nwip_universe
Definition: tables.c:287
fallback_discard
isc_result_t fallback_discard(omapi_object_t *)
client_state::txcount
int txcount
Definition: dhcpd.h:1337
find_hosts6
int find_hosts6(struct host_decl **host, struct packet *packet, const struct data_string *client_id, char *file, int line)
Definition: mdb6.c:3015
write_billing_class
int write_billing_class(struct class *)
Definition: db.c:991
dhc6_lease::dhcpv6_transaction_id
unsigned char dhcpv6_transaction_id[3]
Definition: dhcpd.h:1195
option_cache::flags
u_int32_t flags
Definition: dhcpd.h:393
lease6_exists
isc_boolean_t lease6_exists(const struct ipv6_pool *pool, const struct in6_addr *addr)
Definition: mdb6.c:1526
lease::billing_class
struct class * billing_class
Definition: dhcpd.h:579
pool::index
int index
Definition: dhcpd.h:1042
dhcp_subclass_get_value
isc_result_t dhcp_subclass_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: omapi.c:2299
leasechain::list
struct lease ** list
Definition: dhcpd.h:1015
binding_state_names
const char * binding_state_names[]
Definition: stables.c:161
cancel_timeout
void cancel_timeout(void(*)(void *), void *)
Definition: dispatch.c:390
unlink_class
isc_result_t unlink_class(struct class **class)
Definition: class.c:210
next_token
enum dhcp_token next_token(const char **, unsigned *, struct parse *)
Definition: conflex.c:369
packet::sv_echo_client_id
int sv_echo_client_id
Definition: dhcpd.h:474
dhcp_class_get_value
isc_result_t dhcp_class_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: omapi.c:1959
check_collection
int check_collection(struct packet *, struct lease *, struct collection *)
Definition: dhclient.c:1533
dhcp_failover_process_bind_update
isc_result_t dhcp_failover_process_bind_update(dhcp_failover_state_t *, failover_message_t *)
if_register_lpf
int if_register_lpf(struct interface_info *)
dhcpinform
void dhcpinform(struct packet *, int)
Definition: dhcp.c:1117
dhcp_control_object_t::state
control_object_state_t state
Definition: dhcpd.h:533
parse_base64
int parse_base64(struct data_string *, struct parse *)
Definition: parse.c:1899
group::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:964
form_duid
isc_result_t form_duid(struct data_string *duid, const char *file, int line)
Definition: dhclient.c:4240
interface_info
Definition: dhcpd.h:1376
server_shutdown
@ server_shutdown
Definition: dhcpd.h:525
client_config::do_forward_update
int do_forward_update
Definition: dhcpd.h:1280
fundef_dereference
int fundef_dereference(struct fundef **, const char *, int)
Definition: tree.c:3829
ia_remove_iasubopt
void ia_remove_iasubopt(struct ia_xx *ia, struct iasubopt *iasubopt, const char *file, int line)
Definition: mdb6.c:476
client_config::on_receipt
struct group * on_receipt
Definition: dhcpd.h:1231
register_eventhandler
void register_eventhandler(struct eventqueue **, void(*handler)(void *))
ipv6_pond::next
struct ipv6_pond * next
Definition: dhcpd.h:1742
dhcp_failover_link_initiate
isc_result_t dhcp_failover_link_initiate(omapi_object_t *)
make_host_lookup
int make_host_lookup(struct expression **, const char *)
Definition: tree.c:188
client_state::leases
struct client_lease * leases
Definition: dhcpd.h:1311
packet::remote_id
u_int8_t * remote_id
Definition: dhcpd.h:442
if_reinitialize_send
void if_reinitialize_send(struct interface_info *)
group::authoritative
int authoritative
Definition: dhcpd.h:965
pdestdesc
const char * pdestdesc(struct iaddr)
Definition: inet.c:557
readconf
isc_result_t readconf(void)
Definition: confpars.c:64
nak_lease
void nak_lease(struct packet *, struct iaddr *cip, struct group *)
Constructs and sends a DHCP Nak.
Definition: dhcp.c:1810
pool::reserved
LEASE_STRUCT reserved
Definition: dhcpd.h:1037
dhcp_control_stuff_values
isc_result_t dhcp_control_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:524
dhcp_interface_create
isc_result_t dhcp_interface_create(omapi_object_t **, omapi_object_t *)
Definition: discover.c:1450
subnet::interface_address
struct iaddr interface_address
Definition: dhcpd.h:1077
read_client_duid
void read_client_duid(void)
Definition: clparse.c:333
binding_value_reference
int binding_value_reference(struct binding_value **, struct binding_value *, const char *, int)
Definition: alloc.c:520
parse_semi
int parse_semi(struct parse *)
Definition: parse.c:139
ipv6_pond::valid_from
TIME valid_from
Definition: dhcpd.h:1748
dns_zone::primary
struct option_cache * primary
Definition: dhcpd.h:1519
null_failover_option
failover_option_t null_failover_option
parse_option_statement
int parse_option_statement(struct executable_statement **, struct parse *, int, struct option *, enum statement_op)
Definition: parse.c:4919
dns_zone_allocate
int dns_zone_allocate(struct dns_zone **, const char *, int)
Definition: alloc.c:1134
local_family
int local_family
Definition: discover.c:56
client_state::env
struct string_list * env
Definition: dhcpd.h:1300
reinitialize_interfaces
void reinitialize_interfaces(void)
Definition: discover.c:1075
parse_ip6_prefix
int parse_ip6_prefix(struct parse *, struct iaddr *, u_int8_t *)
Definition: parse.c:479
save_option
void save_option(struct universe *, struct option_state *, struct option_cache *)
Definition: options.c:2818
iasubopt::refcnt
int refcnt
Definition: dhcpd.h:1642
lease6_usable
isc_boolean_t lease6_usable(struct iasubopt *lease)
Check if address is available to a lease.
Definition: mdb6.c:1554
parse_option_code_definition
int parse_option_code_definition(struct parse *, struct option *)
Definition: parse.c:1572
write_leases
int write_leases(void)
Definition: mdb.c:2434
leasechain::nelem
size_t nelem
Definition: dhcpd.h:1018
dhcp_host_get_value
isc_result_t dhcp_host_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: omapi.c:1121
dhcp_failover_send_poolreq
isc_result_t dhcp_failover_send_poolreq(dhcp_failover_state_t *)
P_IGNORE
@ P_IGNORE
Definition: dhcpd.h:1223
client_state::offered_leases
struct client_lease * offered_leases
Definition: dhcpd.h:1310
ia_xx::iasubopt
struct iasubopt ** iasubopt
Definition: dhcpd.h:1683
packet::raw
struct dhcp_packet * raw
Definition: dhcpd.h:406
lc_not_empty
int lc_not_empty(struct leasechain *lc)
broadcast_addr
struct iaddr broadcast_addr(struct iaddr, struct iaddr)
Definition: inet.c:112
client_state::v6_handler
void(* v6_handler)(struct packet *, struct client_state *)
Definition: dhcpd.h:1352
client_state::dhcpv6_transaction_id
unsigned char dhcpv6_transaction_id[3]
Definition: dhcpd.h:1326
new_protocol
struct protocol * new_protocol(const char *, int)
start_init6
void start_init6(struct client_state *client)
client_lease::next
struct client_lease * next
Definition: dhcpd.h:1140
dhcp_ddns_cb::rev_name
struct data_string rev_name
Definition: dhcpd.h:1816
load_balance_mine
int load_balance_mine(struct packet *, dhcp_failover_state_t *)
write_group
int write_group(struct group_object *)
Definition: db.c:449
linked_option_get
int linked_option_get(struct data_string *, struct universe *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct option_state *, struct binding_scope **, unsigned)
got_one_v6
isc_result_t got_one_v6(omapi_object_t *)
dhc6_lease::pref
u_int8_t pref
Definition: dhcpd.h:1193
iasubopt::hard_lifetime_end_time
time_t hard_lifetime_end_time
Definition: dhcpd.h:1647
dhcp_failover_send_connectack
isc_result_t dhcp_failover_send_connectack(omapi_object_t *, dhcp_failover_state_t *, int, const char *)
restore_parse_state
isc_result_t restore_parse_state(struct parse *cfile)
Definition: conflex.c:159
dns_answer
Definition: dhcpd.h:1485
lease::hardware_addr
struct hardware hardware_addr
Definition: dhcpd.h:589
decline_lease6
isc_result_t decline_lease6(struct ipv6_pool *pool, struct iasubopt *lease)
Definition: mdb6.c:1776
lease_state::ip
struct interface_info * ip
Definition: dhcpd.h:659
dhcp_group_stuff_values
isc_result_t dhcp_group_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:301
parse_ip6_addr_expr
int parse_ip6_addr_expr(struct expression **, struct parse *)
Definition: parse.c:465
ipv6_pool::active_timeouts
isc_heap_t * active_timeouts
Definition: dhcpd.h:1719
dhcp_subclass_destroy
isc_result_t dhcp_subclass_destroy(omapi_object_t *, const char *, int)
dhcp_shared_network_stuff_values
isc_result_t dhcp_shared_network_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: comapi.c:859
ipv6_pond::num_active
isc_uint64_t num_active
Definition: dhcpd.h:1755
classification_setup
void classification_setup(void)
Definition: class.c:37
agent_options::next
struct agent_options * next
Definition: dhcpd.h:380
client_envadd
void client_envadd(struct client_state *, const char *, const char *, const char *,...) __attribute__((__format__(__printf__
ddns_fqdn_t::length
unsigned length
Definition: dhcpd.h:280
dhcp_shared_network_set_value
isc_result_t dhcp_shared_network_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
Definition: comapi.c:747
make_substring
int make_substring(struct expression **, struct expression *, struct expression *, struct expression *)
Definition: tree.c:313
option_chain_head_reference
int option_chain_head_reference(struct option_chain_head **, struct option_chain_head *, const char *, int)
Definition: alloc.c:67
shared_network::subnets
struct subnet * subnets
Definition: dhcpd.h:1061
name_server::next
struct name_server * next
Definition: dhcpd.h:354
pool::expired
LEASE_STRUCT expired
Definition: dhcpd.h:1033
dhcp_failover_listener_set_value
isc_result_t dhcp_failover_listener_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
try_hw_addr
void try_hw_addr(struct interface_info *info)
dhcp_interface_setup_hook
int(* dhcp_interface_setup_hook)(struct interface_info *, struct iaddr *)
Definition: discover.c:49
shared_network::pools
struct pool * pools
Definition: dhcpd.h:1063
find_failover_peer
isc_result_t find_failover_peer(dhcp_failover_state_t **, const char *, const char *, int)
domain_search_list::rcdate
TIME rcdate
Definition: dhcpd.h:363
if_deregister_send
void if_deregister_send(struct interface_info *)
send_packet6
ssize_t send_packet6(struct interface_info *, const unsigned char *, size_t, struct sockaddr_in6 *)
set_server_duid_type
void set_server_duid_type(int type)
iasubopt::state
binding_state_t state
Definition: dhcpd.h:1645
expression_dereference
void expression_dereference(struct expression **, const char *, int)
Definition: tree.c:2813
lease_state::rebind
unsigned char rebind[4]
Definition: dhcpd.h:668
dhcp_failover_link_set_value
isc_result_t dhcp_failover_link_set_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *)
do_packet6
void do_packet6(struct interface_info *, const char *, int, int, const struct iaddr *, isc_boolean_t)
client_dns_update
isc_result_t client_dns_update(struct client_state *client, dhcp_ddns_cb_t *ddns_cb)
client_state::destination
struct iaddr destination
Definition: dhcpd.h:1314
pool::logged
int logged
Definition: dhcpd.h:1049
parse::line
int line
Definition: dhcpd.h:317
shutdown_drop_omapi_connections
@ shutdown_drop_omapi_connections
Definition: dhcpd.h:272
class
Definition: dhcpd.h:1098
dhcp_ddns_cb::address_type
int address_type
Definition: dhcpd.h:1819
dhcp_db_objects_setup
void dhcp_db_objects_setup(void)
Definition: omapi.c:57
dhc6_addr
Definition: dhcpd.h:1156
dhcp_type_class
omapi_object_type_t * dhcp_type_class
Definition: omapi.c:48
tvunref_t
void(* tvunref_t)(void *, const char *, int)
Definition: dhcpd.h:1449
do_release
void do_release(struct client_state *)
Definition: dhclient.c:5189
ipv6_pool::shared_network
struct shared_network * shared_network
Definition: dhcpd.h:1723
packet::dhcpv6_link_address
struct in6_addr dhcpv6_link_address
Definition: dhcpd.h:418
dhc6_addr::address
struct iaddr address
Definition: dhcpd.h:1158
parse::inbuf
char * inbuf
Definition: dhcpd.h:328
do_packet
void do_packet(struct interface_info *, struct dhcp_packet *, unsigned, unsigned int, struct iaddr, struct hardware *)
Definition: options.c:4045
packet::interface
struct interface_info * interface
Definition: dhcpd.h:433
lease::binding_state
binding_state_t binding_state
Definition: dhcpd.h:623
new_universe
struct universe * new_universe(const char *, int)
fqdn_option_space_encapsulate
int fqdn_option_space_encapsulate(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
Definition: options.c:3417
interface_or_dummy
int interface_or_dummy(struct interface_info **, const char *)
Definition: clparse.c:1052
build_server_oro
void build_server_oro(struct data_string *, struct option_state *, const char *, int)
Definition: options.c:2753
delete_linked_option
void delete_linked_option(struct universe *, struct option_state *, int)
Definition: options.c:3949
server_startup
@ server_startup
Definition: dhcpd.h:523
lease::host
struct host_decl * host
Definition: dhcpd.h:576
dhcp_failover_send_update_request_all
isc_result_t dhcp_failover_send_update_request_all(dhcp_failover_state_t *)
client_state::IRT
TIME IRT
Definition: dhcpd.h:1341
client_lease::filename
char * filename
Definition: dhcpd.h:1144
interfaces_requested
int interfaces_requested
Definition: dhclient.c:71
process_outstanding_timeouts
struct timeval * process_outstanding_timeouts(struct timeval *)
Definition: dispatch.c:46
pool::permit_list
struct permit * permit_list
Definition: dhcpd.h:1030
policy
policy
Definition: dhcpd.h:1223
host_name_hash
host_hash_t * host_name_hash
Definition: mdb.c:36
class::lease_limit
int lease_limit
Definition: dhcpd.h:1105
delete_class
isc_result_t delete_class(struct class *, int)
Definition: mdb.c:458
dhcp_common_objects_setup
void dhcp_common_objects_setup(void)
token_print_indent
int token_print_indent(FILE *, int, int, const char *, const char *, const char *)
Definition: print.c:1262
lease_state::offer
u_int8_t offer
Definition: dhcpd.h:682
send_release
void send_release(void *)
Definition: dhclient.c:3378
shared_network::name
char * name
Definition: dhcpd.h:1056
packet::packet_length
unsigned packet_length
Definition: dhcpd.h:408
dhcp_lease_create
isc_result_t dhcp_lease_create(omapi_object_t **, omapi_object_t *)
Definition: omapi.c:914
data_string_sprintfa
int data_string_sprintfa(struct data_string *ds, const char *fmt,...)
Definition: tree.c:56
absolute_path
char * absolute_path(const char *orgpath)
Definition: print.c:1453
dhcp_universe
struct universe dhcp_universe
dns_question::type
u_int16_t type
Definition: dhcpd.h:1480
omapi_value_t
Definition: omapip.h:87
parse_subnet_declaration
void parse_subnet_declaration(struct parse *, struct shared_network *)
Definition: confpars.c:2763
schedule_all_ipv6_lease_timeouts
void schedule_all_ipv6_lease_timeouts()
Definition: mdb6.c:2208
client_state::refresh_type
u_int8_t refresh_type
Definition: dhcpd.h:1327
client_state::elapsed
u_int16_t elapsed
Definition: dhcpd.h:1336
icmp_echoreply
isc_result_t icmp_echoreply(omapi_object_t *)
Definition: icmp.c:204
make_client_config
void make_client_config(struct client_state *, struct client_config *)
Definition: clparse.c:1115
remove_all_if_routes
void remove_all_if_routes(struct interface_info *)
make_encapsulation
int make_encapsulation(struct expression **, struct data_string *)
Definition: tree.c:298
parse_if_statement
int parse_if_statement(struct executable_statement **, struct parse *, int *)
Definition: parse.c:3339
subnet::interface
struct interface_info * interface
Definition: dhcpd.h:1076
ddns_cb_free
void ddns_cb_free(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
dns_query::backoff
int backoff
Definition: dhcpd.h:1510
client_state::ddns_cb
struct dhcp_ddns_cb * ddns_cb
Definition: dhcpd.h:1360
new_domain_search_list
struct domain_search_list * new_domain_search_list(const char *, int)
dhcp_group_create
isc_result_t dhcp_group_create(omapi_object_t **, omapi_object_t *)
Definition: comapi.c:398
free_protocol
void free_protocol(struct protocol *, const char *, int)
Definition: alloc.c:345
dhcp_pool_get_value
isc_result_t dhcp_pool_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
Definition: omapi.c:1632
parse_domain_name
struct expression * parse_domain_name(struct parse *cfile)
Definition: parse.c:5785
dns_query::hash
u_int32_t hash
Definition: dhcpd.h:1494
decode_ethernet_header
ssize_t decode_ethernet_header(struct interface_info *, unsigned char *, unsigned, struct hardware *)
dns_query::id
u_int16_t id
Definition: dhcpd.h:1497
ipv6_pool::subnet
struct subnet * subnet
Definition: dhcpd.h:1725
parse::tlname
const char * tlname
Definition: dhcpd.h:294
mockup_lease
int mockup_lease(struct lease **, struct packet *, struct shared_network *, struct host_decl *)
Definition: dhcp.c:4969
enter_failover_peer
isc_result_t enter_failover_peer(dhcp_failover_state_t *)
option_cache_allocate
int option_cache_allocate(struct option_cache **, const char *, int)
Definition: alloc.c:630
set_uid
uid_t set_uid
subnet_inner_than
int subnet_inner_than(const struct subnet *, const struct subnet *, int)
Definition: mdb.c:976
find_option_universe
struct universe * find_option_universe(struct option *, const char *)
Definition: options.c:292
parse_pool6_statement
void parse_pool6_statement(struct parse *, struct group *, int)
group_object
Definition: dhcpd.h:945
free_client_lease
void free_client_lease(struct client_lease *, const char *, int)
Definition: alloc.c:369
parse::token
enum dhcp_token token
Definition: dhcpd.h:320
collections
struct collection * collections
Definition: parse.c:34
collection::next
struct collection * next
Definition: dhcpd.h:1085
authoring_byte_order
int authoring_byte_order
Definition: dhcpd.c:97
client_config::requested_options
struct option ** requested_options
Definition: dhcpd.h:1239
dhcp_host_lookup
isc_result_t dhcp_host_lookup(omapi_object_t **, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:1369
pool::OMAPI_OBJECT_PREAMBLE
OMAPI_OBJECT_PREAMBLE
Definition: dhcpd.h:1026
bind_lease
void bind_lease(struct client_state *)
Definition: dhclient.c:1945
free_name_server
void free_name_server(struct name_server *, const char *, int)
Definition: alloc.c:292
dhcp_failover_rescind_updates
void dhcp_failover_rescind_updates(dhcp_failover_state_t *)
ddns_remove_fwd
isc_result_t ddns_remove_fwd(struct data_string *, struct iaddr, struct data_string *)
class::leases_consumed
int leases_consumed
Definition: dhcpd.h:1106
trace_conf_stop
void trace_conf_stop(trace_type_t *ttype)
iasubopt::valid
u_int32_t valid
Definition: dhcpd.h:1650
ns_name.h
packet::options_valid
int options_valid
Definition: dhcpd.h:430
get_option_int
int get_option_int(int *, struct universe *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct option_state *, struct binding_scope **, unsigned, const char *, int)
Definition: options.c:2358
nowait
int nowait
Definition: dhclient.c:107
dhcp_type_group
omapi_object_type_t * dhcp_type_group
store_option
int store_option(struct data_string *, struct universe *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct option_cache *)
Definition: options.c:3091
interface_info::client
struct client_state * client
Definition: dhcpd.h:1427
shared_network::ipv6_pond
struct ipv6_pond * ipv6_pond
Definition: dhcpd.h:1064
add_route_direct
void add_route_direct(struct interface_info *, struct in_addr)
parse_fixed_addr_param
int parse_fixed_addr_param(struct option_cache **, struct parse *, enum dhcp_token)
Definition: confpars.c:3070
dns_zone
Definition: dhcpd.h:1515
group_dereference
int group_dereference(struct group **, const char *, int)
Definition: alloc.c:205
executable_statement
Definition: statement.h:29
__attribute__
void __attribute__((noreturn))
write_server_duid
int write_server_duid(void)
dns_host_entry
Definition: tree.h:287
ipv6_pool
ipv6_pool structure
Definition: dhcpd.h:1710
dhcp_failover_send_disconnect
isc_result_t dhcp_failover_send_disconnect(omapi_object_t *, int, const char *)
parse_host_name
char * parse_host_name(struct parse *)
Definition: parse.c:196
DHCP_MAXNS
#define DHCP_MAXNS
Definition: isclib.h:115
can_receive_unicast_unconfigured
int can_receive_unicast_unconfigured(struct interface_info *)
interface_info::addresses
struct in_addr * addresses
Definition: dhcpd.h:1383
dhcp_failover_reconnect
void dhcp_failover_reconnect(void *)
dhcp_pool_signal_handler
isc_result_t dhcp_pool_signal_handler(omapi_object_t *, const char *, va_list)
Definition: omapi.c:1697
unconfigure6
void unconfigure6(struct client_state *client, const char *reason)
data_subexpression_length
int data_subexpression_length(int *, struct expression *)
dhcp_shutdown_state
dhcp_shutdown_state
Definition: dhcpd.h:269
conf_file_subparse
isc_result_t conf_file_subparse(struct parse *, struct group *, int)
Definition: confpars.c:250
postconf_initialization
void postconf_initialization(int)
Definition: dhcpd.c:1083
find_matching_case
int find_matching_case(struct executable_statement **, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct expression *, struct executable_statement *)
Definition: execute.c:1042
free_iaddrcidrnetlist
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result)
Definition: inet.c:503
parse_boolean_expression
int parse_boolean_expression(struct expression **, struct parse *, int *)
Definition: parse.c:3475
convert_lease_statement
void convert_lease_statement(struct parse *, jrefproto)
dhcp_failover_option_name
const char * dhcp_failover_option_name(unsigned)
parse_address_range
void parse_address_range(struct parse *, struct group *, int, struct pool *, struct lease **)
Definition: confpars.c:3787
client_lease::medium
struct string_list * medium
Definition: dhcpd.h:1145
store_options
int store_options(int *ocount, unsigned char *buffer, unsigned buflen, unsigned index, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, unsigned *priority_list, int priority_len, unsigned first_cutoff, int second_cutoff, int terminate, const char *vuname)
Definition: options.c:1236
dhcp_control_object_t
dhcp_control_object_t
Definition: dhcpd.h:2513
parse::bufsiz
size_t bufsiz
Definition: dhcpd.h:330
parse_cshl
int parse_cshl(struct data_string *, struct parse *)
Definition: parse.c:2040
dhcp_subclass_stuff_values
isc_result_t dhcp_subclass_stuff_values(omapi_object_t *, omapi_object_t *, omapi_object_t *)
Definition: omapi.c:2334
dhcp_subnet_remove
isc_result_t dhcp_subnet_remove(omapi_object_t *, omapi_object_t *)
Definition: comapi.c:741
dhc6_ia::starts
TIME starts
Definition: dhcpd.h:1179
protocol::next
struct protocol * next
Definition: dhcpd.h:1466
packet::client_addr
struct iaddr client_addr
Definition: dhcpd.h:432
free_bindings
int free_bindings(struct binding_scope *, const char *, int)
Definition: tree.c:3770
dhcp_failover_state_get_value
isc_result_t dhcp_failover_state_get_value(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **)
dhcp_ddns_cb::dhcid_class
dns_rdataclass_t dhcid_class
Definition: dhcpd.h:1843
option_cache::refcnt
int refcnt
Definition: dhcpd.h:386