2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

Make dhcp token type an enum for easier debugging.

This commit is contained in:
Ted Lemon
1998-11-05 18:47:09 +00:00
parent 27fe61a702
commit 983ea35c77

View File

@@ -40,112 +40,115 @@
* Enterprises, see ``http://www.vix.com''.
*/
#define SEMI ';'
#define DOT '.'
#define COLON ':'
#define COMMA ','
#define SLASH '/'
#define LBRACE '{'
#define RBRACE '}'
#define LPAREN '('
#define RPAREN ')'
#define EQUAL '='
enum dhcp_token {
SEMI = ';',
DOT = '.',
COLON = ':',
COMMA = ',',
SLASH = '/',
LBRACE = '{',
RBRACE = '}',
LPAREN = '(',
RPAREN = ')',
EQUAL = '=',
#define FIRST_TOKEN HOST
#define HOST 256
#define HARDWARE 257
#define FILENAME 258
#define FIXED_ADDR 259
#define OPTION 260
#define ETHERNET 261
#define STRING 262
#define NUMBER 263
#define NUMBER_OR_NAME 264
#define NAME 265
#define TIMESTAMP 266
#define STARTS 267
#define ENDS 268
#define UID 269
#define CLASS 270
#define LEASE 271
#define RANGE 272
#define PACKET 273
#define CIADDR 274
#define YIADDR 275
#define SIADDR 276
#define GIADDR 277
#define SUBNET 278
#define NETMASK 279
#define DEFAULT_LEASE_TIME 280
#define MAX_LEASE_TIME 281
#define VENDOR_CLASS 282
#define USER_CLASS 283
#define SHARED_NETWORK 284
#define SERVER_NAME 285
#define DYNAMIC_BOOTP 286
#define SERVER_IDENTIFIER 287
#define DYNAMIC_BOOTP_LEASE_CUTOFF 288
#define DYNAMIC_BOOTP_LEASE_LENGTH 289
#define BOOT_UNKNOWN_CLIENTS 290
#define NEXT_SERVER 291
#define TOKEN_RING 292
#define GROUP 293
#define ONE_LEASE_PER_CLIENT 294
#define GET_LEASE_HOSTNAMES 295
#define USE_HOST_DECL_NAMES 296
#define SEND 297
#define CLIENT_IDENTIFIER 298
#define REQUEST 299
#define REQUIRE 300
#define TIMEOUT 301
#define RETRY 302
#define SELECT_TIMEOUT 303
#define SCRIPT 304
#define INTERFACE 305
#define RENEW 306
#define REBIND 307
#define EXPIRE 308
#define UNKNOWN_CLIENTS 309
#define ALLOW 310
#define BOOTP 311
#define DENY 312
#define BOOTING 313
#define DEFAULT 314
#define MEDIA 315
#define MEDIUM 316
#define ALIAS 317
#define REBOOT 318
#define ABANDONED 319
#define BACKOFF_CUTOFF 320
#define INITIAL_INTERVAL 321
#define NAMESERVER 322
#define DOMAIN 323
#define SEARCH 324
#define SUPERSEDE 325
#define APPEND 326
#define PREPEND 327
#define HOSTNAME 328
#define CLIENT_HOSTNAME 329
#define REJECT 330
#define USE_LEASE_ADDR_FOR_DEFAULT_ROUTE 331
#define MIN_LEASE_TIME 332
#define MIN_SECS 333
#define AND 334
#define OR 335
#define NOT 336
#define SUBSTRING 337
#define SUFFIX 338
#define CHECK 339
#define EXTRACT_INT 340
#define IF 341
#define ADD 342
#define BREAK 343
#define ELSE 344
#define ELSIF 345
#define SUBCLASS 346
#define MATCH 347
#define SPAWN 348
#define WITH 349
HOST = 256,
FIRST_TOKEN = HOST,
HARDWARE = 257,
FILENAME = 258,
FIXED_ADDR = 259,
OPTION = 260,
ETHERNET = 261,
STRING = 262,
NUMBER = 263,
NUMBER_OR_NAME = 264,
NAME = 265,
TIMESTAMP = 266,
STARTS = 267,
ENDS = 268,
UID = 269,
CLASS = 270,
LEASE = 271,
RANGE = 272,
PACKET = 273,
CIADDR = 274,
YIADDR = 275,
SIADDR = 276,
GIADDR = 277,
SUBNET = 278,
NETMASK = 279,
DEFAULT_LEASE_TIME = 280,
MAX_LEASE_TIME = 281,
VENDOR_CLASS = 282,
USER_CLASS = 283,
SHARED_NETWORK = 284,
SERVER_NAME = 285,
DYNAMIC_BOOTP = 286,
SERVER_IDENTIFIER = 287,
DYNAMIC_BOOTP_LEASE_CUTOFF = 288,
DYNAMIC_BOOTP_LEASE_LENGTH = 289,
BOOT_UNKNOWN_CLIENTS = 290,
NEXT_SERVER = 291,
TOKEN_RING = 292,
GROUP = 293,
ONE_LEASE_PER_CLIENT = 294,
GET_LEASE_HOSTNAMES = 295,
USE_HOST_DECL_NAMES = 296,
SEND = 297,
CLIENT_IDENTIFIER = 298,
REQUEST = 299,
REQUIRE = 300,
TIMEOUT = 301,
RETRY = 302,
SELECT_TIMEOUT = 303,
SCRIPT = 304,
INTERFACE = 305,
RENEW = 306,
REBIND = 307,
EXPIRE = 308,
UNKNOWN_CLIENTS = 309,
ALLOW = 310,
BOOTP = 311,
DENY = 312,
BOOTING = 313,
DEFAULT = 314,
MEDIA = 315,
MEDIUM = 316,
ALIAS = 317,
REBOOT = 318,
ABANDONED = 319,
BACKOFF_CUTOFF = 320,
INITIAL_INTERVAL = 321,
NAMESERVER = 322,
DOMAIN = 323,
SEARCH = 324,
SUPERSEDE = 325,
APPEND = 326,
PREPEND = 327,
HOSTNAME = 328,
CLIENT_HOSTNAME = 329,
REJECT = 330,
USE_LEASE_ADDR_FOR_DEFAULT_ROUTE = 331,
MIN_LEASE_TIME = 332,
MIN_SECS = 333,
AND = 334,
OR = 335,
NOT = 336,
SUBSTRING = 337,
SUFFIX = 338,
CHECK = 339,
EXTRACT_INT = 340,
IF = 341,
ADD = 342,
BREAK = 343,
ELSE = 344,
ELSIF = 345,
SUBCLASS = 346,
MATCH = 347,
SPAWN = 348,
WITH = 349,
EXISTS = 350,
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
(x) != STRING && \