32static int get_char (
struct parse *);
33static void unget_char(
struct parse *,
int);
34static void skip_to_eol (
struct parse *);
54 return (ISC_R_NOMEMORY);
77 if (fstat(
file, &sb) < 0) {
78 status = ISC_R_IOERROR;
86 tmp->
inbuf = mmap(NULL, tmp->
bufsiz, PROT_READ, MAP_SHARED,
89 if (tmp->
inbuf == MAP_FAILED) {
90 status = ISC_R_IOERROR;
104 struct parse **cfile;
107 if ((*cfile)->file != -1) {
108 munmap((*cfile)->inbuf, (*cfile)->bufsiz);
109 close((*cfile)->file);
112 if ((*cfile)->saved_state != NULL) {
141 return ISC_R_NOMEMORY;
161#if defined(LDAP_CONFIGURATION)
163 size_t size = cfile->
bufsiz;
175#if defined(LDAP_CONFIGURATION)
182static int get_char (cfile)
189#if !defined(LDAP_CONFIGURATION)
192 if (cfile->read_function != NULL)
193 c = cfile->read_function(cfile);
214 }
else if (c != EOF) {
215 if (cfile->
lpos <= 80) {
230unget_char(
struct parse *cfile,
int c) {
261get_raw_token(
struct parse *cfile) {
271 c = get_char (cfile);
272 if (!((c ==
'\n') && cfile->
eol_token) &&
273 isascii(c) && isspace(c)) {
274 ttok = read_whitespace(c, cfile);
284 ttok = read_string (cfile);
287 if ((isascii (c) && isdigit (c)) || c ==
'-') {
290 ttok = read_number (c, cfile);
292 }
else if (isascii (c) && isalpha (c)) {
295 ttok = read_num_or_name (c, cfile);
297 }
else if (c == EOF) {
324get_next_token(
const char **rval,
unsigned *rlen,
328 if (cfile ->
token) {
336 rv = get_raw_token(cfile);
342 rv = get_raw_token(cfile);
348 *rval = cfile ->
tval;
350 *rlen = cfile ->
tlen;
352 fprintf (stderr,
"%s:%d ", cfile ->
tval, rv);
370 return get_next_token(rval, rlen, cfile,
ISC_FALSE);
381 return get_next_token(rval, rlen, cfile,
ISC_TRUE);
404 cfile->
token = get_raw_token(cfile);
419 *rval = cfile ->
tval;
421 *rlen = cfile ->
tlen;
423 fprintf (stderr,
"(%s:%d) ", cfile ->
tval, cfile ->
token);
425 return cfile ->
token;
458static void skip_to_eol (cfile)
463 c = get_char (cfile);
473read_whitespace(
int c,
struct parse *cfile) {
481 if (ofs >= (
sizeof(cfile->
tokbuf) - 1)) {
488 "whitespace too long, buffer overflow.");
495 }
while (!((c ==
'\n') && cfile->
eol_token) &&
496 isascii(c) && isspace(c));
501 unget_char(cfile, c);
506 cfile->
tokbuf[ofs] =
'\0';
521 for (i = 0; i <
sizeof cfile ->
tokbuf; i++) {
523 c = get_char (cfile);
531 cfile ->
tokbuf [i] =
'\t';
534 cfile ->
tokbuf [i] =
'\r';
537 cfile ->
tokbuf [i] =
'\n';
540 cfile ->
tokbuf [i] =
'\b';
562 if (c >=
'0' && c <=
'9') {
564 }
else if (c >=
'a' && c <=
'f') {
566 }
else if (c >=
'A' && c <=
'F') {
570 "invalid hex digit: %x",
581 if (c >=
'0' && c <=
'7') {
586 "invalid octal digit %x",
599 }
else if (c ==
'\\') {
609 if (i ==
sizeof cfile ->
tokbuf) {
611 "string constant larger than internal buffer");
627 cfile ->
tokbuf [i++] = c;
628 for (; i <
sizeof cfile ->
tokbuf; i++) {
629 c = get_char (cfile);
648 if((i == 2) && isxdigit(c) &&
649 (cfile->
tokbuf[0] ==
'0') &&
650 ((cfile->
tokbuf[1] ==
'x') ||
651 (cfile->
tokbuf[1] ==
'X'))) {
654 }
else if(((c ==
'-') || (c ==
'_') || isalnum(c))) {
664 unget_char(cfile, c);
674 if (i ==
sizeof cfile ->
tokbuf) {
676 "numeric token larger than internal buffer");
689 if ((i == 1) && (cfile->
tokbuf[i] ==
'-'))
695static enum dhcp_token read_num_or_name (c, cfile)
701 cfile ->
tokbuf [i++] = c;
702 for (; i <
sizeof cfile ->
tokbuf; i++) {
703 c = get_char (cfile);
705 (c !=
'-' && c !=
'_' && !isalnum (c))) {
706 unget_char(cfile, c);
713 if (i ==
sizeof cfile ->
tokbuf) {
714 parse_warn (cfile,
"token larger than internal buffer");
720 return intern(cfile->
tval, rv);
725 if (!isascii(atom[0]))
728 switch (tolower((
unsigned char)atom[0])) {
735 if (!strcasecmp(atom + 1,
"bandoned"))
737 if (!strcasecmp(atom + 1,
"ctive"))
739 if (!strncasecmp(atom + 1,
"dd", 2)) {
742 else if (!strcasecmp(atom + 3,
"ress"))
746 if (!strcasecmp(atom + 1,
"fter"))
748 if (isascii(atom[1]) &&
749 (tolower((
unsigned char)atom[1]) ==
'l')) {
750 if (!strcasecmp(atom + 2,
"gorithm"))
752 if (!strcasecmp(atom + 2,
"ias"))
754 if (isascii(atom[2]) &&
755 (tolower((
unsigned char)atom[2]) ==
'l')) {
758 else if (!strcasecmp(atom + 3,
"ow"))
762 if (!strcasecmp(atom + 2,
"so"))
766 if (isascii(atom[1]) &&
767 (tolower((
unsigned char)atom[1]) ==
'n')) {
768 if (!strcasecmp(atom + 2,
"d"))
770 if (!strcasecmp(atom + 2,
"ycast-mac"))
774 if (!strcasecmp(atom + 1,
"ppend"))
776 if (!strcasecmp(atom + 1,
"rray"))
778 if (isascii(atom[1]) &&
779 (tolower((
unsigned char)atom[1]) ==
't')) {
782 if (!strcasecmp(atom + 2,
"sfp"))
786 if (!strcasecmp(atom + 1,
"uthoring-byte-order"))
788 if (!strncasecmp(atom + 1,
"ut", 2)) {
789 if (isascii(atom[3]) &&
790 (tolower((
unsigned char)atom[3]) ==
'h')) {
791 if (!strncasecmp(atom + 4,
"enticat", 7)) {
792 if (!strcasecmp(atom + 11,
"ed"))
794 if (!strcasecmp(atom + 11,
"ion"))
798 if (!strcasecmp(atom + 4,
"oritative"))
802 if (!strcasecmp(atom + 3,
"o-partner-down"))
808 if (!strcasecmp (atom + 1,
"ackup"))
810 if (!strcasecmp (atom + 1,
"ootp"))
812 if (!strcasecmp (atom + 1,
"inding"))
814 if (!strcasecmp (atom + 1,
"inary-to-ascii"))
816 if (!strcasecmp (atom + 1,
"ackoff-cutoff"))
818 if (!strcasecmp (atom + 1,
"ooting"))
820 if (!strcasecmp (atom + 1,
"oot-unknown-clients"))
822 if (!strcasecmp (atom + 1,
"reak"))
824 if (!strcasecmp (atom + 1,
"illing"))
826 if (!strcasecmp (atom + 1,
"oolean"))
828 if (!strcasecmp (atom + 1,
"alance"))
830 if (!strcasecmp (atom + 1,
"ound"))
832 if (!strcasecmp(atom+1,
"ig-endian")) {
835 if (!strcasecmp (atom + 1,
"ootp-broadcast-always"))
839 if (!strcasecmp(atom + 1,
"ase"))
841 if (!strcasecmp(atom + 1,
"heck"))
843 if (!strcasecmp(atom + 1,
"iaddr"))
845 if (isascii(atom[1]) &&
846 tolower((
unsigned char)atom[1]) ==
'l') {
847 if (!strcasecmp(atom + 2,
"ass"))
849 if (!strncasecmp(atom + 2,
"ient", 4)) {
850 if (!strcasecmp(atom + 6,
"s"))
852 if (atom[6] ==
'-') {
853 if (!strcasecmp(atom + 7,
"hostname"))
855 if (!strcasecmp(atom + 7,
"identifier"))
857 if (!strcasecmp(atom + 7,
"state"))
859 if (!strcasecmp(atom + 7,
"updates"))
865 if (!strcasecmp(atom + 2,
"ose"))
867 if (!strcasecmp(atom + 2,
"tt"))
871 if (isascii(atom[1]) &&
872 tolower((
unsigned char)atom[1]) ==
'o') {
873 if (!strcasecmp(atom + 2,
"de"))
875 if (isascii(atom[2]) &&
876 tolower((
unsigned char)atom[2]) ==
'm') {
877 if (!strcasecmp(atom + 3,
"mit"))
879 if (!strcasecmp(atom + 3,
880 "munications-interrupted"))
882 if (!strcasecmp(atom + 3,
"pressed"))
886 if (isascii(atom[2]) &&
887 tolower((
unsigned char)atom[2]) ==
'n') {
888 if (!strcasecmp(atom + 3,
"cat"))
890 if (!strcasecmp(atom + 3,
"fig-option"))
892 if (!strcasecmp(atom + 3,
"flict-done"))
894 if (!strcasecmp(atom + 3,
"nect"))
900 if (!strcasecmp(atom + 1,
"reate"))
904 if (!strcasecmp(atom + 1,
"b-time-format"))
906 if (!strcasecmp (atom + 1,
"omain"))
908 if (!strncasecmp (atom + 1,
"omain-", 6)) {
909 if (!strcasecmp(atom + 7,
"name"))
911 if (!strcasecmp(atom + 7,
"list"))
914 if (!strcasecmp (atom + 1,
"o-forward-updates"))
917 if (!strcasecmp (atom + 1,
"o-forward-update"))
919 if (!strcasecmp (atom + 1,
"ebug"))
921 if (!strcasecmp (atom + 1,
"eny"))
923 if (!strcasecmp (atom + 1,
"eleted"))
925 if (!strcasecmp (atom + 1,
"elete"))
927 if (!strncasecmp (atom + 1,
"efault", 6)) {
930 if (!strcasecmp(atom + 7,
"-duid"))
932 if (!strcasecmp (atom + 7,
"-lease-time"))
936 if (!strncasecmp (atom + 1,
"ynamic", 6)) {
939 if (!strncasecmp (atom + 7,
"-bootp", 6)) {
942 if (!strcasecmp (atom + 13,
"-lease-cutoff"))
944 if (!strcasecmp (atom + 13,
"-lease-length"))
949 if (!strcasecmp (atom + 1,
"uplicates"))
951 if (!strcasecmp (atom + 1,
"eclines"))
953 if (!strncasecmp (atom + 1,
"efine", 5)) {
954 if (!strcasecmp (atom + 6,
"d"))
959 if (!strcasecmp (atom + 1,
"isconnect"))
963 if (isascii (atom [1]) &&
964 tolower((
unsigned char)atom[1]) ==
'x') {
965 if (!strcasecmp (atom + 2,
"tract-int"))
967 if (!strcasecmp (atom + 2,
"ists"))
969 if (!strcasecmp (atom + 2,
"piry"))
971 if (!strcasecmp (atom + 2,
"pire"))
973 if (!strcasecmp (atom + 2,
"pired"))
976 if (!strcasecmp (atom + 1,
"ncode-int"))
978 if (!strcasecmp(atom + 1,
"poch"))
980 if (!strcasecmp (atom + 1,
"thernet"))
982 if (!strcasecmp (atom + 1,
"nds"))
984 if (!strncasecmp (atom + 1,
"ls", 2)) {
985 if (!strcasecmp (atom + 3,
"e"))
987 if (!strcasecmp (atom + 3,
"if"))
991 if (!strcasecmp (atom + 1,
"rror"))
993 if (!strcasecmp (atom + 1,
"val"))
995 if (!strcasecmp (atom + 1,
"ncapsulate"))
997 if (!strcasecmp(atom + 1,
"xecute"))
999 if (!strcasecmp(atom+1,
"n")) {
1004 if (!strcasecmp (atom + 1,
"atal"))
1006 if (!strcasecmp (atom + 1,
"ilename"))
1008 if (!strcasecmp (atom + 1,
"ixed-address"))
1010 if (!strcasecmp (atom + 1,
"ixed-address6"))
1012 if (!strcasecmp (atom + 1,
"ixed-prefix6"))
1014 if (!strcasecmp (atom + 1,
"ddi"))
1016 if (!strcasecmp (atom + 1,
"ormerr"))
1018 if (!strcasecmp (atom + 1,
"unction"))
1020 if (!strcasecmp (atom + 1,
"ailover"))
1022 if (!strcasecmp (atom + 1,
"ree"))
1026 if (!strncasecmp(atom + 1,
"et", 2)) {
1027 if (!strcasecmp(atom + 3,
"-lease-hostnames"))
1029 if (!strcasecmp(atom + 3,
"hostbyname"))
1031 if (!strcasecmp(atom + 3,
"hostname"))
1035 if (!strcasecmp (atom + 1,
"iaddr"))
1037 if (!strcasecmp (atom + 1,
"roup"))
1041 if (!strcasecmp(atom + 1,
"ash"))
1043 if (!strcasecmp (atom + 1,
"ba"))
1045 if (!strcasecmp (atom + 1,
"ost"))
1047 if (!strcasecmp (atom + 1,
"ost-decl-name"))
1049 if (!strcasecmp(atom + 1,
"ost-identifier"))
1051 if (!strcasecmp (atom + 1,
"ardware"))
1053 if (!strcasecmp (atom + 1,
"ostname"))
1055 if (!strcasecmp (atom + 1,
"elp"))
1057 if (!strcasecmp (atom + 1,
"ex")) {
1062 if (!strcasecmp(atom+1,
"a-na"))
1064 if (!strcasecmp(atom+1,
"a-ta"))
1066 if (!strcasecmp(atom+1,
"a-pd"))
1068 if (!strcasecmp(atom+1,
"aaddr"))
1070 if (!strcasecmp(atom+1,
"aprefix"))
1072 if (!strcasecmp (atom + 1,
"nclude"))
1074 if (!strcasecmp (atom + 1,
"nteger"))
1076 if (!strcasecmp (atom + 1,
"nfiniband"))
1078 if (!strcasecmp (atom + 1,
"nfinite"))
1080 if (!strcasecmp (atom + 1,
"nfo"))
1082 if (!strcasecmp (atom + 1,
"p-address"))
1084 if (!strcasecmp (atom + 1,
"p6-address"))
1086 if (!strcasecmp (atom + 1,
"nitial-interval"))
1088 if (!strcasecmp (atom + 1,
"nitial-delay"))
1090 if (!strcasecmp (atom + 1,
"nterface"))
1092 if (!strcasecmp (atom + 1,
"dentifier"))
1094 if (!strcasecmp (atom + 1,
"f"))
1096 if (!strcasecmp (atom + 1,
"s"))
1098 if (!strcasecmp (atom + 1,
"gnore"))
1102 if (!strncasecmp (atom + 1,
"nown", 4)) {
1103 if (!strcasecmp (atom + 5,
"-clients"))
1109 if (!strcasecmp (atom + 1,
"ey"))
1111 if (!strcasecmp (atom + 1,
"ey-algorithm"))
1115 if (!strcasecmp (atom + 1,
"case"))
1117 if (!strcasecmp (atom + 1,
"ease"))
1119 if (!strcasecmp(atom + 1,
"ease6"))
1121 if (!strcasecmp (atom + 1,
"eased-address"))
1123 if (!strcasecmp (atom + 1,
"ease-time"))
1125 if (!strcasecmp(atom + 1,
"easequery"))
1127 if (!strcasecmp(atom + 1,
"ength"))
1129 if (!strcasecmp (atom + 1,
"imit"))
1131 if (!strcasecmp (atom + 1,
"et"))
1133 if (!strcasecmp (atom + 1,
"oad"))
1135 if (!strcasecmp(atom + 1,
"ocal"))
1137 if (!strcasecmp (atom + 1,
"og"))
1139 if (!strcasecmp(atom+1,
"lt")) {
1142 if (!strcasecmp(atom+1,
"l")) {
1145 if (!strcasecmp(atom+1,
"ittle-endian")) {
1148 if (!strcasecmp (atom + 1,
"ease-id-format")) {
1153 if (!strncasecmp (atom + 1,
"ax", 2)) {
1156 if (!strcasecmp (atom + 3,
"-balance"))
1158 if (!strncasecmp (atom + 3,
"-lease-", 7)) {
1159 if (!strcasecmp(atom + 10,
"misbalance"))
1161 if (!strcasecmp(atom + 10,
"ownership"))
1163 if (!strcasecmp(atom + 10,
"time"))
1166 if (!strcasecmp(atom + 3,
"-life"))
1168 if (!strcasecmp (atom + 3,
"-transmit-idle"))
1170 if (!strcasecmp (atom + 3,
"-response-delay"))
1172 if (!strcasecmp (atom + 3,
"-unacked-updates"))
1175 if (!strncasecmp (atom + 1,
"in-", 3)) {
1176 if (!strcasecmp (atom + 4,
"balance"))
1178 if (!strcasecmp (atom + 4,
"lease-time"))
1180 if (!strcasecmp (atom + 4,
"secs"))
1184 if (!strncasecmp (atom + 1,
"edi", 3)) {
1185 if (!strcasecmp (atom + 4,
"a"))
1187 if (!strcasecmp (atom + 4,
"um"))
1191 if (!strcasecmp (atom + 1,
"atch"))
1193 if (!strcasecmp (atom + 1,
"embers"))
1195 if (!strcasecmp (atom + 1,
"y"))
1197 if (!strcasecmp (atom + 1,
"clt"))
1201 if (!strcasecmp (atom + 1,
"ormal"))
1203 if (!strcasecmp (atom + 1,
"ameserver"))
1205 if (!strcasecmp (atom + 1,
"etmask"))
1207 if (!strcasecmp (atom + 1,
"ever"))
1209 if (!strcasecmp (atom + 1,
"ext-server"))
1211 if (!strcasecmp (atom + 1,
"ot"))
1213 if (!strcasecmp (atom + 1,
"o"))
1215 if (!strcasecmp (atom + 1,
"oerror"))
1217 if (!strcasecmp (atom + 1,
"otauth"))
1219 if (!strcasecmp (atom + 1,
"otimp"))
1221 if (!strcasecmp (atom + 1,
"otzone"))
1223 if (!strcasecmp (atom + 1,
"xdomain"))
1225 if (!strcasecmp (atom + 1,
"xrrset"))
1227 if (!strcasecmp (atom + 1,
"ull"))
1229 if (!strcasecmp (atom + 1,
"ext"))
1231 if (!strcasecmp (atom + 1,
"ew"))
1235 if (!strcasecmp (atom + 1,
"mapi"))
1237 if (!strcasecmp (atom + 1,
"r"))
1239 if (!strcasecmp (atom + 1,
"n"))
1241 if (!strcasecmp (atom + 1,
"pen"))
1243 if (!strcasecmp (atom + 1,
"ption"))
1245 if (!strcasecmp (atom + 1,
"ne-lease-per-client"))
1247 if (!strcasecmp (atom + 1,
"f"))
1249 if (!strcasecmp (atom + 1,
"wner"))
1251 if (!strcasecmp (atom + 1,
"ctal")) {
1256 if (!strcasecmp (atom + 1,
"arse-vendor-option"))
1258 if (!strcasecmp (atom + 1,
"repend"))
1260 if (!strcasecmp(atom + 1,
"referred-life"))
1262 if (!strcasecmp (atom + 1,
"acket"))
1264 if (!strcasecmp (atom + 1,
"ool"))
1266 if (!strcasecmp (atom + 1,
"ool6"))
1268 if (!strcasecmp (atom + 1,
"refix6"))
1270 if (!strcasecmp (atom + 1,
"seudo"))
1272 if (!strcasecmp (atom + 1,
"eer"))
1274 if (!strcasecmp (atom + 1,
"rimary"))
1276 if (!strcasecmp (atom + 1,
"rimary6"))
1278 if (!strncasecmp (atom + 1,
"artner", 6)) {
1281 if (!strcasecmp (atom + 7,
"-down"))
1284 if (!strcasecmp (atom + 1,
"ort"))
1286 if (!strcasecmp (atom + 1,
"otential-conflict"))
1288 if (!strcasecmp (atom + 1,
"ick-first-value") ||
1289 !strcasecmp (atom + 1,
"ick"))
1291 if (!strcasecmp (atom + 1,
"aused"))
1295 if (!strcasecmp(atom + 1,
"ange"))
1297 if (!strcasecmp(atom + 1,
"ange6"))
1299 if (isascii(atom[1]) &&
1300 (tolower((
unsigned char)atom[1]) ==
'e')) {
1301 if (!strcasecmp(atom + 2,
"bind"))
1303 if (!strcasecmp(atom + 2,
"boot"))
1305 if (!strcasecmp(atom + 2,
"contact-interval"))
1307 if (!strncasecmp(atom + 2,
"cover", 5)) {
1308 if (atom[7] ==
'\0')
1310 if (!strcasecmp(atom + 7,
"-done"))
1312 if (!strcasecmp(atom + 7,
"-wait"))
1316 if (!strcasecmp(atom + 2,
"fresh"))
1318 if (!strcasecmp(atom + 2,
"fused"))
1320 if (!strcasecmp(atom + 2,
"ject"))
1322 if (!strcasecmp(atom + 2,
"lease"))
1324 if (!strcasecmp(atom + 2,
"leased"))
1326 if (!strcasecmp(atom + 2,
"move"))
1328 if (!strcasecmp(atom + 2,
"new"))
1330 if (!strcasecmp(atom + 2,
"quest"))
1332 if (!strcasecmp(atom + 2,
"quire"))
1334 if (isascii(atom[2]) &&
1335 (tolower((
unsigned char)atom[2]) ==
's')) {
1336 if (!strcasecmp(atom + 3,
"erved"))
1338 if (!strcasecmp(atom + 3,
"et"))
1340 if (!strcasecmp(atom + 3,
1341 "olution-interrupted"))
1345 if (!strcasecmp(atom + 2,
"try"))
1347 if (!strcasecmp(atom + 2,
"turn"))
1349 if (!strcasecmp(atom + 2,
"verse"))
1351 if (!strcasecmp(atom + 2,
"wind"))
1357 if (!strcasecmp(atom + 1,
"cript"))
1359 if (isascii(atom[1]) &&
1360 tolower((
unsigned char)atom[1]) ==
'e') {
1361 if (!strcasecmp(atom + 2,
"arch"))
1363 if (isascii(atom[2]) &&
1364 tolower((
unsigned char)atom[2]) ==
'c') {
1365 if (!strncasecmp(atom + 3,
"ond", 3)) {
1366 if (!strcasecmp(atom + 6,
"ary"))
1368 if (!strcasecmp(atom + 6,
"ary6"))
1370 if (!strcasecmp(atom + 6,
"s"))
1374 if (!strcasecmp(atom + 3,
"ret"))
1378 if (!strncasecmp(atom + 2,
"lect", 4)) {
1379 if (atom[6] ==
'\0')
1381 if (!strcasecmp(atom + 6,
"-timeout"))
1385 if (!strcasecmp(atom + 2,
"nd"))
1387 if (!strncasecmp(atom + 2,
"rv", 2)) {
1388 if (!strncasecmp(atom + 4,
"er", 2)) {
1389 if (atom[6] ==
'\0')
1391 if (atom[6] ==
'-') {
1392 if (!strcasecmp(atom + 7,
1395 if (!strcasecmp(atom + 7,
1398 if (!strcasecmp(atom + 7,
1405 if (!strcasecmp(atom + 4,
"fail"))
1409 if (!strcasecmp(atom + 2,
"t"))
1413 if (isascii(atom[1]) &&
1414 tolower((
unsigned char)atom[1]) ==
'h') {
1415 if (!strcasecmp(atom + 2,
"ared-network"))
1417 if (!strcasecmp(atom + 2,
"utdown"))
1421 if (isascii(atom[1]) &&
1422 tolower((
unsigned char)atom[1]) ==
'i') {
1423 if (!strcasecmp(atom + 2,
"addr"))
1425 if (!strcasecmp(atom + 2,
"gned"))
1427 if (!strcasecmp(atom + 2,
"ze"))
1431 if (isascii(atom[1]) &&
1432 tolower((
unsigned char)atom[1]) ==
'p') {
1433 if (isascii(atom[2]) &&
1434 tolower((
unsigned char)atom[2]) ==
'a') {
1435 if (!strcasecmp(atom + 3,
"ce"))
1437 if (!strcasecmp(atom + 3,
"wn"))
1441 if (!strcasecmp(atom + 2,
"lit"))
1445 if (isascii(atom[1]) &&
1446 tolower((
unsigned char)atom[1]) ==
't') {
1447 if (isascii(atom[2]) &&
1448 tolower((
unsigned char)atom[2]) ==
'a') {
1449 if(!strncasecmp(atom + 3,
"rt", 2)) {
1450 if (!strcasecmp(atom + 5,
"s"))
1452 if (!strcasecmp(atom + 5,
"up"))
1456 if (isascii(atom[3]) &&
1457 tolower((
unsigned char)atom[3]) ==
't') {
1458 if (!strcasecmp(atom + 4,
"e"))
1460 if (!strcasecmp(atom + 4,
"ic"))
1465 if (!strcasecmp(atom + 2,
"ring"))
1469 if (!strncasecmp(atom + 1,
"ub", 2)) {
1470 if (!strcasecmp(atom + 3,
"class"))
1472 if (!strcasecmp(atom + 3,
"net"))
1474 if (!strcasecmp(atom + 3,
"net6"))
1476 if (!strcasecmp(atom + 3,
"string"))
1480 if (isascii(atom[1]) &&
1481 tolower((
unsigned char)atom[1]) ==
'u') {
1482 if (!strcasecmp(atom + 2,
"ffix"))
1484 if (!strcasecmp(atom + 2,
"persede"))
1487 if (!strcasecmp(atom + 1,
"witch"))
1491 if (!strcasecmp (atom + 1,
"imestamp"))
1493 if (!strcasecmp (atom + 1,
"imeout"))
1495 if (!strcasecmp (atom + 1,
"oken-ring"))
1497 if (!strcasecmp (atom + 1,
"ext"))
1499 if (!strcasecmp (atom + 1,
"stp"))
1501 if (!strcasecmp (atom + 1,
"sfp"))
1503 if (!strcasecmp (atom + 1,
"ransmission"))
1505 if (!strcasecmp(atom + 1,
"emporary"))
1509 if (!strcasecmp (atom + 1,
"case"))
1511 if (!strcasecmp (atom + 1,
"nset"))
1513 if (!strcasecmp (atom + 1,
"nsigned"))
1515 if (!strcasecmp (atom + 1,
"id"))
1517 if (!strncasecmp (atom + 1,
"se", 2)) {
1518 if (!strcasecmp (atom + 3,
"r-class"))
1520 if (!strcasecmp (atom + 3,
"-host-decl-names"))
1522 if (!strcasecmp (atom + 3,
1523 "-lease-addr-for-default-route"))
1527 if (!strncasecmp (atom + 1,
"nknown", 6)) {
1528 if (!strcasecmp (atom + 7,
"-clients"))
1530 if (!strcasecmp (atom + 7,
"-state"))
1536 if (!strcasecmp (atom + 1,
"nauthenticated"))
1538 if (!strcasecmp (atom + 1,
"pdate"))
1542 if (!strcasecmp (atom + 1,
"6relay"))
1544 if (!strcasecmp (atom + 1,
"6relopt"))
1546 if (!strcasecmp (atom + 1,
"endor-class"))
1548 if (!strcasecmp (atom + 1,
"endor"))
1552 if (!strcasecmp (atom + 1,
"ith"))
1554 if (!strcasecmp(atom + 1,
"idth"))
1558 if (!strcasecmp (atom + 1,
"iaddr"))
1560 if (!strcasecmp (atom + 1,
"xdomain"))
1562 if (!strcasecmp (atom + 1,
"xrrset"))
1566 if (!strcasecmp (atom + 1,
"erolen"))
1568 if (!strcasecmp (atom + 1,
"one"))
enum dhcp_token next_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token peek_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token peek_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token next_token(const char **rval, unsigned *rlen, struct parse *cfile)
isc_result_t end_parse(struct parse **cfile)
isc_result_t new_parse(struct parse **cfile, int file, char *inbuf, unsigned buflen, const char *name, int eolp)
enum dhcp_token do_peek_token(const char **rval, unsigned int *rlen, struct parse *cfile, isc_boolean_t raw)
isc_result_t save_parse_state(struct parse *cfile)
isc_result_t restore_parse_state(struct parse *cfile)
int parse_warn(struct parse *cfile, const char *fmt,...)
@ USE_LEASE_ADDR_FOR_DEFAULT_ROUTE
@ DYNAMIC_BOOTP_LEASE_CUTOFF
@ DYNAMIC_BOOTP_LEASE_LENGTH
@ COMMUNICATIONS_INTERRUPTED
void * dmalloc(size_t, const char *, int)
void dfree(void *, const char *, int)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
struct parse * saved_state