mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-23 02:17:31 +00:00
Add new NS error type, null and related tokens.
This commit is contained in:
parent
6200131d5d
commit
14a2c38321
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: conflex.c,v 1.63 2000/01/05 17:59:12 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: conflex.c,v 1.64 2000/01/08 01:27:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -506,6 +506,8 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
return BOOLEAN;
|
return BOOLEAN;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
|
if (!strcasecmp (atom + 1, "ase"))
|
||||||
|
return CASE;
|
||||||
if (!strcasecmp (atom + 1, "ommit"))
|
if (!strcasecmp (atom + 1, "ommit"))
|
||||||
return COMMIT;
|
return COMMIT;
|
||||||
if (!strcasecmp (atom + 1, "ode"))
|
if (!strcasecmp (atom + 1, "ode"))
|
||||||
@ -572,6 +574,8 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
return DUPLICATES;
|
return DUPLICATES;
|
||||||
if (!strcasecmp (atom + 1, "eclines"))
|
if (!strcasecmp (atom + 1, "eclines"))
|
||||||
return DECLINES;
|
return DECLINES;
|
||||||
|
if (!strcasecmp (atom + 1, "efined"))
|
||||||
|
return DEFINED;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
if (isascii (atom [1]) && tolower (atom [1]) == 'x') {
|
if (isascii (atom [1]) && tolower (atom [1]) == 'x') {
|
||||||
@ -605,6 +609,8 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
return FIXED_ADDR;
|
return FIXED_ADDR;
|
||||||
if (!strcasecmp (atom + 1, "ddi"))
|
if (!strcasecmp (atom + 1, "ddi"))
|
||||||
return FDDI;
|
return FDDI;
|
||||||
|
if (!strcasecmp (atom + 1, "ormerr"))
|
||||||
|
return NS_FORMERR;
|
||||||
break;
|
break;
|
||||||
case 'g':
|
case 'g':
|
||||||
if (!strcasecmp (atom + 1, "iaddr"))
|
if (!strcasecmp (atom + 1, "iaddr"))
|
||||||
@ -711,6 +717,20 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
return NO;
|
return NO;
|
||||||
if (!strcasecmp (atom + 1, "s-update"))
|
if (!strcasecmp (atom + 1, "s-update"))
|
||||||
return NS_UPDATE;
|
return NS_UPDATE;
|
||||||
|
if (!strcasecmp (atom + 1, "oerror"))
|
||||||
|
return NS_NOERROR;
|
||||||
|
if (!strcasecmp (atom + 1, "otauth"))
|
||||||
|
return NS_NOTAUTH;
|
||||||
|
if (!strcasecmp (atom + 1, "otimp"))
|
||||||
|
return NS_NOTIMP;
|
||||||
|
if (!strcasecmp (atom + 1, "otzone"))
|
||||||
|
return NS_NOTZONE;
|
||||||
|
if (!strcasecmp (atom + 1, "xdomain"))
|
||||||
|
return NS_NXDOMAIN;
|
||||||
|
if (!strcasecmp (atom + 1, "xrrset"))
|
||||||
|
return NS_NXRRSET;
|
||||||
|
if (!strcasecmp (atom + 1, "ull"))
|
||||||
|
return TOKEN_NULL;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
if (!strcasecmp (atom + 1, "r"))
|
if (!strcasecmp (atom + 1, "r"))
|
||||||
@ -777,8 +797,14 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
return REVERSE;
|
return REVERSE;
|
||||||
if (!strcasecmp (atom + 1, "elease"))
|
if (!strcasecmp (atom + 1, "elease"))
|
||||||
return RELEASE;
|
return RELEASE;
|
||||||
|
if (!strcasecmp (atom + 1, "efused"))
|
||||||
|
return NS_REFUSED;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
if (!strcasecmp (atom + 1, "ervfail"))
|
||||||
|
return NS_SERVFAIL;
|
||||||
|
if (!strcasecmp (atom + 1, "witch"))
|
||||||
|
return SWITCH;
|
||||||
if (!strcasecmp (atom + 1, "igned"))
|
if (!strcasecmp (atom + 1, "igned"))
|
||||||
return SIGNED;
|
return SIGNED;
|
||||||
if (!strcasecmp (atom + 1, "tring"))
|
if (!strcasecmp (atom + 1, "tring"))
|
||||||
@ -823,7 +849,9 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
if (!strcasecmp (atom + 1, "tatic"))
|
if (!strcasecmp (atom + 1, "tatic"))
|
||||||
return STATIC;
|
return STATIC;
|
||||||
if (!strcasecmp (atom + 1, "plit"))
|
if (!strcasecmp (atom + 1, "plit"))
|
||||||
return SPLIT;
|
return SPLIT;
|
||||||
|
if (!strcasecmp (atom + 1, "et"))
|
||||||
|
return TOKEN_SET;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
if (!strcasecmp (atom + 1, "imestamp"))
|
if (!strcasecmp (atom + 1, "imestamp"))
|
||||||
@ -879,6 +907,10 @@ static enum dhcp_token intern (atom, dfv)
|
|||||||
case 'y':
|
case 'y':
|
||||||
if (!strcasecmp (atom + 1, "iaddr"))
|
if (!strcasecmp (atom + 1, "iaddr"))
|
||||||
return YIADDR;
|
return YIADDR;
|
||||||
|
if (!strcasecmp (atom + 1, "xdomain"))
|
||||||
|
return NS_YXDOMAIN;
|
||||||
|
if (!strcasecmp (atom + 1, "xrrset"))
|
||||||
|
return NS_YXRRSET;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return dfv;
|
return dfv;
|
||||||
|
@ -214,7 +214,23 @@ enum dhcp_token {
|
|||||||
NO = 431,
|
NO = 431,
|
||||||
TOKEN_DELETE,
|
TOKEN_DELETE,
|
||||||
NS_UPDATE,
|
NS_UPDATE,
|
||||||
UPDATE
|
UPDATE,
|
||||||
|
SWITCH,
|
||||||
|
CASE,
|
||||||
|
NS_FORMERR,
|
||||||
|
NS_NOERROR,
|
||||||
|
NS_NOTAUTH,
|
||||||
|
NS_NOTIMP,
|
||||||
|
NS_NOTZONE,
|
||||||
|
NS_NXDOMAIN,
|
||||||
|
NS_NXRRSET,
|
||||||
|
NS_REFUSED,
|
||||||
|
NS_SERVFAIL,
|
||||||
|
NS_YXDOMAIN,
|
||||||
|
NS_YXRRSET,
|
||||||
|
TOKEN_NULL,
|
||||||
|
TOKEN_SET,
|
||||||
|
DEFINED
|
||||||
};
|
};
|
||||||
|
|
||||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user