49 if (strlen (e ->
name) == length &&
50 !memcmp (e ->
name,
name, (
unsigned)length))
102 #if defined (DEBUG_TOKENS) 103 log_error(
"skip_to_rbrace: %d\n", brace_count);
108 if (brace_count > 0) {
112 if (brace_count == 0) {
119 }
else if (
token ==
SEMI && (brace_count == 0)) {
171 log_fatal (
"no memory for string %s.", val);
172 memcpy (s, val, len + 1);
213 if (!(s = (
char *)
dmalloc (strlen (val) + 1,
MDL)))
214 log_fatal (
"can't allocate temp space for hostname.");
216 c =
cons ((caddr_t)s, c);
217 len += strlen (s) + 1;
234 log_fatal (
"can't allocate space for hostname.");
241 unsigned l = strlen ((
char *)(c -> car));
243 memcpy (t, (
char *)(c -> car), l);
272 unsigned char addr [4];
273 unsigned len =
sizeof addr;
278 token =
peek_token (&val, (
unsigned *)0, cfile);
318 token =
next_token (&val, (
unsigned *)0, cfile);
319 parse_warn (cfile,
"%s (%d): expecting IP address or hostname",
339 &addr ->
len,
DOT, 10, 8))
355 unsigned int mask_width, dest_dest_len;
358 &addr ->
len,
DOT, 10, 8)) {
359 mask_width = (
unsigned int)addr->
iabuf[0];
360 dest_dest_len = (((mask_width+7)/8)+1);
361 if (mask_width > 32) {
363 "subnet mask width (%u) greater than 32.", mask_width);
365 else if (dest_dest_len != addr->
len) {
367 "destination descriptor with subnet mask width %u " 368 "should have %u octets, but has %u octets.",
369 mask_width, dest_dest_len, addr->
len);
381 is_hex_string(
const char *s) {
383 if (!isxdigit((
int)*s)) {
407 char v6[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
422 is_hex_string(val)) ||
429 val_len = strlen(val);
430 if ((v6_len + val_len) >=
sizeof(v6)) {
435 memcpy(v6+v6_len, val, val_len);
448 if (inet_pton(AF_INET6, v6, addr->
iabuf) <= 0) {
463 struct parse *cfile) {
485 if (token !=
SLASH) {
499 if ((n < 0) || (n > 128)) {
500 parse_warn(cfile,
"Invalid IPv6 prefix length.");
523 const char *val, *orig;
527 unsigned char newval, warnmask=0;
531 prefixlen = match->
addr.
len * 8;
535 if (token ==
SLASH) {
540 parse_warn(cfile,
"Invalid CIDR prefix length:" 541 " expecting a number.");
545 prefixlen = atoi(val);
548 prefixlen > (match->
addr.
len * 8)) {
562 fflen = prefixlen / 8;
570 "\x00\x80\xc0\xe0\xf0\xf8\xfc\xfe"[prefixlen % 8];
581 if (newval != match->
addr.
iabuf[fflen]) {
585 }
while (++fflen < match->
mask.
len);
588 log_error(
"Warning: Extraneous bits removed " 589 "in address component of %s/%d.",
600 "expecting ip-address or ip-address/prefixlen");
636 if (!strncmp(val,
"unknown-", 8)) {
640 "expecting a network hardware type");
667 parse_warn(cfile,
"hardware address too long");
697 parse_warn (cfile,
"Expecting numeric lease time");
701 convert_num(cfile, (
unsigned char *)&num, val, 10, 32);
732 max, separator, base, size)
742 unsigned char *bufp = buf, *s, *t;
747 bufp = (
unsigned char *)
dmalloc (*max * size / 8,
MDL);
749 log_fatal (
"no space for numeric aggregate");
756 if (
token != separator) {
769 if ((bufp != NULL) && (bufp != buf))
771 return (
unsigned char *)0;
785 parse_warn (cfile,
"expecting numeric value.");
788 if ((bufp != NULL) && (bufp != buf))
805 t = (
unsigned char *)
dmalloc (strlen (val) + 1,
MDL);
808 strcpy ((
char *)t, val);
809 c =
cons ((caddr_t)t, c);
811 }
while (++count != *max);
819 bufp = (
unsigned char *)
dmalloc (count * size / 8,
MDL);
821 log_fatal (
"no space for numeric aggregate.");
822 s = bufp + count - size / 8;
827 convert_num (cfile, s, (
char *)(c -> car), base, size);
844 const unsigned char *ptr = (
const unsigned char *)str;
857 if (ptr [0] ==
'0') {
858 if (ptr [1] ==
'x') {
861 }
else if (isascii (ptr [1]) && isdigit (ptr [1])) {
877 else if (
tval >=
'A')
879 else if (
tval >=
'0')
887 "Bogus number %s: digit %d not in base %d",
891 val = val * base +
tval;
895 max = (1 << (size - 1));
897 max = (1 << (size - 1)) + ((1 << (size - 1)) - 1);
902 "%s%lo exceeds max (%d) for precision.",
904 (
unsigned long)val, max);
908 "%s%lx exceeds max (%d) for precision.",
910 (
unsigned long)val, max);
914 "%s%lu exceeds max (%d) for precision.",
916 (
unsigned long)val, max);
924 *buf = -(
unsigned long)val;
934 "Unexpected integer size: %d\n", size);
940 *buf = (u_int8_t)val;
950 "Unexpected integer size: %d\n", size);
979 long int tzoff, year, mon, mday, hour, min, sec;
982 static int months[11] = { 31, 59, 90, 120, 151, 181,
983 212, 243, 273, 304, 334 };
1000 parse_warn(cfile,
"Seconds since epoch expected.");
1007 return((
TIME)guess);
1013 parse_warn(cfile,
"numeric day of week expected.");
1043 "expected slash separating year from month.");
1053 parse_warn(cfile,
"numeric month expected.");
1057 mon = atoi(val) - 1;
1065 "expected slash separating month from day.");
1075 parse_warn(cfile,
"numeric day of month expected.");
1098 "expected colon separating hour from minute.");
1108 parse_warn(cfile,
"numeric minute expected.");
1120 "expected colon separating minute from second.");
1130 parse_warn(cfile,
"numeric second expected.");
1144 "Time zone offset or semicolon expected.");
1156 guess = ((((((365 * (year - 70) +
1162 !((year - 72) & 3)) +
1165 min) * 60) + sec + tzoff;
1176 return((
TIME)guess);
1186 struct parse *cfile;
1206 struct parse *cfile;
1221 token =
next_token (&val, (
unsigned *)0, cfile);
1224 "expecting identifier after option keyword.");
1231 log_fatal (
"no memory for uname information.");
1232 strcpy (uname, val);
1233 token =
peek_token (&val, (
unsigned *)0, cfile);
1239 token =
next_token (&val, (
unsigned *)0, cfile);
1241 parse_warn (cfile,
"expecting identifier after '.'");
1252 parse_warn (cfile,
"no option space named %s.", uname);
1254 return ISC_R_NOTFOUND;
1277 }
else if (strncasecmp(val,
"unknown-", 8) == 0) {
1284 parse_warn(cfile,
"Option codes 0 and %u are illegal " 1289 return ISC_R_FAILURE;
1316 log_info(
"option %s has been redefined as option %s. " 1317 "Please update your configs if necessary.",
1324 }
else if (allocate) {
1329 parse_warn(cfile,
"no option named %s in space %s",
1333 return ISC_R_NOTFOUND;
1338 return ISC_R_SUCCESS;
1347 struct parse *cfile;
1353 int tsize=1, lsize=1, hsize = 0;
1358 token =
next_token (&val, (
unsigned *)0, cfile);
1366 log_fatal (
"No memory for new option space.");
1371 log_fatal (
"No memory for new option space name.");
1372 strcpy (nu_name, val);
1373 nu ->
name = nu_name;
1383 if (token !=
WIDTH) {
1390 parse_warn(cfile,
"expecting number 1, 2, 4.");
1411 parse_warn(cfile,
"invalid code width (%d), " 1412 "expecting a 1, 2 or 4.",
1420 if (token !=
WIDTH) {
1427 parse_warn(cfile,
"expecting number 1 or 2.");
1432 if (lsize != 1 && lsize != 2) {
1433 parse_warn(cfile,
"invalid length width (%d) " 1434 "expecting 1 or 2.", lsize);
1442 if (token !=
SIZE) {
1449 parse_warn(cfile,
"expecting a 10base number");
1457 if (hsize < 0 || hsize > 0x7FFFFFFF) {
1468 }
while (token !=
SEMI);
1518 log_fatal (
"No memory to expand option space array.");
1525 if (!option_name_new_hash(&nu->
name_hash, hsize,
MDL) ||
1527 log_fatal(
"Can't allocate %s option hash table.", nu->
name);
1570 struct parse *cfile;
1576 unsigned arrayp = 0;
1578 int no_more_in_record = 0;
1584 int has_encapsulation = 0;
1588 token =
next_token (&val, (
unsigned *)0, cfile);
1590 parse_warn (cfile,
"expecting option code number.");
1594 option -> code = atoi (val);
1596 token =
next_token (&val, (
unsigned *)0, cfile);
1597 if (token !=
EQUAL) {
1604 token =
next_token (&val, (
unsigned *)0, cfile);
1605 if (token ==
ARRAY) {
1606 token =
next_token (&val, (
unsigned *)0, cfile);
1613 token =
next_token (&val, (
unsigned *)0, cfile);
1618 token =
next_token (&val, (
unsigned *)0, cfile);
1623 if (has_encapsulation) {
1625 "encapsulate must always be the last item.");
1639 token =
next_token (&val, (
unsigned *)0, cfile);
1645 arrayp = recordp + 1;
1646 token =
next_token (&val, (
unsigned *)0, cfile);
1647 if ((recordp) && (token ==
LBRACE)) {
1649 "only uniform array inside record.");
1661 token =
next_token (&val, (
unsigned *)0, cfile);
1669 switch (atoi (val)) {
1671 type = is_signed ?
'b' :
'B';
1674 type = is_signed ?
's' :
'S';
1677 type = is_signed ?
'l' :
'L';
1681 "%s bit precision is not supported.", val);
1691 token =
next_token (&val, (
unsigned *)0, cfile);
1693 parse_warn (cfile,
"expecting \"integer\" keyword.");
1721 tokbuf[tokix++] =
'D';
1730 parse_warn (cfile,
"arrays of text strings not %s",
1737 no_more_in_record = 1;
1744 token =
next_token (&val, (
unsigned *)0, cfile);
1747 "expecting option space identifier");
1751 encapsulated = NULL;
1753 val, strlen(val),
MDL)) {
1754 parse_warn(cfile,
"unknown option space %s", val);
1758 if (strlen (val) + tokix + 2 >
sizeof (tokbuf))
1760 tokbuf [tokix++] =
'E';
1761 strcpy (&tokbuf [tokix], val);
1762 tokix += strlen (val);
1764 has_encapsulation = 1;
1770 parse_warn (cfile,
"array incompatible with zerolen.");
1776 no_more_in_record = 1;
1780 parse_warn (cfile,
"unknown data type %s", val);
1787 if (tokix ==
sizeof tokbuf) {
1789 parse_warn (cfile,
"too many types in record.");
1795 tokbuf [tokix++] = type;
1798 token =
next_token (&val, (
unsigned *)0, cfile);
1799 if (arrayp > recordp) {
1800 if (tokix ==
sizeof tokbuf) {
1802 "too many types in record.");
1808 tokbuf[tokix++] =
'a';
1810 if (token ==
COMMA) {
1811 if (no_more_in_record) {
1813 "%s must be at end of record.",
1814 type ==
't' ?
"text" :
"string");
1820 token =
next_token (&val, (
unsigned *)0, cfile);
1824 parse_warn (cfile,
"expecting right brace.");
1838 if (has_encapsulation && arrayp) {
1840 "Arrays of encapsulations don't make sense.");
1843 s =
dmalloc(tokix + (arrayp ? 1 : 0) + 1,
MDL);
1845 log_fatal(
"no memory for option format.");
1847 memcpy(s, tokbuf, tokix);
1849 s[tokix++] = (arrayp > recordp) ?
'a' :
'A';
1858 if (oldopt != NULL) {
1879 if (has_encapsulation) {
1882 if (!option_code_hash_lookup(&encapsulated->
enc_opt,
1885 log_fatal(
"error finding encapsulated option (%s:%d)",
1898 struct parse *cfile;
1903 static unsigned char 1904 from64 [] = {64, 64, 64, 64, 64, 64, 64, 64,
1905 64, 64, 64, 62, 64, 64, 64, 63,
1906 52, 53, 54, 55, 56, 57, 58, 59,
1907 60, 61, 64, 64, 64, 64, 64, 64,
1908 64, 0, 1, 2, 3, 4, 5, 6,
1909 7, 8, 9, 10, 11, 12, 13, 14,
1910 15, 16, 17, 18, 19, 20, 21, 22,
1911 23, 24, 25, 64, 64, 64, 64, 64,
1912 64, 26, 27, 28, 29, 30, 31, 32,
1913 33, 34, 35, 36, 37, 38, 39, 40,
1914 41, 42, 43, 44, 45, 46, 47, 48,
1915 49, 50, 51, 64, 64, 64, 64, 64};
1932 log_fatal(
"no memory for base64 buffer.");
1933 memset(t, 0, (
sizeof(*t)) - 1);
1934 memcpy(t->string, val, l + 1);
1943 for (i = 0; val[i]; i++) {
1947 if (((val[i] <
' ') || (val[i] >
'z')) ||
1948 ((from64[val[i] -
' '] > 63) && (val[i] !=
'='))) {
1953 }
while (valid_base64);
1956 data->
len = (data->
len * 3) / 4;
1958 parse_warn (cfile,
"can't allocate buffer for base64 data.");
1965 for (t = bufs; t; t = t->
next) {
1966 for (i = 0; t->string[i]; i++) {
1967 unsigned foo = t->string[i];
1968 if (terminated && foo !=
'=') {
1970 "stuff after base64 '=' terminator: %s.",
1974 if ((foo <
' ') || (foo >
'z')) {
1977 "invalid base64 character %d.",
1986 foo = from64[foo -
' '];
1989 acc = (acc << 6) + foo;
2014 "partial base64 value left over: %d.",
2021 for (t = bufs; t; t = last) {
2039 struct parse *cfile;
2041 u_int8_t ibuf [128];
2051 token =
next_token (&val, (
unsigned *)0, cfile);
2053 parse_warn (cfile,
"expecting hexadecimal number.");
2055 for (; sl; sl =
next) {
2061 if (ilen ==
sizeof ibuf) {
2066 log_fatal (
"no memory for string list.");
2075 token =
peek_token (&val, (
unsigned *)0, cfile);
2082 log_fatal (
"no memory to store octet data.");
2084 data -> len = tlen + ilen;
2085 data -> terminated = 0;
2090 memcpy (rvp, sl ->
data,
sizeof ibuf);
2096 memcpy (rvp, ibuf, ilen);
2116 struct parse *cfile;
2132 struct parse *cfile;
2136 #if defined(ENABLE_EXECUTE) 2149 isc_result_t status;
2152 token =
peek_token (&val, (
unsigned *)0, cfile);
2159 }
else if (token ==
LOCAL) {
2162 parse_warn(cfile,
"Expecting 'local' or 'default'.");
2170 if (token !=
SEMI) {
2185 token =
next_token (&val, (
unsigned *)0, cfile);
2192 cta = (
struct class *)0;
2194 if (status != ISC_R_SUCCESS) {
2196 val, isc_result_totext (status));
2206 log_fatal (
"no memory for new statement.");
2207 (*result) -> op = add_statement;
2208 (*result) -> data.add = cta;
2218 log_fatal (
"no memory for new statement.");
2219 (*result) -> op = break_statement;
2226 if (status != ISC_R_SUCCESS ||
option == NULL) {
2231 send_option_statement);
2240 if (status != ISC_R_SUCCESS ||
option == NULL) {
2245 supersede_option_statement);
2263 log_fatal (
"no memory for new statement.");
2264 (*result) -> op = supersede_option_statement;
2265 (*result) ->
data.option = cache;
2270 token =
peek_token (&val, (
unsigned *)0, cfile);
2272 goto switch_default;
2275 if (status != ISC_R_SUCCESS ||
option == NULL) {
2280 default_option_statement);
2288 if (status != ISC_R_SUCCESS ||
option == NULL) {
2293 prepend_option_statement);
2301 if (status != ISC_R_SUCCESS ||
option == NULL) {
2306 append_option_statement);
2322 "case statement in inappropriate scope.");
2328 cfile, lose, case_context);
2333 parse_warn (cfile,
"switch default statement in %s",
2334 "inappropriate scope.");
2340 log_fatal (
"no memory for default statement.");
2341 (*result) -> op = default_statement;
2353 token =
next_token (&val, (
unsigned *)0, cfile);
2356 "%s can't be a variable name", val);
2364 log_fatal (
"no memory for set statement.");
2365 (*result) -> op = flag ? define_statement : set_statement;
2367 if (!(*result)->data.set.name)
2368 log_fatal (
"can't allocate variable name");
2369 strcpy ((*result) ->
data.set.name, val);
2370 token =
next_token (&val, (
unsigned *)0, cfile);
2378 (
unsigned *)0, cfile);
2383 "expecting argument name");
2392 strlen (val),
MDL));
2395 memset (
new, 0,
sizeof *
new);
2396 strcpy (
new ->
string, val);
2404 (
unsigned *)0, cfile);
2405 }
while (token ==
COMMA);
2408 parse_warn (cfile,
"expecting right paren.");
2416 token =
next_token (&val, (
unsigned *)0, cfile);
2424 log_fatal (
"can't allocate expression.");
2432 (&expr ->
data.
func -> statements, cfile, lose,
2438 token =
next_token (&val, (
unsigned *)0, cfile);
2444 if (token !=
EQUAL) {
2446 "expecting '=' in %s statement.",
2447 flag ?
"define" :
"set");
2457 "expecting expression.");
2474 token =
next_token (&val, (
unsigned *)0, cfile);
2477 "%s can't be a variable name", val);
2484 log_fatal (
"no memory for set statement.");
2485 (*result) ->
op = unset_statement;
2487 if (!(*result)->data.unset)
2488 log_fatal (
"can't allocate variable name");
2489 strcpy ((*result) ->
data.unset, val);
2500 log_fatal (
"no memory for eval statement.");
2501 (*result) ->
op = eval_statement;
2508 "expecting data expression.");
2522 #ifdef ENABLE_EXECUTE 2526 log_fatal (
"no memory for execute statement.");
2527 (*result)->op = execute_statement;
2531 parse_warn(cfile,
"left parenthesis expected.");
2539 parse_warn(cfile,
"Expecting a quoted string.");
2545 (*result)->data.execute.command =
dmalloc(len + 1,
MDL);
2546 if ((*result)->data.execute.command == NULL)
2547 log_fatal(
"can't allocate command name");
2548 strcpy((*result)->data.execute.command, val);
2551 (*result)->
data.execute.argc = 0;
2555 log_fatal (
"can't allocate expression");
2561 "expecting expression.");
2569 (*result)->
data.execute.argc++;
2573 parse_warn(cfile,
"right parenthesis expected.");
2584 parse_warn(cfile,
"define ENABLE_EXECUTE in site.h to " 2585 "enable execute(); expressions.");
2596 log_fatal (
"no memory for return statement.");
2597 (*result) ->
op = return_statement;
2604 "expecting data expression.");
2622 log_fatal (
"no memory for log statement.");
2623 (*result) ->
op = log_statement;
2625 token =
next_token (&val, (
unsigned *)0, cfile);
2627 parse_warn (cfile,
"left parenthesis expected.");
2633 token =
peek_token (&val, (
unsigned *)0, cfile);
2635 if (token ==
FATAL) {
2636 (*result) ->
data.log.priority = log_priority_fatal;
2637 }
else if (token ==
ERROR) {
2638 (*result) ->
data.log.priority = log_priority_error;
2640 (*result) ->
data.log.priority = log_priority_debug;
2641 }
else if (token ==
INFO) {
2642 (*result) ->
data.log.priority = log_priority_info;
2644 (*result) ->
data.log.priority = log_priority_debug;
2649 token =
next_token (&val, (
unsigned *)0, cfile);
2650 if (token !=
COMMA) {
2659 (&(*result) ->
data.log.
expr, cfile, lose))) {
2665 token =
next_token (&val, (
unsigned *)0, cfile);
2667 parse_warn (cfile,
"right parenthesis expected.");
2673 token =
next_token (&val, (
unsigned *)0, cfile);
2674 if (token !=
SEMI) {
2694 log_fatal(
"no memory for execute statement.");
2695 (*result)->op = vendor_opt_statement;
2707 if (!zone ->
name) {
2715 i = strlen (zone ->
name);
2716 if (zone ->
name [i - 1] !=
'.') {
2719 parse_warn (cfile,
"no trailing '.' on zone");
2722 strcpy (s, zone ->
name);
2731 if (status != ISC_R_SUCCESS) {
2733 zone ->
name, isc_result_totext (status));
2752 option_name_hash_lookup(&
option,
2758 (result, cfile, 1,
option,
2759 supersede_option_statement);
2769 log_fatal (
"no memory for eval statement.");
2770 (*result) -> op = eval_statement;
2821 token =
next_token (&val, (
unsigned *)0, cfile);
2828 token =
peek_token (&val, (
unsigned *)0, cfile);
2831 if (zone -> primary) {
2833 "more than one primary.");
2838 log_fatal (
"can't allocate primary option cache.");
2839 oc = zone -> primary;
2843 if (zone -> secondary) {
2844 parse_warn (cfile,
"more than one secondary.");
2849 log_fatal (
"can't allocate secondary.");
2850 oc = zone -> secondary;
2857 "expecting IP addr or hostname.");
2879 token =
next_token (&val, (
unsigned *)0, cfile);
2880 }
while (token ==
COMMA);
2881 if (token !=
SEMI) {
2890 parse_warn(cfile,
"more than one primary6.");
2895 log_fatal(
"can't allocate primary6 option cache.");
2901 parse_warn(cfile,
"more than one secondary6.");
2935 }
while (token ==
COMMA);
2936 if (token !=
SEMI) {
2959 log_fatal(
"Multiple key definitions for zone %s.",
3000 isc_result_t status;
3004 if (omapi_auth_key_new (&
key,
MDL) != ISC_R_SUCCESS)
3007 token =
peek_token (&val, (
unsigned *)0, cfile);
3024 token =
next_token (&val, (
unsigned *)0, cfile);
3031 token =
next_token (&val, (
unsigned *)0, cfile);
3036 "key %s: too many algorithms",
3043 "expecting key algorithm name.");
3052 static char add [] =
".SIG-ALG.REG.INT.";
3081 parse_warn (cfile,
"key %s: too many secrets",
3086 memset (&ds, 0,
sizeof(ds));
3091 if (status != ISC_R_SUCCESS)
3093 memcpy (
key ->
key -> value,
3107 parse_warn (cfile,
"expecting right brace.");
3112 token =
peek_token (&val, (
unsigned *)0, cfile);
3113 if (token ==
SEMI) {
3119 if (status != ISC_R_SUCCESS) {
3121 key ->
name, isc_result_totext (status));
3124 omapi_auth_key_dereference (&
key,
MDL);
3130 omapi_auth_key_dereference (&
key,
MDL);
3143 struct parse *cfile;
3150 log_fatal (
"no memory for new statement.");
3151 (*result) -> op = on_statement;
3157 (*result) -> data.on.evtypes |=
ON_EXPIRY;
3161 (*result) -> data.on.evtypes |=
ON_COMMIT;
3173 parse_warn (cfile,
"expecting a lease event type");
3199 (
unsigned *)0, cfile);
3223 struct parse *cfile;
3230 log_fatal (
"no memory for new statement.");
3231 (*result) -> op = switch_statement;
3249 "expecting data or numeric expression.");
3267 (&(*result) -> data.s_switch.statements, cfile, lose,
3291 struct parse *cfile;
3299 log_fatal (
"no memory for new statement.");
3300 (*result) -> op = case_statement;
3303 cfile, lose, case_context,
3307 parse_warn (cfile,
"expecting %s expression.",
3309 ?
"data" :
"numeric"));
3338 struct parse *cfile;
3346 log_fatal (
"no memory for if statement.");
3348 (*result) -> op = if_statement;
3361 parse_warn (cfile,
"boolean expression expected.");
3366 #if defined (DEBUG_EXPRESSION_PARSE) 3372 parse_warn (cfile,
"expecting right paren.");
3392 (
unsigned *)0, cfile);
3416 "expecting if statement");
3422 parse_warn (cfile,
"left brace or if expected.");
3430 (&(*result) -> data.ie.fc,
3450 "expecting conditional.");
3474 struct parse *cfile;
3485 parse_warn (cfile,
"Expecting a boolean expression.");
3496 struct parse *cfile;
3502 if (!strcasecmp (val,
"true")
3503 || !strcasecmp (val,
"on"))
3505 else if (!strcasecmp (val,
"false")
3506 || !strcasecmp (val,
"off"))
3510 "boolean value (true/false/on/off) expected");
3541 struct parse *cfile;
3553 parse_warn (cfile,
"Expecting a data expression.");
3568 struct parse *cfile;
3580 parse_warn (cfile,
"Expecting a numeric expression.");
3591 struct parse *cfile;
3601 isc_result_t status;
3604 token =
peek_token (&val, (
unsigned *)0, cfile);
3610 token =
next_token (&val, (
unsigned *)0, cfile);
3618 if (!strcmp (col -> name, val))
3626 log_fatal (
"can't allocate expression");
3634 log_fatal (
"can't allocate expression");
3648 parse_warn (cfile,
"boolean expression expected");
3666 token =
next_token (&val, (
unsigned *)0, cfile);
3678 log_fatal (
"can't allocate expression");
3683 &(*expr)->data.option);
3684 if (status != ISC_R_SUCCESS ||
3685 (*expr)->data.option == NULL) {
3695 log_fatal (
"can't allocate expression");
3702 log_fatal (
"can't allocate expression");
3709 log_fatal (
"can't allocate expression");
3712 token =
next_token (&val, (
unsigned *)0, cfile);
3716 parse_warn (cfile,
"left parenthesis expected.");
3727 "expecting data expression.");
3734 token =
next_token (&val, (
unsigned *)0, cfile);
3735 if (token !=
COMMA) {
3749 "expecting numeric expression.");
3757 token =
next_token (&val, (
unsigned *)0, cfile);
3765 token =
next_token (&val, (
unsigned *)0, cfile);
3768 parse_warn (cfile,
"right parenthesis expected.");
3778 log_fatal (
"can't allocate expression");
3781 token =
next_token (&val, (
unsigned *)0, cfile);
3789 token =
next_token (&val, (
unsigned *)0, cfile);
3797 token =
next_token (&val, (
unsigned *)0, cfile);
3805 log_fatal (
"can't allocate expression");
3808 token =
next_token(&val, (
unsigned *)0, cfile);
3815 token =
next_token(&val, (
unsigned *)0, cfile);
3823 log_fatal (
"can't allocate expression");
3826 token =
next_token (&val, (
unsigned *)0, cfile);
3834 token =
next_token(&val, (
unsigned *)0, cfile);
3842 log_fatal (
"can't allocate expression");
3845 token =
next_token (&val, (
unsigned *)0, cfile);
3853 token =
next_token (&val, (
unsigned *)0, cfile);
3862 token =
next_token (&val, (
unsigned *)0, cfile);
3864 if (token ==
COMMA) {
3867 log_fatal (
"can't allocate at CONCAT2");
3874 goto concat_another;
3884 log_fatal (
"can't allocate expression");
3887 token =
next_token (&val, (
unsigned *)0, cfile);
3895 token =
next_token (&val, (
unsigned *)0, cfile);
3903 token =
next_token (&val, (
unsigned *)0, cfile);
3911 token =
next_token (&val, (
unsigned *)0, cfile);
3919 token =
next_token (&val, (
unsigned *)0, cfile);
3927 log_fatal (
"can't allocate expression");
3930 token =
next_token (&val, (
unsigned *)0, cfile);
3938 token =
next_token (&val, (
unsigned *)0, cfile);
3946 token =
next_token (&val, (
unsigned *)0, cfile);
3956 log_fatal (
"can't allocate expression");
3958 token =
next_token (&val, (
unsigned *)0, cfile);
3971 token =
next_token (&val, (
unsigned *)0, cfile);
3972 if (token ==
COMMA) {
3982 }
while (token ==
COMMA);
3992 log_fatal (
"can't allocate expression");
4000 &(*expr)->data.option);
4001 if (status != ISC_R_SUCCESS ||
4002 (*expr)->data.option == NULL) {
4012 log_fatal (
"can't allocate expression");
4019 log_fatal (
"can't allocate expression");
4026 log_fatal (
"can't allocate expression");
4033 log_fatal (
"can't allocate expression");
4040 log_fatal (
"can't allocate expression");
4047 log_fatal (
"can't allocate expression");
4054 log_fatal (
"can't allocate expression");
4061 log_fatal (
"can't allocate expression");
4068 log_fatal (
"can't allocate expression");
4071 token =
next_token (&val, (
unsigned *)0, cfile);
4079 token =
next_token (&val, (
unsigned *)0, cfile);
4087 token =
next_token (&val, (
unsigned *)0, cfile);
4096 log_fatal (
"can't make constant string expression.");
4101 token =
next_token (&val, (
unsigned *)0, cfile);
4103 parse_warn (cfile,
"left parenthesis expected.");
4109 log_fatal (
"can't allocate expression");
4115 "expecting data expression.");
4123 token =
next_token (&val, (
unsigned *)0, cfile);
4124 if (token !=
COMMA) {
4131 token =
next_token (&val, (
unsigned *)0, cfile);
4138 switch (atoi (val)) {
4153 "unsupported integer size %d", atoi (val));
4160 token =
next_token (&val, (
unsigned *)0, cfile);
4162 parse_warn (cfile,
"right parenthesis expected.");
4171 token =
next_token (&val, (
unsigned *)0, cfile);
4173 parse_warn (cfile,
"left parenthesis expected.");
4179 log_fatal (
"can't allocate expression");
4183 parse_warn (cfile,
"expecting numeric expression.");
4190 token =
next_token (&val, (
unsigned *)0, cfile);
4191 if (token !=
COMMA) {
4198 token =
next_token (&val, (
unsigned *)0, cfile);
4205 switch (atoi (val)) {
4220 "unsupported integer size %d", atoi (val));
4227 token =
next_token (&val, (
unsigned *)0, cfile);
4229 parse_warn (cfile,
"right parenthesis expected.");
4243 log_fatal (
"can't allocate expression");
4251 log_fatal (
"can't allocate expression");
4266 log_fatal (
"can't allocate expression");
4272 known = ISC_R_SUCCESS;
4280 known = ISC_R_NOTIMPLEMENTED;
4341 token =
next_token (&val, (
unsigned *)0, cfile);
4345 token =
next_token (&val, (
unsigned *)0, cfile);
4347 parse_warn (cfile,
"%s can't be a variable name", val);
4354 log_fatal (
"can't allocate expression");
4357 if (!(*expr)->data.variable)
4358 log_fatal (
"can't allocate variable name");
4360 token =
next_token (&val, (
unsigned *)0, cfile);
4390 parse_warn(cfile,
"Expecting quoted literal: " 4391 "\"foo.example.com\"");
4397 log_fatal(
"Error creating gethostbyname() internal " 4398 "record. (%s:%d)",
MDL);
4408 log_fatal (
"can't allocate expression");
4443 log_fatal (
"can't allocate variable name");
4447 token =
peek_token (&val, (
unsigned *)0, cfile);
4450 log_fatal (
"can't allocate expression");
4458 log_fatal (
"can't allocate expression");
4466 log_fatal (
"can't allocate expression");
4474 "expecting expression.");
4482 token =
next_token (&val, (
unsigned *)0, cfile);
4483 }
while (token ==
COMMA);
4485 parse_warn (cfile,
"Right parenthesis expected.");
4500 struct parse *cfile;
4529 "expecting right-hand side.");
4542 token =
peek_token (&val, (
unsigned *)0, cfile);
4546 token =
peek_token (&val, (
unsigned *)0, cfile);
4547 if (token !=
EQUAL) {
4548 parse_warn (cfile,
"! in boolean context without =");
4571 else if (token ==
EQUAL)
4574 parse_warn(cfile,
"expecting ~= or ~~ operator");
4584 parse_warn(cfile,
"No support for regex operator.");
4682 "expecting a subexpression");
4695 (rhs_context != lhs_context)) {
4696 parse_warn (cfile,
"illegal expression relating different types");
4711 parse_warn (cfile,
"expecting data/numeric expression");
4722 parse_warn(cfile,
"expecting data expression");
4740 parse_warn (cfile,
"expecting boolean expressions");
4758 parse_warn (cfile,
"expecting numeric expressions");
4776 log_fatal (
"Can't allocate expression!");
4778 (*expr) ->
op = binop;
4793 log_fatal (
"No memory for equal precedence combination.");
4811 struct parse *cfile;
4816 const char *fmt = NULL;
4832 if ((fmt != NULL) && (fmt !=
option->
format) && (*fmt ==
'a'))
4834 else if ((fmt == NULL) || (*fmt ==
'A'))
4838 if ((fmt[0] !=
'Z') && (tolower((
unsigned char)fmt[1]) ==
'a'))
4842 if ((*fmt ==
'A') || (*fmt ==
'a'))
4850 if (fmt[1] ==
'o') {
4861 if (token ==
SEMI) {
4871 uniform, lookups)) {
4872 if (fmt [1] !=
'o') {
4885 }
while (*fmt !=
'\0');
4887 if ((*fmt ==
'A') || (*fmt ==
'a')) {
4888 token =
peek_token (&val, (
unsigned *)0, cfile);
4890 if (token ==
COMMA) {
4896 if ((*fmt ==
'A') || (fmt[1] ==
'\0'))
4904 }
while ((*fmt ==
'A') || (*fmt ==
'a'));
4918 struct parse *cfile;
4921 enum statement_op op;
4928 token =
peek_token (&val, (
unsigned *)0, cfile);
4938 }
else if (token ==
EQUAL) {
4949 "expecting a data expression.");
4962 log_fatal (
"no memory for option statement.");
4967 log_fatal (
"no memory for option cache");
4977 struct parse *cfile;
4986 unsigned char buf [4];
4990 isc_boolean_t freeval = ISC_FALSE;
4998 if ((*fmt) [1] !=
'o') {
5011 g = strchr (*fmt,
'.');
5014 "malformed encapsulation format (bug!)");
5022 token =
peek_token (&val, (
unsigned *)0, cfile);
5026 if (!
parse_cshl (&t -> data.const_data, cfile)) {
5036 (
const unsigned char *)val,
5038 log_fatal (
"No memory for \"%s\"", val);
5040 if ((*fmt) [1] !=
'o') {
5042 "or hexadecimal data.");
5051 if ((*fmt)[1] ==
'c') {
5061 if ((*fmt)[1] !=
'o')
5071 parse_warn (cfile,
"not a valid domain name.");
5082 if ((*fmt) [1] !=
'o') {
5092 log_fatal (
"No memory for concatenation");
5093 if (freeval == ISC_TRUE) {
5095 freeval = ISC_FALSE;
5102 g = strchr (*fmt,
'.');
5105 "enumeration format");
5111 token =
next_token (&val, (
unsigned *)0, cfile);
5114 "identifier expected");
5158 token =
next_token (&val, (
unsigned *)0, cfile);
5168 token =
next_token (&val, (
unsigned *)0, cfile);
5172 if ((*fmt) [1] !=
'o') {
5186 token =
next_token (&val, (
unsigned *)0, cfile);
5196 token =
next_token (&val, (
unsigned *)0, cfile);
5205 token =
next_token (&val, (
unsigned *)0, cfile);
5207 if ((*fmt) [1] !=
'o')
5210 if ((*fmt) [1] !=
'o') {
5216 if (!strcasecmp (val,
"true")
5217 || !strcasecmp (val,
"on"))
5219 else if (!strcasecmp (val,
"false")
5220 || !strcasecmp (val,
"off"))
5222 else if (!strcasecmp (val,
"ignore"))
5225 if ((*fmt) [1] !=
'o')
5234 token =
peek_token (&val, (
unsigned *)0, cfile);
5235 if (token !=
SEMI) {
5250 parse_warn (cfile,
"Bad format '%c' in parse_option_token.",
5266 struct parse *cfile;
5271 u_int8_t hunkbuf [1024];
5272 unsigned hunkix = 0;
5273 const char *fmt, *f;
5277 const u_int8_t *cdp;
5285 isc_result_t status;
5288 if (status != ISC_R_SUCCESS ||
option == NULL)
5295 for (; *fmt; fmt++) {
5311 if (*fmt ==
'o' && fmt !=
option -> format)
5315 fmt = strchr (fmt,
'.');
5318 "malformed %s (bug!)",
5319 "encapsulation format");
5325 len =
parse_X (cfile, &hunkbuf [hunkix],
5326 sizeof hunkbuf - hunkix);
5333 if (token ==
SEMI && fmt[1] ==
'o') {
5341 "expecting string.");
5344 if (hunkix + len + 1 >
sizeof hunkbuf) {
5346 "option data buffer %s",
5350 memcpy (&hunkbuf [hunkix], val, len + 1);
5356 if (fmt[1] ==
'c') {
5364 if (express == NULL)
5376 if ((hunkix + len) >
sizeof(hunkbuf)) {
5381 memcpy(&hunkbuf[hunkix], cdp, len);
5389 fmt = strchr (fmt,
'.');
5392 "malformed %s (bug!)",
5393 "enumeration format");
5397 (
unsigned *)0, cfile);
5400 "identifier expected");
5434 if (hunkix + len >
sizeof hunkbuf) {
5436 "option data buffer %s",
5440 memcpy (&hunkbuf [hunkix], dp, len);
5447 (
unsigned *)0, cfile);
5452 "expecting number.");
5466 (
unsigned *)0, cfile);
5478 (
unsigned *)0, cfile);
5489 (
unsigned *)0, cfile);
5492 "expecting identifier.");
5499 if (!strcasecmp (val,
"true")
5500 || !strcasecmp (val,
"on"))
5502 else if (!strcasecmp (val,
"false")
5503 || !strcasecmp (val,
"off"))
5507 "expecting boolean.");
5515 token =
peek_token(&val, (
unsigned *)0, cfile);
5516 if (token !=
SEMI) {
5518 "semicolon expected.");
5526 log_error (
"parse_option_param: Bad format %c",
5531 token =
next_token (&val, (
unsigned *)0, cfile);
5532 }
while (*fmt && token ==
COMMA);
5534 if (token !=
SEMI) {
5541 log_fatal (
"no memory to store option declaration.");
5542 memcpy (bp ->
data, hunkbuf, hunkix + nul_term);
5545 log_fatal (
"out of memory allocating option cache.");
5547 (*oc) ->
data.buffer = bp;
5548 (*oc) ->
data.data = &bp ->
data [0];
5549 (*oc) ->
data.terminated = nul_term;
5550 (*oc) ->
data.len = hunkix;
5556 if (express != NULL)
5568 struct parse *cfile;
5583 "expecting hexadecimal constant.");
5589 "hexadecimal constant too long.");
5598 (
unsigned *)0, cfile);
5603 if (len + 1 > max) {
5604 parse_warn (cfile,
"string constant too long.");
5608 memcpy (buf, val, len + 1);
5610 parse_warn (cfile,
"expecting string or hexadecimal data");
5629 snprintf (fbuf,
sizeof fbuf,
"%s line %d: %s",
5632 va_start (list, fmt);
5633 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
5639 if (lix < (
sizeof lexbuf) - 1)
5640 lexbuf [lix++] =
' ';
5642 for (; lix < (
sizeof lexbuf) - 1 && (lix & 7); lix++)
5649 syslog (LOG_ERR,
"%s", mbuf);
5652 syslog (LOG_ERR,
"%s^", lexbuf);
5677 unsigned len, clen = 0;
5680 const unsigned char *dnptrs[256], **lastdnptr;
5682 memset(compbuf, 0,
sizeof(compbuf));
5683 memset(dnptrs, 0,
sizeof(dnptrs));
5684 dnptrs[0] = compbuf;
5685 lastdnptr = &dnptrs[255];
5696 parse_warn(cfile,
"Expecting a domain string.");
5705 sizeof(compbuf) - clen,
5709 parse_warn(cfile,
"Error compressing domain " 5717 sizeof(compbuf) - clen);
5733 while (compbuf[clen] != 0)
5734 clen += compbuf[clen] + 1;
5740 if (clen >
sizeof(compbuf))
5744 }
while (token ==
COMMA);
5747 log_fatal(
"No memory for domain list object.");
struct option_cache * lookup_hashed_option(struct universe *universe, struct option_state *options, unsigned code)
void parse_option_space_decl(struct parse *cfile)
int parse_X(struct parse *cfile, u_int8_t *buf, unsigned max)
int executable_statement_allocate(struct executable_statement **ptr, const char *file, int line)
isc_result_t parse_option_name(struct parse *cfile, int allocate, int *known, struct option **opt)
void add_enumeration(struct enumeration *enumeration)
int parse_option_code_definition(struct parse *cfile, struct option *option)
void(* save_func)(struct universe *, struct option_state *, struct option_cache *, isc_boolean_t)
struct universe * universe
int executable_statement_dereference(struct executable_statement **ptr, const char *file, int line)
u_int32_t(* get_length)(const unsigned char *)
int parse_ip_addr_with_subnet(struct parse *cfile, struct iaddrmatch *match)
const char * piaddr(const struct iaddr addr)
struct universe * new_universe(char *file, int line) const
struct expression::expr_union::@25 arg
struct expression * equal[2]
int hashed_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)
int parse_key(struct parse *cfile)
struct expression::expr_union::@21 pick_first_value
int expression_allocate(struct expression **cptr, const char *file, int line)
struct iaddr ip_addr(struct iaddr subnet, struct iaddr mask, u_int32_t host_address)
int parse_data_expression(struct expression **expr, struct parse *cfile, int *lose)
struct enumeration * find_enumeration(const char *name, int length)
#define DHCP_R_INVALIDARG
struct expression * arglist
struct expression::expr_union::@16 substring
isc_result_t omapi_auth_key_lookup_name(omapi_auth_key_t **, const char *)
int is_numeric_expression(struct expression *expr)
int option_reference(struct option **dest, struct option *src, const char *file, int line)
void print_expression(char *name, struct expression *expr) const
struct universe dhcp_universe
struct enumeration_value * find_enumeration_value(const char *name, int length, unsigned *widthp, const char *value)
void data_string_forget(struct data_string *data, const char *file, int line)
void(* delete_func)(struct universe *universe, struct option_state *, int)
int parse_numeric_expression(struct expression **expr, struct parse *cfile, int *lose)
struct expression * concat[2]
#define WORD_NAME_HASH_SIZE
int fundef_allocate(struct fundef **cptr, const char *file, int line)
int parse_allow_deny(struct option_cache **oc, struct parse *cfile, int flag)
int log_error(const char *,...) __attribute__((__format__(__printf__
void putLong(unsigned char *, int32_t)
struct collection * collections
struct expression * offset
enum expression_context op_context(enum expr_op op)
struct option_cache *(* lookup_func)(struct universe *, struct option_state *, unsigned)
int parse_semi(struct parse *cfile)
struct option_cache * secondary6
struct executable_statement * next
isc_result_t enter_dns_zone(struct dns_zone *zone)
enum dhcp_token peek_token(const char **rval, unsigned *rlen, struct parse *cfile)
struct expression * expression
int(* decode)(struct option_state *, const unsigned char *, unsigned, struct universe *)
#define LOCAL_TIME_FORMAT
enum dhcp_token peek_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
int parse_zone(struct dns_zone *zone, struct parse *cfile)
int parse_option_token(struct expression **rv, struct parse *cfile, const char **fmt, struct expression *expr, int uniform, int lookups)
int parse_string(struct parse *cfile, char **sptr, unsigned *lptr)
struct expression::expr_union::@17 suffix
int is_boolean_expression(struct expression *expr)
void expression_dereference(struct expression **eptr, const char *file, int line)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
int parse_option_buffer(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *universe)
#define DEFAULT_SPACE_HASH_SIZE
int parse_cshl(struct data_string *data, struct parse *cfile)
int option_cache_allocate(struct option_cache **cptr, const char *file, int line)
int MRns_name_compress(const char *src, u_char *dst, size_t dstsiz, const u_char **dnptrs, const u_char **lastdnptr)
union expression::expr_union data
universe_hash_t * universe_hash
struct expression * encode_int
enum dhcp_token next_token(const char **rval, unsigned *rlen, struct parse *cfile)
int make_host_lookup(struct expression **expr, const char *name)
struct universe * config_universe
void delete_hashed_option(struct universe *universe, struct option_state *options, int code)
struct expression::expr_union::@20 reverse
struct expression * width
void(* store_length)(unsigned char *, u_int32_t)
int buffer_allocate(struct buffer **ptr, unsigned len, const char *file, int line)
int parse_if_statement(struct executable_statement **result, struct parse *cfile, int *lose)
char * default_option_format
struct enumeration_value * values
void putULong(unsigned char *, u_int32_t)
omapi_data_string_t * key
void convert_num(struct parse *cfile, unsigned char *buf, const char *str, int base, unsigned size)
#define skip_token(a, b, c)
void save_hashed_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
int parse_boolean_expression(struct expression **expr, struct parse *cfile, int *lose)
option_name_hash_t * name_hash
unsigned char * parse_numeric_aggregate(struct parse *cfile, unsigned char *buf, unsigned *max, int separator, int base, unsigned size)
int make_concat(struct expression **expr, struct expression *left, struct expression *right)
TIME parse_date(struct parse *cfile)
u_int32_t getUShort(const unsigned char *)
int hashed_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
struct enumeration * enumerations
struct option * new_option(char *name, const char *file, int line) const
void dfree(void *, const char *, int)
struct expression * buffer
void putShort(unsigned char *, int32_t)
#define DEFAULT_TIME_FORMAT
int parse_non_binary(struct expression **expr, struct parse *cfile, int *lose, enum expression_context context)
int parse_ip6_addr(struct parse *cfile, struct iaddr *addr)
#define BYTE_NAME_HASH_SIZE
struct enumeration * next
int parse_ip_addr_or_hostname(struct expression **expr, struct parse *cfile, int uniform)
int parse_option_decl(struct option_cache **oc, struct parse *cfile)
int int log_info(const char *,...) __attribute__((__format__(__printf__
void skip_to_semi(struct parse *cfile)
struct expression::expr_union::@19 b2a
struct expression * extract_int
void * dmalloc(size_t, const char *, int)
void skip_to_rbrace(struct parse *cfile, int brace_count)
int parse_on_statement(struct executable_statement **result, struct parse *cfile, int *lose)
u_int32_t getULong(const unsigned char *)
char * parse_host_name(struct parse *cfile)
int parse_option_statement(struct executable_statement **result, struct parse *cfile, int lookups, struct option *option, enum statement_op op)
void putUChar(unsigned char *, u_int32_t)
int parse_option_data(struct expression **expr, struct parse *cfile, int lookups, struct option *option)
int parse_switch_statement(struct executable_statement **result, struct parse *cfile, int *lose)
isc_result_t omapi_auth_key_enter(omapi_auth_key_t *)
struct universe ** universes
isc_result_t save_parse_state(struct parse *cfile)
struct data_string const_data
u_int32_t getUChar(const unsigned char *)
int parse_ip6_addr_expr(struct expression **expr, struct parse *cfile)
int option_state_dereference(struct option_state **ptr, const char *file, int line)
isc_result_t restore_parse_state(struct parse *cfile)
int parse_expression(struct expression **expr, struct parse *cfile, int *lose, enum expression_context context, struct expression **plhs, enum expr_op binop)
int parse_destination_descriptor(struct parse *cfile, struct iaddr *addr)
isc_boolean_t is_cidr_mask_valid(const struct iaddr *addr, int bits)
int make_const_data(struct expression **expr, const unsigned char *data, unsigned len, int terminated, int allocate, const char *file, int line)
struct string_list * next
struct expression * parse_domain_list(struct parse *cfile, int compress)
int is_data_expression(struct expression *expr)
int MRns_name_pton(const char *src, u_char *dst, size_t dstsiz)
TIME parse_date_core(struct parse *cfile)
int parse_base64(struct data_string *data, struct parse *cfile)
isc_result_t find_class(struct class **c, const char *s, const char *file, int line)
int make_limit(struct expression **new, struct expression *expr, int limit)
int parse_ip6_prefix(struct parse *cfile, struct iaddr *addr, u_int8_t *plen)
struct option_cache * primary6
int int int void do_percentm(char *obuf, const char *ibuf)
isc_result_t omapi_data_string_new(omapi_data_string_t **, unsigned, const char *, int)
void parse_lease_time(struct parse *cfile, TIME *timep)
int parse_boolean(struct parse *cfile)
struct collection * check
int expression_reference(struct expression **ptr, struct expression *src, const char *file, int line)
int(* encapsulate)(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
u_int32_t(* get_tag)(const unsigned char *)
struct executable_statement * statements
u_int8_t hbuf[HARDWARE_ADDR_LEN+1]
int op_precedence(enum expr_op op1, enum expr_op op2)
void hashed_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 *))
option_code_hash_t * code_hash
int dns_zone_allocate(struct dns_zone **ptr, const char *file, int line)
pair cons(caddr_t car, pair cdr)
void putUShort(unsigned char *, u_int32_t)
int parse_executable_statements(struct executable_statement **statements, struct parse *cfile, int *lose, enum expression_context case_context)
int parse_ip_addr(struct parse *cfile, struct iaddr *addr)
const unsigned char * data
int parse_case_statement(struct executable_statement **result, struct parse *cfile, int *lose, enum expression_context case_context)
int parse_executable_statement(struct executable_statement **result, struct parse *cfile, int *lose, enum expression_context case_context)
struct expression::expr_union::@26 funcall
void(* store_tag)(unsigned char *, u_int32_t)
void parse_hardware_param(struct parse *cfile, struct hardware *hardware)
#define QUAD_NAME_HASH_SIZE
int parse_warn(struct parse *cfile, const char *fmt,...)
struct expression::expr_union::@18 packet
int option_dereference(struct option **dest, const char *file, int line)
enum dhcp_token next_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
struct expression * separator
int dns_zone_dereference(struct dns_zone **ptr, const char *file, int line)