summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1996-11-08 20:09:41 +0000
committerTed Lemon <source@isc.org>1996-11-08 20:09:41 +0000
commit0b5d360d4b8b4b947c107f053042e55675eb9b1d (patch)
tree4f03145c9457add042b62c881d41248703051a0b
parent2a5cb261ed7f3e4b04d663f2b4026ad239d167f9 (diff)
downloadisc-dhcp-0b5d360d4b8b4b947c107f053042e55675eb9b1d.tar.gz
replace ARPHRD with HTYPE
-rw-r--r--cf/linux.h3
-rw-r--r--common/dispatch.c4
-rw-r--r--confpars.c9
-rw-r--r--dhcp.h4
-rw-r--r--dispatch.c4
-rw-r--r--includes/cf/linux.h3
-rw-r--r--includes/dhcp.h4
-rw-r--r--server/confpars.c9
8 files changed, 18 insertions, 22 deletions
diff --git a/cf/linux.h b/cf/linux.h
index 0674727b..8e439d0b 100644
--- a/cf/linux.h
+++ b/cf/linux.h
@@ -61,9 +61,6 @@ extern int h_errno;
#include <net/if.h>
-#define ARPHRD_ETHER 1
-#define ARPHRD_IEEE802 6
-
#include <sys/time.h> /* gettimeofday()*/
#include <linux/time.h> /* also necessary */
diff --git a/common/dispatch.c b/common/dispatch.c
index c5b33dad..1985fb4e 100644
--- a/common/dispatch.c
+++ b/common/dispatch.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dispatch.c,v 1.26 1996/09/11 18:53:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.27 1996/11/08 20:06:29 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -153,7 +153,7 @@ void discover_interfaces (serverP)
struct sockaddr_dl *foo = ((struct sockaddr_dl *)
(&ifp -> ifr_addr));
tmp -> hw_address.hlen = foo -> sdl_alen;
- tmp -> hw_address.htype = ARPHRD_ETHER; /* XXX */
+ tmp -> hw_address.htype = HTYPE_ETHER; /* XXX */
memcpy (tmp -> hw_address.haddr,
LLADDR (foo), foo -> sdl_alen);
} else
diff --git a/confpars.c b/confpars.c
index 06c4692d..76e8606a 100644
--- a/confpars.c
+++ b/confpars.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.35 1996/09/13 18:58:20 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.36 1996/11/08 20:06:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -289,7 +289,6 @@ int parse_statement (cfile, group, type, host_decl, declaration)
if (type == HOST_DECL)
parse_warn ("get-lease-hostnames not allowed here.");
group -> get_lease_hostnames = parse_boolean (cfile);
-note ("get_lease_hostnames: %d", group -> get_lease_hostnames);
break;
case USE_HOST_DECL_NAMES:
@@ -866,13 +865,11 @@ void parse_hardware_param (cfile, hardware)
token = next_token (&val, cfile);
switch (token) {
case ETHERNET:
- hardware -> htype = ARPHRD_ETHER;
+ hardware -> htype = HTYPE_ETHER;
break;
-#ifdef ARPHRD_IEEE802 /* XXX */
case TOKEN_RING:
- hardware -> htype = ARPHRD_IEEE802;
+ hardware -> htype = HTYPE_IEEE802;
break;
-#endif
default:
parse_warn ("expecting a network hardware type");
skip_to_semi (cfile);
diff --git a/dhcp.h b/dhcp.h
index a4c04821..23a8bf73 100644
--- a/dhcp.h
+++ b/dhcp.h
@@ -80,6 +80,10 @@ struct dhcp_packet {
/* Possible values for flags field... */
#define BOOTP_BROADCAST 32768L
+/* Possible values for hardware type (htype) field... */
+#define HTYPE_ETHER 1 /* Ethernet 10Mbps */
+#define HTYPE_IEEE802 6 /* IEEE 802.2 Token Ring... */
+
/* Magic cookie validating dhcp options field (and bootp vendor
extensions field). */
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
diff --git a/dispatch.c b/dispatch.c
index c5b33dad..1985fb4e 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dispatch.c,v 1.26 1996/09/11 18:53:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.27 1996/11/08 20:06:29 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -153,7 +153,7 @@ void discover_interfaces (serverP)
struct sockaddr_dl *foo = ((struct sockaddr_dl *)
(&ifp -> ifr_addr));
tmp -> hw_address.hlen = foo -> sdl_alen;
- tmp -> hw_address.htype = ARPHRD_ETHER; /* XXX */
+ tmp -> hw_address.htype = HTYPE_ETHER; /* XXX */
memcpy (tmp -> hw_address.haddr,
LLADDR (foo), foo -> sdl_alen);
} else
diff --git a/includes/cf/linux.h b/includes/cf/linux.h
index 0674727b..8e439d0b 100644
--- a/includes/cf/linux.h
+++ b/includes/cf/linux.h
@@ -61,9 +61,6 @@ extern int h_errno;
#include <net/if.h>
-#define ARPHRD_ETHER 1
-#define ARPHRD_IEEE802 6
-
#include <sys/time.h> /* gettimeofday()*/
#include <linux/time.h> /* also necessary */
diff --git a/includes/dhcp.h b/includes/dhcp.h
index a4c04821..23a8bf73 100644
--- a/includes/dhcp.h
+++ b/includes/dhcp.h
@@ -80,6 +80,10 @@ struct dhcp_packet {
/* Possible values for flags field... */
#define BOOTP_BROADCAST 32768L
+/* Possible values for hardware type (htype) field... */
+#define HTYPE_ETHER 1 /* Ethernet 10Mbps */
+#define HTYPE_IEEE802 6 /* IEEE 802.2 Token Ring... */
+
/* Magic cookie validating dhcp options field (and bootp vendor
extensions field). */
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
diff --git a/server/confpars.c b/server/confpars.c
index 06c4692d..76e8606a 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.35 1996/09/13 18:58:20 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.36 1996/11/08 20:06:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -289,7 +289,6 @@ int parse_statement (cfile, group, type, host_decl, declaration)
if (type == HOST_DECL)
parse_warn ("get-lease-hostnames not allowed here.");
group -> get_lease_hostnames = parse_boolean (cfile);
-note ("get_lease_hostnames: %d", group -> get_lease_hostnames);
break;
case USE_HOST_DECL_NAMES:
@@ -866,13 +865,11 @@ void parse_hardware_param (cfile, hardware)
token = next_token (&val, cfile);
switch (token) {
case ETHERNET:
- hardware -> htype = ARPHRD_ETHER;
+ hardware -> htype = HTYPE_ETHER;
break;
-#ifdef ARPHRD_IEEE802 /* XXX */
case TOKEN_RING:
- hardware -> htype = ARPHRD_IEEE802;
+ hardware -> htype = HTYPE_IEEE802;
break;
-#endif
default:
parse_warn ("expecting a network hardware type");
skip_to_semi (cfile);