52 if (strlen (e ->
name) == length &&
53 !memcmp (e ->
name,
name, (
unsigned)length))
105 #if defined (DEBUG_TOKENS) 106 log_error(
"skip_to_rbrace: %d\n", brace_count);
111 if (brace_count > 0) {
115 if (brace_count == 0) {
122 }
else if (
token ==
SEMI && (brace_count == 0)) {
174 log_fatal (
"no memory for string %s.", val);
175 memcpy (s, val, len + 1);
216 if (!(s = (
char *)
dmalloc (strlen (val) + 1,
MDL)))
217 log_fatal (
"can't allocate temp space for hostname.");
219 c =
cons ((caddr_t)s, c);
220 len += strlen (s) + 1;
237 log_fatal (
"can't allocate space for hostname.");
244 unsigned l = strlen ((
char *)(c -> car));
246 memcpy (t, (
char *)(c -> car), l);
275 unsigned char addr [4];
276 unsigned len =
sizeof addr;
281 token =
peek_token (&val, (
unsigned *)0, cfile);
321 token =
next_token (&val, (
unsigned *)0, cfile);
322 parse_warn (cfile,
"%s (%d): expecting IP address or hostname",
342 &addr ->
len,
DOT, 10, 8))
358 unsigned int mask_width, dest_dest_len;
361 &addr ->
len,
DOT, 10, 8)) {
362 mask_width = (
unsigned int)addr->
iabuf[0];
363 dest_dest_len = (((mask_width+7)/8)+1);
364 if (mask_width > 32) {
366 "subnet mask width (%u) greater than 32.", mask_width);
368 else if (dest_dest_len != addr->
len) {
370 "destination descriptor with subnet mask width %u " 371 "should have %u octets, but has %u octets.",
372 mask_width, dest_dest_len, addr->
len);
384 is_hex_string(
const char *s) {
386 if (!isxdigit((
int)*s)) {
410 char v6[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
425 is_hex_string(val)) ||
432 val_len = strlen(val);
433 if ((v6_len + val_len) >=
sizeof(v6)) {
438 memcpy(v6+v6_len, val, val_len);
451 if (inet_pton(AF_INET6, v6, addr->
iabuf) <= 0) {
466 struct parse *cfile) {
488 if (token !=
SLASH) {
502 if ((n < 0) || (n > 128)) {
503 parse_warn(cfile,
"Invalid IPv6 prefix length.");
526 const char *val, *orig;
530 unsigned char newval, warnmask=0;
534 prefixlen = match->
addr.
len * 8;
538 if (token ==
SLASH) {
543 parse_warn(cfile,
"Invalid CIDR prefix length:" 544 " expecting a number.");
548 prefixlen = atoi(val);
551 prefixlen > (match->
addr.
len * 8)) {
565 fflen = prefixlen / 8;
573 "\x00\x80\xc0\xe0\xf0\xf8\xfc\xfe"[prefixlen % 8];
584 if (newval != match->
addr.
iabuf[fflen]) {
588 }
while (++fflen < match->
mask.
len);
591 log_error(
"Warning: Extraneous bits removed " 592 "in address component of %s/%d.",
603 "expecting ip-address or ip-address/prefixlen");
639 if (!strncmp(val,
"unknown-", 8)) {
643 "expecting a network hardware type");
670 parse_warn(cfile,
"hardware address too long");
700 parse_warn (cfile,
"Expecting numeric lease time");
704 convert_num(cfile, (
unsigned char *)&num, val, 10, 32);
735 max, separator, base, size)
745 unsigned char *bufp = buf, *s, *t;
750 bufp = (
unsigned char *)
dmalloc (*max * size / 8,
MDL);
752 log_fatal (
"no space for numeric aggregate");
759 if (
token != separator) {
772 if ((bufp != NULL) && (bufp != buf))
774 return (
unsigned char *)0;
788 parse_warn (cfile,
"expecting numeric value.");
791 if ((bufp != NULL) && (bufp != buf))
808 t = (
unsigned char *)
dmalloc (strlen (val) + 1,
MDL);
811 strcpy ((
char *)t, val);
812 c =
cons ((caddr_t)t, c);
814 }
while (++count != *max);
822 bufp = (
unsigned char *)
dmalloc (count * size / 8,
MDL);
824 log_fatal (
"no space for numeric aggregate.");
825 s = bufp + count - size / 8;
830 convert_num (cfile, s, (
char *)(c -> car), base, size);
847 const unsigned char *ptr = (
const unsigned char *)str;
860 if (ptr [0] ==
'0') {
861 if (ptr [1] ==
'x') {
864 }
else if (isascii (ptr [1]) && isdigit (ptr [1])) {
880 else if (
tval >=
'A')
882 else if (
tval >=
'0')
890 "Bogus number %s: digit %d not in base %d",
894 val = val * base +
tval;
898 max = (1 << (size - 1));
900 max = (1 << (size - 1)) + ((1 << (size - 1)) - 1);
905 "%s%lo exceeds max (%d) for precision.",
907 (
unsigned long)val, max);
911 "%s%lx exceeds max (%d) for precision.",
913 (
unsigned long)val, max);
917 "%s%lu exceeds max (%d) for precision.",
919 (
unsigned long)val, max);
927 *buf = -(
unsigned long)val;
937 "Unexpected integer size: %d\n", size);
943 *buf = (u_int8_t)val;
953 "Unexpected integer size: %d\n", size);
982 int tzoff, year, mon, mday, hour, min, sec;
985 static int months[11] = { 31, 59, 90, 120, 151, 181,
986 212, 243, 273, 304, 334 };
1003 parse_warn(cfile,
"Seconds since epoch expected.");
1010 return((
TIME)guess);
1016 parse_warn(cfile,
"numeric day of week expected.");
1046 "expected slash separating year from month.");
1056 parse_warn(cfile,
"numeric month expected.");
1060 mon = atoi(val) - 1;
1068 "expected slash separating month from day.");
1078 parse_warn(cfile,
"numeric day of month expected.");
1101 "expected colon separating hour from minute.");
1111 parse_warn(cfile,
"numeric minute expected.");
1123 "expected colon separating minute from second.");
1133 parse_warn(cfile,
"numeric second expected.");
1147 "Time zone offset or semicolon expected.");
1159 guess = ((((((365 * (year - 70) +
1165 !((year - 72) & 3)) +
1168 min) * 60) + sec + tzoff;
1179 return((
TIME)guess);
1189 struct parse *cfile;
1209 struct parse *cfile;
1224 token =
next_token (&val, (
unsigned *)0, cfile);
1227 "expecting identifier after option keyword.");
1234 log_fatal (
"no memory for uname information.");
1235 strcpy (uname, val);
1236 token =
peek_token (&val, (
unsigned *)0, cfile);
1242 token =
next_token (&val, (
unsigned *)0, cfile);
1244 parse_warn (cfile,
"expecting identifier after '.'");
1255 parse_warn (cfile,
"no option space named %s.", uname);
1257 return ISC_R_NOTFOUND;
1280 }
else if (strncasecmp(val,
"unknown-", 8) == 0) {
1287 parse_warn(cfile,
"Option codes 0 and %u are illegal " 1292 return ISC_R_FAILURE;
1319 log_info(
"option %s has been redefined as option %s. " 1320 "Please update your configs if necessary.",
1327 }
else if (allocate) {
1332 parse_warn(cfile,
"no option named %s in space %s",
1336 return ISC_R_NOTFOUND;
1341 return ISC_R_SUCCESS;
1350 struct parse *cfile;
1356 int tsize=1, lsize=1, hsize = 0;
1361 token =
next_token (&val, (
unsigned *)0, cfile);
1369 log_fatal (
"No memory for new option space.");
1374 log_fatal (
"No memory for new option space name.");
1375 strcpy (nu_name, val);
1376 nu ->
name = nu_name;
1386 if (token !=
WIDTH) {
1393 parse_warn(cfile,
"expecting number 1, 2, 4.");
1414 parse_warn(cfile,
"invalid code width (%d), " 1415 "expecting a 1, 2 or 4.",
1423 if (token !=
WIDTH) {
1430 parse_warn(cfile,
"expecting number 1 or 2.");
1435 if (lsize != 1 && lsize != 2) {
1436 parse_warn(cfile,
"invalid length width (%d) " 1437 "expecting 1 or 2.", lsize);
1445 if (token !=
SIZE) {
1452 parse_warn(cfile,
"expecting a 10base number");
1460 if (hsize < 0 || hsize > 0x7FFFFFFF) {
1471 }
while (token !=
SEMI);
1521 log_fatal (
"No memory to expand option space array.");
1528 if (!option_name_new_hash(&nu->
name_hash, hsize,
MDL) ||
1530 log_fatal(
"Can't allocate %s option hash table.", nu->
name);
1573 struct parse *cfile;
1579 unsigned arrayp = 0;
1581 int no_more_in_record = 0;
1587 int has_encapsulation = 0;
1591 token =
next_token (&val, (
unsigned *)0, cfile);
1593 parse_warn (cfile,
"expecting option code number.");
1597 option -> code = atoi (val);
1599 token =
next_token (&val, (
unsigned *)0, cfile);
1600 if (token !=
EQUAL) {
1607 token =
next_token (&val, (
unsigned *)0, cfile);
1608 if (token ==
ARRAY) {
1609 token =
next_token (&val, (
unsigned *)0, cfile);
1616 token =
next_token (&val, (
unsigned *)0, cfile);
1621 token =
next_token (&val, (
unsigned *)0, cfile);
1626 if (has_encapsulation) {
1628 "encapsulate must always be the last item.");
1642 token =
next_token (&val, (
unsigned *)0, cfile);
1648 arrayp = recordp + 1;
1649 token =
next_token (&val, (
unsigned *)0, cfile);
1650 if ((recordp) && (token ==
LBRACE)) {
1652 "only uniform array inside record.");
1664 token =
next_token (&val, (
unsigned *)0, cfile);
1672 switch (atoi (val)) {
1674 type = is_signed ?
'b' :
'B';
1677 type = is_signed ?
's' :
'S';
1680 type = is_signed ?
'l' :
'L';
1684 "%s bit precision is not supported.", val);
1694 token =
next_token (&val, (
unsigned *)0, cfile);
1696 parse_warn (cfile,
"expecting \"integer\" keyword.");
1724 tokbuf[tokix++] =
'D';
1733 parse_warn (cfile,
"arrays of text strings not %s",
1740 no_more_in_record = 1;
1747 token =
next_token (&val, (
unsigned *)0, cfile);
1750 "expecting option space identifier");
1754 encapsulated = NULL;
1756 val, strlen(val),
MDL)) {
1757 parse_warn(cfile,
"unknown option space %s", val);
1761 if (strlen (val) + tokix + 2 >
sizeof (tokbuf))
1763 tokbuf [tokix++] =
'E';
1764 strcpy (&tokbuf [tokix], val);
1765 tokix += strlen (val);
1767 has_encapsulation = 1;
1773 parse_warn (cfile,
"array incompatible with zerolen.");
1779 no_more_in_record = 1;
1783 parse_warn (cfile,
"unknown data type %s", val);
1790 if (tokix ==
sizeof tokbuf) {
1792 parse_warn (cfile,
"too many types in record.");
1798 tokbuf [tokix++] = type;
1801 token =
next_token (&val, (
unsigned *)0, cfile);
1802 if (arrayp > recordp) {
1803 if (tokix ==
sizeof tokbuf) {
1805 "too many types in record.");
1811 tokbuf[tokix++] =
'a';
1813 if (token ==
COMMA) {
1814 if (no_more_in_record) {
1816 "%s must be at end of record.",
1817 type ==
't' ?
"text" :
"string");
1823 token =
next_token (&val, (
unsigned *)0, cfile);
1827 parse_warn (cfile,
"expecting right brace.");
1841 if (has_encapsulation && arrayp) {
1843 "Arrays of encapsulations don't make sense.");
1846 s =
dmalloc(tokix + (arrayp ? 1 : 0) + 1,
MDL);
1848 log_fatal(
"no memory for option format.");
1850 memcpy(s, tokbuf, tokix);
1852 s[tokix++] = (arrayp > recordp) ?
'a' :
'A';
1861 if (oldopt != NULL) {
1882 if (has_encapsulation) {
1885 if (!option_code_hash_lookup(&encapsulated->
enc_opt,
1888 log_fatal(
"error finding encapsulated option (%s:%d)",
1901 struct parse *cfile;
1906 static unsigned char 1907 from64 [] = {64, 64, 64, 64, 64, 64, 64, 64,
1908 64, 64, 64, 62, 64, 64, 64, 63,
1909 52, 53, 54, 55, 56, 57, 58, 59,
1910 60, 61, 64, 64, 64, 64, 64, 64,
1911 64, 0, 1, 2, 3, 4, 5, 6,
1912 7, 8, 9, 10, 11, 12, 13, 14,
1913 15, 16, 17, 18, 19, 20, 21, 22,
1914 23, 24, 25, 64, 64, 64, 64, 64,
1915 64, 26, 27, 28, 29, 30, 31, 32,
1916 33, 34, 35, 36, 37, 38, 39, 40,
1917 41, 42, 43, 44, 45, 46, 47, 48,
1918 49, 50, 51, 64, 64, 64, 64, 64};
1935 log_fatal(
"no memory for base64 buffer.");
1936 memset(t, 0, (
sizeof(*t)) - 1);
1937 memcpy(t->string, val, l + 1);
1946 for (i = 0; val[i]; i++) {
1950 if (((val[i] <
' ') || (val[i] >
'z')) ||
1951 ((from64[val[i] -
' '] > 63) && (val[i] !=
'='))) {
1956 }
while (valid_base64);
1959 data->
len = (data->
len * 3) / 4;
1961 parse_warn (cfile,
"can't allocate buffer for base64 data.");
1968 for (t = bufs; t; t = t->
next) {
1969 for (i = 0; t->string[i]; i++) {
1970 unsigned foo = t->string[i];
1971 if (terminated && foo !=
'=') {
1973 "stuff after base64 '=' terminator: %s.",
1977 if ((foo <
' ') || (foo >
'z')) {
1980 "invalid base64 character %d.",
1989 foo = from64[foo -
' '];
1992 acc = (acc << 6) + foo;
2017 "partial base64 value left over: %d.",
2024 for (t = bufs; t; t = last) {
2042 struct parse *cfile;
2044 u_int8_t ibuf [128];
2054 token =
next_token (&val, (
unsigned *)0, cfile);
2056 parse_warn (cfile,
"expecting hexadecimal number.");
2058 for (; sl; sl =
next) {
2064 if (ilen ==
sizeof ibuf) {
2069 log_fatal (
"no memory for string list.");
2078 token =
peek_token (&val, (
unsigned *)0, cfile);
2085 log_fatal (
"no memory to store octet data.");
2087 data -> len = tlen + ilen;
2088 data -> terminated = 0;
2093 memcpy (rvp, sl ->
data,
sizeof ibuf);
2099 memcpy (rvp, ibuf, ilen);
2119 struct parse *cfile;
2135 struct parse *cfile;
2139 #if defined(ENABLE_EXECUTE) 2152 isc_result_t status;
2155 token =
peek_token (&val, (
unsigned *)0, cfile);
2162 }
else if (token ==
LOCAL) {
2165 parse_warn(cfile,
"Expecting 'local' or 'default'.");
2173 if (token !=
SEMI) {
2188 token =
next_token (&val, (
unsigned *)0, cfile);
2195 cta = (
struct class *)0;
2197 if (status != ISC_R_SUCCESS) {
2199 val, isc_result_totext (status));
2209 log_fatal (
"no memory for new statement.");
2210 (*result) -> op = add_statement;
2211 (*result) -> data.add = cta;
2221 log_fatal (
"no memory for new statement.");
2222 (*result) -> op = break_statement;
2229 if (status != ISC_R_SUCCESS ||
option == NULL) {
2234 send_option_statement);
2243 if (status != ISC_R_SUCCESS ||
option == NULL) {
2248 supersede_option_statement);
2266 log_fatal (
"no memory for new statement.");
2267 (*result) -> op = supersede_option_statement;
2268 (*result) ->
data.option = cache;
2273 token =
peek_token (&val, (
unsigned *)0, cfile);
2275 goto switch_default;
2278 if (status != ISC_R_SUCCESS ||
option == NULL) {
2283 default_option_statement);
2291 if (status != ISC_R_SUCCESS ||
option == NULL) {
2296 prepend_option_statement);
2304 if (status != ISC_R_SUCCESS ||
option == NULL) {
2309 append_option_statement);
2325 "case statement in inappropriate scope.");
2331 cfile, lose, case_context);
2336 parse_warn (cfile,
"switch default statement in %s",
2337 "inappropriate scope.");
2343 log_fatal (
"no memory for default statement.");
2344 (*result) -> op = default_statement;
2356 token =
next_token (&val, (
unsigned *)0, cfile);
2359 "%s can't be a variable name", val);
2367 log_fatal (
"no memory for set statement.");
2368 (*result) -> op = flag ? define_statement : set_statement;
2370 if (!(*result)->data.set.name)
2371 log_fatal (
"can't allocate variable name");
2372 strcpy ((*result) ->
data.set.name, val);
2373 token =
next_token (&val, (
unsigned *)0, cfile);
2381 (
unsigned *)0, cfile);
2386 "expecting argument name");
2395 strlen (val),
MDL));
2398 memset (
new, 0,
sizeof *
new);
2399 strcpy (
new ->
string, val);
2407 (
unsigned *)0, cfile);
2408 }
while (token ==
COMMA);
2411 parse_warn (cfile,
"expecting right paren.");
2419 token =
next_token (&val, (
unsigned *)0, cfile);
2427 log_fatal (
"can't allocate expression.");
2435 (&expr ->
data.
func -> statements, cfile, lose,
2441 token =
next_token (&val, (
unsigned *)0, cfile);
2447 if (token !=
EQUAL) {
2449 "expecting '=' in %s statement.",
2450 flag ?
"define" :
"set");
2460 "expecting expression.");
2477 token =
next_token (&val, (
unsigned *)0, cfile);
2480 "%s can't be a variable name", val);
2487 log_fatal (
"no memory for set statement.");
2488 (*result) ->
op = unset_statement;
2490 if (!(*result)->data.unset)
2491 log_fatal (
"can't allocate variable name");
2492 strcpy ((*result) ->
data.unset, val);
2503 log_fatal (
"no memory for eval statement.");
2504 (*result) ->
op = eval_statement;
2511 "expecting data expression.");
2525 #ifdef ENABLE_EXECUTE 2529 log_fatal (
"no memory for execute statement.");
2530 (*result)->op = execute_statement;
2534 parse_warn(cfile,
"left parenthesis expected.");
2542 parse_warn(cfile,
"Expecting a quoted string.");
2548 (*result)->data.execute.command =
dmalloc(len + 1,
MDL);
2549 if ((*result)->data.execute.command == NULL)
2550 log_fatal(
"can't allocate command name");
2551 strcpy((*result)->data.execute.command, val);
2554 (*result)->
data.execute.argc = 0;
2558 log_fatal (
"can't allocate expression");
2564 "expecting expression.");
2572 (*result)->
data.execute.argc++;
2576 parse_warn(cfile,
"right parenthesis expected.");
2587 parse_warn(cfile,
"define ENABLE_EXECUTE in site.h to " 2588 "enable execute(); expressions.");
2599 log_fatal (
"no memory for return statement.");
2600 (*result) ->
op = return_statement;
2607 "expecting data expression.");
2625 log_fatal (
"no memory for log statement.");
2626 (*result) ->
op = log_statement;
2628 token =
next_token (&val, (
unsigned *)0, cfile);
2630 parse_warn (cfile,
"left parenthesis expected.");
2636 token =
peek_token (&val, (
unsigned *)0, cfile);
2638 if (token ==
FATAL) {
2639 (*result) ->
data.log.priority = log_priority_fatal;
2640 }
else if (token ==
ERROR) {
2641 (*result) ->
data.log.priority = log_priority_error;
2643 (*result) ->
data.log.priority = log_priority_debug;
2644 }
else if (token ==
INFO) {
2645 (*result) ->
data.log.priority = log_priority_info;
2647 (*result) ->
data.log.priority = log_priority_debug;
2652 token =
next_token (&val, (
unsigned *)0, cfile);
2653 if (token !=
COMMA) {
2662 (&(*result) ->
data.log.
expr, cfile, lose))) {
2668 token =
next_token (&val, (
unsigned *)0, cfile);
2670 parse_warn (cfile,
"right parenthesis expected.");
2676 token =
next_token (&val, (
unsigned *)0, cfile);
2677 if (token !=
SEMI) {
2697 log_fatal(
"no memory for execute statement.");
2698 (*result)->op = vendor_opt_statement;
2710 if (!zone ->
name) {
2718 i = strlen (zone ->
name);
2719 if (zone ->
name [i - 1] !=
'.') {
2722 parse_warn (cfile,
"no trailing '.' on zone");
2725 strcpy (s, zone ->
name);
2734 if (status != ISC_R_SUCCESS) {
2736 zone ->
name, isc_result_totext (status));
2755 option_name_hash_lookup(&
option,
2761 (result, cfile, 1,
option,
2762 supersede_option_statement);
2772 log_fatal (
"no memory for eval statement.");
2773 (*result) -> op = eval_statement;
2824 token =
next_token (&val, (
unsigned *)0, cfile);
2831 token =
peek_token (&val, (
unsigned *)0, cfile);
2834 if (zone -> primary) {
2836 "more than one primary.");
2841 log_fatal (
"can't allocate primary option cache.");
2842 oc = zone -> primary;
2846 if (zone -> secondary) {
2847 parse_warn (cfile,
"more than one secondary.");
2852 log_fatal (
"can't allocate secondary.");
2853 oc = zone -> secondary;
2860 "expecting IP addr or hostname.");
2882 token =
next_token (&val, (
unsigned *)0, cfile);
2883 }
while (token ==
COMMA);
2884 if (token !=
SEMI) {
2893 parse_warn(cfile,
"more than one primary6.");
2898 log_fatal(
"can't allocate primary6 option cache.");
2904 parse_warn(cfile,
"more than one secondary6.");
2938 }
while (token ==
COMMA);
2939 if (token !=
SEMI) {
2962 log_fatal(
"Multiple key definitions for zone %s.",
3003 isc_result_t status;
3007 if (omapi_auth_key_new (&
key,
MDL) != ISC_R_SUCCESS)
3010 token =
peek_token (&val, (
unsigned *)0, cfile);
3027 token =
next_token (&val, (
unsigned *)0, cfile);
3034 token =
next_token (&val, (
unsigned *)0, cfile);
3039 "key %s: too many algorithms",
3046 "expecting key algorithm name.");
3055 static char add [] =
".SIG-ALG.REG.INT.";
3084 parse_warn (cfile,
"key %s: too many secrets",
3089 memset (&ds, 0,
sizeof(ds));
3094 if (status != ISC_R_SUCCESS)
3096 memcpy (
key ->
key -> value,
3110 parse_warn (cfile,
"expecting right brace.");
3115 token =
peek_token (&val, (
unsigned *)0, cfile);
3116 if (token ==
SEMI) {
3122 if (status != ISC_R_SUCCESS) {
3124 key ->
name, isc_result_totext (status));
3127 omapi_auth_key_dereference (&
key,
MDL);
3133 omapi_auth_key_dereference (&
key,
MDL);
3146 struct parse *cfile;
3153 log_fatal (
"no memory for new statement.");
3154 (*result) -> op = on_statement;
3160 (*result) -> data.on.evtypes |=
ON_EXPIRY;
3164 (*result) -> data.on.evtypes |=
ON_COMMIT;
3176 parse_warn (cfile,
"expecting a lease event type");
3202 (
unsigned *)0, cfile);
3226 struct parse *cfile;
3233 log_fatal (
"no memory for new statement.");
3234 (*result) -> op = switch_statement;
3252 "expecting data or numeric expression.");
3270 (&(*result) -> data.s_switch.statements, cfile, lose,
3294 struct parse *cfile;
3302 log_fatal (
"no memory for new statement.");
3303 (*result) -> op = case_statement;
3306 cfile, lose, case_context,
3310 parse_warn (cfile,
"expecting %s expression.",
3312 ?
"data" :
"numeric"));
3341 struct parse *cfile;
3349 log_fatal (
"no memory for if statement.");
3351 (*result) -> op = if_statement;
3364 parse_warn (cfile,
"boolean expression expected.");
3369 #if defined (DEBUG_EXPRESSION_PARSE) 3375 parse_warn (cfile,
"expecting right paren.");
3395 (
unsigned *)0, cfile);
3419 "expecting if statement");
3425 parse_warn (cfile,
"left brace or if expected.");
3433 (&(*result) -> data.ie.fc,
3453 "expecting conditional.");
3477 struct parse *cfile;
3488 parse_warn (cfile,
"Expecting a boolean expression.");
3499 struct parse *cfile;
3505 if (!strcasecmp (val,
"true")
3506 || !strcasecmp (val,
"on"))
3508 else if (!strcasecmp (val,
"false")
3509 || !strcasecmp (val,
"off"))
3513 "boolean value (true/false/on/off) expected");
3544 struct parse *cfile;
3556 parse_warn (cfile,
"Expecting a data expression.");
3571 struct parse *cfile;
3583 parse_warn (cfile,
"Expecting a numeric expression.");
3594 struct parse *cfile;
3604 isc_result_t status;
3607 token =
peek_token (&val, (
unsigned *)0, cfile);
3613 token =
next_token (&val, (
unsigned *)0, cfile);
3621 if (!strcmp (col -> name, val))
3629 log_fatal (
"can't allocate expression");
3637 log_fatal (
"can't allocate expression");
3651 parse_warn (cfile,
"boolean expression expected");
3669 token =
next_token (&val, (
unsigned *)0, cfile);
3681 log_fatal (
"can't allocate expression");
3686 &(*expr)->data.option);
3687 if (status != ISC_R_SUCCESS ||
3688 (*expr)->data.option == NULL) {
3698 log_fatal (
"can't allocate expression");
3705 log_fatal (
"can't allocate expression");
3712 log_fatal (
"can't allocate expression");
3715 token =
next_token (&val, (
unsigned *)0, cfile);
3719 parse_warn (cfile,
"left parenthesis expected.");
3730 "expecting data expression.");
3737 token =
next_token (&val, (
unsigned *)0, cfile);
3738 if (token !=
COMMA) {
3752 "expecting numeric expression.");
3760 token =
next_token (&val, (
unsigned *)0, cfile);
3768 token =
next_token (&val, (
unsigned *)0, cfile);
3771 parse_warn (cfile,
"right parenthesis expected.");
3781 log_fatal (
"can't allocate expression");
3784 token =
next_token (&val, (
unsigned *)0, cfile);
3792 token =
next_token (&val, (
unsigned *)0, cfile);
3800 token =
next_token (&val, (
unsigned *)0, cfile);
3808 log_fatal (
"can't allocate expression");
3811 token =
next_token(&val, (
unsigned *)0, cfile);
3818 token =
next_token(&val, (
unsigned *)0, cfile);
3826 log_fatal (
"can't allocate expression");
3829 token =
next_token (&val, (
unsigned *)0, cfile);
3837 token =
next_token(&val, (
unsigned *)0, cfile);
3845 log_fatal (
"can't allocate expression");
3848 token =
next_token (&val, (
unsigned *)0, cfile);
3856 token =
next_token (&val, (
unsigned *)0, cfile);
3865 token =
next_token (&val, (
unsigned *)0, cfile);
3867 if (token ==
COMMA) {
3870 log_fatal (
"can't allocate at CONCAT2");
3877 goto concat_another;
3887 log_fatal (
"can't allocate expression");
3890 token =
next_token (&val, (
unsigned *)0, cfile);
3898 token =
next_token (&val, (
unsigned *)0, cfile);
3906 token =
next_token (&val, (
unsigned *)0, cfile);
3914 token =
next_token (&val, (
unsigned *)0, cfile);
3922 token =
next_token (&val, (
unsigned *)0, cfile);
3930 log_fatal (
"can't allocate expression");
3933 token =
next_token (&val, (
unsigned *)0, cfile);
3941 token =
next_token (&val, (
unsigned *)0, cfile);
3949 token =
next_token (&val, (
unsigned *)0, cfile);
3959 log_fatal (
"can't allocate expression");
3961 token =
next_token (&val, (
unsigned *)0, cfile);
3974 token =
next_token (&val, (
unsigned *)0, cfile);
3975 if (token ==
COMMA) {
3985 }
while (token ==
COMMA);
3995 log_fatal (
"can't allocate expression");
4003 &(*expr)->data.option);
4004 if (status != ISC_R_SUCCESS ||
4005 (*expr)->data.option == NULL) {
4015 log_fatal (
"can't allocate expression");
4022 log_fatal (
"can't allocate expression");
4029 log_fatal (
"can't allocate expression");
4036 log_fatal (
"can't allocate expression");
4043 log_fatal (
"can't allocate expression");
4050 log_fatal (
"can't allocate expression");
4057 log_fatal (
"can't allocate expression");
4064 log_fatal (
"can't allocate expression");
4071 log_fatal (
"can't allocate expression");
4074 token =
next_token (&val, (
unsigned *)0, cfile);
4082 token =
next_token (&val, (
unsigned *)0, cfile);
4090 token =
next_token (&val, (
unsigned *)0, cfile);
4099 log_fatal (
"can't make constant string expression.");
4104 token =
next_token (&val, (
unsigned *)0, cfile);
4106 parse_warn (cfile,
"left parenthesis expected.");
4112 log_fatal (
"can't allocate expression");
4118 "expecting data expression.");
4126 token =
next_token (&val, (
unsigned *)0, cfile);
4127 if (token !=
COMMA) {
4134 token =
next_token (&val, (
unsigned *)0, cfile);
4141 switch (atoi (val)) {
4156 "unsupported integer size %d", atoi (val));
4163 token =
next_token (&val, (
unsigned *)0, cfile);
4165 parse_warn (cfile,
"right parenthesis expected.");
4174 token =
next_token (&val, (
unsigned *)0, cfile);
4176 parse_warn (cfile,
"left parenthesis expected.");
4182 log_fatal (
"can't allocate expression");
4186 parse_warn (cfile,
"expecting numeric expression.");
4193 token =
next_token (&val, (
unsigned *)0, cfile);
4194 if (token !=
COMMA) {
4201 token =
next_token (&val, (
unsigned *)0, cfile);
4208 switch (atoi (val)) {
4223 "unsupported integer size %d", atoi (val));
4230 token =
next_token (&val, (
unsigned *)0, cfile);
4232 parse_warn (cfile,
"right parenthesis expected.");
4246 log_fatal (
"can't allocate expression");
4254 log_fatal (
"can't allocate expression");
4269 log_fatal (
"can't allocate expression");
4275 known = ISC_R_SUCCESS;
4283 known = ISC_R_NOTIMPLEMENTED;
4344 token =
next_token (&val, (
unsigned *)0, cfile);
4348 token =
next_token (&val, (
unsigned *)0, cfile);
4350 parse_warn (cfile,
"%s can't be a variable name", val);
4357 log_fatal (
"can't allocate expression");
4360 if (!(*expr)->data.variable)
4361 log_fatal (
"can't allocate variable name");
4363 token =
next_token (&val, (
unsigned *)0, cfile);
4393 parse_warn(cfile,
"Expecting quoted literal: " 4394 "\"foo.example.com\"");
4400 log_fatal(
"Error creating gethostbyname() internal " 4401 "record. (%s:%d)",
MDL);
4411 log_fatal (
"can't allocate expression");
4446 log_fatal (
"can't allocate variable name");
4450 token =
peek_token (&val, (
unsigned *)0, cfile);
4453 log_fatal (
"can't allocate expression");
4461 log_fatal (
"can't allocate expression");
4469 log_fatal (
"can't allocate expression");
4477 "expecting expression.");
4485 token =
next_token (&val, (
unsigned *)0, cfile);
4486 }
while (token ==
COMMA);
4488 parse_warn (cfile,
"Right parenthesis expected.");
4503 struct parse *cfile;
4532 "expecting right-hand side.");
4545 token =
peek_token (&val, (
unsigned *)0, cfile);
4549 token =
peek_token (&val, (
unsigned *)0, cfile);
4550 if (token !=
EQUAL) {
4551 parse_warn (cfile,
"! in boolean context without =");
4574 else if (token ==
EQUAL)
4577 parse_warn(cfile,
"expecting ~= or ~~ operator");
4587 parse_warn(cfile,
"No support for regex operator.");
4685 "expecting a subexpression");
4698 (rhs_context != lhs_context)) {
4699 parse_warn (cfile,
"illegal expression relating different types");
4714 parse_warn (cfile,
"expecting data/numeric expression");
4725 parse_warn(cfile,
"expecting data expression");
4743 parse_warn (cfile,
"expecting boolean expressions");
4761 parse_warn (cfile,
"expecting numeric expressions");
4779 log_fatal (
"Can't allocate expression!");
4781 (*expr) ->
op = binop;
4796 log_fatal (
"No memory for equal precedence combination.");
4814 struct parse *cfile;
4819 const char *fmt = NULL;
4835 if ((fmt != NULL) && (fmt !=
option->
format) && (*fmt ==
'a'))
4837 else if ((fmt == NULL) || (*fmt ==
'A'))
4841 if ((fmt[0] !=
'Z') && (tolower((
unsigned char)fmt[1]) ==
'a'))
4845 if ((*fmt ==
'A') || (*fmt ==
'a'))
4853 if (fmt[1] ==
'o') {
4864 if (token ==
SEMI) {
4874 uniform, lookups)) {
4875 if (fmt [1] !=
'o') {
4888 }
while (*fmt !=
'\0');
4890 if ((*fmt ==
'A') || (*fmt ==
'a')) {
4891 token =
peek_token (&val, (
unsigned *)0, cfile);
4893 if (token ==
COMMA) {
4899 if ((*fmt ==
'A') || (fmt[1] ==
'\0'))
4907 }
while ((*fmt ==
'A') || (*fmt ==
'a'));
4921 struct parse *cfile;
4924 enum statement_op op;
4931 token =
peek_token (&val, (
unsigned *)0, cfile);
4941 }
else if (token ==
EQUAL) {
4952 "expecting a data expression.");
4965 log_fatal (
"no memory for option statement.");
4970 log_fatal (
"no memory for option cache");
4980 struct parse *cfile;
4989 unsigned char buf [4];
4993 isc_boolean_t freeval = ISC_FALSE;
5001 if ((*fmt) [1] !=
'o') {
5014 g = strchr (*fmt,
'.');
5017 "malformed encapsulation format (bug!)");
5025 token =
peek_token (&val, (
unsigned *)0, cfile);
5029 if (!
parse_cshl (&t -> data.const_data, cfile)) {
5039 (
const unsigned char *)val,
5041 log_fatal (
"No memory for \"%s\"", val);
5043 if ((*fmt) [1] !=
'o') {
5045 "or hexadecimal data.");
5054 if ((*fmt)[1] ==
'c') {
5064 if ((*fmt)[1] !=
'o')
5074 parse_warn (cfile,
"not a valid domain name.");
5085 if ((*fmt) [1] !=
'o') {
5095 log_fatal (
"No memory for concatenation");
5096 if (freeval == ISC_TRUE) {
5098 freeval = ISC_FALSE;
5105 g = strchr (*fmt,
'.');
5108 "enumeration format");
5114 token =
next_token (&val, (
unsigned *)0, cfile);
5117 "identifier expected");
5161 token =
next_token (&val, (
unsigned *)0, cfile);
5171 token =
next_token (&val, (
unsigned *)0, cfile);
5175 if ((*fmt) [1] !=
'o') {
5189 token =
next_token (&val, (
unsigned *)0, cfile);
5199 token =
next_token (&val, (
unsigned *)0, cfile);
5208 token =
next_token (&val, (
unsigned *)0, cfile);
5210 if ((*fmt) [1] !=
'o')
5213 if ((*fmt) [1] !=
'o') {
5219 if (!strcasecmp (val,
"true")
5220 || !strcasecmp (val,
"on"))
5222 else if (!strcasecmp (val,
"false")
5223 || !strcasecmp (val,
"off"))
5225 else if (!strcasecmp (val,
"ignore"))
5228 if ((*fmt) [1] !=
'o')
5237 token =
peek_token (&val, (
unsigned *)0, cfile);
5238 if (token !=
SEMI) {
5253 parse_warn (cfile,
"Bad format '%c' in parse_option_token.",
5269 struct parse *cfile;
5274 u_int8_t hunkbuf [1024];
5275 unsigned hunkix = 0;
5276 const char *fmt, *f;
5280 const u_int8_t *cdp;
5288 isc_result_t status;
5291 if (status != ISC_R_SUCCESS ||
option == NULL)
5298 for (; *fmt; fmt++) {
5314 if (*fmt ==
'o' && fmt !=
option -> format)
5318 fmt = strchr (fmt,
'.');
5321 "malformed %s (bug!)",
5322 "encapsulation format");
5328 len =
parse_X (cfile, &hunkbuf [hunkix],
5329 sizeof hunkbuf - hunkix);
5336 if (token ==
SEMI && fmt[1] ==
'o') {
5344 "expecting string.");
5347 if (hunkix + len + 1 >
sizeof hunkbuf) {
5349 "option data buffer %s",
5353 memcpy (&hunkbuf [hunkix], val, len + 1);
5359 if (fmt[1] ==
'c') {
5367 if (express == NULL)
5379 if ((hunkix + len) >
sizeof(hunkbuf)) {
5384 memcpy(&hunkbuf[hunkix], cdp, len);
5392 fmt = strchr (fmt,
'.');
5395 "malformed %s (bug!)",
5396 "enumeration format");
5400 (
unsigned *)0, cfile);
5403 "identifier expected");
5437 if (hunkix + len >
sizeof hunkbuf) {
5439 "option data buffer %s",
5443 memcpy (&hunkbuf [hunkix], dp, len);
5450 (
unsigned *)0, cfile);
5455 "expecting number.");
5469 (
unsigned *)0, cfile);
5481 (
unsigned *)0, cfile);
5492 (
unsigned *)0, cfile);
5495 "expecting identifier.");
5502 if (!strcasecmp (val,
"true")
5503 || !strcasecmp (val,
"on"))
5505 else if (!strcasecmp (val,
"false")
5506 || !strcasecmp (val,
"off"))
5510 "expecting boolean.");
5518 token =
peek_token(&val, (
unsigned *)0, cfile);
5519 if (token !=
SEMI) {
5521 "semicolon expected.");
5529 log_error (
"parse_option_param: Bad format %c",
5534 token =
next_token (&val, (
unsigned *)0, cfile);
5535 }
while (*fmt && token ==
COMMA);
5537 if (token !=
SEMI) {
5544 log_fatal (
"no memory to store option declaration.");
5545 memcpy (bp ->
data, hunkbuf, hunkix + nul_term);
5548 log_fatal (
"out of memory allocating option cache.");
5550 (*oc) ->
data.buffer = bp;
5551 (*oc) ->
data.data = &bp ->
data [0];
5552 (*oc) ->
data.terminated = nul_term;
5553 (*oc) ->
data.len = hunkix;
5559 if (express != NULL)
5571 struct parse *cfile;
5586 "expecting hexadecimal constant.");
5593 "hexadecimal constant too long.");
5600 (
unsigned *)0, cfile);
5605 if (len + 1 > max) {
5606 parse_warn (cfile,
"string constant too long.");
5610 memcpy (buf, val, len + 1);
5612 parse_warn (cfile,
"expecting string or hexadecimal data");
5631 snprintf (fbuf,
sizeof fbuf,
"%s line %d: %s",
5634 va_start (list, fmt);
5635 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
5641 if (lix < (
sizeof lexbuf) - 1)
5642 lexbuf [lix++] =
' ';
5644 for (; lix < (
sizeof lexbuf) - 1 && (lix & 7); lix++)
5651 syslog (LOG_ERR,
"%s", mbuf);
5654 syslog (LOG_ERR,
"%s^", lexbuf);
5679 unsigned len, clen = 0;
5682 const unsigned char *dnptrs[256], **lastdnptr;
5684 memset(compbuf, 0,
sizeof(compbuf));
5685 memset(dnptrs, 0,
sizeof(dnptrs));
5686 dnptrs[0] = compbuf;
5687 lastdnptr = &dnptrs[255];
5698 parse_warn(cfile,
"Expecting a domain string.");
5707 sizeof(compbuf) - clen,
5711 parse_warn(cfile,
"Error compressing domain " 5719 sizeof(compbuf) - clen);
5735 while (compbuf[clen] != 0)
5736 clen += compbuf[clen] + 1;
5742 if (clen >
sizeof(compbuf))
5746 }
while (token ==
COMMA);
5749 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 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 *))
struct collection * collections
option_code_hash_t * code_hash
int dns_zone_allocate(struct dns_zone **ptr, const char *file, int line)
struct collection default_collection
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)