From: Ted Lemon Date: Fri, 8 Nov 1996 20:09:41 +0000 (+0000) Subject: replace ARPHRD with HTYPE X-Git-Tag: BETA_5_14~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b5d360d4b8b4b947c107f053042e55675eb9b1d;p=thirdparty%2Fdhcp.git replace ARPHRD with HTYPE --- diff --git a/cf/linux.h b/cf/linux.h index 0674727bc..8e439d0b7 100644 --- a/cf/linux.h +++ b/cf/linux.h @@ -61,9 +61,6 @@ extern int h_errno; #include -#define ARPHRD_ETHER 1 -#define ARPHRD_IEEE802 6 - #include /* gettimeofday()*/ #include /* also necessary */ diff --git a/common/dispatch.c b/common/dispatch.c index c5b33dad3..1985fb4e9 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 06c4692d2..76e8606aa 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 a4c04821c..23a8bf737 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 c5b33dad3..1985fb4e9 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 0674727bc..8e439d0b7 100644 --- a/includes/cf/linux.h +++ b/includes/cf/linux.h @@ -61,9 +61,6 @@ extern int h_errno; #include -#define ARPHRD_ETHER 1 -#define ARPHRD_IEEE802 6 - #include /* gettimeofday()*/ #include /* also necessary */ diff --git a/includes/dhcp.h b/includes/dhcp.h index a4c04821c..23a8bf737 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 06c4692d2..76e8606aa 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);