33static unsigned char global_host_once = 1;
35static int parse_binding_value(
struct parse *
cfile,
38static void parse_authoring_byte_order (
struct parse *
cfile);
39static void parse_lease_id_format (
struct parse *
cfile);
69#if defined(LDAP_CONFIGURATION)
123 log_error (
"Can't open lease database %s: %m --",
125 log_error (
" check for failed database %s!",
127 log_error (
"Please read the dhcpd.leases manual%s",
129 log_fatal (
"don't know what to do about this.");
131 log_fatal (
"Can't open %s: %m", filename);
145 log_fatal (
"Can't lseek on %s: %m", filename);
150 if ((
sizeof(
void*) < 8) &&
flen > 0x7FFFFFFFUL)
151 log_fatal (
"%s: file is too long to buffer.", filename);
159 log_fatal (
"No memory for %s (%d bytes)",
169 log_fatal (
"Can't read in %s: %m", filename);
171 log_fatal (
"%s: short read of %d bytes instead of %d.",
214 fbuf = data +
tflen + 1;
294 "possibly corrupt lease file");
295 }
else if (token ==
IA_NA) {
297 }
else if (token ==
IA_TA) {
299 }
else if (token ==
IA_PD) {
301 }
else if (token ==
CLASS) {
307 }
else if (token ==
HOST) {
309 }
else if (token ==
GROUP) {
311#if defined (FAILOVER_PROTOCOL)
321 parse_authoring_byte_order(
cfile);
323 log_error (
"Corrupt lease file - possible data loss!");
404 if (global_host_once &&
406 global_host_once = 0;
407 log_error(
"WARNING: Host declarations are "
408 "global. They are not limited to "
409 "the scope you declared them in.");
415 "host declarations not allowed here.");
426 "group declarations not allowed here.");
452 "subnet declarations not allowed here.");
480 log_fatal (
"Can't allocate shared subnet: %s",
483 log_fatal (
"Can't allocate group for shared net");
517 log_fatal(
"Out of memory allocating default "
518 "shared network name (\"%s\").",
n);
533 "class declarations not allowed here.");
544 "class declarations not allowed here.");
555 "class declarations not allowed here.");
566 "class declarations not allowed here.");
589 "not allowed here.");
601 "Only one fixed address "
602 "declaration per host.");
608 "fixed-address parameter not "
632 "range declaration not allowed here.");
645 "range6 declaration not allowed here.");
656 "prefix6 declaration not allowed here.");
667 "fixed-prefix6 declaration not "
695 group -> authoritative = 0;
705 group -> authoritative = 1;
718 log_fatal(
"Server identifier not in hash (%s:%d).",
726 if (token ==
SPACE) {
729 "option space definitions %s",
730 "may not be scoped.");
745 "option definitions%s",
746 " may not be scoped.");
801 "defined in shared-network");
802 log_error (
"declarations and the outer scope.");
807#if defined (FAILOVER_PROTOCOL)
823 parse_lease_id_format(
cfile);
839 "expecting a declaration");
842 "expecting a parameter %s",
895#if defined (FAILOVER_PROTOCOL)
925 log_fatal (
"no memory for peer name %s", val);
941 "in shared-network declaration");
945 " failover peer ", name);
956 }
else if (token ==
STATE) {
959 " failover peer ", name);
967 }
else if (token !=
LBRACE) {
983 log_fatal (
"Can't allocate failover peer %s: %s",
1005 "secondary may not define %s",
1006 "load balance settings.");
1036 tp = &
peer->max_lease_misbalance;
1040 tp = &
peer->max_lease_ownership;
1052 tp = &
peer->auto_partner_down;
1080 "secondary may not define %s",
1081 "load balance settings.");
1090 "HBA must be exactly 32 bytes.");
1106 "secondary may not define %s",
1107 "load balance settings.");
1117 "0 and 256, inclusive");
1122 hba [
i / 8] |= (1 << (
i & 7));
1156 "invalid statement in peer declaration");
1166 }
while (token !=
RBRACE);
1176 if (!
peer->partner.port)
1182 "primary failover server must have hba or split.");
1185 "primary failover server must have mclt.");
1189 if (!
peer->max_lease_misbalance)
1191 if (!
peer->max_lease_ownership)
1193 if (!
peer->max_balance)
1195 if (!
peer->min_balance)
1197 if (!
peer->me.max_flying_updates)
1199 if (!
peer->me.max_response_delay)
1229 if (token !=
PEER) {
1239 log_fatal (
"failover peer name %s: no memory",
1258 if (token !=
STATE) {
1285 if (token !=
STATE) {
1298 if (state ->
i_am == primary) {
1300 "mclt not valid for primary");
1319 }
while (token !=
RBRACE);
1437void parse_authoring_byte_order (
struct parse *
cfile)
1446 "authoring-byte-order specified too late.\n"
1447 "It must occur before the first lease in file\n");
1462 " it must be big-endian or little-endian.");
1468 log_error (
"WARNING: Lease file authored using different"
1469 " byte order, will attempt to convert");
1494void parse_lease_id_format (
struct parse *
cfile)
1510 " it must be octal or hex.");
1562 TIME *valid_from, *valid_until;
1640 if (*valid_from || *valid_until) {
1702 prp ->
class ==
plp ->
class)) {
1760 "subnet or shared-network statements.");
1769#if defined (FAILOVER_PROTOCOL)
1791 "expecting \"failover peer\".");
1795#if defined (FAILOVER_PROTOCOL)
1802#if defined (FAILOVER_PROTOCOL)
1806 if (token !=
PEER) {
1824 "failover peer %s: %s", val,
1875#if defined (FAILOVER_PROTOCOL)
1896#if defined (BINARY_LEASES)
1910 for (; *
p;
p = &((*p)->next))
1919 log_error(
"Pool declarations must always contain at least");
1985 log_fatal (
"can't allocate host decl struct %s: %s",
2028 if (token ==
GROUP) {
2034 "expecting string or identifier.");
2044 if (host -> named_group)
2046 (&host -> named_group,
MDL);
2058 unsigned char *
t = 0;
2066 sizeof(buf) - 1, buf);
2068 "Host '%s' already has a uid '%s'",
2079 host -> client_identifier.terminated = 1;
2084 (
unsigned char *)0, &len,
':', 16, 8);
2087 "expecting hex list.");
2090 s = (
const char *)
t;
2093 (&host -> client_identifier.buffer,
2094 len + host -> client_identifier.terminated,
MDL))
2095 log_fatal (
"no memory for uid for host %s.",
2097 host -> client_identifier.data =
2098 host -> client_identifier.buffer -> data;
2099 host -> client_identifier.len = len;
2100 memcpy (host -> client_identifier.buffer -> data,
s,
2101 len + host -> client_identifier.terminated);
2113 "only one host-identifier allowed "
2124 "host-identifier v6relopt "
2125 "must have a number");
2132 "host-identifier v6relopt "
2133 "must have a number >= 0");
2137 }
else if (token !=
OPTION) {
2139 "host-identifier must be an option"
2186 (
unsigned char *)host ->
name,
2193 if (host ->
group -> statements ||
2194 (host ->
group -> authoritative !=
2196 if (host ->
group -> next)
2282 log_fatal (
"no memory for class name.");
2284 data.terminated = 1;
2287 "implicit-vendor-class" :
"implicit-user-class";
2317 data.terminated = 1;
2353 class -> lease_limit =
pc -> lease_limit;
2354 if (
class -> lease_limit) {
2355 class -> billed_leases =
2356 dmalloc (
class -> lease_limit *
2358 if (!
class -> billed_leases)
2360 memset (
class -> billed_leases, 0,
2361 (
class -> lease_limit *
2362 sizeof (
struct lease *)));
2367 log_fatal (
"No memory for subclass hash.");
2369 (
const char *)
class -> hash_string.data,
2370 class -> hash_string.len,
2371 (
void *)
class,
MDL);
2376 log_fatal (
"no memory to clone class group.");
2385 log_fatal (
"no memory for class statement.");
2389 stmt -> data.option -> data = data;
2394 &
stmt->data.option->option,
2398 class -> statements =
stmt;
2411 if (
class -> superclass) {
2413 if (token ==
SEMI) {
2445 }
else if (token ==
DYNAMIC) {
2457 }
else if (token ==
MATCH) {
2460 "invalid match in subclass.");
2471 "one 'match if' clause.");
2482 "expecting boolean expr.");
2486#if defined (DEBUG_EXPRESSION_PARSE)
2492 }
else if (token ==
SPAWN) {
2496 "invalid spawn in subclass.");
2500 class -> spawning = 1;
2502 if (token !=
WITH) {
2504 "expecting with after spawn");
2511 "can't override existing %s.",
2523 "expecting data expr.");
2527#if defined (DEBUG_EXPRESSION_PARSE)
2533 }
else if (token ==
LEASE) {
2536 if (token !=
LIMIT) {
2549 class -> lease_limit =
atoi (val);
2552 class -> billed_leases =
2553 dmalloc (
class -> lease_limit *
2555 if (!
class -> billed_leases)
2556 log_fatal (
"no memory for billed leases.");
2557 memset (
class -> billed_leases, 0,
2558 (
class -> lease_limit *
2559 sizeof (
struct lease *)));
2620 log_fatal (
"Can't allocate shared subnet: %s",
2623 log_fatal (
"Can't clone group for shared net");
2635 val =
"<no-name-given>";
2639 log_fatal (
"no memory for shared network name");
2645 "expecting a name for shared-network");
2664 "empty shared-network decl");
2735 for (
t =
share->subnets;
t->next_sibling;
t =
t->next_sibling) {
2771 unsigned char addr [4];
2772 unsigned len =
sizeof addr;
2778 log_fatal (
"Allocation of new subnet failed: %s",
2794 log_fatal(
"Allocation of group for new subnet failed.");
2832 log_fatal(
"Allocation of subnet maskstr failed: %s",
2837 "subnet %s netmask %s: bad subnet number/mask combination.",
2863 const static int mask[] = { 0x00, 0x80, 0xC0, 0xE0,
2864 0xF0, 0xF8, 0xFC, 0xFE };
2870 "in DHCPv6 and DHCPv4o6 modes.");
2886 log_fatal(
"Allocation of new subnet failed: %s",
2903 log_fatal(
"Allocation of group for new subnet failed.");
2914 if (token !=
SLASH) {
2954 while (--
ofs >= 0) {
2962 "subnet %s/%d: prefix not long enough for address.",
2969 if (!common_subnet_parsing(
cfile, share,
subnet)) {
2994 log_fatal(
"no memory for explicit group.");
3002 log_fatal(
"no memory for group decl name %s", val);
3024 }
else if (token ==
DYNAMIC) {
3028 }
else if (token ==
STATIC) {
3051 log_fatal(
"no memory for group decl %s: %s",
3108 if (token ==
COMMA) {
3111 }
while (token ==
COMMA);
3145 unsigned char addr [4];
3146 unsigned len =
sizeof addr;
3161 unsigned buflen = 0;
3162 struct class *
class;
3245 unsigned char *
tuid;
3252 tuid = ((
unsigned char *)
3268 (
cfile, (
unsigned char *)0,
3269 &buflen,
':', 16, 8));
3354 if (token !=
STATE) {
3397 "%s: expecting a binding state.",
3423 log_fatal(
"Impossible condition at %s:%d.",
3446 "expecting a hostname.");
3458 if (token ==
CLASS) {
3460 (
unsigned *)0,
cfile);
3468 if (
lease -> billing_class)
3474 "unknown class %s", val);
3477 if (
lease -> billing_class)
3504 on->data.on.statements) {
3511 on->data.on.statements) {
3529 "agent option expected.");
3536 log_error (
"no memory to stash agent option");
3540 *
p;
p = &((*p) -> cdr))
3544 &((*p) -> car)),
oc,
MDL);
3555 "%s can't be a variable name",
3571 if (!
lease -> scope)
3593 log_fatal(
"no memory for binding value.");
3597 if (token !=
EQUAL) {
3599 "expecting '=' in set statement.");
3609 if (!parse_binding_value(
cfile,
nv)) {
3640 }
else if (!
strcasecmp (val,
"ddns-rev-name")) {
3655 "Too many %s parameters in lease %s\n",
3667#if defined (FAILOVER_PROTOCOL)
3674#if defined (FAILOVER_PROTOCOL)
3717 value->type = binding_data;
3718 value->value.data.len = buflen;
3728 data->terminated = 1;
3730 value->type = binding_data;
3750 }
else if (token ==
PERCENT) {
3759 value->type = binding_numeric;
3761 }
else if (token ==
NAME) {
3763 value->type = binding_boolean;
3765 value->value.boolean = 1;
3767 value->value.boolean = 0;
3795 unsigned char addr [4];
3796 unsigned len =
sizeof addr;
3830 if (token !=
SEMI) {
3850 log_error (
"Be sure to place pool statement after %s",
3851 "related subnet declarations.");
3867 permit_dynamic_bootp_clients)) ||
3872 permit_all_clients))) {
3883 log_fatal (
"no memory for ad-hoc pool: %s",
3887 log_fatal (
"no memory for ad-hoc permit.");
3893 pool -> permit_list =
p;
3896 pool -> prohibit_list =
p;
3906 log_fatal (
"no memory for anon pool group.");
3919#if defined (FAILOVER_PROTOCOL)
3924 "not permitted for address");
3925 log_error (
"range declarations where there is a failover");
3926 log_error (
"peer in scope. If you wish to declare an");
3927 log_error (
"address range from which dynamic bootp leases");
3928 log_error (
"can be allocated, please declare it within a");
3929 log_error (
"pool declaration that also contains the \"no");
3930 log_error (
"failover\" statement. The failover protocol");
3931 log_error (
"itself does not permit dynamic bootp - this");
3932 log_error (
"is not a limitation specific to the ISC DHCP");
3933 log_error (
"server. Please don't ask me to defend this");
3934 log_error (
"until you have read and really tried %s",
3936 log_error (
"the failover protocol specification.");
3952 struct iaddr *lo_addr,
int bits,
int units,
3963 log_fatal(
"Internal error: Attempt to add non-IPv6 address "
3964 "to IPv6 shared network.");
4035 if (
pond->jumbo_range == 0) {
4037 pond->jumbo_range = 1;
4047 pond->jumbo_range = 1;
4095 (
pond->permit_list->next ==
NULL) &&
4096 (
pond->permit_list->type == permit_all_clients)) {
4106 log_fatal (
"no memory for ad-hoc ipv6 pond: %s",
4110 log_fatal (
"no memory for ad-hoc ipv6 permit.");
4113 p->type = permit_all_clients;
4114 pond->permit_list =
p;
4126 log_fatal (
"no memory for anon pool group.");
4179 memset(&net, 0,
sizeof(net));
4186 if (token ==
SLASH) {
4199 if ((bits < 0) || (bits > 128)) {
4206 "network mask smaller than subnet mask");
4259 "range6 end address is outside the subnet");
4269 log_fatal(
"Error converting range to CIDR networks");
4289 &
p->cidrnet.lo_addr,
4290 p->cidrnet.bits, 128,
pond);
4300 if (token !=
SEMI) {
4349 " is outside the subnet");
4369 " is outside the subnet");
4379 if (token !=
SLASH) {
4393 if ((bits <= 0) || (bits >= 128)) {
4418 if (token !=
SEMI) {
4429 log_fatal(
"Error converting prefix to CIDR");
4446 if (
p->cidrnet.bits == 128) {
4447 p->cidrnet.bits = bits;
4449 if (
p->cidrnet.bits > bits) {
4454 &
p->cidrnet.lo_addr,
4455 p->cidrnet.bits, bits,
pond);
4477 while (*h !=
NULL) {
4497 if (token !=
SLASH) {
4513 if (token !=
SEMI) {
4585 "subnet statements.");
4615 &
pond->valid_from, &
pond->valid_until);
4621 &
pond->valid_from, &
pond->valid_until);
4657 p = &
pond->shared_network->ipv6_pond;
4658 for (; *
p;
p = &((*p)->next))
4666 "address range6 or prefix6");
4667 log_error (
"Pool6 declarations must always contain at least");
4668 log_error (
"one range6 or prefix6 statement.");
4743 log_fatal(
"Unable to find server option %u (%s:%d).",
4769 char addr_buf[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
4799 if (token ==
RBRACE)
break;
4801 if (token ==
CLTT) {
4808 "expecting IAADDR or right brace");
4815 "expecting IPv6 address");
4823 "expecting left brace");
4833 if (token ==
RBRACE)
break;
4842 "unexpected end of file");
4848 if (token !=
STATE) {
4882 if (token !=
SEMI) {
4899 prefer =
atoi (val);
4908 if (token ==
SEMI) {
4912 "corrupt lease file; "
4913 "expecting semicolon.");
4936 if (token ==
SEMI) {
4940 "corrupt lease file; "
4941 "expecting semicolon.");
4953 if ((token !=
NAME) &&
5002 if (token !=
EQUAL) {
5008 if (!parse_binding_value(
cfile,
nv)) {
5068 "expecting ia_na contents, "
5077 "missing state in iaaddr");
5082 "missing end time in iaaddr");
5098 if (scope !=
NULL) {
5115 (&
iaaddr->on_star.on_expiry,
5121 (&
iaaddr->on_star.on_release,
5133 log_error(
"No pool found for IA_NA address %s",
5139 if ((
pool->ipv6_pond->use_eui_64) &&
5142 log_error(
"Non EUI-64 lease in EUI-64 pool: %s"
5217 char addr_buf[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
5247 if (token ==
RBRACE)
break;
5249 if (token ==
CLTT) {
5256 "expecting IAADDR or right brace");
5263 "expecting IPv6 address");
5271 "expecting left brace");
5281 if (token ==
RBRACE)
break;
5290 "unexpected end of file");
5296 if (token !=
STATE) {
5330 if (token !=
SEMI) {
5347 prefer =
atoi (val);
5356 if (token ==
SEMI) {
5360 "corrupt lease file; "
5361 "expecting semicolon.");
5384 if (token ==
SEMI) {
5388 "corrupt lease file; "
5389 "expecting semicolon.");
5401 if ((token !=
NAME) &&
5450 if (token !=
EQUAL) {
5456 if (!parse_binding_value(
cfile,
nv)) {
5516 "expecting ia_ta contents, "
5525 "missing state in iaaddr");
5530 "missing end time in iaaddr");
5546 if (scope !=
NULL) {
5563 (&
iaaddr->on_star.on_expiry,
5569 (&
iaaddr->on_star.on_release,
5581 log_error(
"No pool found for IA_TA address %s",
5655 char addr_buf[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
5685 if (token ==
RBRACE)
break;
5687 if (token ==
CLTT) {
5694 "IAPREFIX or right brace");
5701 "expecting IPv6 prefix");
5709 "expecting left brace");
5719 if (token ==
RBRACE)
break;
5728 "unexpected end of file");
5734 if (token !=
STATE) {
5768 if (token !=
SEMI) {
5785 prefer =
atoi (val);
5794 if (token ==
SEMI) {
5798 "corrupt lease file; "
5799 "expecting semicolon.");
5822 if (token ==
SEMI) {
5826 "corrupt lease file; "
5827 "expecting semicolon.");
5839 if ((token !=
NAME) &&
5888 if (token !=
EQUAL) {
5894 if (!parse_binding_value(
cfile,
nv)) {
5954 "expecting ia_pd contents, "
5963 "missing state in iaprefix");
5968 "missing end time in iaprefix");
5984 if (scope !=
NULL) {
6001 (&
iapref->on_star.on_expiry,
6007 (&
iapref->on_star.on_release,
6092 unsigned char bytes[128];
6104 log_fatal(
"parse_server_duid: out of memory");
6179 log_fatal(
"Out of memory storing DUID");
6181 duid.data = (
unsigned char *)
duid.buffer->data;
6197 else if (token ==
LL) {
6231 log_fatal(
"Out of memory storing DUID");
6233 duid.data = (
unsigned char *)
duid.buffer->data;
6252 else if (token ==
LLT) {
6295 log_fatal(
"Out of memory storing DUID");
6297 duid.data = (
unsigned char *)
duid.buffer->data;
6319 else if (token ==
NUMBER) {
6335 log_fatal(
"Out of memory storing DUID");
6337 duid.data = (
unsigned char *)
duid.buffer->data;
6358 if (token !=
SEMI) {
6386 "authoring-byte-order not in the lease file.\n"
6387 "Assuming file byte order matches this server.\n");
6393 ((
value << 8) & 0xff0000) |
6394 ((
value >> 8) & 0xff00) |
6395 ((
value << 24) & 0xff000000));
6418 unsigned char bytes[132];
6422 log_error(
"parse_iaid_duid: ia ptr cannot be null");
6430 "iaid+ia_xx string too short");
6441 log_fatal(
"parse_iaid_duid:Out of memory.");
int group_dereference(struct group **ptr, const char *file, int line)
int option_cache_reference(struct option_cache **ptr, struct option_cache *src, const char *file, int line)
int buffer_allocate(struct buffer **ptr, unsigned len, const char *file, int line)
int option_chain_head_allocate(struct option_chain_head **ptr, const char *file, int line)
void data_string_forget(struct data_string *data, const char *file, int line)
int group_reference(struct group **ptr, struct group *bp, const char *file, int line)
int binding_value_reference(struct binding_value **ptr, struct binding_value *src, const char *file, int line)
int executable_statement_reference(struct executable_statement **ptr, struct executable_statement *bp, const char *file, int line)
int binding_scope_reference(struct binding_scope **ptr, struct binding_scope *bp, const char *file, int line)
int binding_scope_allocate(struct binding_scope **ptr, const char *file, int line)
void data_string_copy(struct data_string *dest, const struct data_string *src, const char *file, int line)
int executable_statement_allocate(struct executable_statement **ptr, const char *file, int line)
int option_cache_allocate(struct option_cache **cptr, const char *file, int line)
int binding_value_allocate(struct binding_value **cptr, const char *file, int line)
enum dhcp_token peek_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token next_token(const char **rval, unsigned *rlen, struct parse *cfile)
isc_result_t end_parse(struct parse **cfile)
isc_result_t new_parse(struct parse **cfile, int file, char *inbuf, unsigned buflen, const char *name, int eolp)
int option_cache_dereference(struct option_cache **ptr, const char *file, int line)
unsigned char * parse_numeric_aggregate(struct parse *cfile, unsigned char *buf, unsigned *max, int separator, int base, unsigned size)
int parse_string(struct parse *cfile, char **sptr, unsigned *lptr)
int parse_boolean_expression(struct expression **expr, struct parse *cfile, int *lose)
struct collection * collections
int parse_ip6_addr_expr(struct expression **expr, struct parse *cfile)
void skip_to_semi(struct parse *cfile)
int parse_option_statement(struct executable_statement **result, struct parse *cfile, int lookups, struct option *option, enum statement_op op)
int parse_X(struct parse *cfile, u_int8_t *buf, unsigned max)
int parse_semi(struct parse *cfile)
int parse_option_code_definition(struct parse *cfile, struct option *option)
int parse_ip6_prefix(struct parse *cfile, struct iaddr *addr, u_int8_t *plen)
int parse_ip6_addr(struct parse *cfile, struct iaddr *addr)
int parse_option_decl(struct option_cache **oc, struct parse *cfile)
TIME parse_date(struct parse *cfile)
void skip_to_rbrace(struct parse *cfile, int brace_count)
int parse_warn(struct parse *cfile, const char *fmt,...)
int parse_data_expression(struct expression **expr, struct parse *cfile, int *lose)
char * parse_host_name(struct parse *cfile)
int parse_ip_addr_or_hostname(struct expression **expr, struct parse *cfile, int uniform)
int parse_cshl(struct data_string *data, struct parse *cfile)
void parse_hardware_param(struct parse *cfile, struct hardware *hardware)
int parse_on_statement(struct executable_statement **result, struct parse *cfile, int *lose)
int parse_option_data(struct expression **expr, struct parse *cfile, int lookups, struct option *option)
void parse_option_space_decl(struct parse *cfile)
int parse_executable_statement(struct executable_statement **result, struct parse *cfile, int *lose, enum expression_context case_context)
isc_result_t parse_option_name(struct parse *cfile, int allocate, int *known, struct option **opt)
TIME parse_date_core(struct parse *cfile)
void print_expression(char *name, struct expression *expr) const
void print_hex_or_string(unsigned len, const u_int8_t *data, unsigned limit, char *buf)
void parse_group_declaration(struct parse *cfile, struct group *group)
isc_result_t conf_file_subparse(struct parse *cfile, struct group *group, int group_type)
void parse_address_range(struct parse *cfile, struct group *group, int type, struct pool *inpool, struct lease **lpchain)
void parse_ia_na_declaration(struct parse *cfile)
int parse_allow_deny(struct option_cache **oc, struct parse *cfile, int flag)
int parse_lease_declaration(struct lease **lp, struct parse *cfile)
int parse_class_declaration(struct class **cp, struct parse *cfile, struct group *group, int type)
int permit_list_match(struct permit *lhs, struct permit *rhs)
isc_result_t read_conf_file(const char *filename, struct group *group, int group_type, int leasep)
void parse_host_declaration(struct parse *cfile, struct group *group)
void get_permit(struct parse *cfile, struct permit **permit_head, int is_allow, TIME *valid_from, TIME *valid_until)
Parse allow and deny statements.
int parse_lbrace(struct parse *cfile)
void parse_subnet_declaration(struct parse *cfile, struct shared_network *share)
void parse_subnet6_declaration(struct parse *cfile, struct shared_network *share)
void parse_shared_net_declaration(struct parse *cfile, struct group *group)
int parse_fixed_addr_param(struct option_cache **oc, struct parse *cfile, enum dhcp_token type)
int parse_statement(struct parse *cfile, struct group *group, int type, struct host_decl *host_decl, int declaration)
void parse_ia_ta_declaration(struct parse *cfile)
void parse_pool_statement(struct parse *cfile, struct group *group, int type)
Parse a pool statement.
void parse_ia_pd_declaration(struct parse *cfile)
isc_result_t lease_file_subparse(struct parse *cfile)
void putUShort(unsigned char *, u_int32_t)
void putULong(unsigned char *, u_int32_t)
isc_result_t find_class(struct class **c, const char *s, const char *file, int line)
void db_startup(int testp)
#define DHO_VENDOR_CLASS_IDENTIFIER
#define DHO_DHCP_SERVER_IDENTIFIER
void parse_failover_peer(struct parse *, struct group *, int)
#define skip_token(a, b, c)
isc_result_t ipv6_pond_reference(struct ipv6_pond **pond, struct ipv6_pond *src, const char *file, int line)
reference an IPv6 pond structure.
isc_result_t delete_class(struct class *, int)
const char * pin6_addr(const struct in6_addr *)
#define CLASS_TYPE_VENDOR
void parse_server_duid(struct parse *cfile)
void trace_conf_stop(trace_type_t *ttype)
isc_result_t ia_add_iasubopt(struct ia_xx *ia, struct iasubopt *iasubopt, const char *file, int line)
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.
void parse_server_duid_conf(struct parse *cfile)
#define HOST_DECL_DYNAMIC
isc_result_t find_failover_peer(dhcp_failover_state_t **, const char *, const char *, int)
void free_permit(struct permit *, const char *, int)
uint32_t parse_byte_order_uint32(const void *source)
struct universe agent_universe
isc_result_t delete_host(struct host_decl *, int)
isc_result_t add_ipv6_pool(struct ipv6_pool *pool)
#define SV_CLIENT_UPDATES
void parse_trace_setup(void)
void parse_prefix6(struct parse *cfile, struct group *group, struct ipv6_pond *)
void set_server_duid(struct data_string *new_duid)
const char * path_dhcpd_db
void trace_conf_input(trace_type_t *, unsigned, char *)
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)
struct ipv6_pool ** pools
#define CLASS_TYPE_SUBCLASS
isc_result_t ipv6_pond_dereference(struct ipv6_pond **pond, const char *file, int line)
de-reference an IPv6 pond structure.
#define SV_BOOT_UNKNOWN_CLIENTS
isc_result_t enter_failover_peer(dhcp_failover_state_t *)
void set_server_duid_type(int type)
isc_result_t enter_host(struct host_decl *, int, int)
void new_shared_network_interface(struct parse *, struct shared_network *, const char *)
host_hash_t * host_name_hash
const char * path_dhcpd_conf
void parse_failover_state_declaration(struct parse *, dhcp_failover_state_t *)
void enter_lease(struct lease *)
isc_result_t ipv6_pond_allocate(struct ipv6_pond **pond, const char *file, int line)
Create a new IPv6 pond structure.
struct universe server_universe
void enter_shared_network(struct shared_network *)
void parse_fixed_prefix6(struct parse *cfile, struct host_decl *host_decl)
isc_result_t ia_dereference(struct ia_xx **ia, const char *file, int line)
#define GROUP_OBJECT_STATIC
struct universe dhcp_universe
int subnet_inner_than(const struct subnet *, const struct subnet *, int)
#define GROUP_OBJECT_DYNAMIC
isc_result_t find_ipv6_pool(struct ipv6_pool **pool, u_int16_t type, const struct in6_addr *addr)
struct permit * new_permit(const char *, int)
isc_result_t ipv6_pool_dereference(struct ipv6_pool **pool, const char *file, int line)
de-reference an IPv6 pool structure.
void parse_address_range6(struct parse *cfile, struct group *group, struct ipv6_pond *)
void postdb_startup(void)
isc_result_t iasubopt_dereference(struct iasubopt **iasubopt, const char *file, int line)
void enter_subnet(struct subnet *)
#define CLASS_DECL_DELETED
void new_address_range(struct parse *, struct iaddr, struct iaddr, struct subnet *, struct pool *, struct lease **)
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.
void parse_pool6_statement(struct parse *, struct group *, int)
isc_result_t add_lease6(struct ipv6_pool *pool, struct iasubopt *lease, time_t valid_lifetime_end_time)
void parse_failover_state(struct parse *, enum failover_state *, TIME *)
void postconf_initialization(int)
isc_result_t ipv6_pool_reference(struct ipv6_pool **pool, struct ipv6_pool *src, const char *file, int line)
reference an IPv6 pool structure.
isc_result_t ia_reference(struct ia_xx **ia, struct ia_xx *src, const char *file, int line)
#define CLASS_DECL_DYNAMIC
int executable_statement_dereference(struct executable_statement **ptr, const char *file, int line)
@ communications_interrupted
@ COMMUNICATIONS_INTERRUPTED
isc_result_t range2cidr(struct iaddrcidrnetlist **result, const struct iaddr *lo, const struct iaddr *hi)
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result)
u_int32_t host_addr(struct iaddr addr, struct iaddr mask)
isc_boolean_t is_cidr_mask_valid(const struct iaddr *addr, int bits)
struct iaddr ip_addr(struct iaddr subnet, struct iaddr mask, u_int32_t host_address)
char * piaddrcidr(const struct iaddr *addr, unsigned int bits)
const char * piaddr(const struct iaddr addr)
int addr_eq(struct iaddr addr1, struct iaddr addr2)
struct iaddr subnet_number(struct iaddr addr, struct iaddr mask)
char * piaddrmask(struct iaddr *addr, struct iaddr *mask)
@ supersede_option_statement
int clone_group(struct group **gp, struct group *group, const char *file, int line)
struct group * root_group
isc_result_t delete_group(struct group_object *group, int writep)
isc_result_t supersede_group(struct group_object *group, int writep)
group_hash_t * group_name_hash
void * dmalloc(size_t, const char *, int)
void dfree(void *, const char *, int)
int log_error(const char *,...) __attribute__((__format__(__printf__
int int int log_debug(const char *,...) __attribute__((__format__(__printf__
void log_fatal(const char *,...) __attribute__((__format__(__printf__
struct binding * bindings
struct binding_value * value
struct expression * submatch
struct lease ** billed_leases
struct data_string hash_string
const unsigned char * data
enum executable_statement::statement_op op
struct executable_statement::@7::@9 on
union executable_statement::@7 data
struct executable_statement * next
struct executable_statement * statements
union expression::expr_union data
struct shared_network * shared_network
struct executable_statement * statements
struct iaddrcidrnetlist * fixed_prefix
struct option_cache * fixed_addr
struct data_string client_identifier
struct group_object * named_group
struct data_string host_id
struct option * host_id_option
struct hardware interface
struct data_string iaid_duid
struct iaddrcidrnet cidrnet
binding_state_t next_binding_state
struct binding_scope * scope
struct hardware hardware_addr
binding_state_t rewind_binding_state
binding_state_t binding_state
struct executable_statement * on_expiry
struct executable_statement * on_release
struct universe * universe
@ permit_dynamic_bootp_clients
@ permit_authenticated_clients
@ permit_unauthenticated_clients
struct permit * prohibit_list
struct permit * permit_list
dhcp_failover_state_t * failover_peer
struct shared_network * shared_network
struct interface_info * interface
dhcp_failover_state_t * failover_peer
struct interface_info * interface
struct subnet * next_sibling
struct shared_network * shared_network
option_name_hash_t * name_hash
option_code_hash_t * code_hash
int option_reference(struct option **dest, struct option *src, const char *file, int line)
int option_dereference(struct option **dest, const char *file, int line)
isc_result_t trace_get_file(trace_type_t *, const char *, unsigned *, char **)
trace_type_t * trace_type_register(const char *, void *, void(*)(trace_type_t *, unsigned, char *), void(*)(trace_type_t *), const char *, int)
isc_result_t trace_write_packet(trace_type_t *, unsigned, const char *, const char *, int)
int binding_scope_dereference(struct binding_scope **ptr, const char *file, int line)
int make_const_data(struct expression **expr, const unsigned char *data, unsigned len, int terminated, int allocate, const char *file, int line)
struct binding * find_binding(struct binding_scope *scope, const char *name)
void expression_dereference(struct expression **eptr, const char *file, int line)
pair cons(caddr_t car, pair cdr)
int option_cache(struct option_cache **oc, struct data_string *dp, struct expression *expr, struct option *option, const char *file, int line)
int binding_value_dereference(struct binding_value **v, const char *file, int line)
int make_concat(struct expression **expr, struct expression *left, struct expression *right)
struct data_string const_data