2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-01 06:45:27 +00:00

Add get-lease-hostnames parameter

This commit is contained in:
Ted Lemon
1996-08-29 23:02:40 +00:00
parent f5d07a3896
commit 5fea7b10ff
12 changed files with 1326 additions and 1806 deletions

View File

@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: conflex.c,v 1.17 1996/08/29 09:49:52 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: conflex.c,v 1.18 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -390,6 +390,8 @@ static int intern (atom, dfv)
return GIADDR;
if (!strcasecmp (atom + 1, "roup"))
return GROUP;
if (!strcasecmp (atom + 1, "et-lease-hostnames"))
return GET_LEASE_HOSTNAMES;
break;
case 'h':
if (!strcasecmp (atom + 1, "ost"))

View File

@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: conflex.c,v 1.17 1996/08/29 09:49:52 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: conflex.c,v 1.18 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -390,6 +390,8 @@ static int intern (atom, dfv)
return GIADDR;
if (!strcasecmp (atom + 1, "roup"))
return GROUP;
if (!strcasecmp (atom + 1, "et-lease-hostnames"))
return GET_LEASE_HOSTNAMES;
break;
case 'h':
if (!strcasecmp (atom + 1, "ost"))

View File

@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: confpars.c,v 1.29 1996/08/29 20:12:37 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: confpars.c,v 1.30 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -143,6 +143,7 @@ void read_leases ()
| DYNAMIC_BOOTP_LEASE_LENGTH lease_time
| BOOT_UNKNOWN_CLIENTS boolean
| ONE_LEASE_PER_CLIENT boolean
| GET_LEASE_HOSTNAMES boolean
| NEXT_SERVER ip-addr-or-hostname SEMI
| option_parameter
| SERVER-IDENTIFIER ip-addr-or-hostname SEMI
@@ -285,6 +286,12 @@ int parse_statement (cfile, group, type, host_decl, declaration)
group -> one_lease_per_client = parse_boolean (cfile);
break;
case GET_LEASE_HOSTNAMES:
if (type == HOST_DECL)
parse_warn ("get-lease-hostnames not allowed here.");
group -> get_lease_hostnames = parse_boolean (cfile);
break;
case NEXT_SERVER:
tree = parse_ip_addr_or_hostname (cfile, 0);
if (!tree)

View File

@@ -595,6 +595,19 @@ or not to dynamically assign addresses to unknown DHCP clients. If
assigned to unknown DHCP clients when available. If \fIflag\fR is
false, then addresses are provided only to DHCP clients which match at
least one host declaration.
.PP
.B The
.I get-lease-hostnames
.B statement
.PP
\fBget-lease-hostnames\fR \fIflag\fR\fB;\fR
.PP
The \fIget-lease-hostnames\fR statement is used to tell dhcpd whether
or not to look up the domain name corresponding to the IP address of
each address in the lease pool and use that address for the DHCP
\fIhostname\fR option. If \fIflag\fR is true, then this lookup is
done for all addresses in the current scope. By default, or if
\fIflag\fR is false, no lookups are done.
.SH REFERENCE: OPTION STATEMENTS
.PP
DHCP \fIoption\fR statements always start with the \fIoption\fR

File diff suppressed because it is too large Load Diff

View File

@@ -137,6 +137,7 @@ struct group {
int boot_unknown_clients;
int dynamic_bootp;
int one_lease_per_client;
int get_lease_hostnames;
struct tree_cache *options [256];
};

View File

@@ -88,6 +88,7 @@
#define TOKEN_RING 292
#define GROUP 293
#define ONE_LEASE_PER_CLIENT 294
#define GET_LEASE_HOSTNAMES 295
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
(x) != STRING && \

View File

@@ -137,6 +137,7 @@ struct group {
int boot_unknown_clients;
int dynamic_bootp;
int one_lease_per_client;
int get_lease_hostnames;
struct tree_cache *options [256];
};

View File

@@ -88,6 +88,7 @@
#define TOKEN_RING 292
#define GROUP 293
#define ONE_LEASE_PER_CLIENT 294
#define GET_LEASE_HOSTNAMES 295
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
(x) != STRING && \

View File

@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: confpars.c,v 1.29 1996/08/29 20:12:37 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: confpars.c,v 1.30 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -143,6 +143,7 @@ void read_leases ()
| DYNAMIC_BOOTP_LEASE_LENGTH lease_time
| BOOT_UNKNOWN_CLIENTS boolean
| ONE_LEASE_PER_CLIENT boolean
| GET_LEASE_HOSTNAMES boolean
| NEXT_SERVER ip-addr-or-hostname SEMI
| option_parameter
| SERVER-IDENTIFIER ip-addr-or-hostname SEMI
@@ -285,6 +286,12 @@ int parse_statement (cfile, group, type, host_decl, declaration)
group -> one_lease_per_client = parse_boolean (cfile);
break;
case GET_LEASE_HOSTNAMES:
if (type == HOST_DECL)
parse_warn ("get-lease-hostnames not allowed here.");
group -> get_lease_hostnames = parse_boolean (cfile);
break;
case NEXT_SERVER:
tree = parse_ip_addr_or_hostname (cfile, 0);
if (!tree)

View File

@@ -595,6 +595,19 @@ or not to dynamically assign addresses to unknown DHCP clients. If
assigned to unknown DHCP clients when available. If \fIflag\fR is
false, then addresses are provided only to DHCP clients which match at
least one host declaration.
.PP
.B The
.I get-lease-hostnames
.B statement
.PP
\fBget-lease-hostnames\fR \fIflag\fR\fB;\fR
.PP
The \fIget-lease-hostnames\fR statement is used to tell dhcpd whether
or not to look up the domain name corresponding to the IP address of
each address in the lease pool and use that address for the DHCP
\fIhostname\fR option. If \fIflag\fR is true, then this lookup is
done for all addresses in the current scope. By default, or if
\fIflag\fR is false, no lookups are done.
.SH REFERENCE: OPTION STATEMENTS
.PP
DHCP \fIoption\fR statements always start with the \fIoption\fR

File diff suppressed because it is too large Load Diff