From f71f026a5bf50255f64fc0db6ce72e06db29019f Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Tue, 18 Feb 1997 14:32:30 +0000 Subject: [PATCH] Add DHCP client tokens --- common/conflex.c | 28 +++++++++++++++++++++++++++- conflex.c | 28 +++++++++++++++++++++++++++- dhctoken.h | 12 ++++++++++++ includes/dhctoken.h | 12 ++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) diff --git a/common/conflex.c b/common/conflex.c index b8b6a1952..979a5c2a3 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.19 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.20 1997/02/18 14:32:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -360,6 +360,8 @@ static int intern (atom, dfv) return CLASS; if (!strcasecmp (atom + 1, "iaddr")) return CIADDR; + if (!strcasecmp (atom + 1, "lient-identifier")) + return CLIENT_IDENTIFIER; break; case 'd': if (!strcasecmp (atom + 1, "efault-lease-time")) @@ -378,6 +380,8 @@ static int intern (atom, dfv) return ETHERNET; if (!strcasecmp (atom + 1, "nds")) return ENDS; + if (!strcasecmp (atom + 1, "xpire")) + return EXPIRE; break; case 'f': if (!strcasecmp (atom + 1, "ilename")) @@ -396,9 +400,15 @@ static int intern (atom, dfv) case 'h': if (!strcasecmp (atom + 1, "ost")) return HOST; + if (!strcasecmp (atom + 1, "ostname")) + return HOSTNAME; if (!strcasecmp (atom + 1, "ardware")) return HARDWARE; break; + case 'i': + if (!strcasecmp (atom + 1, "nterface")) + return INTERFACE; + break; case 'l': if (!strcasecmp (atom + 1, "ease")) return LEASE; @@ -426,6 +436,16 @@ static int intern (atom, dfv) case 'r': if (!strcasecmp (atom + 1, "ange")) return RANGE; + if (!strcasecmp (atom + 1, "equest")) + return REQUEST; + if (!strcasecmp (atom + 1, "equire")) + return REQUIRE; + if (!strcasecmp (atom + 1, "etry")) + return RETRY; + if (!strcasecmp (atom + 1, "enew")) + return RENEW; + if (!strcasecmp (atom + 1, "ebind")) + return REBIND; break; case 's': if (!strcasecmp (atom + 1, "tarts")) @@ -440,10 +460,16 @@ static int intern (atom, dfv) return SERVER_NAME; if (!strcasecmp (atom + 1, "erver-identifier")) return SERVER_IDENTIFIER; + if (!strcasecmp (atom + 1, "elect-timeout")) + return SELECT_TIMEOUT; + if (!strcasecmp (atom + 1, "cript")) + return SCRIPT; break; case 't': if (!strcasecmp (atom + 1, "imestamp")) return TIMESTAMP; + if (!strcasecmp (atom + 1, "imeout")) + return TIMEOUT; if (!strcasecmp (atom + 1, "oken-ring")) return TOKEN_RING; break; diff --git a/conflex.c b/conflex.c index b8b6a1952..979a5c2a3 100644 --- a/conflex.c +++ b/conflex.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.19 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.20 1997/02/18 14:32:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -360,6 +360,8 @@ static int intern (atom, dfv) return CLASS; if (!strcasecmp (atom + 1, "iaddr")) return CIADDR; + if (!strcasecmp (atom + 1, "lient-identifier")) + return CLIENT_IDENTIFIER; break; case 'd': if (!strcasecmp (atom + 1, "efault-lease-time")) @@ -378,6 +380,8 @@ static int intern (atom, dfv) return ETHERNET; if (!strcasecmp (atom + 1, "nds")) return ENDS; + if (!strcasecmp (atom + 1, "xpire")) + return EXPIRE; break; case 'f': if (!strcasecmp (atom + 1, "ilename")) @@ -396,9 +400,15 @@ static int intern (atom, dfv) case 'h': if (!strcasecmp (atom + 1, "ost")) return HOST; + if (!strcasecmp (atom + 1, "ostname")) + return HOSTNAME; if (!strcasecmp (atom + 1, "ardware")) return HARDWARE; break; + case 'i': + if (!strcasecmp (atom + 1, "nterface")) + return INTERFACE; + break; case 'l': if (!strcasecmp (atom + 1, "ease")) return LEASE; @@ -426,6 +436,16 @@ static int intern (atom, dfv) case 'r': if (!strcasecmp (atom + 1, "ange")) return RANGE; + if (!strcasecmp (atom + 1, "equest")) + return REQUEST; + if (!strcasecmp (atom + 1, "equire")) + return REQUIRE; + if (!strcasecmp (atom + 1, "etry")) + return RETRY; + if (!strcasecmp (atom + 1, "enew")) + return RENEW; + if (!strcasecmp (atom + 1, "ebind")) + return REBIND; break; case 's': if (!strcasecmp (atom + 1, "tarts")) @@ -440,10 +460,16 @@ static int intern (atom, dfv) return SERVER_NAME; if (!strcasecmp (atom + 1, "erver-identifier")) return SERVER_IDENTIFIER; + if (!strcasecmp (atom + 1, "elect-timeout")) + return SELECT_TIMEOUT; + if (!strcasecmp (atom + 1, "cript")) + return SCRIPT; break; case 't': if (!strcasecmp (atom + 1, "imestamp")) return TIMESTAMP; + if (!strcasecmp (atom + 1, "imeout")) + return TIMEOUT; if (!strcasecmp (atom + 1, "oken-ring")) return TOKEN_RING; break; diff --git a/dhctoken.h b/dhctoken.h index bbb02cad9..8508983a4 100644 --- a/dhctoken.h +++ b/dhctoken.h @@ -90,6 +90,18 @@ #define ONE_LEASE_PER_CLIENT 294 #define GET_LEASE_HOSTNAMES 295 #define USE_HOST_DECL_NAMES 296 +#define HOSTNAME 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 is_identifier(x) ((x) >= FIRST_TOKEN && \ (x) != STRING && \ diff --git a/includes/dhctoken.h b/includes/dhctoken.h index bbb02cad9..8508983a4 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h @@ -90,6 +90,18 @@ #define ONE_LEASE_PER_CLIENT 294 #define GET_LEASE_HOSTNAMES 295 #define USE_HOST_DECL_NAMES 296 +#define HOSTNAME 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 is_identifier(x) ((x) >= FIRST_TOKEN && \ (x) != STRING && \ -- 2.47.3