summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2012-11-15 14:54:19 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2012-11-15 14:54:19 +0000
commit76758accf1097be80788d01d6fbab5d2a89a405e (patch)
tree9259ec5bc444f714db76709cbbedb90f05979375 /sbin
parent290da08e57b8c1d064f93ef567e96cbed4d24390 (diff)
Shuffle #include's to use the majority idiom everywhere - i.e. use
dhcpd.h to pull in most sys/net/netinet/etc. .h file. Eliminate superfluous #include's.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/bpf.c3
-rw-r--r--sbin/dhclient/conflex.c4
-rw-r--r--sbin/dhclient/dhclient.c9
-rw-r--r--sbin/dhclient/errwarn.c8
-rw-r--r--sbin/dhclient/kroute.c12
-rw-r--r--sbin/dhclient/options.c4
-rw-r--r--sbin/dhclient/packet.c3
7 files changed, 15 insertions, 28 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index 42e313a62d8..5913533c64a 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.21 2012/01/15 13:05:23 phessler Exp $ */
+/* $OpenBSD: bpf.c,v 1.22 2012/11/15 14:54:18 krw Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
@@ -48,7 +48,6 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
-#include <netinet/if_ether.h>
#define BPF_FORMAT "/dev/bpf%d"
diff --git a/sbin/dhclient/conflex.c b/sbin/dhclient/conflex.c
index 9c39cb17fa7..ebaaebc657c 100644
--- a/sbin/dhclient/conflex.c
+++ b/sbin/dhclient/conflex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conflex.c,v 1.17 2012/11/07 15:20:28 krw Exp $ */
+/* $OpenBSD: conflex.c,v 1.18 2012/11/15 14:54:18 krw Exp $ */
/* Lexical scanner for dhclient config file... */
@@ -40,8 +40,6 @@
* Enterprises, see ``http://www.vix.com''.
*/
-#include <ctype.h>
-
#include "dhcpd.h"
#include "dhctoken.h"
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 8df84c3810c..1da4fd047fd 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.176 2012/11/15 10:32:59 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.177 2012/11/15 14:54:18 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -53,15 +53,14 @@
* purpose.
*/
+#include "dhcpd.h"
+#include "privsep.h"
+
#include <sys/ioctl.h>
-#include <ctype.h>
#include <poll.h>
#include <pwd.h>
-#include "dhcpd.h"
-#include "privsep.h"
-
#define CLIENT_PATH "PATH=/usr/bin:/usr/sbin:/bin:/sbin"
#define DEFAULT_LEASE_TIME 43200 /* 12 hours... */
#define TIME_MAX 2147483647
diff --git a/sbin/dhclient/errwarn.c b/sbin/dhclient/errwarn.c
index 2357936be92..e7ddff58142 100644
--- a/sbin/dhclient/errwarn.c
+++ b/sbin/dhclient/errwarn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: errwarn.c,v 1.17 2009/11/26 23:14:29 krw Exp $ */
+/* $OpenBSD: errwarn.c,v 1.18 2012/11/15 14:54:18 krw Exp $ */
/* Errors and warnings... */
@@ -40,12 +40,10 @@
* with Vixie Laboratories.
*/
-#include <sys/types.h>
+#include "dhcpd.h"
+
#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include "dhcpd.h"
static void do_percentm(char *obuf, size_t size, char *ibuf);
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c
index 5cb5ae5c747..d3fb17f6308 100644
--- a/sbin/dhclient/kroute.c
+++ b/sbin/dhclient/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.15 2012/11/14 15:47:41 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.16 2012/11/15 14:54:18 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
@@ -16,21 +16,17 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "dhcpd.h"
+#include "privsep.h"
+
#include <sys/ioctl.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include <sys/sysctl.h>
#include <sys/uio.h>
#include <net/if_types.h>
-#include <net/if.h>
#include <ifaddrs.h>
-#include "dhcpd.h"
-#include "privsep.h"
-
/*
* Do equivalent of
*
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index f7959c6dd68..261e1aadbca 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.44 2012/11/08 21:32:55 krw Exp $ */
+/* $OpenBSD: options.c,v 1.45 2012/11/15 14:54:18 krw Exp $ */
/* DHCP options parsing and reassembly. */
@@ -40,8 +40,6 @@
* Enterprises, see ``http://www.vix.com''.
*/
-#include <ctype.h>
-
#include "dhcpd.h"
int parse_option_buffer(struct option_data *, unsigned char *, int);
diff --git a/sbin/dhclient/packet.c b/sbin/dhclient/packet.c
index 65662b9ed64..8b597dac54f 100644
--- a/sbin/dhclient/packet.c
+++ b/sbin/dhclient/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.13 2009/06/06 04:02:42 krw Exp $ */
+/* $OpenBSD: packet.c,v 1.14 2012/11/15 14:54:18 krw Exp $ */
/* Packet assembly code, originally contributed by Archie Cobbs. */
@@ -45,7 +45,6 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
-#include <netinet/if_ether.h>
#define ETHER_HEADER_SIZE (ETHER_ADDR_LEN * 2 + sizeof(u_int16_t))