29 static const char copyright[] =
30 "Copyright 2004-2018 Internet Systems Consortium.";
31 static const char arr [] =
"All rights reserved.";
32 static const char message [] =
"Internet Systems Consortium DHCP Server";
33 static const char url [] =
34 "For info, please visit https://www.isc.org/software/dhcp/";
42 #include <sys/types.h> 46 #if defined (PARANOIA) 47 # include <sys/types.h> 51 # define group real_group 66 #if defined (NSUPDATE) 70 char std_nsupdate [] =
" \n\ 71 option server.ddns-hostname = \n\ 72 pick (option fqdn.hostname, option host-name, config-option host-name); \n\ 73 option server.ddns-domainname = config-option domain-name; \n\ 74 option server.ddns-rev-domainname = \"in-addr.arpa.\";";
90 int persist_eui64 = 1;
108 #if defined (TRACING) 115 return ISC_R_SUCCESS;
121 return ISC_R_SUCCESS;
124 static void omapi_listener_start (
void *foo)
132 if (result != ISC_R_SUCCESS)
133 log_fatal (
"Can't allocate new generic object: %s",
134 isc_result_totext (result));
137 if (result == ISC_R_SUCCESS && omapi_key)
139 (listener, verify_addr, verify_auth);
140 if (result != ISC_R_SUCCESS) {
141 log_error (
"Can't start OMAPI protocol: %s",
142 isc_result_totext (result));
143 tv.tv_sec =
cur_tv.tv_sec + 5;
144 tv.tv_usec =
cur_tv.tv_usec;
152 #define DHCPD_USAGE0 \ 153 "[-p <UDP port #>] [-f] [-d] [-q] [-t|-T]\n" 157 #define DHCPD_USAGE1 \ 158 " [-4|-6] [-4o6 <port>]\n" \ 159 " [-cf config-file] [-lf lease-file]\n" 161 #define DHCPD_USAGE1 \ 162 " [-4|-6] [-cf config-file] [-lf lease-file]\n" 165 #define DHCPD_USAGE1 \ 166 " [-cf config-file] [-lf lease-file]\n" 169 #if defined (PARANOIA) 170 #define DHCPD_USAGEP \ 171 " [-user user] [-group group] [-chroot dir]\n" 173 #define DHCPD_USAGEP "" 176 #if defined (TRACING) 177 #define DHCPD_USAGET \ 178 " [-tf trace-output-file]\n" \ 179 " [-play trace-input-file]\n" 181 #define DHCPD_USAGET "" 184 #define DHCPD_USAGEC \ 185 " [-pf pid-file] [--no-pid] [-s server]\n" \ 188 #define DHCPD_USAGEH "{--version|--help|-h}" 205 static char use_noarg[] =
"No argument for command: %s ";
208 usage(
const char *sfmt,
const char *sarg) {
215 #ifdef PRINT_SPECIFIC_CL_ERRORS 220 log_fatal(
"Usage: %s %s%s%s%s%s\n %s %s",
235 #if defined (PARANOIA) 237 static void setup_chroot (
char *chroot_dir) {
239 log_fatal (
"you must be root to use chroot");
241 if (chroot(chroot_dir)) {
242 log_fatal (
"chroot(\"%s\"): %m", chroot_dir);
263 int dfd[2] = { -1, -1 };
266 char *server = (
char *)0;
270 #if defined (NSUPDATE) 274 int have_dhcpd_conf = 0;
275 int have_dhcpd_db = 0;
276 int have_dhcpd_pid = 0;
278 int local_family_set = 0;
280 u_int16_t dhcp4o6_port = 0;
283 #if defined (TRACING) 284 char *traceinfile = (
char *)0;
285 char *traceoutfile = (
char *)0;
288 #if defined (PARANOIA) 291 char *set_chroot = 0;
303 fd = open(
"/dev/null", O_RDWR | O_CLOEXEC);
305 fd = open(
"/dev/null", O_RDWR | O_CLOEXEC);
307 fd = open(
"/dev/null", O_RDWR | O_CLOEXEC);
314 for (i = 1; i < argc; i++) {
315 if (!strcmp (argv [i],
"-f")) {
319 }
else if (!strcmp (argv [i],
"-d")) {
323 }
else if (!strcmp (argv [i],
"-t")) {
327 }
else if (!strcmp (argv [i],
"-T")) {
331 }
else if (!strcmp (argv [i],
"--version")) {
332 const char vstring[] =
"isc-dhcpd-";
340 }
else if (!strcmp(argv[i],
"--help") ||
341 !strcmp(argv[i],
"-h")) {
342 const char *pname = isc_file_basename(
progname);
350 #if defined (PARANOIA) 354 #if defined (TRACING) 369 }
else if (!strcmp (argv [i],
"-play")) {
382 if ((pid = fork ()) < 0)
388 (void) close(
dfd[1]);
392 n = read(
dfd[0], &buf, 1);
395 }
while (n == -1 && errno == EINTR);
399 (void) close(
dfd[0]);
406 if (status != ISC_R_SUCCESS)
407 log_fatal(
"Can't initialize context: %s",
408 isc_result_totext(status));
415 if (result != ISC_R_SUCCESS)
417 isc_result_totext (result));
426 openlog (isc_file_basename(
progname),
429 for (i = 1; i < argc; i++) {
430 if (!strcmp (argv [i],
"-p")) {
432 usage(use_noarg, argv[i-1]);
434 log_debug (
"binding to user-specified port %d",
436 }
else if (!strcmp (argv [i],
"-f")) {
440 }
else if (!strcmp (argv [i],
"-d")) {
445 }
else if (!strcmp (argv [i],
"-s")) {
447 usage(use_noarg, argv[i-1]);
449 #if defined (PARANOIA) 450 }
else if (!strcmp (argv [i],
"-user")) {
452 usage(use_noarg, argv[i-1]);
454 }
else if (!strcmp (argv [i],
"-group")) {
456 usage(use_noarg, argv[i-1]);
457 set_group = argv [i];
458 }
else if (!strcmp (argv [i],
"-chroot")) {
460 usage(use_noarg, argv[i-1]);
461 set_chroot = argv [i];
463 }
else if (!strcmp (argv [i],
"-cf")) {
465 usage(use_noarg, argv[i-1]);
468 }
else if (!strcmp (argv [i],
"-lf")) {
470 usage(use_noarg, argv[i-1]);
473 }
else if (!strcmp (argv [i],
"-pf")) {
475 usage(use_noarg, argv[i-1]);
478 }
else if (!strcmp(argv[i],
"--no-pid")) {
480 }
else if (!strcmp (argv [i],
"-t")) {
487 }
else if (!strcmp (argv [i],
"-T")) {
495 }
else if (!strcmp (argv [i],
"-q")) {
499 }
else if (!strcmp(argv[i],
"-4")) {
501 log_fatal(
"Server cannot run in both IPv4 and " 502 "IPv6 mode at the same time.");
505 local_family_set = 1;
506 }
else if (!strcmp(argv[i],
"-6")) {
508 log_fatal(
"Server cannot run in both IPv4 and " 509 "IPv6 mode at the same time.");
512 local_family_set = 1;
514 }
else if (!strcmp(argv[i],
"-4o6")) {
516 usage(use_noarg, argv[i-1]);
519 log_debug(
"DHCPv4 over DHCPv6 over ::1 port %d and %d",
521 ntohs(dhcp4o6_port) + 1);
525 #if defined (TRACING) 526 }
else if (!strcmp (argv [i],
"-tf")) {
528 usage(use_noarg, argv[i-1]);
529 traceoutfile = argv [i];
530 }
else if (!strcmp (argv [i],
"-play")) {
532 usage(use_noarg, argv[i-1]);
533 traceinfile = argv [i];
536 }
else if (argv [i][0] ==
'-') {
537 usage(
"Unknown command %s", argv[i]);
541 if (strlen(argv[i]) >=
sizeof(tmp->
name))
544 argv[i], (
long)strlen(argv[i]));
545 result = interface_allocate (&tmp,
MDL);
546 if (result != ISC_R_SUCCESS)
547 log_fatal (
"Insufficient memory to %s %s: %s",
548 "record interface", argv [i],
549 isc_result_totext (result));
550 strcpy (tmp ->
name, argv [i]);
552 interface_reference (&tmp ->
next,
561 #if defined(DHCPv6) && defined(DHCP4o6) 563 if (!local_family_set)
564 log_error(
"please specify the address family " 565 "with DHPv4 over DHCPv6 [-4|-6].");
567 log_fatal(
"DHCPv4 server in DHPv4 over DHCPv6 " 568 "mode with command line specified " 573 if (!have_dhcpd_conf && (s = getenv (
"PATH_DHCPD_CONF"))) {
580 if (!have_dhcpd_db) {
581 if ((s = getenv (
"PATH_DHCPD6_DB")))
586 if (!have_dhcpd_pid) {
587 if ((s = getenv (
"PATH_DHCPD6_PID")))
595 if (!have_dhcpd_db && (s = getenv (
"PATH_DHCPD_DB"))) {
599 if (!have_dhcpd_pid && (s = getenv (
"PATH_DHCPD_PID"))) {
622 #if defined (TRACING) 626 if (result != ISC_R_SUCCESS)
628 isc_result_totext (result));
635 #if defined (NSUPDATE) 640 #if defined (PARANOIA) 643 struct passwd *tmp_pwd;
646 log_fatal (
"you must be root to set user");
648 if (!(tmp_pwd = getpwnam(set_user)))
649 log_fatal (
"no such user: %s", set_user);
660 #define group real_group 661 struct group *tmp_grp;
664 log_fatal (
"you must be root to set group");
666 if (!(tmp_grp = getgrnam(set_group)))
667 log_fatal (
"no such group: %s", set_group);
673 # if defined (EARLY_CHROOT) 674 if (set_chroot) setup_chroot (set_chroot);
681 if ((s = getenv (
"DHCPD_PORT"))) {
683 log_debug (
"binding to environment-specified port %d",
687 ent = getservbyname(
"dhcp",
"udp");
695 ent = getservbyname(
"dhcpv6-server",
"udp");
712 ent = getservbyname(
"dhcpv6-client",
"udp");
722 log_fatal(
"You can only specify address to send " 723 "replies to when running an IPv4 server.");
727 he = gethostbyname (server);
730 he -> h_addr_list [0],
740 gettimeofday(&
cur_tv, NULL);
749 #if defined (LDAP_CONFIGURATION) 751 #if defined (LDAP_USE_SSL) 759 log_fatal (
"Can't allocate root group!");
770 #if defined (NSUPDATE) 773 status =
new_parse(&
parse, -1, std_nsupdate,
sizeof(std_nsupdate) - 1,
774 "standard name service update routine", 0);
775 if (status != ISC_R_SUCCESS)
776 log_fatal (
"can't begin parsing name service updater!");
783 log_fatal(
"can't parse standard name service updater!");
790 if (!cftest && !lftest)
793 #if defined (TRACING) 795 if (!have_dhcpd_db) {
797 log_error (
"** You must specify a lease file with -lf.");
798 log_error (
" Dhcpd will not overwrite your default");
799 log_fatal (
" lease file when playing back a trace. **");
803 #if defined (DEBUG_MEMORY_LEAKAGE) && \ 804 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 816 log_fatal(
"Out of memory creating hash for active IA_NA.");
819 log_fatal(
"Out of memory creating hash for active IA_TA.");
822 log_fatal(
"Out of memory creating hash for active IA_PD.");
828 log_fatal (
"Configuration file errors encountered -- exiting");
832 #if defined (FAILOVER_PROTOCOL) 836 #if defined(DHCPv6) && defined(DHCP4o6) 839 log_fatal(
"DHCPv4 server in DHPv4 over DHCPv6 " 840 "mode with config file specified " 845 #if defined (PARANOIA) && !defined (EARLY_CHROOT) 846 if (set_chroot) setup_chroot (set_chroot);
855 if (cftest && !lftest) {
869 status = read(i, pbuf, (
sizeof pbuf) - 1);
880 (pid != getpid() && kill(pid, 0) == 0))
882 "DHCP server running.");
896 #if defined(DHCPv6) && defined(DHCP4o6) 903 if (real_family == AF_INET)
938 &
ip -> hw_address.hbuf [
ip -> hw_address.hlen -
939 sizeof seed],
sizeof seed);
943 #if defined (TRACING) 962 log_fatal(
"Unable to set server identifier.");
967 dhcp4o6_setup(dhcp4o6_port);
978 i = open(
path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
980 sprintf(pbuf,
"%d\n", (
int) getpid());
984 log_error(
"Can't create PID file %s: %m.",
989 #if defined (PARANOIA) 993 if (setgroups (0, (
void *)0))
1013 if (
dfd[0] != -1 &&
dfd[1] != -1) {
1016 if (write(
dfd[1], &buf, 1) != 1)
1018 (void) close(
dfd[1]);
1031 (void) open(
"/dev/null", O_RDWR | O_CLOEXEC);
1032 (void) open(
"/dev/null", O_RDWR | O_CLOEXEC);
1033 (void) open(
"/dev/null", O_RDWR | O_CLOEXEC);
1040 #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \ 1041 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 1042 dmalloc_cutoff_generation = dmalloc_generation;
1043 dmalloc_longterm = dmalloc_outstanding;
1044 dmalloc_outstanding = 0;
1050 #if defined(ENABLE_GENTLE_SHUTDOWN) 1058 log_info(
"Server starting service.");
1077 isc_result_t result;
1079 #if defined (NSUPDATE) 1080 struct in_addr local4, *local4_ptr = NULL;
1081 struct in6_addr local6, *local6_ptr = NULL;
1090 memset(&db, 0,
sizeof db);
1097 log_fatal(
"no memory for lease db filename.");
1110 log_fatal(
"no memory for pid filename.");
1130 log_fatal(
"no memory for lease db filename.");
1144 log_fatal(
"no memory for pid filename.");
1168 NULL, options, NULL,
1184 log_fatal(
"invalid omapi port data length");
1194 log_fatal(
"no memory for OMAPI key filename.");
1200 if (result != ISC_R_SUCCESS)
1202 s, isc_result_totext (result));
1212 log_fatal(
"invalid local port data length");
1223 log_fatal(
"invalid remote port data length");
1235 log_fatal(
"invalid broadcast address data length");
1246 log_fatal(
"invalid local address data length");
1263 #if defined (NSUPDATE) 1266 log_fatal(
"ddns-update-style ad_hoc no longer supported");
1274 memcpy(&local4, db.
data, 4);
1275 local4_ptr = &local4;
1286 memcpy(&local6, db.
data, 16);
1287 local6_ptr = &local6;
1298 local4_ptr, local6_ptr)
1300 log_fatal(
"Unable to complete ddns initialization");
1312 log_fatal(
"Support for ddns-update-style not compiled in");
1328 openlog(isc_file_basename(
progname),
1346 #if defined(DELAYED_ACK) 1354 log_fatal(
"invalid max delayed ACK count ");
1358 #if defined(DHCP4o6) 1363 "setting delayed-ack to zero (incompatible)");
1377 log_fatal(
"invalid max ack delay configuration");
1392 log_error(
"Not using fsync() to flush lease writes");
1399 log_info(
"Setting server-id-check true");
1423 if (db.
len == sizeof (u_int32_t)) {
1426 log_fatal(
"invalid abandon-lease-time");
1432 #if defined (FAILOVER_PROTOCOL) 1437 check_secs_byte_order = 1;
1451 if (!persist_eui64) {
1452 log_info(
"EUI64 leases will not be written to lease file");
1466 #if defined (BINARY_LEASES) 1468 log_info(
"Source compiled to use binary-leases");
1480 omapi_listener_start (0);
1483 #if defined (FAILOVER_PROTOCOL) 1508 lp = (
struct lease *)0;
1510 log_debug (
"unexpected ICMP Echo Reply from %s",
1516 #if defined (FAILOVER_PROTOCOL) 1518 !lp ->
pool -> failover_peer)
1520 log_debug (
"ICMP Echo Reply for %s late or spurious.",
1526 log_debug (
"ICMP Echo reply while lease %s valid.",
1540 lease_dereference (&lp,
MDL);
1546 struct lease *lp = vlp;
1548 #if defined (DEBUG_MEMORY_LEAKAGE) 1549 unsigned long previous_outstanding = dmalloc_outstanding;
1555 #if defined (DEBUG_MEMORY_LEAKAGE) 1556 log_info (
"generation %ld: %ld new, %ld outstanding, %ld long-term",
1558 dmalloc_outstanding - previous_outstanding,
1559 dmalloc_outstanding, dmalloc_longterm);
1561 #if defined (DEBUG_MEMORY_LEAKAGE) 1562 dmalloc_dump_outstanding ();
1570 isc_result_t status;
1575 const char *fnn =
"fallback-net";
1577 if (status != ISC_R_SUCCESS)
1578 log_fatal (
"No memory for shared subnet: %s",
1579 isc_result_totext (status));
1582 log_fatal(
"no memory for shared network");
1597 log_error (
"Multiple interfaces match the %s: %s %s",
1604 log_fatal (
"Interface %s matches multiple shared %s",
1605 ip -> name,
"networks");
1608 shared_network_reference
1615 log_error (
"Multiple interfaces match the %s: %s %s",
1616 "same shared network",
1624 static TIME shutdown_time;
1625 static int omapi_connection_count;
1636 return ISC_R_SUCCESS;
1646 omapi_connection_count++;
1649 return ISC_R_SUCCESS;
1657 return ISC_R_SUCCESS;
1659 return ISC_R_SUCCESS;
1662 static isc_result_t dhcp_io_shutdown_countdown (
void *vlp)
1664 #if defined (FAILOVER_PROTOCOL) 1665 dhcp_failover_state_t *state;
1666 int failover_connection_count = 0;
1675 omapi_connection_count = 0;
1682 omapi_connection_count == 0) {
1705 #if defined (FAILOVER_PROTOCOL) 1709 if (state -> me.state ==
normal) {
1711 failover_connection_count++;
1715 failover_connection_count++;
1722 if (state -> link_to_peer)
1723 dhcp_failover_link_dereference (&state -> link_to_peer,
1728 #if defined (DEBUG_MEMORY_LEAKAGE) && \ 1729 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 1739 #if defined (DEBUG_MEMORY_LEAKAGE) && \ 1740 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 1751 !failover_connection_count &&
1758 tv.tv_sec =
cur_tv.tv_sec + 1;
1759 tv.tv_usec =
cur_tv.tv_usec;
1761 (
void (*)(
void *))dhcp_io_shutdown_countdown, 0, 0, 0);
1762 return ISC_R_SUCCESS;
1774 return ISC_R_SUCCESS;
1780 dhcp_io_shutdown_countdown (0);
1781 return ISC_R_SUCCESS;
1791 tv.tv_sec =
cur_tv.tv_sec;
1792 tv.tv_usec =
cur_tv.tv_usec + 1;
1794 (
void (*)(
void *))dhcp_io_shutdown_countdown, 0, 0, 0);
1795 return ISC_R_SUCCESS;
void do_packet6(struct interface_info *, const char *, int, int, const struct iaddr *, isc_boolean_t)
const char * path_dhcpd_db
void initialize_server_option_spaces(void)
void(* dhcpv6_packet_handler)(struct interface_info *, const char *, int, int, const struct iaddr *, isc_boolean_t)
int dhcpd_interface_setup_hook(struct interface_info *ip, struct iaddr *ia)
void mark_hosts_unavailable(void)
isc_result_t omapi_protocol_listen(omapi_object_t *, unsigned, int)
void add_enumeration(struct enumeration *enumeration)
void parse_trace_setup(void)
struct binding_scope * global_scope
omapi_object_type_t * omapi_type_connection
#define SV_DDNS_UPDATE_STYLE
const char * piaddr(const struct iaddr addr)
isc_boolean_t server_duid_isset(void)
isc_result_t end_parse(struct parse **cfile)
#define SV_BIND_LOCAL_ADDRESS6
void lease_ping_timeout(void *vlp)
void(* bootp_packet_handler)(struct interface_info *, struct dhcp_packet *, unsigned, unsigned int, struct iaddr, struct hardware *)
struct lease_state * state
struct universe server_universe
#define SV_DONT_USE_FSYNC
void cancel_timeout(void(*)(void *) where, void *what)
void icmp_startup(int routep, void *handler)
#define DHCP_R_INVALIDARG
#define DDNS_UPDATE_STYLE_AD_HOC
int int int log_debug(const char *,...) __attribute__((__format__(__printf__
#define SV_DDNS_LOCAL_ADDRESS4
isc_result_t dhcp_interface_remove(omapi_object_t *lp, omapi_object_t *id)
isc_result_t omapi_auth_key_lookup_name(omapi_auth_key_t **, const char *)
#define DHCP_CONTEXT_PRE_DB
isc_boolean_t no_pid_file
#define SV_LEASE_FILE_NAME
void data_string_forget(struct data_string *data, const char *file, int line)
struct group * root_group
#define SV_RELEASE_ON_ROAM
int log_error(const char *,...) __attribute__((__format__(__printf__
void add_timeout(struct timeval *when, void(*)(void *) where, void *what, tvref_t ref, tvunref_t unref)
#define DHCP_R_INVALIDKEY
void omapi_print_dmalloc_usage_by_caller(void)
void mark_interfaces_unavailable(void)
void do_packet(struct interface_info *interface, struct dhcp_packet *packet, unsigned len, unsigned int from_port, struct iaddr from, struct hardware *hfrom)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
#define SV_SERVER_ID_CHECK
isc_result_t omapi_io_state_foreach(isc_result_t(*func)(omapi_object_t *, void *), void *p)
calls a given function on every object
#define DHCP_CONTEXT_POST_DB
struct executable_statement * statements
u_int32_t abandon_lease_time
void interface_trace_setup(void)
void free_lease_state(struct lease_state *, const char *, int)
omapi_object_type_t * omapi_type_listener
int server_identifier_matched
omapi_object_type_t * omapi_type_protocol
u_int16_t validate_port(char *port)
void dhcp_signal_handler(int signal)
void postconf_initialization(int quiet)
int find_subnet(struct subnet **sp, struct iaddr addr, const char *file, int line)
void execute_statements_in_scope(struct binding_value **result, 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, struct group *group, struct group *limiting_group, struct on_star *on_star)
isc_result_t readconf(void)
u_int16_t ddns_conflict_mask
#define FAILOVER_PROTOCOL
int option_state_allocate(struct option_state **ptr, const char *file, int line)
isc_result_t dhcp_context_create(int flags, struct in_addr *local4, struct in6_addr *local6)
int evaluate_option_cache(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 option_cache *oc, const char *file, int line)
isc_result_t dhcp_failover_set_state(dhcp_failover_state_t *, enum failover_state)
void trace_seed_stop(trace_type_t *)
#define DHCPD_LOG_FACILITY
void mark_phosts_unavailable(void)
struct iaddr interface_address
void abandon_lease(struct lease *, const char *)
isc_result_t dhcp_set_control_state(control_object_state_t oldstate, control_object_state_t newstate)
trace_type_t * trace_type_register(const char *, void *, void(*)(trace_type_t *, unsigned, char *), void(*)(trace_type_t *), const char *, int)
int group_allocate(struct group **ptr, const char *file, int line)
isc_result_t omapi_listener_destroy(omapi_object_t *, const char *, int)
int write_server_duid(void)
int(* group_write_hook)(struct group_object *)
isc_result_t omapi_object_dereference(omapi_object_t **, const char *, int)
isc_result_t omapi_generic_new(omapi_object_t **, const char *, int)
omapi_object_type_t * omapi_type_protocol_listener
u_int32_t getUShort(const unsigned char *)
void dfree(void *, const char *, int)
omapi_object_type_t * dhcp_type_interface
void trace_file_replay(const char *)
#define SV_DHCPV6_PID_FILE_NAME
dhcp_failover_state_t * failover_states
struct option_cache * lookup_option(struct universe *universe, struct option_state *options, unsigned code)
void dhcp_db_objects_setup(void)
struct in_addr limited_broadcast
int int log_info(const char *,...) __attribute__((__format__(__printf__
int main(int argc, char **argv)
void trace_seed_stash(trace_type_t *, unsigned)
u_int16_t validate_port_pair(char *port)
void * dmalloc(size_t, const char *, int)
struct interface_info * interfaces
u_int32_t getULong(const unsigned char *)
struct shared_network * shared_network
void db_startup(int testp)
void lease_pinged(struct iaddr from, u_int8_t *packet, int length)
dhcp_control_object_t * dhcp_control_object
int(* dhcp_interface_setup_hook)(struct interface_info *, struct iaddr *)
isc_result_t dhcp_io_shutdown(omapi_object_t *obj, void *foo)
#define DEFAULT_HASH_SIZE
void dhcp_failover_startup(void)
int quiet_interface_discovery
#define DEFAULT_ABANDON_LEASE_TIME
int option_state_dereference(struct option_state **ptr, const char *file, int line)
void initialize_common_option_spaces()
void trace_ddns_init(void)
struct interface_info * next
int evaluate_boolean_option_cache(int *ignorep, 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 option_cache *oc, const char *file, int line)
char * absolute_path(const char *orgpath)
void schedule_all_ipv6_lease_timeouts()
#define SV_ABANDON_LEASE_TIME
void report_jumbo_ranges()
isc_result_t trace_begin(const char *, const char *, int)
isc_result_t set_server_duid_from_option(void)
isc_result_t omapi_protocol_configure_security(omapi_object_t *, isc_result_t(*)(omapi_object_t *, omapi_addr_t *), isc_result_t(*)(omapi_object_t *, omapi_auth_key_t *))
#define DISCOVER_SERVER46
void dhcp_failover_sanity_check(void)
u_int16_t get_conflict_mask(struct option_state *input_options)
#define DDNS_UPDATE_STYLE_NONE
isc_result_t trace_init(void(*set_time)(time_t), const char *, int)
#define SV_DHCPV6_LEASE_FILE_NAME
struct class unknown_class
struct in_addr local_address
int dhcp_max_agent_option_packet_length
#define SV_DDNS_LOCAL_ADDRESS6
#define SV_LOCAL_ADDRESS6
#define SV_PREFIX_LEN_MODE
void classification_setup(void)
isc_result_t omapi_set_int_value(omapi_object_t *, omapi_object_t *, const char *, int)
#define SV_LIMITED_BROADCAST_ADDRESS
int group_writer(struct group_object *)
const char * path_dhcpd_conf
void dhcp_reply(struct lease *)
struct enumeration syslog_enum
int parse_executable_statements(struct executable_statement **statements, struct parse *cfile, int *lose, enum expression_context case_context)
isc_result_t omapi_disconnect(omapi_object_t *, int)
const unsigned char * data
void dhcp_common_objects_setup(void)
isc_result_t generate_new_server_duid(void)
enum dhcp_shutdown_state shutdown_state
struct iaddr server_identifier
struct in6_addr local_address6
struct enumeration prefix_length_modes
const char * path_dhcpd_pid
void trace_seed_input(trace_type_t *, unsigned, char *)
int find_lease_by_ip_addr(struct lease **, struct iaddr, const char *, int)
struct enumeration ddns_styles
void discover_interfaces(int state)
struct interface_info * interface
isc_result_t new_parse(struct parse **cfile, int file, char *inbuf, unsigned buflen, const char *name, int eolp)
#define SV_CHECK_SECS_BYTE_ORDER
void trace_replay_init(void)
#define INTERFACE_REQUESTED
void postdb_startup(void)
isc_result_t omapi_init(void)