32 static int get_char (
struct parse *);
33 static void unget_char(
struct parse *,
int);
34 static void skip_to_eol (
struct parse *);
49 isc_result_t status = ISC_R_SUCCESS;
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;
96 return (ISC_R_SUCCESS);
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) {
118 return ISC_R_SUCCESS;
141 return ISC_R_NOMEMORY;
144 return ISC_R_SUCCESS;
163 memcpy(cfile, saved_state,
sizeof(*cfile));
165 return ISC_R_SUCCESS;
168 static int get_char (cfile)
175 #if !defined(LDAP_CONFIGURATION) 178 if (cfile->read_function != NULL)
179 c = cfile->read_function(cfile);
200 }
else if (c != EOF) {
201 if (cfile->
lpos <= 80) {
216 unget_char(
struct parse *cfile,
int c) {
247 get_raw_token(
struct parse *cfile) {
257 c = get_char (cfile);
258 if (!((c ==
'\n') && cfile->
eol_token) &&
259 isascii(c) && isspace(c)) {
260 ttok = read_whitespace(c, cfile);
270 ttok = read_string (cfile);
273 if ((isascii (c) && isdigit (c)) || c ==
'-') {
276 ttok = read_number (c, cfile);
278 }
else if (isascii (c) && isalpha (c)) {
281 ttok = read_num_or_name (c, cfile);
283 }
else if (c == EOF) {
310 get_next_token(
const char **rval,
unsigned *rlen,
311 struct parse *cfile, isc_boolean_t raw) {
314 if (cfile ->
token) {
322 rv = get_raw_token(cfile);
328 rv = get_raw_token(cfile);
334 *rval = cfile ->
tval;
336 *rlen = cfile ->
tlen;
338 fprintf (stderr,
"%s:%d ", cfile ->
tval, rv);
356 return get_next_token(rval, rlen, cfile, ISC_FALSE);
367 return get_next_token(rval, rlen, cfile, ISC_TRUE);
382 struct parse *cfile, isc_boolean_t raw) {
390 cfile->
token = get_raw_token(cfile);
405 *rval = cfile ->
tval;
407 *rlen = cfile ->
tlen;
409 fprintf (stderr,
"(%s:%d) ", cfile ->
tval, cfile ->
token);
411 return cfile ->
token;
444 static void skip_to_eol (cfile)
449 c = get_char (cfile);
459 read_whitespace(
int c,
struct parse *cfile) {
467 if (ofs >=
sizeof(cfile->
tokbuf)) {
474 "whitespace too long, buffer overflow.");
479 }
while (!((c ==
'\n') && cfile->
eol_token) &&
480 isascii(c) && isspace(c));
485 unget_char(cfile, c);
490 cfile->
tokbuf[ofs] =
'\0';
505 for (i = 0; i <
sizeof cfile ->
tokbuf; i++) {
507 c = get_char (cfile);
515 cfile ->
tokbuf [i] =
'\t';
518 cfile ->
tokbuf [i] =
'\r';
521 cfile ->
tokbuf [i] =
'\n';
524 cfile ->
tokbuf [i] =
'\b';
546 if (c >=
'0' && c <=
'9') {
547 value = value * 16 + (c -
'0');
548 }
else if (c >=
'a' && c <=
'f') {
549 value = value * 16 + (c -
'a' + 10);
550 }
else if (c >=
'A' && c <=
'F') {
551 value = value * 16 + (c -
'A' + 10);
554 "invalid hex digit: %x",
560 cfile ->
tokbuf [i] = value;
565 if (c >=
'0' && c <=
'7') {
566 value = value * 8 + (c -
'0');
570 "invalid octal digit %x",
578 cfile ->
tokbuf [i] = value;
583 }
else if (c ==
'\\') {
593 if (i ==
sizeof cfile ->
tokbuf) {
595 "string constant larger than internal buffer");
611 cfile ->
tokbuf [i++] = c;
612 for (; i <
sizeof cfile ->
tokbuf; i++) {
613 c = get_char (cfile);
620 switch(isascii(c) ? token :
BREAK) {
632 if((i == 2) && isxdigit(c) &&
633 (cfile->
tokbuf[0] ==
'0') &&
634 ((cfile->
tokbuf[1] ==
'x') ||
635 (cfile->
tokbuf[1] ==
'X'))) {
638 }
else if(((c ==
'-') || (c ==
'_') || isalnum(c))) {
648 unget_char(cfile, c);
658 if (i ==
sizeof cfile ->
tokbuf) {
660 "numeric token larger than internal buffer");
673 if ((i == 1) && (cfile->
tokbuf[i] ==
'-'))
679 static enum dhcp_token read_num_or_name (c, cfile)
685 cfile ->
tokbuf [i++] = c;
686 for (; i <
sizeof cfile ->
tokbuf; i++) {
687 c = get_char (cfile);
689 (c !=
'-' && c !=
'_' && !isalnum (c))) {
690 unget_char(cfile, c);
697 if (i ==
sizeof cfile ->
tokbuf) {
698 parse_warn (cfile,
"token larger than internal buffer");
704 return intern(cfile->
tval, rv);
709 if (!isascii(atom[0]))
712 switch (tolower((
unsigned char)atom[0])) {
719 if (!strcasecmp(atom + 1,
"bandoned"))
721 if (!strcasecmp(atom + 1,
"ctive"))
723 if (!strncasecmp(atom + 1,
"dd", 2)) {
726 else if (!strcasecmp(atom + 3,
"ress"))
730 if (!strcasecmp(atom + 1,
"fter"))
732 if (isascii(atom[1]) &&
733 (tolower((
unsigned char)atom[1]) ==
'l')) {
734 if (!strcasecmp(atom + 2,
"gorithm"))
736 if (!strcasecmp(atom + 2,
"ias"))
738 if (isascii(atom[2]) &&
739 (tolower((
unsigned char)atom[2]) ==
'l')) {
742 else if (!strcasecmp(atom + 3,
"ow"))
746 if (!strcasecmp(atom + 2,
"so"))
750 if (isascii(atom[1]) &&
751 (tolower((
unsigned char)atom[1]) ==
'n')) {
752 if (!strcasecmp(atom + 2,
"d"))
754 if (!strcasecmp(atom + 2,
"ycast-mac"))
758 if (!strcasecmp(atom + 1,
"ppend"))
760 if (!strcasecmp(atom + 1,
"rray"))
762 if (isascii(atom[1]) &&
763 (tolower((
unsigned char)atom[1]) ==
't')) {
766 if (!strcasecmp(atom + 2,
"sfp"))
770 if (!strncasecmp(atom + 1,
"ut", 2)) {
771 if (isascii(atom[3]) &&
772 (tolower((
unsigned char)atom[3]) ==
'h')) {
773 if (!strncasecmp(atom + 4,
"enticat", 7)) {
774 if (!strcasecmp(atom + 11,
"ed"))
776 if (!strcasecmp(atom + 11,
"ion"))
780 if (!strcasecmp(atom + 4,
"oritative"))
784 if (!strcasecmp(atom + 3,
"o-partner-down"))
790 if (!strcasecmp (atom + 1,
"ackup"))
792 if (!strcasecmp (atom + 1,
"ootp"))
794 if (!strcasecmp (atom + 1,
"inding"))
796 if (!strcasecmp (atom + 1,
"inary-to-ascii"))
798 if (!strcasecmp (atom + 1,
"ackoff-cutoff"))
800 if (!strcasecmp (atom + 1,
"ooting"))
802 if (!strcasecmp (atom + 1,
"oot-unknown-clients"))
804 if (!strcasecmp (atom + 1,
"reak"))
806 if (!strcasecmp (atom + 1,
"illing"))
808 if (!strcasecmp (atom + 1,
"oolean"))
810 if (!strcasecmp (atom + 1,
"alance"))
812 if (!strcasecmp (atom + 1,
"ound"))
814 if (!strcasecmp (atom + 1,
"ootp-broadcast-always"))
818 if (!strcasecmp(atom + 1,
"ase"))
820 if (!strcasecmp(atom + 1,
"heck"))
822 if (!strcasecmp(atom + 1,
"iaddr"))
824 if (isascii(atom[1]) &&
825 tolower((
unsigned char)atom[1]) ==
'l') {
826 if (!strcasecmp(atom + 2,
"ass"))
828 if (!strncasecmp(atom + 2,
"ient", 4)) {
829 if (!strcasecmp(atom + 6,
"s"))
831 if (atom[6] ==
'-') {
832 if (!strcasecmp(atom + 7,
"hostname"))
834 if (!strcasecmp(atom + 7,
"identifier"))
836 if (!strcasecmp(atom + 7,
"state"))
838 if (!strcasecmp(atom + 7,
"updates"))
844 if (!strcasecmp(atom + 2,
"ose"))
846 if (!strcasecmp(atom + 2,
"tt"))
850 if (isascii(atom[1]) &&
851 tolower((
unsigned char)atom[1]) ==
'o') {
852 if (!strcasecmp(atom + 2,
"de"))
854 if (isascii(atom[2]) &&
855 tolower((
unsigned char)atom[2]) ==
'm') {
856 if (!strcasecmp(atom + 3,
"mit"))
858 if (!strcasecmp(atom + 3,
859 "munications-interrupted"))
861 if (!strcasecmp(atom + 3,
"pressed"))
865 if (isascii(atom[2]) &&
866 tolower((
unsigned char)atom[2]) ==
'n') {
867 if (!strcasecmp(atom + 3,
"cat"))
869 if (!strcasecmp(atom + 3,
"fig-option"))
871 if (!strcasecmp(atom + 3,
"flict-done"))
873 if (!strcasecmp(atom + 3,
"nect"))
879 if (!strcasecmp(atom + 1,
"reate"))
883 if (!strcasecmp(atom + 1,
"b-time-format"))
885 if (!strcasecmp (atom + 1,
"omain"))
887 if (!strncasecmp (atom + 1,
"omain-", 6)) {
888 if (!strcasecmp(atom + 7,
"name"))
890 if (!strcasecmp(atom + 7,
"list"))
893 if (!strcasecmp (atom + 1,
"o-forward-updates"))
895 if (!strcasecmp (atom + 1,
"ebug"))
897 if (!strcasecmp (atom + 1,
"eny"))
899 if (!strcasecmp (atom + 1,
"eleted"))
901 if (!strcasecmp (atom + 1,
"elete"))
903 if (!strncasecmp (atom + 1,
"efault", 6)) {
906 if (!strcasecmp(atom + 7,
"-duid"))
908 if (!strcasecmp (atom + 7,
"-lease-time"))
912 if (!strncasecmp (atom + 1,
"ynamic", 6)) {
915 if (!strncasecmp (atom + 7,
"-bootp", 6)) {
918 if (!strcasecmp (atom + 13,
"-lease-cutoff"))
920 if (!strcasecmp (atom + 13,
"-lease-length"))
925 if (!strcasecmp (atom + 1,
"uplicates"))
927 if (!strcasecmp (atom + 1,
"eclines"))
929 if (!strncasecmp (atom + 1,
"efine", 5)) {
930 if (!strcasecmp (atom + 6,
"d"))
937 if (isascii (atom [1]) &&
938 tolower((
unsigned char)atom[1]) ==
'x') {
939 if (!strcasecmp (atom + 2,
"tract-int"))
941 if (!strcasecmp (atom + 2,
"ists"))
943 if (!strcasecmp (atom + 2,
"piry"))
945 if (!strcasecmp (atom + 2,
"pire"))
947 if (!strcasecmp (atom + 2,
"pired"))
950 if (!strcasecmp (atom + 1,
"ncode-int"))
952 if (!strcasecmp(atom + 1,
"poch"))
954 if (!strcasecmp (atom + 1,
"thernet"))
956 if (!strcasecmp (atom + 1,
"nds"))
958 if (!strncasecmp (atom + 1,
"ls", 2)) {
959 if (!strcasecmp (atom + 3,
"e"))
961 if (!strcasecmp (atom + 3,
"if"))
965 if (!strcasecmp (atom + 1,
"rror"))
967 if (!strcasecmp (atom + 1,
"val"))
969 if (!strcasecmp (atom + 1,
"ncapsulate"))
971 if (!strcasecmp(atom + 1,
"xecute"))
973 if (!strcasecmp(atom+1,
"n")) {
978 if (!strcasecmp (atom + 1,
"atal"))
980 if (!strcasecmp (atom + 1,
"ilename"))
982 if (!strcasecmp (atom + 1,
"ixed-address"))
984 if (!strcasecmp (atom + 1,
"ixed-address6"))
986 if (!strcasecmp (atom + 1,
"ixed-prefix6"))
988 if (!strcasecmp (atom + 1,
"ddi"))
990 if (!strcasecmp (atom + 1,
"ormerr"))
992 if (!strcasecmp (atom + 1,
"unction"))
994 if (!strcasecmp (atom + 1,
"ailover"))
996 if (!strcasecmp (atom + 1,
"ree"))
1000 if (!strncasecmp(atom + 1,
"et", 2)) {
1001 if (!strcasecmp(atom + 3,
"-lease-hostnames"))
1003 if (!strcasecmp(atom + 3,
"hostbyname"))
1005 if (!strcasecmp(atom + 3,
"hostname"))
1009 if (!strcasecmp (atom + 1,
"iaddr"))
1011 if (!strcasecmp (atom + 1,
"roup"))
1015 if (!strcasecmp(atom + 1,
"ash"))
1017 if (!strcasecmp (atom + 1,
"ba"))
1019 if (!strcasecmp (atom + 1,
"ost"))
1021 if (!strcasecmp (atom + 1,
"ost-decl-name"))
1023 if (!strcasecmp(atom + 1,
"ost-identifier"))
1025 if (!strcasecmp (atom + 1,
"ardware"))
1027 if (!strcasecmp (atom + 1,
"ostname"))
1029 if (!strcasecmp (atom + 1,
"elp"))
1033 if (!strcasecmp(atom+1,
"a-na"))
1035 if (!strcasecmp(atom+1,
"a-ta"))
1037 if (!strcasecmp(atom+1,
"a-pd"))
1039 if (!strcasecmp(atom+1,
"aaddr"))
1041 if (!strcasecmp(atom+1,
"aprefix"))
1043 if (!strcasecmp (atom + 1,
"nclude"))
1045 if (!strcasecmp (atom + 1,
"nteger"))
1047 if (!strcasecmp (atom + 1,
"nfiniband"))
1049 if (!strcasecmp (atom + 1,
"nfinite"))
1051 if (!strcasecmp (atom + 1,
"nfo"))
1053 if (!strcasecmp (atom + 1,
"p-address"))
1055 if (!strcasecmp (atom + 1,
"p6-address"))
1057 if (!strcasecmp (atom + 1,
"nitial-interval"))
1059 if (!strcasecmp (atom + 1,
"nitial-delay"))
1061 if (!strcasecmp (atom + 1,
"nterface"))
1063 if (!strcasecmp (atom + 1,
"dentifier"))
1065 if (!strcasecmp (atom + 1,
"f"))
1067 if (!strcasecmp (atom + 1,
"s"))
1069 if (!strcasecmp (atom + 1,
"gnore"))
1073 if (!strncasecmp (atom + 1,
"nown", 4)) {
1074 if (!strcasecmp (atom + 5,
"-clients"))
1080 if (!strcasecmp (atom + 1,
"ey"))
1084 if (!strcasecmp (atom + 1,
"case"))
1086 if (!strcasecmp (atom + 1,
"ease"))
1088 if (!strcasecmp(atom + 1,
"ease6"))
1090 if (!strcasecmp (atom + 1,
"eased-address"))
1092 if (!strcasecmp (atom + 1,
"ease-time"))
1094 if (!strcasecmp(atom + 1,
"easequery"))
1096 if (!strcasecmp(atom + 1,
"ength"))
1098 if (!strcasecmp (atom + 1,
"imit"))
1100 if (!strcasecmp (atom + 1,
"et"))
1102 if (!strcasecmp (atom + 1,
"oad"))
1104 if (!strcasecmp(atom + 1,
"ocal"))
1106 if (!strcasecmp (atom + 1,
"og"))
1108 if (!strcasecmp(atom+1,
"lt")) {
1111 if (!strcasecmp(atom+1,
"l")) {
1116 if (!strncasecmp (atom + 1,
"ax", 2)) {
1119 if (!strcasecmp (atom + 3,
"-balance"))
1121 if (!strncasecmp (atom + 3,
"-lease-", 7)) {
1122 if (!strcasecmp(atom + 10,
"misbalance"))
1124 if (!strcasecmp(atom + 10,
"ownership"))
1126 if (!strcasecmp(atom + 10,
"time"))
1129 if (!strcasecmp(atom + 3,
"-life"))
1131 if (!strcasecmp (atom + 3,
"-transmit-idle"))
1133 if (!strcasecmp (atom + 3,
"-response-delay"))
1135 if (!strcasecmp (atom + 3,
"-unacked-updates"))
1138 if (!strncasecmp (atom + 1,
"in-", 3)) {
1139 if (!strcasecmp (atom + 4,
"balance"))
1141 if (!strcasecmp (atom + 4,
"lease-time"))
1143 if (!strcasecmp (atom + 4,
"secs"))
1147 if (!strncasecmp (atom + 1,
"edi", 3)) {
1148 if (!strcasecmp (atom + 4,
"a"))
1150 if (!strcasecmp (atom + 4,
"um"))
1154 if (!strcasecmp (atom + 1,
"atch"))
1156 if (!strcasecmp (atom + 1,
"embers"))
1158 if (!strcasecmp (atom + 1,
"y"))
1160 if (!strcasecmp (atom + 1,
"clt"))
1164 if (!strcasecmp (atom + 1,
"ormal"))
1166 if (!strcasecmp (atom + 1,
"ameserver"))
1168 if (!strcasecmp (atom + 1,
"etmask"))
1170 if (!strcasecmp (atom + 1,
"ever"))
1172 if (!strcasecmp (atom + 1,
"ext-server"))
1174 if (!strcasecmp (atom + 1,
"ot"))
1176 if (!strcasecmp (atom + 1,
"o"))
1178 if (!strcasecmp (atom + 1,
"oerror"))
1180 if (!strcasecmp (atom + 1,
"otauth"))
1182 if (!strcasecmp (atom + 1,
"otimp"))
1184 if (!strcasecmp (atom + 1,
"otzone"))
1186 if (!strcasecmp (atom + 1,
"xdomain"))
1188 if (!strcasecmp (atom + 1,
"xrrset"))
1190 if (!strcasecmp (atom + 1,
"ull"))
1192 if (!strcasecmp (atom + 1,
"ext"))
1194 if (!strcasecmp (atom + 1,
"ew"))
1198 if (!strcasecmp (atom + 1,
"mapi"))
1200 if (!strcasecmp (atom + 1,
"r"))
1202 if (!strcasecmp (atom + 1,
"n"))
1204 if (!strcasecmp (atom + 1,
"pen"))
1206 if (!strcasecmp (atom + 1,
"ption"))
1208 if (!strcasecmp (atom + 1,
"ne-lease-per-client"))
1210 if (!strcasecmp (atom + 1,
"f"))
1212 if (!strcasecmp (atom + 1,
"wner"))
1216 if (!strcasecmp (atom + 1,
"repend"))
1218 if (!strcasecmp(atom + 1,
"referred-life"))
1220 if (!strcasecmp (atom + 1,
"acket"))
1222 if (!strcasecmp (atom + 1,
"ool"))
1224 if (!strcasecmp (atom + 1,
"ool6"))
1226 if (!strcasecmp (atom + 1,
"refix6"))
1228 if (!strcasecmp (atom + 1,
"seudo"))
1230 if (!strcasecmp (atom + 1,
"eer"))
1232 if (!strcasecmp (atom + 1,
"rimary"))
1234 if (!strcasecmp (atom + 1,
"rimary6"))
1236 if (!strncasecmp (atom + 1,
"artner", 6)) {
1239 if (!strcasecmp (atom + 7,
"-down"))
1242 if (!strcasecmp (atom + 1,
"ort"))
1244 if (!strcasecmp (atom + 1,
"otential-conflict"))
1246 if (!strcasecmp (atom + 1,
"ick-first-value") ||
1247 !strcasecmp (atom + 1,
"ick"))
1249 if (!strcasecmp (atom + 1,
"aused"))
1253 if (!strcasecmp(atom + 1,
"ange"))
1255 if (!strcasecmp(atom + 1,
"ange6"))
1257 if (isascii(atom[1]) &&
1258 (tolower((
unsigned char)atom[1]) ==
'e')) {
1259 if (!strcasecmp(atom + 2,
"bind"))
1261 if (!strcasecmp(atom + 2,
"boot"))
1263 if (!strcasecmp(atom + 2,
"contact-interval"))
1265 if (!strncasecmp(atom + 2,
"cover", 5)) {
1266 if (atom[7] ==
'\0')
1268 if (!strcasecmp(atom + 7,
"-done"))
1270 if (!strcasecmp(atom + 7,
"-wait"))
1274 if (!strcasecmp(atom + 2,
"fresh"))
1276 if (!strcasecmp(atom + 2,
"fused"))
1278 if (!strcasecmp(atom + 2,
"ject"))
1280 if (!strcasecmp(atom + 2,
"lease"))
1282 if (!strcasecmp(atom + 2,
"leased"))
1284 if (!strcasecmp(atom + 2,
"move"))
1286 if (!strcasecmp(atom + 2,
"new"))
1288 if (!strcasecmp(atom + 2,
"quest"))
1290 if (!strcasecmp(atom + 2,
"quire"))
1292 if (isascii(atom[2]) &&
1293 (tolower((
unsigned char)atom[2]) ==
's')) {
1294 if (!strcasecmp(atom + 3,
"erved"))
1296 if (!strcasecmp(atom + 3,
"et"))
1298 if (!strcasecmp(atom + 3,
1299 "olution-interrupted"))
1303 if (!strcasecmp(atom + 2,
"try"))
1305 if (!strcasecmp(atom + 2,
"turn"))
1307 if (!strcasecmp(atom + 2,
"verse"))
1309 if (!strcasecmp(atom + 2,
"wind"))
1315 if (!strcasecmp(atom + 1,
"cript"))
1317 if (isascii(atom[1]) &&
1318 tolower((
unsigned char)atom[1]) ==
'e') {
1319 if (!strcasecmp(atom + 2,
"arch"))
1321 if (isascii(atom[2]) &&
1322 tolower((
unsigned char)atom[2]) ==
'c') {
1323 if (!strncasecmp(atom + 3,
"ond", 3)) {
1324 if (!strcasecmp(atom + 6,
"ary"))
1326 if (!strcasecmp(atom + 6,
"ary6"))
1328 if (!strcasecmp(atom + 6,
"s"))
1332 if (!strcasecmp(atom + 3,
"ret"))
1336 if (!strncasecmp(atom + 2,
"lect", 4)) {
1337 if (atom[6] ==
'\0')
1339 if (!strcasecmp(atom + 6,
"-timeout"))
1343 if (!strcasecmp(atom + 2,
"nd"))
1345 if (!strncasecmp(atom + 2,
"rv", 2)) {
1346 if (!strncasecmp(atom + 4,
"er", 2)) {
1347 if (atom[6] ==
'\0')
1349 if (atom[6] ==
'-') {
1350 if (!strcasecmp(atom + 7,
1353 if (!strcasecmp(atom + 7,
1356 if (!strcasecmp(atom + 7,
1363 if (!strcasecmp(atom + 4,
"fail"))
1367 if (!strcasecmp(atom + 2,
"t"))
1371 if (isascii(atom[1]) &&
1372 tolower((
unsigned char)atom[1]) ==
'h') {
1373 if (!strcasecmp(atom + 2,
"ared-network"))
1375 if (!strcasecmp(atom + 2,
"utdown"))
1379 if (isascii(atom[1]) &&
1380 tolower((
unsigned char)atom[1]) ==
'i') {
1381 if (!strcasecmp(atom + 2,
"addr"))
1383 if (!strcasecmp(atom + 2,
"gned"))
1385 if (!strcasecmp(atom + 2,
"ze"))
1389 if (isascii(atom[1]) &&
1390 tolower((
unsigned char)atom[1]) ==
'p') {
1391 if (isascii(atom[2]) &&
1392 tolower((
unsigned char)atom[2]) ==
'a') {
1393 if (!strcasecmp(atom + 3,
"ce"))
1395 if (!strcasecmp(atom + 3,
"wn"))
1399 if (!strcasecmp(atom + 2,
"lit"))
1403 if (isascii(atom[1]) &&
1404 tolower((
unsigned char)atom[1]) ==
't') {
1405 if (isascii(atom[2]) &&
1406 tolower((
unsigned char)atom[2]) ==
'a') {
1407 if(!strncasecmp(atom + 3,
"rt", 2)) {
1408 if (!strcasecmp(atom + 5,
"s"))
1410 if (!strcasecmp(atom + 5,
"up"))
1414 if (isascii(atom[3]) &&
1415 tolower((
unsigned char)atom[3]) ==
't') {
1416 if (!strcasecmp(atom + 4,
"e"))
1418 if (!strcasecmp(atom + 4,
"ic"))
1423 if (!strcasecmp(atom + 2,
"ring"))
1427 if (!strncasecmp(atom + 1,
"ub", 2)) {
1428 if (!strcasecmp(atom + 3,
"class"))
1430 if (!strcasecmp(atom + 3,
"net"))
1432 if (!strcasecmp(atom + 3,
"net6"))
1434 if (!strcasecmp(atom + 3,
"string"))
1438 if (isascii(atom[1]) &&
1439 tolower((
unsigned char)atom[1]) ==
'u') {
1440 if (!strcasecmp(atom + 2,
"ffix"))
1442 if (!strcasecmp(atom + 2,
"persede"))
1445 if (!strcasecmp(atom + 1,
"witch"))
1449 if (!strcasecmp (atom + 1,
"imestamp"))
1451 if (!strcasecmp (atom + 1,
"imeout"))
1453 if (!strcasecmp (atom + 1,
"oken-ring"))
1455 if (!strcasecmp (atom + 1,
"ext"))
1457 if (!strcasecmp (atom + 1,
"stp"))
1459 if (!strcasecmp (atom + 1,
"sfp"))
1461 if (!strcasecmp (atom + 1,
"ransmission"))
1463 if (!strcasecmp(atom + 1,
"emporary"))
1467 if (!strcasecmp (atom + 1,
"case"))
1469 if (!strcasecmp (atom + 1,
"nset"))
1471 if (!strcasecmp (atom + 1,
"nsigned"))
1473 if (!strcasecmp (atom + 1,
"id"))
1475 if (!strncasecmp (atom + 1,
"se", 2)) {
1476 if (!strcasecmp (atom + 3,
"r-class"))
1478 if (!strcasecmp (atom + 3,
"-host-decl-names"))
1480 if (!strcasecmp (atom + 3,
1481 "-lease-addr-for-default-route"))
1485 if (!strncasecmp (atom + 1,
"nknown", 6)) {
1486 if (!strcasecmp (atom + 7,
"-clients"))
1488 if (!strcasecmp (atom + 7,
"-state"))
1494 if (!strcasecmp (atom + 1,
"nauthenticated"))
1496 if (!strcasecmp (atom + 1,
"pdate"))
1500 if (!strcasecmp (atom + 1,
"6relay"))
1502 if (!strcasecmp (atom + 1,
"6relopt"))
1504 if (!strcasecmp (atom + 1,
"endor-class"))
1506 if (!strcasecmp (atom + 1,
"endor"))
1510 if (!strcasecmp (atom + 1,
"ith"))
1512 if (!strcasecmp(atom + 1,
"idth"))
1516 if (!strcasecmp (atom + 1,
"iaddr"))
1518 if (!strcasecmp (atom + 1,
"xdomain"))
1520 if (!strcasecmp (atom + 1,
"xrrset"))
1524 if (!strcasecmp (atom + 1,
"erolen"))
1526 if (!strcasecmp (atom + 1,
"one"))
isc_result_t end_parse(struct parse **cfile)
void * dmalloc(unsigned, const char *, int)
enum dhcp_token do_peek_token(const char **rval, unsigned int *rlen, struct parse *cfile, isc_boolean_t raw)
enum dhcp_token peek_token(const char **rval, unsigned *rlen, struct parse *cfile)
struct parse * saved_state
enum dhcp_token peek_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
enum dhcp_token next_token(const char **rval, unsigned *rlen, struct parse *cfile)
void dfree(void *, const char *, int)
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,...)
isc_result_t new_parse(struct parse **cfile, int file, char *inbuf, unsigned buflen, const char *name, int eolp)
enum dhcp_token next_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)