38static int get_char(
struct parse *);
39static void unget_char(
struct parse *,
int);
40static void skip_to_eol(
struct parse *);
52 tmp = (
struct parse *)malloc(
sizeof(
struct parse));
54 memset(tmp, 0,
sizeof(
struct parse));
75 if (fstat(
file, &sb) < 0) {
76 fprintf(stderr,
"can't stat input\n");
84 tmp->
inbuf = mmap(NULL, tmp->
bufsiz, PROT_READ, MAP_SHARED,
87 if (tmp->
inbuf == MAP_FAILED) {
88 fprintf(stderr,
"can't map input\n");
100 if (cfile->
file != -1) {
114 if (cfile->
stack != NULL)
145 tmp = (
struct parse *)malloc(
sizeof(
struct parse));
147 parse_error(cfile,
"can't allocate state to be saved");
148 memset(tmp, 0,
sizeof(
struct parse));
150 memcpy(tmp, cfile, (
size_t)&(((
struct parse *)0)->
comments));
175get_char(
struct parse *cfile)
199 }
else if (c != EOF) {
200 if (cfile->
lpos <= 80) {
215unget_char(
struct parse *cfile,
int c) {
246get_raw_token(
struct parse *cfile) {
257 if (!((c ==
'\n') && cfile->
eol_token) &&
258 isascii(c) && isspace(c)) {
259 ttok = read_whitespace(c, cfile);
269 ttok = read_string(cfile);
272 if ((isascii(c) && isdigit(c)) || c ==
'-') {
275 ttok = read_number(c, cfile);
277 }
else if (isascii(c) && isalpha(c)) {
280 ttok = read_num_or_name(c, cfile);
282 }
else if (c == EOF) {
309get_next_token(
const char **rval,
unsigned *rlen,
321 rv = get_raw_token(cfile);
327 rv = get_raw_token(cfile);
351 return get_next_token(rval, rlen, cfile,
ISC_FALSE);
362 return get_next_token(rval, rlen, cfile,
ISC_TRUE);
385 cfile->
token = get_raw_token(cfile);
441skip_to_eol(
struct parse *cfile)
447 memset(buf, 0,
sizeof(buf));
458 if (++cc <
sizeof(buf) - 1)
466read_whitespace(
int c,
struct parse *cfile) {
474 if (ofs >= (
sizeof(cfile->
tokbuf) - 1)) {
481 "whitespace too long, buffer overflow.");
487 }
while (!((c ==
'\n') && cfile->
eol_token) &&
488 isascii(c) && isspace(c));
493 unget_char(cfile, c);
498 cfile->
tokbuf[ofs] =
'\0';
505read_string(
struct parse *cfile)
513 for (i = 0; i <
sizeof(cfile->
tokbuf); i++) {
552 if (c >=
'0' && c <=
'9') {
554 }
else if (c >=
'a' && c <=
'f') {
556 }
else if (c >=
'A' && c <=
'F') {
560 "invalid hex digit: %x",
568 if (c >=
'0' && c <=
'7') {
573 "invalid octal digit %x",
585 }
else if (c ==
'\\') {
595 if (i ==
sizeof(cfile->
tokbuf))
597 "string constant larger than internal buffer");
605read_number(
int c,
struct parse *cfile)
611 for (; i <
sizeof(cfile->
tokbuf); i++) {
619 switch (isascii(c) ? token :
BREAK) {
631 if ((i == 2) && isxdigit(c) &&
632 (cfile->
tokbuf[0] ==
'0') &&
633 ((cfile->
tokbuf[1] ==
'x') ||
634 (cfile->
tokbuf[1] ==
'X'))) {
637 }
else if (((c ==
'-') || (c ==
'_') || isalnum(c))) {
647 unget_char(cfile, c);
652 "read_number(): impossible case");
658 if (i ==
sizeof(cfile->
tokbuf))
660 "numeric token larger than internal buffer");
671 if ((i == 1) && (cfile->
tokbuf[i] ==
'-'))
678read_num_or_name(
int c,
struct parse *cfile)
684 for (; i <
sizeof(cfile->
tokbuf); i++) {
687 (c !=
'-' && c !=
'_' && !isalnum(c))) {
688 unget_char(cfile, c);
695 if (i ==
sizeof(cfile->
tokbuf))
696 parse_error(cfile,
"token larger than internal buffer");
700 return intern(cfile->
tval, rv);
705 if (!isascii(atom[0]))
708 switch (tolower((
unsigned char)atom[0])) {
715 if (!strcasecmp(atom + 1,
"bandoned"))
717 if (!strcasecmp(atom + 1,
"ctive"))
719 if (!strncasecmp(atom + 1,
"dd", 2)) {
722 else if (!strcasecmp(atom + 3,
"ress"))
726 if (!strcasecmp(atom + 1,
"fter"))
728 if (isascii(atom[1]) &&
729 (tolower((
unsigned char)atom[1]) ==
'l')) {
730 if (!strcasecmp(atom + 2,
"gorithm"))
732 if (!strcasecmp(atom + 2,
"ias"))
734 if (isascii(atom[2]) &&
735 (tolower((
unsigned char)atom[2]) ==
'l')) {
738 else if (!strcasecmp(atom + 3,
"ow"))
742 if (!strcasecmp(atom + 2,
"so"))
746 if (isascii(atom[1]) &&
747 (tolower((
unsigned char)atom[1]) ==
'n')) {
748 if (!strcasecmp(atom + 2,
"d"))
750 if (!strcasecmp(atom + 2,
"ycast-mac"))
754 if (!strcasecmp(atom + 1,
"ppend"))
756 if (!strcasecmp(atom + 1,
"rray"))
758 if (isascii(atom[1]) &&
759 (tolower((
unsigned char)atom[1]) ==
't')) {
762 if (!strcasecmp(atom + 2,
"sfp"))
766 if (!strcasecmp(atom + 1,
"uthoring-byte-order"))
768 if (!strncasecmp(atom + 1,
"ut", 2)) {
769 if (isascii(atom[3]) &&
770 (tolower((
unsigned char)atom[3]) ==
'h')) {
771 if (!strncasecmp(atom + 4,
"enticat", 7)) {
772 if (!strcasecmp(atom + 11,
"ed"))
774 if (!strcasecmp(atom + 11,
"ion"))
778 if (!strcasecmp(atom + 4,
"oritative"))
782 if (!strcasecmp(atom + 3,
"o-partner-down"))
788 if (!strcasecmp(atom + 1,
"ackup"))
790 if (!strcasecmp(atom + 1,
"ootp"))
792 if (!strcasecmp(atom + 1,
"inding"))
794 if (!strcasecmp(atom + 1,
"inary-to-ascii"))
796 if (!strcasecmp(atom + 1,
"ackoff-cutoff"))
798 if (!strcasecmp(atom + 1,
"ooting"))
800 if (!strcasecmp(atom + 1,
"oot-unknown-clients"))
802 if (!strcasecmp(atom + 1,
"reak"))
804 if (!strcasecmp(atom + 1,
"illing"))
806 if (!strcasecmp(atom + 1,
"oolean"))
808 if (!strcasecmp(atom + 1,
"alance"))
810 if (!strcasecmp(atom + 1,
"ound"))
812 if (!strcasecmp(atom+1,
"ig-endian")) {
817 if (!strcasecmp(atom + 1,
"ase"))
819 if (!strcasecmp(atom + 1,
"heck"))
821 if (!strcasecmp(atom + 1,
"iaddr"))
823 if (isascii(atom[1]) &&
824 tolower((
unsigned char)atom[1]) ==
'l') {
825 if (!strcasecmp(atom + 2,
"ass"))
827 if (!strncasecmp(atom + 2,
"ient", 4)) {
828 if (!strcasecmp(atom + 6,
"s"))
830 if (atom[6] ==
'-') {
831 if (!strcasecmp(atom + 7,
"hostname"))
833 if (!strcasecmp(atom + 7,
"identifier"))
835 if (!strcasecmp(atom + 7,
"state"))
837 if (!strcasecmp(atom + 7,
"updates"))
843 if (!strcasecmp(atom + 2,
"ose"))
845 if (!strcasecmp(atom + 2,
"tt"))
849 if (isascii(atom[1]) &&
850 tolower((
unsigned char)atom[1]) ==
'o') {
851 if (!strcasecmp(atom + 2,
"de"))
853 if (isascii(atom[2]) &&
854 tolower((
unsigned char)atom[2]) ==
'm') {
855 if (!strcasecmp(atom + 3,
"mit"))
857 if (!strcasecmp(atom + 3,
858 "munications-interrupted"))
860 if (!strcasecmp(atom + 3,
"pressed"))
864 if (isascii(atom[2]) &&
865 tolower((
unsigned char)atom[2]) ==
'n') {
866 if (!strcasecmp(atom + 3,
"cat"))
868 if (!strcasecmp(atom + 3,
"fig-option"))
870 if (!strcasecmp(atom + 3,
"flict-done"))
872 if (!strcasecmp(atom + 3,
"nect"))
878 if (!strcasecmp(atom + 1,
"reate"))
882 if (!strcasecmp(atom + 1,
"b-time-format"))
884 if (!strcasecmp(atom + 1,
"omain"))
886 if (!strncasecmp(atom + 1,
"omain-", 6)) {
887 if (!strcasecmp(atom + 7,
"name"))
889 if (!strcasecmp(atom + 7,
"list"))
892 if (!strcasecmp(atom + 1,
"o-forward-updates"))
895 if (!strcasecmp(atom + 1,
"o-forward-update"))
897 if (!strcasecmp(atom + 1,
"ebug"))
899 if (!strcasecmp(atom + 1,
"eny"))
901 if (!strcasecmp(atom + 1,
"eleted"))
903 if (!strcasecmp(atom + 1,
"elete"))
905 if (!strncasecmp(atom + 1,
"efault", 6)) {
908 if (!strcasecmp(atom + 7,
"-duid"))
910 if (!strcasecmp(atom + 7,
"-lease-time"))
914 if (!strncasecmp(atom + 1,
"ynamic", 6)) {
917 if (!strncasecmp(atom + 7,
"-bootp", 6)) {
920 if (!strcasecmp(atom + 13,
"-lease-cutoff"))
922 if (!strcasecmp(atom + 13,
"-lease-length"))
927 if (!strcasecmp(atom + 1,
"uplicates"))
929 if (!strcasecmp(atom + 1,
"eclines"))
931 if (!strncasecmp(atom + 1,
"efine", 5)) {
932 if (!strcasecmp(atom + 6,
"d"))
939 if (isascii(atom [1]) &&
940 tolower((
unsigned char)atom[1]) ==
'x') {
941 if (!strcasecmp(atom + 2,
"tract-int"))
943 if (!strcasecmp(atom + 2,
"ists"))
945 if (!strcasecmp(atom + 2,
"piry"))
947 if (!strcasecmp(atom + 2,
"pire"))
949 if (!strcasecmp(atom + 2,
"pired"))
952 if (!strcasecmp(atom + 1,
"ncode-int"))
954 if (!strcasecmp(atom + 1,
"poch"))
956 if (!strcasecmp(atom + 1,
"thernet"))
958 if (!strcasecmp(atom + 1,
"nds"))
960 if (!strncasecmp(atom + 1,
"ls", 2)) {
961 if (!strcasecmp(atom + 3,
"e"))
963 if (!strcasecmp(atom + 3,
"if"))
967 if (!strcasecmp(atom + 1,
"rror"))
969 if (!strcasecmp(atom + 1,
"val"))
971 if (!strcasecmp(atom + 1,
"ncapsulate"))
973 if (!strcasecmp(atom + 1,
"xecute"))
975 if (!strcasecmp(atom+1,
"n")) {
980 if (!strcasecmp(atom + 1,
"atal"))
982 if (!strcasecmp(atom + 1,
"ilename"))
984 if (!strcasecmp(atom + 1,
"ixed-address"))
986 if (!strcasecmp(atom + 1,
"ixed-address6"))
988 if (!strcasecmp(atom + 1,
"ixed-prefix6"))
990 if (!strcasecmp(atom + 1,
"ddi"))
992 if (!strcasecmp(atom + 1,
"ormerr"))
994 if (!strcasecmp(atom + 1,
"unction"))
996 if (!strcasecmp(atom + 1,
"ailover"))
998 if (!strcasecmp(atom + 1,
"ree"))
1002 if (!strncasecmp(atom + 1,
"et", 2)) {
1003 if (!strcasecmp(atom + 3,
"-lease-hostnames"))
1005 if (!strcasecmp(atom + 3,
"hostbyname"))
1007 if (!strcasecmp(atom + 3,
"hostname"))
1011 if (!strcasecmp(atom + 1,
"iaddr"))
1013 if (!strcasecmp(atom + 1,
"roup"))
1017 if (!strcasecmp(atom + 1,
"ash"))
1019 if (!strcasecmp(atom + 1,
"ba"))
1021 if (!strcasecmp(atom + 1,
"ost"))
1023 if (!strcasecmp(atom + 1,
"ost-decl-name"))
1025 if (!strcasecmp(atom + 1,
"ost-identifier"))
1027 if (!strcasecmp(atom + 1,
"ardware"))
1029 if (!strcasecmp(atom + 1,
"ostname"))
1031 if (!strcasecmp(atom + 1,
"elp"))
1033 if (!strcasecmp(atom + 1,
"ex")) {
1038 if (!strcasecmp(atom+1,
"a-na"))
1040 if (!strcasecmp(atom+1,
"a-ta"))
1042 if (!strcasecmp(atom+1,
"a-pd"))
1044 if (!strcasecmp(atom+1,
"aaddr"))
1046 if (!strcasecmp(atom+1,
"aprefix"))
1048 if (!strcasecmp(atom + 1,
"nclude"))
1050 if (!strcasecmp(atom + 1,
"nteger"))
1052 if (!strcasecmp(atom + 1,
"nfiniband"))
1054 if (!strcasecmp(atom + 1,
"nfinite"))
1056 if (!strcasecmp(atom + 1,
"nfo"))
1058 if (!strcasecmp(atom + 1,
"p-address"))
1060 if (!strcasecmp(atom + 1,
"p6-address"))
1062 if (!strcasecmp(atom + 1,
"nitial-interval"))
1064 if (!strcasecmp(atom + 1,
"nitial-delay"))
1066 if (!strcasecmp(atom + 1,
"nterface"))
1068 if (!strcasecmp(atom + 1,
"dentifier"))
1070 if (!strcasecmp(atom + 1,
"f"))
1072 if (!strcasecmp(atom + 1,
"s"))
1074 if (!strcasecmp(atom + 1,
"gnore"))
1078 if (!strncasecmp(atom + 1,
"nown", 4)) {
1079 if (!strcasecmp(atom + 5,
"-clients"))
1085 if (!strcasecmp(atom + 1,
"ey"))
1087 if (!strcasecmp (atom + 1,
"ey-algorithm"))
1091 if (!strcasecmp(atom + 1,
"case"))
1093 if (!strcasecmp(atom + 1,
"ease"))
1095 if (!strcasecmp(atom + 1,
"ease6"))
1097 if (!strcasecmp(atom + 1,
"eased-address"))
1099 if (!strcasecmp(atom + 1,
"ease-time"))
1101 if (!strcasecmp(atom + 1,
"easequery"))
1103 if (!strcasecmp(atom + 1,
"ength"))
1105 if (!strcasecmp(atom + 1,
"imit"))
1107 if (!strcasecmp(atom + 1,
"et"))
1109 if (!strcasecmp(atom + 1,
"oad"))
1111 if (!strcasecmp(atom + 1,
"ocal"))
1113 if (!strcasecmp(atom + 1,
"og"))
1115 if (!strcasecmp(atom+1,
"lt")) {
1118 if (!strcasecmp(atom+1,
"l")) {
1121 if (!strcasecmp(atom+1,
"ittle-endian")) {
1124 if (!strcasecmp(atom + 1,
"ease-id-format")) {
1129 if (!strncasecmp(atom + 1,
"ax", 2)) {
1132 if (!strcasecmp(atom + 3,
"-balance"))
1134 if (!strncasecmp(atom + 3,
"-lease-", 7)) {
1135 if (!strcasecmp(atom + 10,
"misbalance"))
1137 if (!strcasecmp(atom + 10,
"ownership"))
1139 if (!strcasecmp(atom + 10,
"time"))
1142 if (!strcasecmp(atom + 3,
"-life"))
1144 if (!strcasecmp(atom + 3,
"-transmit-idle"))
1146 if (!strcasecmp(atom + 3,
"-response-delay"))
1148 if (!strcasecmp(atom + 3,
"-unacked-updates"))
1151 if (!strncasecmp(atom + 1,
"in-", 3)) {
1152 if (!strcasecmp(atom + 4,
"balance"))
1154 if (!strcasecmp(atom + 4,
"lease-time"))
1156 if (!strcasecmp(atom + 4,
"secs"))
1160 if (!strncasecmp(atom + 1,
"edi", 3)) {
1161 if (!strcasecmp(atom + 4,
"a"))
1163 if (!strcasecmp(atom + 4,
"um"))
1167 if (!strcasecmp(atom + 1,
"atch"))
1169 if (!strcasecmp(atom + 1,
"embers"))
1171 if (!strcasecmp(atom + 1,
"y"))
1173 if (!strcasecmp(atom + 1,
"clt"))
1177 if (!strcasecmp(atom + 1,
"ormal"))
1179 if (!strcasecmp(atom + 1,
"ameserver"))
1181 if (!strcasecmp(atom + 1,
"etmask"))
1183 if (!strcasecmp(atom + 1,
"ever"))
1185 if (!strcasecmp(atom + 1,
"ext-server"))
1187 if (!strcasecmp(atom + 1,
"ot"))
1189 if (!strcasecmp(atom + 1,
"o"))
1191 if (!strcasecmp(atom + 1,
"oerror"))
1193 if (!strcasecmp(atom + 1,
"otauth"))
1195 if (!strcasecmp(atom + 1,
"otimp"))
1197 if (!strcasecmp(atom + 1,
"otzone"))
1199 if (!strcasecmp(atom + 1,
"xdomain"))
1201 if (!strcasecmp(atom + 1,
"xrrset"))
1203 if (!strcasecmp(atom + 1,
"ull"))
1205 if (!strcasecmp(atom + 1,
"ext"))
1207 if (!strcasecmp(atom + 1,
"ew"))
1211 if (!strcasecmp(atom + 1,
"mapi"))
1213 if (!strcasecmp(atom + 1,
"r"))
1215 if (!strcasecmp(atom + 1,
"n"))
1217 if (!strcasecmp(atom + 1,
"pen"))
1219 if (!strcasecmp(atom + 1,
"ption"))
1221 if (!strcasecmp(atom + 1,
"ne-lease-per-client"))
1223 if (!strcasecmp(atom + 1,
"f"))
1225 if (!strcasecmp(atom + 1,
"wner"))
1227 if (!strcasecmp(atom + 1,
"ctal")) {
1232 if (!strcasecmp(atom + 1,
"arse-vendor-option"))
1234 if (!strcasecmp(atom + 1,
"repend"))
1236 if (!strcasecmp(atom + 1,
"referred-life"))
1238 if (!strcasecmp(atom + 1,
"acket"))
1240 if (!strcasecmp(atom + 1,
"ool"))
1242 if (!strcasecmp(atom + 1,
"ool6"))
1244 if (!strcasecmp(atom + 1,
"refix6"))
1246 if (!strcasecmp(atom + 1,
"seudo"))
1248 if (!strcasecmp(atom + 1,
"eer"))
1250 if (!strcasecmp(atom + 1,
"rimary"))
1252 if (!strcasecmp(atom + 1,
"rimary6"))
1254 if (!strncasecmp(atom + 1,
"artner", 6)) {
1257 if (!strcasecmp(atom + 7,
"-down"))
1260 if (!strcasecmp(atom + 1,
"ort"))
1262 if (!strcasecmp(atom + 1,
"otential-conflict"))
1264 if (!strcasecmp(atom + 1,
"ick-first-value") ||
1265 !strcasecmp(atom + 1,
"ick"))
1267 if (!strcasecmp(atom + 1,
"aused"))
1271 if (!strcasecmp(atom + 1,
"ange"))
1273 if (!strcasecmp(atom + 1,
"ange6"))
1275 if (isascii(atom[1]) &&
1276 (tolower((
unsigned char)atom[1]) ==
'e')) {
1277 if (!strcasecmp(atom + 2,
"bind"))
1279 if (!strcasecmp(atom + 2,
"boot"))
1281 if (!strcasecmp(atom + 2,
"contact-interval"))
1283 if (!strncasecmp(atom + 2,
"cover", 5)) {
1284 if (atom[7] ==
'\0')
1286 if (!strcasecmp(atom + 7,
"-done"))
1288 if (!strcasecmp(atom + 7,
"-wait"))
1292 if (!strcasecmp(atom + 2,
"fresh"))
1294 if (!strcasecmp(atom + 2,
"fused"))
1296 if (!strcasecmp(atom + 2,
"ject"))
1298 if (!strcasecmp(atom + 2,
"lease"))
1300 if (!strcasecmp(atom + 2,
"leased"))
1302 if (!strcasecmp(atom + 2,
"move"))
1304 if (!strcasecmp(atom + 2,
"new"))
1306 if (!strcasecmp(atom + 2,
"quest"))
1308 if (!strcasecmp(atom + 2,
"quire"))
1310 if (isascii(atom[2]) &&
1311 (tolower((
unsigned char)atom[2]) ==
's')) {
1312 if (!strcasecmp(atom + 3,
"erved"))
1314 if (!strcasecmp(atom + 3,
"et"))
1316 if (!strcasecmp(atom + 3,
1317 "olution-interrupted"))
1321 if (!strcasecmp(atom + 2,
"try"))
1323 if (!strcasecmp(atom + 2,
"turn"))
1325 if (!strcasecmp(atom + 2,
"verse"))
1327 if (!strcasecmp(atom + 2,
"wind"))
1333 if (!strcasecmp(atom + 1,
"cript"))
1335 if (isascii(atom[1]) &&
1336 tolower((
unsigned char)atom[1]) ==
'e') {
1337 if (!strcasecmp(atom + 2,
"arch"))
1339 if (isascii(atom[2]) &&
1340 tolower((
unsigned char)atom[2]) ==
'c') {
1341 if (!strncasecmp(atom + 3,
"ond", 3)) {
1342 if (!strcasecmp(atom + 6,
"ary"))
1344 if (!strcasecmp(atom + 6,
"ary6"))
1346 if (!strcasecmp(atom + 6,
"s"))
1350 if (!strcasecmp(atom + 3,
"ret"))
1354 if (!strncasecmp(atom + 2,
"lect", 4)) {
1355 if (atom[6] ==
'\0')
1357 if (!strcasecmp(atom + 6,
"-timeout"))
1361 if (!strcasecmp(atom + 2,
"nd"))
1363 if (!strncasecmp(atom + 2,
"rv", 2)) {
1364 if (!strncasecmp(atom + 4,
"er", 2)) {
1365 if (atom[6] ==
'\0')
1367 if (atom[6] ==
'-') {
1368 if (!strcasecmp(atom + 7,
1371 if (!strcasecmp(atom + 7,
1374 if (!strcasecmp(atom + 7,
1381 if (!strcasecmp(atom + 4,
"fail"))
1385 if (!strcasecmp(atom + 2,
"t"))
1389 if (isascii(atom[1]) &&
1390 tolower((
unsigned char)atom[1]) ==
'h') {
1391 if (!strcasecmp(atom + 2,
"ared-network"))
1393 if (!strcasecmp(atom + 2,
"utdown"))
1397 if (isascii(atom[1]) &&
1398 tolower((
unsigned char)atom[1]) ==
'i') {
1399 if (!strcasecmp(atom + 2,
"addr"))
1401 if (!strcasecmp(atom + 2,
"gned"))
1403 if (!strcasecmp(atom + 2,
"ze"))
1407 if (isascii(atom[1]) &&
1408 tolower((
unsigned char)atom[1]) ==
'p') {
1409 if (isascii(atom[2]) &&
1410 tolower((
unsigned char)atom[2]) ==
'a') {
1411 if (!strcasecmp(atom + 3,
"ce"))
1413 if (!strcasecmp(atom + 3,
"wn"))
1417 if (!strcasecmp(atom + 2,
"lit"))
1421 if (isascii(atom[1]) &&
1422 tolower((
unsigned char)atom[1]) ==
't') {
1423 if (isascii(atom[2]) &&
1424 tolower((
unsigned char)atom[2]) ==
'a') {
1425 if (!strncasecmp(atom + 3,
"rt", 2)) {
1426 if (!strcasecmp(atom + 5,
"s"))
1428 if (!strcasecmp(atom + 5,
"up"))
1432 if (isascii(atom[3]) &&
1433 tolower((
unsigned char)atom[3]) ==
't') {
1434 if (!strcasecmp(atom + 4,
"e"))
1436 if (!strcasecmp(atom + 4,
"ic"))
1441 if (!strcasecmp(atom + 2,
"ring"))
1445 if (!strncasecmp(atom + 1,
"ub", 2)) {
1446 if (!strcasecmp(atom + 3,
"class"))
1448 if (!strcasecmp(atom + 3,
"net"))
1450 if (!strcasecmp(atom + 3,
"net6"))
1452 if (!strcasecmp(atom + 3,
"string"))
1456 if (isascii(atom[1]) &&
1457 tolower((
unsigned char)atom[1]) ==
'u') {
1458 if (!strcasecmp(atom + 2,
"ffix"))
1460 if (!strcasecmp(atom + 2,
"persede"))
1463 if (!strcasecmp(atom + 1,
"witch"))
1467 if (!strcasecmp(atom + 1,
"imestamp"))
1469 if (!strcasecmp(atom + 1,
"imeout"))
1471 if (!strcasecmp(atom + 1,
"oken-ring"))
1473 if (!strcasecmp(atom + 1,
"ext"))
1475 if (!strcasecmp(atom + 1,
"stp"))
1477 if (!strcasecmp(atom + 1,
"sfp"))
1479 if (!strcasecmp(atom + 1,
"ransmission"))
1481 if (!strcasecmp(atom + 1,
"emporary"))
1485 if (!strcasecmp(atom + 1,
"case"))
1487 if (!strcasecmp(atom + 1,
"nset"))
1489 if (!strcasecmp(atom + 1,
"nsigned"))
1491 if (!strcasecmp(atom + 1,
"id"))
1493 if (!strncasecmp(atom + 1,
"se", 2)) {
1494 if (!strcasecmp(atom + 3,
"r-class"))
1496 if (!strcasecmp(atom + 3,
"-host-decl-names"))
1498 if (!strcasecmp(atom + 3,
1499 "-lease-addr-for-default-route"))
1503 if (!strncasecmp(atom + 1,
"nknown", 6)) {
1504 if (!strcasecmp(atom + 7,
"-clients"))
1506 if (!strcasecmp(atom + 7,
"-state"))
1512 if (!strcasecmp(atom + 1,
"nauthenticated"))
1514 if (!strcasecmp(atom + 1,
"pdate"))
1518 if (!strcasecmp(atom + 1,
"6relay"))
1520 if (!strcasecmp(atom + 1,
"6relopt"))
1522 if (!strcasecmp(atom + 1,
"endor-class"))
1524 if (!strcasecmp(atom + 1,
"endor"))
1528 if (!strcasecmp(atom + 1,
"ith"))
1530 if (!strcasecmp(atom + 1,
"idth"))
1534 if (!strcasecmp(atom + 1,
"iaddr"))
1536 if (!strcasecmp(atom + 1,
"xdomain"))
1538 if (!strcasecmp(atom + 1,
"xrrset"))
1542 if (!strcasecmp(atom + 1,
"erolen"))
1544 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)
struct comment * createComment(const char *line)
#define TAILQ_INSERT_AFTER(head, listelm, elm)
#define TAILQ_INSERT_TAIL(head, elm)
#define TAILQ_REMOVE(head, elm)
@ USE_LEASE_ADDR_FOR_DEFAULT_ROUTE
@ DYNAMIC_BOOTP_LEASE_CUTOFF
@ DYNAMIC_BOOTP_LEASE_LENGTH
@ COMMUNICATIONS_INTERRUPTED
void parse_error(struct parse *cfile, const char *fmt,...)
struct parse * saved_state