diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-02-06 23:50:11 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-02-06 23:50:11 +0000 |
commit | b6249db2d7089ab71bae1b8aea3a0399482e4c41 (patch) | |
tree | e64685766291fdb65a0994af64d3ef49e80280ad /usr.sbin | |
parent | 8ef2fa9bbd914f2f092dc28bb985d3ac8b159b2f (diff) |
Eliminate #include inside *.h files and include only needed headers in
each *.c file.
Inspired by mention of header silliness by Edgar Pettijohn and mmcc@
on tech@.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dhcpd/alloc.c | 14 | ||||
-rw-r--r-- | usr.sbin/dhcpd/bootp.c | 16 | ||||
-rw-r--r-- | usr.sbin/dhcpd/bpf.c | 24 | ||||
-rw-r--r-- | usr.sbin/dhcpd/conflex.c | 14 | ||||
-rw-r--r-- | usr.sbin/dhcpd/confpars.c | 14 | ||||
-rw-r--r-- | usr.sbin/dhcpd/convert.c | 15 | ||||
-rw-r--r-- | usr.sbin/dhcpd/db.c | 15 | ||||
-rw-r--r-- | usr.sbin/dhcpd/dhcp.c | 18 | ||||
-rw-r--r-- | usr.sbin/dhcpd/dhcpd.c | 23 | ||||
-rw-r--r-- | usr.sbin/dhcpd/dhcpd.h | 33 | ||||
-rw-r--r-- | usr.sbin/dhcpd/dispatch.c | 30 | ||||
-rw-r--r-- | usr.sbin/dhcpd/errwarn.c | 18 | ||||
-rw-r--r-- | usr.sbin/dhcpd/hash.c | 15 | ||||
-rw-r--r-- | usr.sbin/dhcpd/icmp.c | 19 | ||||
-rw-r--r-- | usr.sbin/dhcpd/inet.c | 16 | ||||
-rw-r--r-- | usr.sbin/dhcpd/memory.c | 16 | ||||
-rw-r--r-- | usr.sbin/dhcpd/options.c | 15 | ||||
-rw-r--r-- | usr.sbin/dhcpd/packet.c | 15 | ||||
-rw-r--r-- | usr.sbin/dhcpd/parse.c | 17 | ||||
-rw-r--r-- | usr.sbin/dhcpd/pfutils.c | 9 | ||||
-rw-r--r-- | usr.sbin/dhcpd/print.c | 14 | ||||
-rw-r--r-- | usr.sbin/dhcpd/sync.c | 31 | ||||
-rw-r--r-- | usr.sbin/dhcpd/tables.c | 13 | ||||
-rw-r--r-- | usr.sbin/dhcpd/tree.c | 15 | ||||
-rw-r--r-- | usr.sbin/dhcpd/udpsock.c | 19 |
25 files changed, 351 insertions, 97 deletions
diff --git a/usr.sbin/dhcpd/alloc.c b/usr.sbin/dhcpd/alloc.c index f42af8211d3..89a906b1e20 100644 --- a/usr.sbin/dhcpd/alloc.c +++ b/usr.sbin/dhcpd/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.13 2015/12/21 21:39:11 mmcc Exp $ */ +/* $OpenBSD: alloc.c,v 1.14 2016/02/06 23:50:10 krw Exp $ */ /* Memory allocation... */ @@ -40,6 +40,18 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <stdlib.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" struct lease_state *free_lease_states; diff --git a/usr.sbin/dhcpd/bootp.c b/usr.sbin/dhcpd/bootp.c index c47664ffb9b..36d79190f19 100644 --- a/usr.sbin/dhcpd/bootp.c +++ b/usr.sbin/dhcpd/bootp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootp.c,v 1.15 2014/07/11 09:42:27 yasuoka Exp $ */ +/* $OpenBSD: bootp.c,v 1.16 2016/02/06 23:50:10 krw Exp $ */ /* * BOOTP Protocol support. @@ -42,6 +42,20 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/socket.h> + +#include <arpa/inet.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <errno.h> +#include <stdio.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" void diff --git a/usr.sbin/dhcpd/bpf.c b/usr.sbin/dhcpd/bpf.c index 57b38512d12..6d54149c753 100644 --- a/usr.sbin/dhcpd/bpf.c +++ b/usr.sbin/dhcpd/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.12 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: bpf.c,v 1.13 2016/02/06 23:50:10 krw Exp $ */ /* BPF socket interface code, originally contributed by Archie Cobbs. */ @@ -40,14 +40,28 @@ * Enterprises, see ``http://www.vix.com''. */ -#include "dhcpd.h" #include <sys/ioctl.h> -#include <sys/uio.h> +#include <sys/types.h> +#include <sys/socket.h> + +#include <arpa/inet.h> #include <net/bpf.h> -#include <netinet/ip.h> -#include <netinet/udp.h> +#include <net/if.h> + #include <netinet/if_ether.h> +#include <netinet/in.h> + +#include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include "dhcp.h" +#include "tree.h" +#include "dhcpd.h" #define BPF_FORMAT "/dev/bpf%d" diff --git a/usr.sbin/dhcpd/conflex.c b/usr.sbin/dhcpd/conflex.c index ee1611d52e0..246dcb77bbe 100644 --- a/usr.sbin/dhcpd/conflex.c +++ b/usr.sbin/dhcpd/conflex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conflex.c,v 1.15 2015/05/18 17:51:21 krw Exp $ */ +/* $OpenBSD: conflex.c,v 1.16 2016/02/06 23:50:10 krw Exp $ */ /* Lexical scanner for dhcpd config file... */ @@ -40,8 +40,20 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + #include <ctype.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" #include "dhctoken.h" diff --git a/usr.sbin/dhcpd/confpars.c b/usr.sbin/dhcpd/confpars.c index 2423e91dba1..d3119acf657 100644 --- a/usr.sbin/dhcpd/confpars.c +++ b/usr.sbin/dhcpd/confpars.c @@ -1,4 +1,4 @@ -/* $OpenBSD: confpars.c,v 1.25 2015/08/20 22:39:29 deraadt Exp $ */ +/* $OpenBSD: confpars.c,v 1.26 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium. @@ -38,6 +38,18 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netdb.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" #include "dhctoken.h" diff --git a/usr.sbin/dhcpd/convert.c b/usr.sbin/dhcpd/convert.c index e2750f67da9..690b92fa96b 100644 --- a/usr.sbin/dhcpd/convert.c +++ b/usr.sbin/dhcpd/convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: convert.c,v 1.4 2004/05/04 21:25:27 deraadt Exp $ */ +/* $OpenBSD: convert.c,v 1.5 2016/02/06 23:50:10 krw Exp $ */ /* * Safe copying of option values into and out of the option buffer, @@ -43,6 +43,19 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" u_int32_t diff --git a/usr.sbin/dhcpd/db.c b/usr.sbin/dhcpd/db.c index 664772c6e35..cc29ad692e2 100644 --- a/usr.sbin/dhcpd/db.c +++ b/usr.sbin/dhcpd/db.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db.c,v 1.14 2014/02/08 18:12:17 krw Exp $ */ +/* $OpenBSD: db.c,v 1.15 2016/02/06 23:50:10 krw Exp $ */ /* * Persistent database management routines for DHCPD. @@ -42,6 +42,19 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <fcntl.h> +#include <stdio.h> +#include <unistd.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" FILE *db_file; diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c index 6ce9af56a0b..18dc8c40a38 100644 --- a/usr.sbin/dhcpd/dhcp.c +++ b/usr.sbin/dhcpd/dhcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp.c,v 1.44 2015/12/21 21:39:11 mmcc Exp $ */ +/* $OpenBSD: dhcp.c,v 1.45 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -38,6 +38,22 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <arpa/inet.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" #include "sync.h" diff --git a/usr.sbin/dhcpd/dhcpd.c b/usr.sbin/dhcpd/dhcpd.c index 074706c0b2e..5ffc2155770 100644 --- a/usr.sbin/dhcpd/dhcpd.c +++ b/usr.sbin/dhcpd/dhcpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.c,v 1.49 2015/12/14 01:08:50 krw Exp $ */ +/* $OpenBSD: dhcpd.c,v 1.50 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org> @@ -39,11 +39,28 @@ * Enterprises, see ``http://www.vix.com''. */ -#include "dhcpd.h" -#include "sync.h" +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <arpa/inet.h> #include <err.h> +#include <netdb.h> +#include <paths.h> #include <pwd.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <syslog.h> +#include <unistd.h> + +#include "dhcp.h" +#include "tree.h" +#include "dhcpd.h" +#include "sync.h" + __dead void usage(void); diff --git a/usr.sbin/dhcpd/dhcpd.h b/usr.sbin/dhcpd/dhcpd.h index 87323ce01cd..4cc611d4283 100644 --- a/usr.sbin/dhcpd/dhcpd.h +++ b/usr.sbin/dhcpd/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.52 2014/07/11 16:48:29 yasuoka Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.53 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -38,42 +38,11 @@ * Enterprises, see ``http://www.vix.com''. */ -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <sys/sockio.h> -#include <sys/time.h> - -#include <net/if.h> -#include <net/if_dl.h> -#include <net/route.h> - -#include <netinet/in.h> -#include <arpa/inet.h> - -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <limits.h> -#include <netdb.h> -#include <paths.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <syslog.h> -#include <time.h> -#include <unistd.h> - #define ifr_netmask ifr_addr #define HAVE_SA_LEN #define HAVE_MKSTEMP -#include "dhcp.h" -#include "tree.h" - #define DB_TIMEFMT "%w %Y/%m/%d %T UTC" #define OLD_DB_TIMEFMT "%w %Y/%m/%d %T" diff --git a/usr.sbin/dhcpd/dispatch.c b/usr.sbin/dhcpd/dispatch.c index a54f05220af..08232b313db 100644 --- a/usr.sbin/dhcpd/dispatch.c +++ b/usr.sbin/dhcpd/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.35 2015/08/20 22:39:29 deraadt Exp $ */ +/* $OpenBSD: dispatch.c,v 1.36 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -38,13 +38,33 @@ * Enterprises, see ``http://www.vix.com''. */ -#include "dhcpd.h" -#include "sync.h" -#include <ifaddrs.h> +#include <sys/types.h> #include <sys/ioctl.h> -#include <poll.h> +#include <sys/socket.h> + +#include <arpa/inet.h> + +#include <net/if.h> +#include <net/if_dl.h> #include <net/if_media.h> +#include <netinet/in.h> + +#include <errno.h> +#include <ifaddrs.h> +#include <limits.h> +#include <poll.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <syslog.h> +#include <unistd.h> + +#include "dhcp.h" +#include "tree.h" +#include "dhcpd.h" +#include "sync.h" + extern int syncfd; struct interface_info *interfaces; diff --git a/usr.sbin/dhcpd/errwarn.c b/usr.sbin/dhcpd/errwarn.c index 050eb230076..e825c3b5ec2 100644 --- a/usr.sbin/dhcpd/errwarn.c +++ b/usr.sbin/dhcpd/errwarn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: errwarn.c,v 1.8 2008/05/07 12:19:20 beck Exp $ */ +/* $OpenBSD: errwarn.c,v 1.9 2016/02/06 23:50:10 krw Exp $ */ /* Errors and warnings... */ @@ -41,10 +41,22 @@ */ #include <sys/types.h> -#include <sys/uio.h> -#include <unistd.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + #include <errno.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <syslog.h> +#include <unistd.h> +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" static void do_percentm(char *obuf, size_t size, char *ibuf); diff --git a/usr.sbin/dhcpd/hash.c b/usr.sbin/dhcpd/hash.c index c817d44506d..2f478d14de9 100644 --- a/usr.sbin/dhcpd/hash.c +++ b/usr.sbin/dhcpd/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.6 2010/01/01 20:30:25 krw Exp $ */ +/* $OpenBSD: hash.c,v 1.7 2016/02/06 23:50:10 krw Exp $ */ /* Routines for manipulating hash tables... */ @@ -40,6 +40,19 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" static int do_hash(unsigned char *, int, int); diff --git a/usr.sbin/dhcpd/icmp.c b/usr.sbin/dhcpd/icmp.c index be7742ac524..2d95ac28227 100644 --- a/usr.sbin/dhcpd/icmp.c +++ b/usr.sbin/dhcpd/icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp.c,v 1.13 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: icmp.c,v 1.14 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 1997, 1998 The Internet Software Consortium. @@ -38,10 +38,25 @@ * Enterprises, see ``http://www.vix.com''. */ -#include "dhcpd.h" +#include <sys/types.h> +#include <sys/socket.h> + +#include <arpa/inet.h> + +#include <net/if.h> + #include <netinet/ip.h> #include <netinet/ip_icmp.h> +#include <netdb.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> + +#include "dhcp.h" +#include "tree.h" +#include "dhcpd.h" + static int icmp_protocol_initialized; static int icmp_protocol_fd; diff --git a/usr.sbin/dhcpd/inet.c b/usr.sbin/dhcpd/inet.c index 6255b37184f..de8507cca39 100644 --- a/usr.sbin/dhcpd/inet.c +++ b/usr.sbin/dhcpd/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.5 2004/09/16 21:27:44 claudio Exp $ */ +/* $OpenBSD: inet.c,v 1.6 2016/02/06 23:50:10 krw Exp $ */ /* * Subroutines to manipulate internet addresses in a safely portable @@ -42,6 +42,20 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <arpa/inet.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" /* diff --git a/usr.sbin/dhcpd/memory.c b/usr.sbin/dhcpd/memory.c index 0e2f6799466..a214636a482 100644 --- a/usr.sbin/dhcpd/memory.c +++ b/usr.sbin/dhcpd/memory.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memory.c,v 1.23 2015/02/10 23:06:13 krw Exp $ */ +/* $OpenBSD: memory.c,v 1.24 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. @@ -38,6 +38,20 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <arpa/inet.h> + +#include <net/if.h> + +#include <netdb.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" #include "sync.h" diff --git a/usr.sbin/dhcpd/options.c b/usr.sbin/dhcpd/options.c index 6557d1eae5b..5ca9a4383fb 100644 --- a/usr.sbin/dhcpd/options.c +++ b/usr.sbin/dhcpd/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.29 2015/06/27 14:29:39 krw Exp $ */ +/* $OpenBSD: options.c,v 1.30 2016/02/06 23:50:10 krw Exp $ */ /* DHCP options parsing and reassembly. */ @@ -40,8 +40,19 @@ * Enterprises, see ``http://www.vix.com''. */ -#include <ctype.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" int bad_options = 0; diff --git a/usr.sbin/dhcpd/packet.c b/usr.sbin/dhcpd/packet.c index 4b0ac2cf653..121cfa96815 100644 --- a/usr.sbin/dhcpd/packet.c +++ b/usr.sbin/dhcpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.10 2016/02/03 14:48:36 krw Exp $ */ +/* $OpenBSD: packet.c,v 1.11 2016/02/06 23:50:10 krw Exp $ */ /* Packet assembly code, originally contributed by Archie Cobbs. */ @@ -40,12 +40,23 @@ * Enterprises, see ``http://www.vix.com''. */ -#include "dhcpd.h" +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> +#include <netinet/in.h> #include <netinet/ip.h> #include <netinet/udp.h> #include <netinet/if_ether.h> +#include <stdio.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" +#include "dhcpd.h" + u_int32_t checksum(unsigned char *, unsigned, u_int32_t); u_int32_t wrapsum(u_int32_t); diff --git a/usr.sbin/dhcpd/parse.c b/usr.sbin/dhcpd/parse.c index c93620fd38d..18852ce868b 100644 --- a/usr.sbin/dhcpd/parse.c +++ b/usr.sbin/dhcpd/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.19 2015/12/11 14:09:48 krw Exp $ */ +/* $OpenBSD: parse.c,v 1.20 2016/02/06 23:50:10 krw Exp $ */ /* Common parser code for dhcpd and dhclient. */ @@ -40,8 +40,21 @@ * Enterprises, see ``http://www.vix.com''. */ -#include <stdint.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <net/if.h> + +#include <netinet/in.h> + +#include <ctype.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" #include "dhctoken.h" diff --git a/usr.sbin/dhcpd/pfutils.c b/usr.sbin/dhcpd/pfutils.c index 7f11185744a..10c8c290ad0 100644 --- a/usr.sbin/dhcpd/pfutils.c +++ b/usr.sbin/dhcpd/pfutils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfutils.c,v 1.13 2015/02/05 09:42:52 krw Exp $ */ +/* $OpenBSD: pfutils.c,v 1.14 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org> * @@ -18,17 +18,14 @@ #include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> -#include <sys/time.h> #include <netinet/in.h> -#include <arpa/inet.h> #include <net/if.h> #include <net/pfvar.h> -#include <ctype.h> -#include <err.h> #include <errno.h> #include <fcntl.h> +#include <paths.h> #include <poll.h> #include <pwd.h> #include <stdio.h> @@ -36,6 +33,8 @@ #include <string.h> #include <unistd.h> +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" extern struct passwd *pw; diff --git a/usr.sbin/dhcpd/print.c b/usr.sbin/dhcpd/print.c index 38bfac94471..fa6ec3beba6 100644 --- a/usr.sbin/dhcpd/print.c +++ b/usr.sbin/dhcpd/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.10 2005/11/13 20:25:59 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.11 2016/02/06 23:50:10 krw Exp $ */ /* Turn data structures into printable text. */ @@ -40,6 +40,18 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" char * diff --git a/usr.sbin/dhcpd/sync.c b/usr.sbin/dhcpd/sync.c index 3418559492b..30c097cd04a 100644 --- a/usr.sbin/dhcpd/sync.c +++ b/usr.sbin/dhcpd/sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sync.c,v 1.16 2015/01/16 06:40:16 deraadt Exp $ */ +/* $OpenBSD: sync.c,v 1.17 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 2008 Bob Beck <beck@openbsd.org> @@ -17,33 +17,28 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/stdint.h> -#include <sys/file.h> -#include <sys/wait.h> -#include <sys/socket.h> -#include <sys/resource.h> -#include <sys/uio.h> +#include <sys/types.h> #include <sys/ioctl.h> #include <sys/queue.h> - +#include <sys/socket.h> #include <net/if.h> -#include <netinet/in.h> + #include <arpa/inet.h> -#include <err.h> +#include <netinet/in.h> + +#include <openssl/hmac.h> + #include <errno.h> -#include <pwd.h> -#include <stdio.h> -#include <stdlib.h> +#include <netdb.h> +#include <sha1.h> #include <string.h> +#include <syslog.h> #include <unistd.h> -#include <sha1.h> - -#include <netdb.h> - -#include <openssl/hmac.h> +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" #include "sync.h" diff --git a/usr.sbin/dhcpd/tables.c b/usr.sbin/dhcpd/tables.c index 3633474d686..e56e20497bc 100644 --- a/usr.sbin/dhcpd/tables.c +++ b/usr.sbin/dhcpd/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.11 2015/06/27 14:29:39 krw Exp $ */ +/* $OpenBSD: tables.c,v 1.12 2016/02/06 23:50:10 krw Exp $ */ /* Tables of information... */ @@ -40,6 +40,17 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" /* diff --git a/usr.sbin/dhcpd/tree.c b/usr.sbin/dhcpd/tree.c index 7e223d20a3b..52f0a36a7b0 100644 --- a/usr.sbin/dhcpd/tree.c +++ b/usr.sbin/dhcpd/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.16 2015/12/21 21:39:11 mmcc Exp $ */ +/* $OpenBSD: tree.c,v 1.17 2016/02/06 23:50:10 krw Exp $ */ /* Routines for manipulating parse trees... */ @@ -40,6 +40,19 @@ * Enterprises, see ``http://www.vix.com''. */ +#include <sys/types.h> +#include <sys/socket.h> + +#include <net/if.h> + +#include <netinet/in.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" static time_t tree_evaluate_recurse(int *, unsigned char **, int *, diff --git a/usr.sbin/dhcpd/udpsock.c b/usr.sbin/dhcpd/udpsock.c index 235299452cf..46e820d8fc0 100644 --- a/usr.sbin/dhcpd/udpsock.c +++ b/usr.sbin/dhcpd/udpsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udpsock.c,v 1.3 2015/12/14 01:08:50 krw Exp $ */ +/* $OpenBSD: udpsock.c,v 1.4 2016/02/06 23:50:10 krw Exp $ */ /* * Copyright (c) 2014 YASUOKA Masahiko <yasuoka@openbsd.org> @@ -17,16 +17,25 @@ */ #include <sys/param.h> /* nitems */ -#include <sys/socket.h> -#include <sys/uio.h> #include <sys/ioctl.h> -#include <netinet/in.h> +#include <sys/socket.h> + #include <arpa/inet.h> +#include <net/if.h> +#include <net/if_dl.h> + +#include <netinet/in.h> + +#include <ctype.h> #include <errno.h> -#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> #include <string.h> +#include <unistd.h> +#include "dhcp.h" +#include "tree.h" #include "dhcpd.h" void udpsock_handler (struct protocol *); |