40 enumerations = enumeration;
47 for (e = enumerations; e; e = e ->
next)
48 if (strlen (e -> name) == length &&
49 !memcmp (e -> name, name, (
unsigned)length))
67 if (!strcmp (value, e ->
values [i].name))
101 #if defined (DEBUG_TOKEN)
102 log_error(
"skip_to_rbrace: %d\n", brace_count);
107 if (brace_count > 0) {
111 if (brace_count == 0) {
116 }
else if (token ==
LBRACE) {
118 }
else if (token ==
SEMI && (brace_count == 0)) {
122 }
else if (token ==
EOL) {
141 token =
next_token (&val, (
unsigned *)0, cfile);
170 log_fatal (
"no memory for string %s.", val);
171 memcpy (s, val, len + 1);
206 token =
peek_token (&val, (
unsigned *)0, cfile);
212 if (!(s = (
char *)
dmalloc (strlen (val) + 1,
MDL)))
213 log_fatal (
"can't allocate temp space for hostname.");
215 c =
cons ((caddr_t)s, c);
216 len += strlen (s) + 1;
219 token =
peek_token (&val, (
unsigned *)0, cfile);
221 token =
next_token (&val, (
unsigned *)0, cfile);
225 }
while (token ==
DOT);
233 log_fatal (
"can't allocate space for hostname.");
240 unsigned l = strlen ((
char *)(c -> car));
242 memcpy (t, (
char *)(c -> car), l);
271 unsigned char addr [4];
272 unsigned len =
sizeof addr;
277 token =
peek_token (&val, (
unsigned *)0, cfile);
317 token =
next_token (&val, (
unsigned *)0, cfile);
318 parse_warn (cfile,
"%s (%d): expecting IP address or hostname",
338 &addr -> len,
DOT, 10, 8))
354 unsigned int mask_width, dest_dest_len;
357 &addr -> len,
DOT, 10, 8)) {
358 mask_width = (
unsigned int)addr->
iabuf[0];
359 dest_dest_len = (((mask_width+7)/8)+1);
360 if (mask_width > 32) {
362 "subnet mask width (%u) greater than 32.", mask_width);
364 else if (dest_dest_len != addr->
len) {
366 "destination descriptor with subnet mask width %u "
367 "should have %u octets, but has %u octets.",
368 mask_width, dest_dest_len, addr->
len);
380 is_hex_string(
const char *s) {
382 if (!isxdigit((
int)*s)) {
406 char v6[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
421 is_hex_string(val)) ||
428 val_len = strlen(val);
429 if ((v6_len + val_len) >=
sizeof(v6)) {
434 memcpy(v6+v6_len, val, val_len);
447 if (inet_pton(AF_INET6, v6, addr->
iabuf) <= 0) {
462 struct parse *cfile) {
484 if (token !=
SLASH) {
498 if ((n < 0) || (n > 128)) {
499 parse_warn(cfile,
"Invalid IPv6 prefix length.");
522 const char *val, *orig;
526 unsigned char newval, warnmask=0;
530 prefixlen = match->
addr.
len * 8;
534 if (token ==
SLASH) {
539 parse_warn(cfile,
"Invalid CIDR prefix length:"
540 " expecting a number.");
544 prefixlen = atoi(val);
547 prefixlen > (match->
addr.
len * 8)) {
561 fflen = prefixlen / 8;
567 if (fflen < match->mask.len) {
569 "\x00\x80\xc0\xe0\xf0\xf8\xfc\xfe"[prefixlen % 8];
580 if (newval != match->
addr.
iabuf[fflen]) {
584 }
while (++fflen < match->mask.len);
587 log_error(
"Warning: Extraneous bits removed "
588 "in address component of %s/%d.",
599 "expecting ip-address or ip-address/prefixlen");
635 if (!strncmp(val,
"unknown-", 8)) {
636 hardware->
hbuf[0] = atoi(&val[8]);
639 "expecting a network hardware type");
664 if (hlen + 1 >
sizeof(hardware->
hbuf)) {
666 parse_warn(cfile,
"hardware address too long");
668 hardware->
hlen = hlen + 1;
669 memcpy((
unsigned char *)&hardware->
hbuf[1], t, hlen);
670 if (hlen + 1 <
sizeof(hardware->
hbuf))
671 memset(&hardware->
hbuf[hlen + 1], 0,
672 (
sizeof(hardware->
hbuf)) - hlen - 1);
694 token =
next_token (&val, (
unsigned *)0, cfile);
696 parse_warn (cfile,
"Expecting numeric lease time");
700 convert_num(cfile, (
unsigned char *)&num, val, 10, 32);
731 max, separator, base, size)
741 unsigned char *bufp = buf, *s, *t;
746 bufp = (
unsigned char *)
dmalloc (*max * size / 8,
MDL);
748 log_fatal (
"no space for numeric aggregate");
754 token =
peek_token (&val, (
unsigned *)0, cfile);
755 if (token != separator) {
768 if ((bufp != NULL) && (bufp != buf))
770 return (
unsigned char *)0;
774 token =
next_token (&val, (
unsigned *)0, cfile);
784 parse_warn (cfile,
"expecting numeric value.");
787 if ((bufp != NULL) && (bufp != buf))
804 t = (
unsigned char *)
dmalloc (strlen (val) + 1,
MDL);
807 strcpy ((
char *)t, val);
808 c =
cons ((caddr_t)t, c);
810 }
while (++count != *max);
818 bufp = (
unsigned char *)
dmalloc (count * size / 8,
MDL);
820 log_fatal (
"no space for numeric aggregate.");
821 s = bufp + count - size / 8;
826 convert_num (cfile, s, (
char *)(c -> car), base, size);
843 const unsigned char *ptr = (
const unsigned char *)str;
856 if (ptr [0] ==
'0') {
857 if (ptr [1] ==
'x') {
860 }
else if (isascii (ptr [1]) && isdigit (ptr [1])) {
875 tval = tval -
'a' + 10;
876 else if (tval >=
'A')
877 tval = tval -
'A' + 10;
878 else if (tval >=
'0')
886 "Bogus number %s: digit %d not in base %d",
890 val = val * base + tval;
894 max = (1 << (size - 1));
896 max = (1 << (size - 1)) + ((1 << (size - 1)) - 1);
901 "%s%lo exceeds max (%d) for precision.",
903 (
unsigned long)val, max);
907 "%s%lx exceeds max (%d) for precision.",
909 (
unsigned long)val, max);
913 "%s%lu exceeds max (%d) for precision.",
915 (
unsigned long)val, max);
923 *buf = -(
unsigned long)val;
933 "Unexpected integer size: %d\n", size);
939 *buf = (u_int8_t)val;
949 "Unexpected integer size: %d\n", size);
978 long int tzoff, year, mon, mday, hour, min, sec;
981 static int months[11] = { 31, 59, 90, 120, 151, 181,
982 212, 243, 273, 304, 334 };
986 if (token ==
NEVER) {
992 if (token ==
EPOCH) {
999 parse_warn(cfile,
"Seconds since epoch expected.");
1006 return((
TIME)guess);
1012 parse_warn(cfile,
"numeric day of week expected.");
1038 if (token !=
SLASH) {
1042 "expected slash separating year from month.");
1052 parse_warn(cfile,
"numeric month expected.");
1056 mon = atoi(val) - 1;
1060 if (token !=
SLASH) {
1064 "expected slash separating month from day.");
1074 parse_warn(cfile,
"numeric day of month expected.");
1093 if (token !=
COLON) {
1097 "expected colon separating hour from minute.");
1107 parse_warn(cfile,
"numeric minute expected.");
1115 if (token !=
COLON) {
1119 "expected colon separating minute from second.");
1129 parse_warn(cfile,
"numeric second expected.");
1140 }
else if (token !=
SEMI) {
1143 "Time zone offset or semicolon expected.");
1155 guess = ((((((365 * (year - 70) +
1161 !((year - 72) & 3)) +
1164 min) * 60) + sec + tzoff;
1175 return((
TIME)guess);
1185 struct
parse *cfile;
1205 struct
parse *cfile;
1220 token =
next_token (&val, (
unsigned *)0, cfile);
1223 "expecting identifier after option keyword.");
1230 log_fatal (
"no memory for uname information.");
1231 strcpy (uname, val);
1232 token =
peek_token (&val, (
unsigned *)0, cfile);
1238 token =
next_token (&val, (
unsigned *)0, cfile);
1240 parse_warn (cfile,
"expecting identifier after '.'");
1248 universe = (
struct universe *)0;
1251 parse_warn (cfile,
"no option space named %s.", uname);
1253 return ISC_R_NOTFOUND;
1263 option_name_hash_lookup(opt, universe->
name_hash, val, 0,
MDL);
1276 }
else if (strncasecmp(val,
"unknown-", 8) == 0) {
1282 if (code == 0 || code == universe->
end) {
1283 parse_warn(cfile,
"Option codes 0 and %u are illegal "
1284 "in the %s space.", universe->
end,
1288 return ISC_R_FAILURE;
1298 option_code_hash_lookup(opt, universe->
code_hash,
1308 if (option == NULL) {
1311 option->
code = code;
1315 log_info(
"option %s has been redefined as option %s. "
1316 "Please update your configs if neccessary.",
1323 }
else if (allocate) {
1325 option -> universe = universe;
1328 parse_warn(cfile,
"no option named %s in space %s",
1329 val, universe->
name);
1332 return ISC_R_NOTFOUND;
1337 return ISC_R_SUCCESS;
1346 struct
parse *cfile;
1352 int tsize=1, lsize=1, hsize = 0;
1357 token =
next_token (&val, (
unsigned *)0, cfile);
1365 log_fatal (
"No memory for new option space.");
1370 log_fatal (
"No memory for new option space name.");
1371 strcpy (nu_name, val);
1372 nu ->
name = nu_name;
1382 if (token !=
WIDTH) {
1389 parse_warn(cfile,
"expecting number 1, 2, 4.");
1410 parse_warn(cfile,
"invalid code width (%d), "
1411 "expecting a 1, 2 or 4.",
1419 if (token !=
WIDTH) {
1426 parse_warn(cfile,
"expecting number 1 or 2.");
1431 if (lsize != 1 && lsize != 2) {
1432 parse_warn(cfile,
"invalid length width (%d) "
1433 "expecting 1 or 2.", lsize);
1441 if (token !=
SIZE) {
1448 parse_warn(cfile,
"expecting a 10base number");
1456 if (hsize < 0 || hsize > 0x7FFFFFFF) {
1467 }
while (token !=
SEMI);
1517 log_fatal (
"No memory to expand option space array.");
1524 if (!option_name_new_hash(&nu->
name_hash, hsize,
MDL) ||
1526 log_fatal(
"Can't allocate %s option hash table.", nu->
name);
1569 struct
parse *cfile;
1574 struct option *oldopt;
1575 unsigned arrayp = 0;
1577 int no_more_in_record = 0;
1583 int has_encapsulation = 0;
1587 token =
next_token (&val, (
unsigned *)0, cfile);
1589 parse_warn (cfile,
"expecting option code number.");
1593 option -> code = atoi (val);
1595 token =
next_token (&val, (
unsigned *)0, cfile);
1596 if (token !=
EQUAL) {
1603 token =
next_token (&val, (
unsigned *)0, cfile);
1604 if (token ==
ARRAY) {
1605 token =
next_token (&val, (
unsigned *)0, cfile);
1612 token =
next_token (&val, (
unsigned *)0, cfile);
1617 token =
next_token (&val, (
unsigned *)0, cfile);
1622 if (has_encapsulation) {
1624 "encapsulate must always be the last item.");
1638 token =
next_token (&val, (
unsigned *)0, cfile);
1644 arrayp = recordp + 1;
1645 token =
next_token (&val, (
unsigned *)0, cfile);
1646 if ((recordp) && (token ==
LBRACE)) {
1648 "only uniform array inside record.");
1660 token =
next_token (&val, (
unsigned *)0, cfile);
1668 switch (atoi (val)) {
1670 type = is_signed ?
'b' :
'B';
1673 type = is_signed ?
's' :
'S';
1676 type = is_signed ?
'l' :
'L';
1680 "%s bit precision is not supported.", val);
1690 token =
next_token (&val, (
unsigned *)0, cfile);
1692 parse_warn (cfile,
"expecting \"integer\" keyword.");
1720 tokbuf[tokix++] =
'D';
1729 parse_warn (cfile,
"arrays of text strings not %s",
1736 no_more_in_record = 1;
1743 token =
next_token (&val, (
unsigned *)0, cfile);
1746 "expecting option space identifier");
1750 encapsulated = NULL;
1752 val, strlen(val),
MDL)) {
1753 parse_warn(cfile,
"unknown option space %s", val);
1757 if (strlen (val) + tokix + 2 >
sizeof (tokbuf))
1759 tokbuf [tokix++] =
'E';
1760 strcpy (&tokbuf [tokix], val);
1761 tokix += strlen (val);
1763 has_encapsulation = 1;
1769 parse_warn (cfile,
"array incompatible with zerolen.");
1775 no_more_in_record = 1;
1779 parse_warn (cfile,
"unknown data type %s", val);
1786 if (tokix ==
sizeof tokbuf) {
1788 parse_warn (cfile,
"too many types in record.");
1794 tokbuf [tokix++] = type;
1797 token =
next_token (&val, (
unsigned *)0, cfile);
1798 if (arrayp > recordp) {
1799 if (tokix ==
sizeof tokbuf) {
1801 "too many types in record.");
1807 tokbuf[tokix++] =
'a';
1809 if (token ==
COMMA) {
1810 if (no_more_in_record) {
1812 "%s must be at end of record.",
1813 type ==
't' ?
"text" :
"string");
1819 token =
next_token (&val, (
unsigned *)0, cfile);
1823 parse_warn (cfile,
"expecting right brace.");
1837 if (has_encapsulation && arrayp) {
1839 "Arrays of encapsulations don't make sense.");
1842 s =
dmalloc(tokix + (arrayp ? 1 : 0) + 1,
MDL);
1844 log_fatal(
"no memory for option format.");
1846 memcpy(s, tokbuf, tokix);
1848 s[tokix++] = (arrayp > recordp) ?
'a' :
'A';
1852 option -> format = s;
1857 if (oldopt != NULL) {
1878 if (has_encapsulation) {
1881 if (!option_code_hash_lookup(&encapsulated->
enc_opt,
1884 log_fatal(
"error finding encapsulated option (%s:%d)",
1897 struct
parse *cfile;
1902 static unsigned char
1903 from64 [] = {64, 64, 64, 64, 64, 64, 64, 64,
1904 64, 64, 64, 62, 64, 64, 64, 63,
1905 52, 53, 54, 55, 56, 57, 58, 59,
1906 60, 61, 64, 64, 64, 64, 64, 64,
1907 64, 0, 1, 2, 3, 4, 5, 6,
1908 7, 8, 9, 10, 11, 12, 13, 14,
1909 15, 16, 17, 18, 19, 20, 21, 22,
1910 23, 24, 25, 64, 64, 64, 64, 64,
1911 64, 26, 27, 28, 29, 30, 31, 32,
1912 33, 34, 35, 36, 37, 38, 39, 40,
1913 41, 42, 43, 44, 45, 46, 47, 48,
1914 49, 50, 51, 64, 64, 64, 64, 64};
1931 log_fatal(
"no memory for base64 buffer.");
1932 memset(t, 0, (
sizeof(*t)) - 1);
1933 memcpy(t->string, val, l + 1);
1942 for (i = 0; val[i]; i++) {
1946 if (((val[i] <
' ') || (val[i] >
'z')) ||
1947 ((from64[val[i] -
' '] > 63) && (val[i] !=
'='))) {
1952 }
while (valid_base64);
1955 data->len = (data->len * 3) / 4;
1957 parse_warn (cfile,
"can't allocate buffer for base64 data.");
1964 for (t = bufs; t; t = t->
next) {
1965 for (i = 0; t->string[i]; i++) {
1966 unsigned foo = t->string[i];
1967 if (terminated && foo !=
'=') {
1969 "stuff after base64 '=' terminator: %s.",
1973 if ((foo <
' ') || (foo >
'z')) {
1976 "invalid base64 character %d.",
1985 foo = from64[foo -
' '];
1988 acc = (acc << 6) + foo;
1993 data->buffer->data[j++] = (acc >> 4);
1998 data->buffer->data[j++] = (acc >> 2);
2002 data->buffer->data[j++] = acc;
2013 "partial base64 value left over: %d.",
2018 data->data = data->buffer->data;
2020 for (t = bufs; t; t = last) {
2038 struct
parse *cfile;
2040 u_int8_t ibuf [128];
2050 token =
next_token (&val, (
unsigned *)0, cfile);
2052 parse_warn (cfile,
"expecting hexadecimal number.");
2054 for (; sl; sl =
next) {
2060 if (ilen ==
sizeof ibuf) {
2065 log_fatal (
"no memory for string list.");
2066 memcpy (next -> data, ibuf, ilen);
2068 last = &next ->
next;
2074 token =
peek_token (&val, (
unsigned *)0, cfile);
2081 log_fatal (
"no memory to store octet data.");
2082 data -> data = &data ->
buffer -> data [0];
2083 data -> len = tlen + ilen;
2084 data -> terminated = 0;
2086 rvp = &data ->
buffer -> data [0];
2089 memcpy (rvp, sl -> data,
sizeof ibuf);
2095 memcpy (rvp, ibuf, ilen);
2115 struct
parse *cfile;
2123 next = &((*next) ->
next);
2131 struct
parse *cfile;
2135 #if defined(ENABLE_EXECUTE)
2148 isc_result_t status;
2151 token =
peek_token (&val, (
unsigned *)0, cfile);
2158 }
else if (token ==
LOCAL) {
2161 parse_warn(cfile,
"Expecting 'local' or 'default'.");
2169 if (token !=
SEMI) {
2184 token =
next_token (&val, (
unsigned *)0, cfile);
2191 cta = (
struct class *)0;
2193 if (status != ISC_R_SUCCESS) {
2195 val, isc_result_totext (status));
2205 log_fatal (
"no memory for new statement.");
2206 (*result) -> op = add_statement;
2207 (*result) -> data.add = cta;
2217 log_fatal (
"no memory for new statement.");
2218 (*result) -> op = break_statement;
2225 if (status != ISC_R_SUCCESS || option == NULL) {
2230 send_option_statement);
2239 if (status != ISC_R_SUCCESS || option == NULL) {
2244 supersede_option_statement);
2262 log_fatal (
"no memory for new statement.");
2263 (*result) -> op = supersede_option_statement;
2264 (*result) ->
data.option = cache;
2269 token =
peek_token (&val, (
unsigned *)0, cfile);
2271 goto switch_default;
2274 if (status != ISC_R_SUCCESS || option == NULL) {
2279 default_option_statement);
2287 if (status != ISC_R_SUCCESS || option == NULL) {
2292 prepend_option_statement);
2300 if (status != ISC_R_SUCCESS || option == NULL) {
2305 append_option_statement);
2321 "case statement in inappropriate scope.");
2327 cfile, lose, case_context);
2332 parse_warn (cfile,
"switch default statement in %s",
2333 "inappropriate scope.");
2339 log_fatal (
"no memory for default statement.");
2340 (*result) -> op = default_statement;
2352 token =
next_token (&val, (
unsigned *)0, cfile);
2355 "%s can't be a variable name", val);
2363 log_fatal (
"no memory for set statement.");
2364 (*result) -> op = flag ? define_statement : set_statement;
2366 if (!(*result)->data.set.name)
2367 log_fatal (
"can't allocate variable name");
2368 strcpy ((*result) ->
data.set.name, val);
2369 token =
next_token (&val, (
unsigned *)0, cfile);
2377 (
unsigned *)0, cfile);
2382 "expecting argument name");
2391 strlen (val),
MDL));
2394 memset (
new, 0,
sizeof *
new);
2395 strcpy (
new ->
string, val);
2403 (
unsigned *)0, cfile);
2404 }
while (token ==
COMMA);
2407 parse_warn (cfile,
"expecting right paren.");
2415 token =
next_token (&val, (
unsigned *)0, cfile);
2423 log_fatal (
"can't allocate expression.");
2431 (&expr ->
data.
func -> statements, cfile, lose,
2437 token =
next_token (&val, (
unsigned *)0, cfile);
2443 if (token !=
EQUAL) {
2445 "expecting '=' in %s statement.",
2446 flag ?
"define" :
"set");
2456 "expecting expression.");
2473 token =
next_token (&val, (
unsigned *)0, cfile);
2476 "%s can't be a variable name", val);
2483 log_fatal (
"no memory for set statement.");
2484 (*result) ->
op = unset_statement;
2486 if (!(*result)->data.unset)
2487 log_fatal (
"can't allocate variable name");
2488 strcpy ((*result) ->
data.unset, val);
2499 log_fatal (
"no memory for eval statement.");
2500 (*result) ->
op = eval_statement;
2507 "expecting data expression.");
2521 #ifdef ENABLE_EXECUTE
2525 log_fatal (
"no memory for execute statement.");
2526 (*result)->op = execute_statement;
2530 parse_warn(cfile,
"left parenthesis expected.");
2538 parse_warn(cfile,
"Expecting a quoted string.");
2544 (*result)->data.execute.command =
dmalloc(len + 1,
MDL);
2545 if ((*result)->data.execute.command == NULL)
2546 log_fatal(
"can't allocate command name");
2547 strcpy((*result)->data.execute.command, val);
2550 (*result)->
data.execute.argc = 0;
2554 log_fatal (
"can't allocate expression");
2560 "expecting expression.");
2568 (*result)->
data.execute.argc++;
2572 parse_warn(cfile,
"right parenthesis expected.");
2583 parse_warn(cfile,
"define ENABLE_EXECUTE in site.h to "
2584 "enable execute(); expressions.");
2595 log_fatal (
"no memory for return statement.");
2596 (*result) ->
op = return_statement;
2603 "expecting data expression.");
2621 log_fatal (
"no memory for log statement.");
2622 (*result) ->
op = log_statement;
2624 token =
next_token (&val, (
unsigned *)0, cfile);
2626 parse_warn (cfile,
"left parenthesis expected.");
2632 token =
peek_token (&val, (
unsigned *)0, cfile);
2634 if (token ==
FATAL) {
2635 (*result) ->
data.log.priority = log_priority_fatal;
2636 }
else if (token ==
ERROR) {
2637 (*result) ->
data.log.priority = log_priority_error;
2639 (*result) ->
data.log.priority = log_priority_debug;
2640 }
else if (token ==
INFO) {
2641 (*result) ->
data.log.priority = log_priority_info;
2643 (*result) ->
data.log.priority = log_priority_debug;
2648 token =
next_token (&val, (
unsigned *)0, cfile);
2649 if (token !=
COMMA) {
2658 (&(*result) ->
data.log.
expr, cfile, lose))) {
2664 token =
next_token (&val, (
unsigned *)0, cfile);
2666 parse_warn (cfile,
"right parenthesis expected.");
2672 token =
next_token (&val, (
unsigned *)0, cfile);
2673 if (token !=
SEMI) {
2693 log_fatal(
"no memory for execute statement.");
2694 (*result)->op = vendor_opt_statement;
2706 if (!zone ->
name) {
2714 i = strlen (zone ->
name);
2715 if (zone ->
name [i - 1] !=
'.') {
2718 parse_warn (cfile,
"no trailing '.' on zone");
2721 strcpy (s, zone ->
name);
2730 if (status != ISC_R_SUCCESS) {
2732 zone ->
name, isc_result_totext (status));
2750 option = (
struct option *)0;
2751 option_name_hash_lookup(&option,
2757 (result, cfile, 1, option,
2758 supersede_option_statement);
2768 log_fatal (
"no memory for eval statement.");
2769 (*result) -> op = eval_statement;
2820 token =
next_token (&val, (
unsigned *)0, cfile);
2827 token =
peek_token (&val, (
unsigned *)0, cfile);
2830 if (zone -> primary) {
2832 "more than one primary.");
2837 log_fatal (
"can't allocate primary option cache.");
2838 oc = zone -> primary;
2842 if (zone -> secondary) {
2843 parse_warn (cfile,
"more than one secondary.");
2848 log_fatal (
"can't allocate secondary.");
2849 oc = zone -> secondary;
2856 "expecting IP addr or hostname.");
2878 token =
next_token (&val, (
unsigned *)0, cfile);
2879 }
while (token ==
COMMA);
2880 if (token !=
SEMI) {
2889 parse_warn(cfile,
"more than one primary6.");
2894 log_fatal(
"can't allocate primary6 option cache.");
2900 parse_warn(cfile,
"more than one secondary6.");
2934 }
while (token ==
COMMA);
2935 if (token !=
SEMI) {
2958 log_fatal(
"Multiple key definitions for zone %s.",
2999 isc_result_t status;
3003 if (omapi_auth_key_new (&key,
MDL) != ISC_R_SUCCESS)
3006 token =
peek_token (&val, (
unsigned *)0, cfile);
3012 strcpy (key ->
name, val);
3023 token =
next_token (&val, (
unsigned *)0, cfile);
3030 token =
next_token (&val, (
unsigned *)0, cfile);
3035 "key %s: too many algorithms",
3042 "expecting key algorithm name.");
3051 static char add [] =
".SIG-ALG.REG.INT.";
3080 parse_warn (cfile,
"key %s: too many secrets",
3085 memset (&ds, 0,
sizeof(ds));
3090 if (status != ISC_R_SUCCESS)
3092 memcpy (key -> key -> value,
3106 parse_warn (cfile,
"expecting right brace.");
3111 token =
peek_token (&val, (
unsigned *)0, cfile);
3112 if (token ==
SEMI) {
3118 if (status != ISC_R_SUCCESS) {
3120 key ->
name, isc_result_totext (status));
3123 omapi_auth_key_dereference (&key,
MDL);
3129 omapi_auth_key_dereference (&key,
MDL);
3142 struct
parse *cfile;
3149 log_fatal (
"no memory for new statement.");
3150 (*result) -> op = on_statement;
3153 token =
next_token (&val, (
unsigned *)0, cfile);
3156 (*result) -> data.on.evtypes |=
ON_EXPIRY;
3160 (*result) -> data.on.evtypes |=
ON_COMMIT;
3172 parse_warn (cfile,
"expecting a lease event type");
3178 token =
next_token (&val, (
unsigned *)0, cfile);
3179 }
while (token ==
OR);
3198 (
unsigned *)0, cfile);
3204 token =
next_token (&val, (
unsigned *)0, cfile);
3222 struct
parse *cfile;
3229 log_fatal (
"no memory for new statement.");
3230 (*result) -> op = switch_statement;
3232 token =
next_token (&val, (
unsigned *)0, cfile);
3248 "expecting data or numeric expression.");
3254 token =
next_token (&val, (
unsigned *)0, cfile);
3260 token =
next_token (&val, (
unsigned *)0, cfile);
3266 (&(*result) -> data.s_switch.statements, cfile, lose,
3275 token =
next_token (&val, (
unsigned *)0, cfile);
3290 struct
parse *cfile;
3298 log_fatal (
"no memory for new statement.");
3299 (*result) -> op = case_statement;
3302 cfile, lose, case_context,
3306 parse_warn (cfile,
"expecting %s expression.",
3308 ?
"data" :
"numeric"));
3317 token =
next_token (&val, (
unsigned *)0, cfile);
3318 if (token !=
COLON) {
3337 struct
parse *cfile;
3345 log_fatal (
"no memory for if statement.");
3347 (*result) -> op = if_statement;
3349 token =
peek_token (&val, (
unsigned *)0, cfile);
3360 parse_warn (cfile,
"boolean expression expected.");
3365 #if defined (DEBUG_EXPRESSION_PARSE)
3369 token =
next_token (&val, (
unsigned *)0, cfile);
3371 parse_warn (cfile,
"expecting right paren.");
3377 token =
next_token (&val, (
unsigned *)0, cfile);
3391 (
unsigned *)0, cfile);
3397 token =
next_token (&val, (
unsigned *)0, cfile);
3405 token =
peek_token (&val, (
unsigned *)0, cfile);
3406 if (token ==
ELSE) {
3408 token =
peek_token (&val, (
unsigned *)0, cfile);
3415 "expecting if statement");
3420 }
else if (token !=
LBRACE) {
3421 parse_warn (cfile,
"left brace or if expected.");
3429 (&(*result) -> data.ie.fc,
3434 token =
next_token (&val, (
unsigned *)0, cfile);
3443 }
else if (token ==
ELSIF) {
3449 "expecting conditional.");
3473 struct
parse *cfile;
3484 parse_warn (cfile,
"Expecting a boolean expression.");
3495 struct
parse *cfile;
3501 if (!strcasecmp (val,
"true")
3502 || !strcasecmp (val,
"on"))
3504 else if (!strcasecmp (val,
"false")
3505 || !strcasecmp (val,
"off"))
3509 "boolean value (true/false/on/off) expected");
3540 struct
parse *cfile;
3552 parse_warn (cfile,
"Expecting a data expression.");
3567 struct
parse *cfile;
3579 parse_warn (cfile,
"Expecting a numeric expression.");
3590 struct
parse *cfile;
3600 isc_result_t status;
3603 token =
peek_token (&val, (
unsigned *)0, cfile);
3609 token =
next_token (&val, (
unsigned *)0, cfile);
3617 if (!strcmp (col -> name, val))
3625 log_fatal (
"can't allocate expression");
3633 log_fatal (
"can't allocate expression");
3647 parse_warn (cfile,
"boolean expression expected");
3665 token =
next_token (&val, (
unsigned *)0, cfile);
3677 log_fatal (
"can't allocate expression");
3682 &(*expr)->data.option);
3683 if (status != ISC_R_SUCCESS ||
3684 (*expr)->data.option == NULL) {
3694 log_fatal (
"can't allocate expression");
3701 log_fatal (
"can't allocate expression");
3708 log_fatal (
"can't allocate expression");
3711 token =
next_token (&val, (
unsigned *)0, cfile);
3715 parse_warn (cfile,
"left parenthesis expected.");
3726 "expecting data expression.");
3733 token =
next_token (&val, (
unsigned *)0, cfile);
3734 if (token !=
COMMA) {
3748 "expecting numeric expression.");
3756 token =
next_token (&val, (
unsigned *)0, cfile);
3764 token =
next_token (&val, (
unsigned *)0, cfile);
3767 parse_warn (cfile,
"right parenthesis expected.");
3777 log_fatal (
"can't allocate expression");
3780 token =
next_token (&val, (
unsigned *)0, cfile);
3788 token =
next_token (&val, (
unsigned *)0, cfile);
3796 token =
next_token (&val, (
unsigned *)0, cfile);
3804 log_fatal (
"can't allocate expression");
3807 token =
next_token(&val, (
unsigned *)0, cfile);
3814 token =
next_token(&val, (
unsigned *)0, cfile);
3822 log_fatal (
"can't allocate expression");
3825 token =
next_token (&val, (
unsigned *)0, cfile);
3833 token =
next_token(&val, (
unsigned *)0, cfile);
3841 log_fatal (
"can't allocate expression");
3844 token =
next_token (&val, (
unsigned *)0, cfile);
3852 token =
next_token (&val, (
unsigned *)0, cfile);
3861 token =
next_token (&val, (
unsigned *)0, cfile);
3863 if (token ==
COMMA) {
3866 log_fatal (
"can't allocate at CONCAT2");
3873 goto concat_another;
3883 log_fatal (
"can't allocate expression");
3886 token =
next_token (&val, (
unsigned *)0, cfile);
3894 token =
next_token (&val, (
unsigned *)0, cfile);
3902 token =
next_token (&val, (
unsigned *)0, cfile);
3910 token =
next_token (&val, (
unsigned *)0, cfile);
3918 token =
next_token (&val, (
unsigned *)0, cfile);
3926 log_fatal (
"can't allocate expression");
3929 token =
next_token (&val, (
unsigned *)0, cfile);
3937 token =
next_token (&val, (
unsigned *)0, cfile);
3945 token =
next_token (&val, (
unsigned *)0, cfile);
3955 log_fatal (
"can't allocate expression");
3957 token =
next_token (&val, (
unsigned *)0, cfile);
3970 token =
next_token (&val, (
unsigned *)0, cfile);
3971 if (token ==
COMMA) {
3981 }
while (token ==
COMMA);
3991 log_fatal (
"can't allocate expression");
3999 &(*expr)->data.option);
4000 if (status != ISC_R_SUCCESS ||
4001 (*expr)->data.option == NULL) {
4011 log_fatal (
"can't allocate expression");
4018 log_fatal (
"can't allocate expression");
4025 log_fatal (
"can't allocate expression");
4032 log_fatal (
"can't allocate expression");
4039 log_fatal (
"can't allocate expression");
4046 log_fatal (
"can't allocate expression");
4053 log_fatal (
"can't allocate expression");
4060 log_fatal (
"can't allocate expression");
4067 log_fatal (
"can't allocate expression");
4070 token =
next_token (&val, (
unsigned *)0, cfile);
4078 token =
next_token (&val, (
unsigned *)0, cfile);
4086 token =
next_token (&val, (
unsigned *)0, cfile);
4095 log_fatal (
"can't make constant string expression.");
4100 token =
next_token (&val, (
unsigned *)0, cfile);
4102 parse_warn (cfile,
"left parenthesis expected.");
4108 log_fatal (
"can't allocate expression");
4114 "expecting data expression.");
4122 token =
next_token (&val, (
unsigned *)0, cfile);
4123 if (token !=
COMMA) {
4130 token =
next_token (&val, (
unsigned *)0, cfile);
4137 switch (atoi (val)) {
4152 "unsupported integer size %d", atoi (val));
4159 token =
next_token (&val, (
unsigned *)0, cfile);
4161 parse_warn (cfile,
"right parenthesis expected.");
4170 token =
next_token (&val, (
unsigned *)0, cfile);
4172 parse_warn (cfile,
"left parenthesis expected.");
4178 log_fatal (
"can't allocate expression");
4182 parse_warn (cfile,
"expecting numeric expression.");
4189 token =
next_token (&val, (
unsigned *)0, cfile);
4190 if (token !=
COMMA) {
4197 token =
next_token (&val, (
unsigned *)0, cfile);
4204 switch (atoi (val)) {
4219 "unsupported integer size %d", atoi (val));
4226 token =
next_token (&val, (
unsigned *)0, cfile);
4228 parse_warn (cfile,
"right parenthesis expected.");
4242 log_fatal (
"can't allocate expression");
4250 log_fatal (
"can't allocate expression");
4265 log_fatal (
"can't allocate expression");
4271 known = ISC_R_SUCCESS;
4279 known = ISC_R_NOTIMPLEMENTED;
4340 token =
next_token (&val, (
unsigned *)0, cfile);
4344 token =
next_token (&val, (
unsigned *)0, cfile);
4346 parse_warn (cfile,
"%s can't be a variable name", val);
4353 log_fatal (
"can't allocate expression");
4356 if (!(*expr)->data.variable)
4357 log_fatal (
"can't allocate variable name");
4359 token =
next_token (&val, (
unsigned *)0, cfile);
4389 parse_warn(cfile,
"Expecting quoted literal: "
4390 "\"foo.example.com\"");
4396 log_fatal(
"Error creating gethostbyname() internal "
4397 "record. (%s:%d)",
MDL);
4407 log_fatal (
"can't allocate expression");
4442 log_fatal (
"can't allocate variable name");
4446 token =
peek_token (&val, (
unsigned *)0, cfile);
4449 log_fatal (
"can't allocate expression");
4457 log_fatal (
"can't allocate expression");
4465 log_fatal (
"can't allocate expression");
4473 "expecting expression.");
4481 token =
next_token (&val, (
unsigned *)0, cfile);
4482 }
while (token ==
COMMA);
4484 parse_warn (cfile,
"Right parenthesis expected.");
4499 struct
parse *cfile;
4528 "expecting right-hand side.");
4541 token =
peek_token (&val, (
unsigned *)0, cfile);
4545 token =
peek_token (&val, (
unsigned *)0, cfile);
4546 if (token !=
EQUAL) {
4547 parse_warn (cfile,
"! in boolean context without =");
4570 else if (token ==
EQUAL)
4573 parse_warn(cfile,
"expecting ~= or ~~ operator");
4583 parse_warn(cfile,
"No support for regex operator.");
4681 "expecting a subexpression");
4694 (rhs_context != lhs_context)) {
4695 parse_warn (cfile,
"illegal expression relating different types");
4710 parse_warn (cfile,
"expecting data/numeric expression");
4721 parse_warn(cfile,
"expecting data expression");
4739 parse_warn (cfile,
"expecting boolean expressions");
4757 parse_warn (cfile,
"expecting numeric expressions");
4775 log_fatal (
"Can't allocate expression!");
4777 (*expr) ->
op = binop;
4792 log_fatal (
"No memory for equal precedence combination.");
4810 struct
parse *cfile;
4815 const char *fmt = NULL;
4831 if ((fmt != NULL) && (fmt != option->
format) && (*fmt ==
'a'))
4833 else if ((fmt == NULL) || (*fmt ==
'A'))
4837 if ((fmt[0] !=
'Z') && (tolower((
unsigned char)fmt[1]) ==
'a'))
4841 if ((*fmt ==
'A') || (*fmt ==
'a'))
4849 if (fmt[1] ==
'o') {
4860 if (token ==
SEMI) {
4870 uniform, lookups)) {
4871 if (fmt [1] !=
'o') {
4884 }
while (*fmt !=
'\0');
4886 if ((*fmt ==
'A') || (*fmt ==
'a')) {
4887 token =
peek_token (&val, (
unsigned *)0, cfile);
4889 if (token ==
COMMA) {
4895 if ((*fmt ==
'A') || (fmt[1] ==
'\0'))
4903 }
while ((*fmt ==
'A') || (*fmt ==
'a'));
4917 struct
parse *cfile;
4920 enum statement_op
op;
4927 token =
peek_token (&val, (
unsigned *)0, cfile);
4928 if ((token ==
SEMI) && (option->
format[0] !=
'Z')) {
4937 }
else if (token ==
EQUAL) {
4948 "expecting a data expression.");
4961 log_fatal (
"no memory for option statement.");
4965 NULL, expr, option,
MDL))
4966 log_fatal (
"no memory for option cache");
4976 struct
parse *cfile;
4985 unsigned char buf [4];
4989 isc_boolean_t freeval = ISC_FALSE;
4997 if ((*fmt) [1] !=
'o') {
5010 g = strchr (*fmt,
'.');
5013 "malformed encapsulation format (bug!)");
5021 token =
peek_token (&val, (
unsigned *)0, cfile);
5025 if (!
parse_cshl (&t -> data.const_data, cfile)) {
5035 (
const unsigned char *)val,
5037 log_fatal (
"No memory for \"%s\"", val);
5039 if ((*fmt) [1] !=
'o') {
5041 "or hexadecimal data.");
5050 if ((*fmt)[1] ==
'c') {
5060 if ((*fmt)[1] !=
'o')
5070 parse_warn (cfile,
"not a valid domain name.");
5081 if ((*fmt) [1] !=
'o') {
5091 log_fatal (
"No memory for concatenation");
5092 if (freeval == ISC_TRUE) {
5094 freeval = ISC_FALSE;
5101 g = strchr (*fmt,
'.');
5104 "enumeration format");
5110 token =
next_token (&val, (
unsigned *)0, cfile);
5113 "identifier expected");
5157 token =
next_token (&val, (
unsigned *)0, cfile);
5167 token =
next_token (&val, (
unsigned *)0, cfile);
5171 if ((*fmt) [1] !=
'o') {
5185 token =
next_token (&val, (
unsigned *)0, cfile);
5195 token =
next_token (&val, (
unsigned *)0, cfile);
5204 token =
next_token (&val, (
unsigned *)0, cfile);
5206 if ((*fmt) [1] !=
'o')
5209 if ((*fmt) [1] !=
'o') {
5215 if (!strcasecmp (val,
"true")
5216 || !strcasecmp (val,
"on"))
5218 else if (!strcasecmp (val,
"false")
5219 || !strcasecmp (val,
"off"))
5221 else if (!strcasecmp (val,
"ignore"))
5224 if ((*fmt) [1] !=
'o')
5233 token =
peek_token (&val, (
unsigned *)0, cfile);
5234 if (token !=
SEMI) {
5249 parse_warn (cfile,
"Bad format '%c' in parse_option_token.",
5265 struct
parse *cfile;
5270 u_int8_t hunkbuf [1024];
5271 unsigned hunkix = 0;
5272 const char *fmt, *f;
5274 struct iaddr ip_addr;
5276 const u_int8_t *cdp;
5284 isc_result_t status;
5287 if (status != ISC_R_SUCCESS || option == NULL)
5294 for (; *fmt; fmt++) {
5310 if (*fmt ==
'o' && fmt != option -> format)
5314 fmt = strchr (fmt,
'.');
5317 "malformed %s (bug!)",
5318 "encapsulation format");
5324 len =
parse_X (cfile, &hunkbuf [hunkix],
5325 sizeof hunkbuf - hunkix);
5332 if (token ==
SEMI && fmt[1] ==
'o') {
5340 "expecting string.");
5343 if (hunkix + len + 1 >
sizeof hunkbuf) {
5345 "option data buffer %s",
5349 memcpy (&hunkbuf [hunkix], val, len + 1);
5355 if (fmt[1] ==
'c') {
5363 if (express == NULL)
5375 if ((hunkix + len) >
sizeof(hunkbuf)) {
5380 memcpy(&hunkbuf[hunkix], cdp, len);
5388 fmt = strchr (fmt,
'.');
5391 "malformed %s (bug!)",
5392 "enumeration format");
5396 (
unsigned *)0, cfile);
5399 "identifier expected");
5433 if (hunkix + len >
sizeof hunkbuf) {
5435 "option data buffer %s",
5439 memcpy (&hunkbuf [hunkix], dp, len);
5446 (
unsigned *)0, cfile);
5451 "expecting number.");
5465 (
unsigned *)0, cfile);
5477 (
unsigned *)0, cfile);
5488 (
unsigned *)0, cfile);
5491 "expecting identifier.");
5498 if (!strcasecmp (val,
"true")
5499 || !strcasecmp (val,
"on"))
5501 else if (!strcasecmp (val,
"false")
5502 || !strcasecmp (val,
"off"))
5506 "expecting boolean.");
5514 token =
peek_token(&val, (
unsigned *)0, cfile);
5515 if (token !=
SEMI) {
5517 "semicolon expected.");
5525 log_error (
"parse_option_param: Bad format %c",
5530 token =
next_token (&val, (
unsigned *)0, cfile);
5531 }
while (*fmt && token ==
COMMA);
5533 if (token !=
SEMI) {
5540 log_fatal (
"no memory to store option declaration.");
5541 memcpy (bp ->
data, hunkbuf, hunkix + nul_term);
5544 log_fatal (
"out of memory allocating option cache.");
5546 (*oc) ->
data.buffer = bp;
5547 (*oc) ->
data.data = &bp ->
data [0];
5548 (*oc) ->
data.terminated = nul_term;
5549 (*oc) ->
data.len = hunkix;
5555 if (express != NULL)
5567 struct
parse *cfile;
5575 token =
peek_token (&val, (
unsigned *)0, cfile);
5579 token =
next_token (&val, (
unsigned *)0, cfile);
5582 "expecting hexadecimal constant.");
5589 "hexadecimal constant too long.");
5593 token =
peek_token (&val, (
unsigned *)0, cfile);
5596 (
unsigned *)0, cfile);
5597 }
while (token ==
COLON);
5599 }
else if (token ==
STRING) {
5601 if (len + 1 > max) {
5602 parse_warn (cfile,
"string constant too long.");
5606 memcpy (buf, val, len + 1);
5608 parse_warn (cfile,
"expecting string or hexadecimal data");
5627 snprintf (fbuf,
sizeof fbuf,
"%s line %d: %s",
5630 va_start (list, fmt);
5631 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
5637 if (lix < (
sizeof lexbuf) - 1)
5638 lexbuf [lix++] =
' ';
5640 for (; lix < (
sizeof lexbuf) - 1 && (lix & 7); lix++)
5647 syslog (LOG_ERR,
"%s", mbuf);
5650 syslog (LOG_ERR,
"%s^", lexbuf);
5664 cfile -> warnings_occurred = 1;
5675 unsigned len, clen = 0;
5678 const unsigned char *dnptrs[256], **lastdnptr;
5680 memset(compbuf, 0,
sizeof(compbuf));
5681 memset(dnptrs, 0,
sizeof(dnptrs));
5682 dnptrs[0] = compbuf;
5683 lastdnptr = &dnptrs[255];
5694 parse_warn(cfile,
"Expecting a domain string.");
5703 sizeof(compbuf) - clen,
5707 parse_warn(cfile,
"Error compressing domain "
5715 sizeof(compbuf) - clen);
5731 while (compbuf[clen] != 0)
5732 clen += compbuf[clen] + 1;
5738 if (clen >
sizeof(compbuf))
5742 }
while (token ==
COMMA);
5745 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)
void * dmalloc(unsigned, const char *, int)
struct expression::expr_union::@21 pick_first_value
int expression_allocate(struct expression **cptr, const char *file, int line)
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 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)