summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-04-14 01:09:52 +0000
committerhenning <henning@openbsd.org>2004-04-14 01:09:52 +0000
commitec54c8794510e43c8d6bf77a64b70547d1d4cb90 (patch)
tree13f1a159e27a535e9343f7d5173cb563df413524
parentmore crap bites the dust (diff)
downloadwireguard-openbsd-ec54c8794510e43c8d6bf77a64b70547d1d4cb90.tar.xz
wireguard-openbsd-ec54c8794510e43c8d6bf77a64b70547d1d4cb90.zip
fold in 10liners and clean up other .hs a bit
-rw-r--r--usr.sbin/dhcpd/dhcp.h20
-rw-r--r--usr.sbin/dhcpd/dhcpd.h26
-rw-r--r--usr.sbin/dhcpd/dhctoken.h4
-rw-r--r--usr.sbin/dhcpd/hash.h56
-rw-r--r--usr.sbin/dhcpd/inet.h52
-rw-r--r--usr.sbin/dhcpd/tree.h6
6 files changed, 39 insertions, 125 deletions
diff --git a/usr.sbin/dhcpd/dhcp.h b/usr.sbin/dhcpd/dhcp.h
index b96ec3d096d..3b430843423 100644
--- a/usr.sbin/dhcpd/dhcp.h
+++ b/usr.sbin/dhcpd/dhcp.h
@@ -1,6 +1,6 @@
-/* dhcp.h
+/* $OpenBSD: dhcp.h,v 1.2 2004/04/14 01:09:52 henning Exp $ */
- Protocol structures... */
+/* Protocol structures... */
/*
* Copyright (c) 1995, 1996 The Internet Software Consortium.
@@ -40,8 +40,8 @@
* Enterprises, see ``http://www.vix.com''.
*/
-#define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \
- 20 + /* IP header */ \
+#define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \
+ 20 + /* IP header */ \
8) /* UDP header */
#define DHCP_SNAME_LEN 64
#define DHCP_FILE_LEN 128
@@ -55,7 +55,7 @@
#define DHCP_MIN_LEN 548
struct dhcp_packet {
- u_int8_t op; /* Message opcode/type */
+ u_int8_t op; /* Message opcode/type */
u_int8_t htype; /* Hardware addr type (see net/if_types.h) */
u_int8_t hlen; /* Hardware addr length */
u_int8_t hops; /* Number of relay agent hops from client */
@@ -66,16 +66,16 @@ struct dhcp_packet {
struct in_addr yiaddr; /* Client IP address */
struct in_addr siaddr; /* IP address of next server to talk to */
struct in_addr giaddr; /* DHCP relay agent IP address */
- unsigned char chaddr [16]; /* Client hardware address */
- char sname [DHCP_SNAME_LEN]; /* Server name */
- char file [DHCP_FILE_LEN]; /* Boot filename */
- unsigned char options [DHCP_OPTION_LEN];
+ unsigned char chaddr[16]; /* Client hardware address */
+ char sname[DHCP_SNAME_LEN]; /* Server name */
+ char file[DHCP_FILE_LEN]; /* Boot filename */
+ unsigned char options[DHCP_OPTION_LEN];
/* Optional parameters
(actual length dependent on MTU). */
};
/* BOOTP (rfc951) message types */
-#define BOOTREQUEST 1
+#define BOOTREQUEST 1
#define BOOTREPLY 2
/* Possible values for flags field... */
diff --git a/usr.sbin/dhcpd/dhcpd.h b/usr.sbin/dhcpd/dhcpd.h
index 98eb48511d3..be7e3f3a36f 100644
--- a/usr.sbin/dhcpd/dhcpd.h
+++ b/usr.sbin/dhcpd/dhcpd.h
@@ -98,11 +98,33 @@ extern int h_errno;
#include "dhcp.h"
#include "tree.h"
-#include "hash.h"
-#include "inet.h"
#define LOCAL_PORT 68
+struct iaddr {
+ int len;
+ unsigned char iabuf [16];
+};
+
+struct iaddrlist {
+ struct iaddrlist *next;
+ struct iaddr addr;
+};
+
+#define DEFAULT_HASH_SIZE 97
+
+struct hash_bucket {
+ struct hash_bucket *next;
+ unsigned char *name;
+ int len;
+ unsigned char *value;
+};
+
+struct hash_table {
+ int hash_count;
+ struct hash_bucket *buckets [DEFAULT_HASH_SIZE];
+};
+
struct option_data {
int len;
u_int8_t *data;
diff --git a/usr.sbin/dhcpd/dhctoken.h b/usr.sbin/dhcpd/dhctoken.h
index 2aeb5303af1..88a45ca4111 100644
--- a/usr.sbin/dhcpd/dhctoken.h
+++ b/usr.sbin/dhcpd/dhctoken.h
@@ -1,6 +1,6 @@
-/* dhctoken.h
+/* $OpenBSD: dhctoken.h,v 1.2 2004/04/14 01:09:52 henning Exp $ */
- Tokens for config file lexer and parser. */
+/* Tokens for config file lexer and parser. */
/*
* Copyright (c) 1995, 1996, 1997, 1998, 1999
diff --git a/usr.sbin/dhcpd/hash.h b/usr.sbin/dhcpd/hash.h
deleted file mode 100644
index 1bebb3140f8..00000000000
--- a/usr.sbin/dhcpd/hash.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* hash.h
-
- Definitions for hashing... */
-
-/*
- * Copyright (c) 1995, 1996 The Internet Software Consortium.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This software has been written for the Internet Software Consortium
- * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
- * Enterprises. To learn more about the Internet Software Consortium,
- * see ``http://www.vix.com/isc''. To learn more about Vixie
- * Enterprises, see ``http://www.vix.com''.
- */
-
-#define DEFAULT_HASH_SIZE 97
-
-struct hash_bucket {
- struct hash_bucket *next;
- unsigned char *name;
- int len;
- unsigned char *value;
-};
-
-struct hash_table {
- int hash_count;
- struct hash_bucket *buckets [DEFAULT_HASH_SIZE];
-};
-
diff --git a/usr.sbin/dhcpd/inet.h b/usr.sbin/dhcpd/inet.h
deleted file mode 100644
index 1cedc2331a2..00000000000
--- a/usr.sbin/dhcpd/inet.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* inet.h
-
- Portable definitions for internet addresses */
-
-/*
- * Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This software has been written for the Internet Software Consortium
- * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
- * Enterprises. To learn more about the Internet Software Consortium,
- * see ``http://www.vix.com/isc''. To learn more about Vixie
- * Enterprises, see ``http://www.vix.com''.
- */
-
-/* An internet address of up to 128 bits. */
-
-struct iaddr {
- int len;
- unsigned char iabuf [16];
-};
-
-struct iaddrlist {
- struct iaddrlist *next;
- struct iaddr addr;
-};
diff --git a/usr.sbin/dhcpd/tree.h b/usr.sbin/dhcpd/tree.h
index 73956be528c..e9d9ae0b236 100644
--- a/usr.sbin/dhcpd/tree.h
+++ b/usr.sbin/dhcpd/tree.h
@@ -1,6 +1,6 @@
-/* tree.h
+/* $OpenBSD: tree.h,v 1.3 2004/04/14 01:09:52 henning Exp $ */
- Definitions for address trees... */
+/* Definitions for address trees... */
/*
* Copyright (c) 1995 The Internet Software Consortium. All rights reserved.
@@ -96,7 +96,7 @@ struct tree_cache {
struct universe {
char *name;
struct hash_table *hash;
- struct option *options [256];
+ struct option *options[256];
};
struct option {