summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/relayctl/parser.c14
-rw-r--r--usr.sbin/relayctl/parser.h4
-rw-r--r--usr.sbin/relayctl/relayctl.c16
-rw-r--r--usr.sbin/relayd/agentx.c6
-rw-r--r--usr.sbin/relayd/ca.c13
-rw-r--r--usr.sbin/relayd/carp.c7
-rw-r--r--usr.sbin/relayd/check_icmp.c8
-rw-r--r--usr.sbin/relayd/check_script.c12
-rw-r--r--usr.sbin/relayd/check_tcp.c9
-rw-r--r--usr.sbin/relayd/config.c23
-rw-r--r--usr.sbin/relayd/control.c9
-rw-r--r--usr.sbin/relayd/hce.c18
-rw-r--r--usr.sbin/relayd/log.c13
-rw-r--r--usr.sbin/relayd/name2id.c10
-rw-r--r--usr.sbin/relayd/parse.y17
-rw-r--r--usr.sbin/relayd/pfe.c18
-rw-r--r--usr.sbin/relayd/pfe_filter.c9
-rw-r--r--usr.sbin/relayd/pfe_route.c9
-rw-r--r--usr.sbin/relayd/proc.c10
-rw-r--r--usr.sbin/relayd/relay.c16
-rw-r--r--usr.sbin/relayd/relay_http.c22
-rw-r--r--usr.sbin/relayd/relay_udp.c14
-rw-r--r--usr.sbin/relayd/relayd.c3
-rw-r--r--usr.sbin/relayd/relayd.h18
-rw-r--r--usr.sbin/relayd/shuffle.c10
-rw-r--r--usr.sbin/relayd/snmp.c17
-rw-r--r--usr.sbin/relayd/ssl.c14
27 files changed, 113 insertions, 226 deletions
diff --git a/usr.sbin/relayctl/parser.c b/usr.sbin/relayctl/parser.c
index fbe11e1c49f..0b97aa6ce6c 100644
--- a/usr.sbin/relayctl/parser.c
+++ b/usr.sbin/relayctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.26 2015/01/22 15:23:50 reyk Exp $ */
+/* $OpenBSD: parser.c,v 1.27 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -19,25 +19,13 @@
*/
#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/queue.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <err.h>
-#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <event.h>
-
-#include <openssl/ssl.h>
#include "relayd.h"
-
#include "parser.h"
enum token_type {
diff --git a/usr.sbin/relayctl/parser.h b/usr.sbin/relayctl/parser.h
index 5e19f9befde..158d95ff406 100644
--- a/usr.sbin/relayctl/parser.h
+++ b/usr.sbin/relayctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.14 2011/05/19 08:56:49 reyk Exp $ */
+/* $OpenBSD: parser.h,v 1.15 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -16,6 +16,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "relayd.h"
+
enum actions {
NONE,
SHOW_SUM,
diff --git a/usr.sbin/relayctl/relayctl.c b/usr.sbin/relayctl/relayctl.c
index e42dc5ec671..defc498a231 100644
--- a/usr.sbin/relayctl/relayctl.c
+++ b/usr.sbin/relayctl/relayctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayctl.c,v 1.52 2015/01/16 06:40:20 deraadt Exp $ */
+/* $OpenBSD: relayctl.c,v 1.53 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2007 - 2013 Reyk Floeter <reyk@openbsd.org>
@@ -22,25 +22,21 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/queue.h>
#include <sys/un.h>
-#include <net/if.h>
-#include <net/if_media.h>
-#include <net/if_types.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <err.h>
#include <errno.h>
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <event.h>
-
-#include <openssl/ssl.h>
+#include <time.h>
+#include <imsg.h>
#include "relayd.h"
#include "parser.h"
diff --git a/usr.sbin/relayd/agentx.c b/usr.sbin/relayd/agentx.c
index 24b07de8092..5b6f33e9373 100644
--- a/usr.sbin/relayd/agentx.c
+++ b/usr.sbin/relayd/agentx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agentx.c,v 1.10 2015/01/22 15:21:28 reyk Exp $ */
+/* $OpenBSD: agentx.c,v 1.11 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2013,2014 Bret Stephen Lambert <blambert@openbsd.org>
*
@@ -17,11 +17,9 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/uio.h>
+#include <sys/queue.h>
#include <sys/un.h>
-#include <err.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/usr.sbin/relayd/ca.c b/usr.sbin/relayd/ca.c
index 6964a0b70e3..0b79b62f75b 100644
--- a/usr.sbin/relayd/ca.c
+++ b/usr.sbin/relayd/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.11 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: ca.c,v 1.12 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -16,21 +16,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
#include <sys/queue.h>
-#include <sys/socket.h>
#include <sys/uio.h>
-#include <net/if.h>
-#include <netinet/in.h>
-
-#include <limits.h>
-#include <event.h>
-#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
-#include <errno.h>
+#include <imsg.h>
+#include <openssl/bio.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
diff --git a/usr.sbin/relayd/carp.c b/usr.sbin/relayd/carp.c
index ba5836b67c5..09708aa7dbf 100644
--- a/usr.sbin/relayd/carp.c
+++ b/usr.sbin/relayd/carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: carp.c,v 1.10 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: carp.c,v 1.11 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@@ -16,7 +16,9 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/queue.h>
#include <sys/ioctl.h>
#include <net/if.h>
@@ -25,9 +27,6 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
-#include <event.h>
-
-#include <openssl/ssl.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/check_icmp.c b/usr.sbin/relayd/check_icmp.c
index 3fefb8ad469..d6f5ffb7ba0 100644
--- a/usr.sbin/relayd/check_icmp.c
+++ b/usr.sbin/relayd/check_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: check_icmp.c,v 1.39 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: check_icmp.c,v 1.40 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -20,22 +20,20 @@
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
+#include <sys/time.h>
-#include <net/if.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <netinet/icmp6.h>
+#include <arpa/inet.h>
-#include <limits.h>
#include <event.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
-#include <openssl/ssl.h>
-
#include "relayd.h"
void icmp_setup(struct relayd *, struct ctl_icmp_event *, int);
diff --git a/usr.sbin/relayd/check_script.c b/usr.sbin/relayd/check_script.c
index 0e22176f64b..217dc89f024 100644
--- a/usr.sbin/relayd/check_script.c
+++ b/usr.sbin/relayd/check_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: check_script.c,v 1.17 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: check_script.c,v 1.18 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -16,23 +16,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/queue.h>
-#include <sys/socket.h>
#include <sys/wait.h>
+#include <sys/time.h>
-#include <net/if.h>
-
-#include <limits.h>
-#include <event.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <pwd.h>
-#include <err.h>
-
-#include <openssl/ssl.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/check_tcp.c b/usr.sbin/relayd/check_tcp.c
index d439471f8d5..246d0ec8062 100644
--- a/usr.sbin/relayd/check_tcp.c
+++ b/usr.sbin/relayd/check_tcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: check_tcp.c,v 1.45 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: check_tcp.c,v 1.46 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -16,10 +16,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/queue.h>
+#include <sys/types.h>
+#include <sys/time.h>
#include <sys/socket.h>
-#include <net/if.h>
#include <netinet/in.h>
#include <limits.h>
@@ -31,8 +31,7 @@
#include <errno.h>
#include <fnmatch.h>
#include <sha1.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/config.c b/usr.sbin/relayd/config.c
index 16007b2b895..9cfbdca6872 100644
--- a/usr.sbin/relayd/config.c
+++ b/usr.sbin/relayd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.23 2015/01/21 21:50:33 deraadt Exp $ */
+/* $OpenBSD: config.c,v 1.24 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2011 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -17,29 +17,16 @@
*/
#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
#include <sys/queue.h>
+#include <sys/time.h>
#include <sys/uio.h>
-#include <netinet/in.h>
-#include <net/if.h>
-#include <net/pfvar.h>
-
-#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
-#include <err.h>
-#include <errno.h>
-#include <event.h>
#include <limits.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <netdb.h>
#include <string.h>
-#include <ifaddrs.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/control.c b/usr.sbin/relayd/control.c
index 2272e341e83..8c72b78748e 100644
--- a/usr.sbin/relayd/control.c
+++ b/usr.sbin/relayd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.47 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.48 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -19,19 +19,16 @@
#include <sys/queue.h>
#include <sys/stat.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/un.h>
-#include <net/if.h>
-
#include <errno.h>
#include <event.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <signal.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c
index 70748dd8a17..f7fc77cc144 100644
--- a/usr.sbin/relayd/hce.c
+++ b/usr.sbin/relayd/hce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hce.c,v 1.68 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: hce.c,v 1.69 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -16,26 +16,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/un.h>
+#include <sys/uio.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-
-#include <errno.h>
#include <event.h>
-#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <err.h>
-#include <pwd.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/log.c b/usr.sbin/relayd/log.c
index ff4e3bbf418..58fc6de5202 100644
--- a/usr.sbin/relayd/log.c
+++ b/usr.sbin/relayd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.26 2014/12/21 00:54:49 guenther Exp $ */
+/* $OpenBSD: log.c,v 1.27 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -17,13 +17,8 @@
*/
#include <sys/types.h>
-#include <sys/queue.h>
#include <sys/socket.h>
-#include <sys/tree.h>
-
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
+#include <sys/time.h>
#include <errno.h>
#include <stdarg.h>
@@ -31,11 +26,9 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
-#include <event.h>
#include <netdb.h>
#include <ctype.h>
-
-#include <openssl/ssl.h>
+#include <time.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/name2id.c b/usr.sbin/relayd/name2id.c
index 4009fc6488b..e4220c55fd7 100644
--- a/usr.sbin/relayd/name2id.c
+++ b/usr.sbin/relayd/name2id.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: name2id.c,v 1.3 2014/07/09 16:42:05 reyk Exp $ */
+/* $OpenBSD: name2id.c,v 1.4 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -17,17 +17,11 @@
*/
#include <sys/types.h>
-#include <sys/socket.h>
#include <sys/queue.h>
-#include <net/if.h>
-
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <event.h>
-
-#include <openssl/ssl.h>
+#include <errno.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index be618dd2d20..9605c8d41dd 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.201 2015/01/21 21:50:33 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.202 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -30,29 +30,30 @@
#include <sys/stat.h>
#include <sys/queue.h>
#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/tree.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <net/pfvar.h>
+#include <net/route.h>
-#include <ctype.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <stdio.h>
#include <unistd.h>
+#include <ctype.h>
#include <err.h>
+#include <endian.h>
#include <errno.h>
-#include <event.h>
#include <limits.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <stdio.h>
#include <netdb.h>
#include <string.h>
#include <ifaddrs.h>
#include <syslog.h>
#include <md5.h>
-#include <openssl/ssl.h>
-
#include "relayd.h"
#include "http.h"
#include "snmp.h"
diff --git a/usr.sbin/relayd/pfe.c b/usr.sbin/relayd/pfe.c
index c7ddde93902..42afc1ff8ce 100644
--- a/usr.sbin/relayd/pfe.c
+++ b/usr.sbin/relayd/pfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe.c,v 1.77 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: pfe.c,v 1.78 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -16,21 +16,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/un.h>
+#include <sys/types.h>
+#include <sys/queue.h>
+#include <sys/time.h>
+#include <sys/uio.h>
-#include <net/if.h>
-
-#include <errno.h>
#include <event.h>
-#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <pwd.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/pfe_filter.c b/usr.sbin/relayd/pfe_filter.c
index 7a4fc4defbb..30db9ef04ae 100644
--- a/usr.sbin/relayd/pfe_filter.c
+++ b/usr.sbin/relayd/pfe_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe_filter.c,v 1.57 2015/01/22 15:21:28 reyk Exp $ */
+/* $OpenBSD: pfe_filter.c,v 1.58 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -19,25 +19,22 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/ioctl.h>
+#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
-#include <net/if.h>
#include <net/pfvar.h>
#include <limits.h>
-#include <fcntl.h>
-#include <event.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <openssl/ssl.h>
-
#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
#include "relayd.h"
diff --git a/usr.sbin/relayd/pfe_route.c b/usr.sbin/relayd/pfe_route.c
index 135b9359862..fa5336425d6 100644
--- a/usr.sbin/relayd/pfe_route.c
+++ b/usr.sbin/relayd/pfe_route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe_route.c,v 1.8 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: pfe_route.c,v 1.9 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2009 - 2011 Reyk Floeter <reyk@openbsd.org>
@@ -20,19 +20,16 @@
#include <sys/queue.h>
#include <sys/socket.h>
-#include <net/if.h>
#include <netinet/in.h>
#include <net/route.h>
+#include <arpa/inet.h>
+#include <limits.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#include <event.h>
#include <string.h>
#include <errno.h>
-#include <openssl/ssl.h>
-
#include "relayd.h"
struct relay_rtmsg {
diff --git a/usr.sbin/relayd/proc.c b/usr.sbin/relayd/proc.c
index d8c67611d9c..f4e5908bf08 100644
--- a/usr.sbin/relayd/proc.c
+++ b/usr.sbin/relayd/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.19 2014/12/21 00:54:49 guenther Exp $ */
+/* $OpenBSD: proc.c,v 1.20 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -21,11 +21,6 @@
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/wait.h>
-#include <sys/tree.h>
-
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
#include <stdio.h>
#include <stdlib.h>
@@ -35,8 +30,7 @@
#include <signal.h>
#include <pwd.h>
#include <event.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index d63787e2107..34e7312d45d 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.189 2015/01/22 15:21:28 reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.190 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -21,24 +21,22 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/socket.h>
-#include <sys/un.h>
#include <sys/tree.h>
-#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/ip.h>
#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <stdio.h>
-#include <err.h>
-#include <pwd.h>
#include <event.h>
-#include <fnmatch.h>
+#include <siphash.h>
+#include <imsg.h>
#include <openssl/dh.h>
#include <openssl/ssl.h>
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c
index 7ab81b28d4c..1d0b3220475 100644
--- a/usr.sbin/relayd/relay_http.c
+++ b/usr.sbin/relayd/relay_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay_http.c,v 1.42 2015/01/22 15:21:28 reyk Exp $ */
+/* $OpenBSD: relay_http.c,v 1.43 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -19,28 +19,22 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>
-#include <sys/stat.h>
#include <sys/socket.h>
-#include <sys/un.h>
#include <sys/tree.h>
-#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
+#include <arpa/inet.h>
-#include <errno.h>
-#include <fcntl.h>
+#include <limits.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <errno.h>
#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <err.h>
-#include <pwd.h>
+#include <time.h>
#include <event.h>
#include <fnmatch.h>
-
-#include <openssl/ssl.h>
+#include <siphash.h>
+#include <imsg.h>
#include "relayd.h"
#include "http.h"
diff --git a/usr.sbin/relayd/relay_udp.c b/usr.sbin/relayd/relay_udp.c
index ccd85670275..a59c4e2dd06 100644
--- a/usr.sbin/relayd/relay_udp.c
+++ b/usr.sbin/relayd/relay_udp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay_udp.c,v 1.38 2015/01/16 15:06:40 deraadt Exp $ */
+/* $OpenBSD: relay_udp.c,v 1.39 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2007 - 2013 Reyk Floeter <reyk@openbsd.org>
@@ -19,15 +19,11 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>
-#include <sys/stat.h>
#include <sys/socket.h>
-#include <sys/un.h>
#include <sys/tree.h>
-#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
+#include <arpa/inet.h>
#include <signal.h>
#include <errno.h>
@@ -36,12 +32,8 @@
#include <string.h>
#include <unistd.h>
#include <stdio.h>
-#include <err.h>
-#include <pwd.h>
#include <event.h>
-#include <fnmatch.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index 6fd07f03918..de921959aaa 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.137 2015/01/22 15:21:28 reyk Exp $ */
+/* $OpenBSD: relayd.c,v 1.138 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -23,7 +23,6 @@
#include <sys/wait.h>
#include <sys/resource.h>
-#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h
index e78ecc674fa..2bdfe553349 100644
--- a/usr.sbin/relayd/relayd.h
+++ b/usr.sbin/relayd/relayd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.h,v 1.206 2015/01/22 09:26:05 reyk Exp $ */
+/* $OpenBSD: relayd.h,v 1.207 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -21,12 +21,21 @@
#ifndef _RELAYD_H
#define _RELAYD_H
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/queue.h>
#include <sys/tree.h>
+#include <sys/time.h>
-#include <netinet/in.h>
+#include <net/if.h>
+
+#include <stdarg.h>
#include <limits.h>
-#include <imsg.h>
#include <siphash.h>
+#include <event.h>
+#include <imsg.h>
+
+#include <openssl/ssl.h>
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
@@ -519,7 +528,6 @@ struct rdr {
};
TAILQ_HEAD(rdrlist, rdr);
-struct relay;
struct rsession {
objid_t se_id;
objid_t se_relayid;
@@ -791,7 +799,6 @@ enum dstmode {
};
#define RELAY_DSTMODE_DEFAULT RELAY_DSTMODE_ROUNDROBIN
-struct router;
struct netroute_config {
objid_t id;
struct sockaddr_storage ss;
@@ -861,7 +868,6 @@ enum blockmodes {
BM_NONBLOCK
};
-
struct imsgev {
struct imsgbuf ibuf;
void (*handler)(int, short, void *);
diff --git a/usr.sbin/relayd/shuffle.c b/usr.sbin/relayd/shuffle.c
index 256d16dba16..e6173d69f24 100644
--- a/usr.sbin/relayd/shuffle.c
+++ b/usr.sbin/relayd/shuffle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shuffle.c,v 1.3 2014/12/21 00:54:49 guenther Exp $ */
+/* $OpenBSD: shuffle.c,v 1.4 2015/01/22 17:42:09 reyk Exp $ */
/*
* Portions Copyright (C) 2008 Theo de Raadt
@@ -20,18 +20,10 @@
/* based on: bind/lib/isc/shuffle.c,v 1.4 2008/07/09 17:07:32 reyk Exp $ */
#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <net/if.h>
#include <stdlib.h>
-#include <string.h>
-#include <event.h>
#include <assert.h>
-#include <openssl/ssl.h>
-
#include "relayd.h"
#define VALID_SHUFFLE(x) (x != NULL)
diff --git a/usr.sbin/relayd/snmp.c b/usr.sbin/relayd/snmp.c
index dafd2f2e1f7..5cbb91fe652 100644
--- a/usr.sbin/relayd/snmp.c
+++ b/usr.sbin/relayd/snmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmp.c,v 1.22 2015/01/22 15:21:05 reyk Exp $ */
+/* $OpenBSD: snmp.c,v 1.23 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2008 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -18,22 +18,21 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/queue.h>
+#include <sys/time.h>
#include <sys/un.h>
-#include <sys/uio.h>
#include <netinet/in.h>
-#include <net/if.h>
-#include <errno.h>
-#include <fcntl.h>
+#include <limits.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
+#include <errno.h>
#include <string.h>
#include <unistd.h>
-#include <stdio.h>
-#include <err.h>
#include <event.h>
-
-#include <openssl/ssl.h>
+#include <imsg.h>
#include "relayd.h"
#include "snmp.h"
diff --git a/usr.sbin/relayd/ssl.c b/usr.sbin/relayd/ssl.c
index b8133296eaa..815957939e3 100644
--- a/usr.sbin/relayd/ssl.c
+++ b/usr.sbin/relayd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.27 2015/01/16 15:06:41 deraadt Exp $ */
+/* $OpenBSD: ssl.c,v 1.28 2015/01/22 17:42:09 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -17,24 +17,20 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/queue.h>
+#include <sys/types.h>
#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-
#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <event.h>
-#include <fcntl.h>
#include <unistd.h>
#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
+#include <imsg.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/engine.h>
-#include <openssl/rsa.h>
#include "relayd.h"