summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2013-10-23 15:12:42 +0000
committermpi <mpi@openbsd.org>2013-10-23 15:12:42 +0000
commit48a59fe3de1bf0741c6557eb9f5dcbf9d9c5b9a3 (patch)
tree980637fc8c10e433bdde3004b27deb7a8c26846d
parentNo need to expose twice in_socktrim(), it is only used in one file. (diff)
downloadwireguard-openbsd-48a59fe3de1bf0741c6557eb9f5dcbf9d9c5b9a3.tar.xz
wireguard-openbsd-48a59fe3de1bf0741c6557eb9f5dcbf9d9c5b9a3.zip
Remove the number of in_var.h inclusions by moving some functions and
global variables to in.h. ok mikeb@, deraadt@
-rw-r--r--sys/net/if.c3
-rw-r--r--sys/net/if_ethersubr.c5
-rw-r--r--sys/net/if_fddisubr.c3
-rw-r--r--sys/net/if_loop.c3
-rw-r--r--sys/net/if_mpe.c3
-rw-r--r--sys/net/if_pflog.c3
-rw-r--r--sys/net/if_ppp.c3
-rw-r--r--sys/net/if_sl.c3
-rw-r--r--sys/net/if_tun.c3
-rw-r--r--sys/net/pf.c3
-rw-r--r--sys/net/pf_lb.c3
-rw-r--r--sys/net/pipex.c3
-rw-r--r--sys/netinet/in.h10
-rw-r--r--sys/netinet/in_var.h9
-rw-r--r--sys/netinet/ip_gre.c3
-rw-r--r--sys/netinet/ip_ipip.c3
-rw-r--r--sys/netinet/ip_mroute.c3
-rw-r--r--sys/netinet/ip_spd.c3
-rw-r--r--sys/netinet/ipsec_input.c3
-rw-r--r--sys/netinet/tcp_subr.c3
20 files changed, 27 insertions, 48 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index b773e41cb86..5a3e042ef5a 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.273 2013/10/21 08:44:13 phessler Exp $ */
+/* $OpenBSD: if.c,v 1.274 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -92,7 +92,6 @@
#ifdef INET
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/if_ether.h>
#include <netinet/igmp.h>
#ifdef MROUTING
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 731ec9f059a..cf138a3782b 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.157 2013/06/05 10:42:58 dlg Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.158 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -97,9 +97,6 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <net/if_types.h>
#include <netinet/in.h>
-#ifdef INET
-#include <netinet/in_var.h>
-#endif
#include <netinet/if_ether.h>
#include <netinet/ip_ipsp.h>
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 90ece001a8f..914da295a38 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.62 2013/10/17 16:27:40 bluhm Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.63 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -95,7 +95,6 @@
#ifdef INET
#include <netinet/in.h>
-#include <netinet/in_var.h>
#endif
#include <netinet/if_ether.h>
#include <net/if_fddi.h>
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 55683e57020..b78857354cd 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_loop.c,v 1.51 2013/10/19 14:46:30 mpi Exp $ */
+/* $OpenBSD: if_loop.c,v 1.52 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */
/*
@@ -125,7 +125,6 @@
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
#include <netinet/ip.h>
#endif
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index f083c6f47de..eaf75b562a5 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.30 2013/10/17 16:27:41 bluhm Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.31 2013/10/23 15:12:42 mpi Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -31,7 +31,6 @@
#ifdef INET
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#endif
diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c
index d053b270e2f..369b8d7be57 100644
--- a/sys/net/if_pflog.c
+++ b/sys/net/if_pflog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflog.c,v 1.55 2013/10/17 16:27:41 bluhm Exp $ */
+/* $OpenBSD: if_pflog.c,v 1.56 2013/10/23 15:12:42 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -51,7 +51,6 @@
#ifdef INET
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 42c076a970f..6e6c421189d 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ppp.c,v 1.70 2013/10/19 14:46:30 mpi Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.71 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
@@ -128,7 +128,6 @@
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
#include <netinet/ip.h>
#else
#ifdef _KERNEL
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index a58fbe4dbed..a57aa224d6e 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sl.c,v 1.49 2013/10/19 14:46:31 mpi Exp $ */
+/* $OpenBSD: if_sl.c,v 1.50 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */
/*
@@ -82,7 +82,6 @@
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
#include <netinet/ip.h>
#else
#error Huh? Slip without inet?
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 5c750eaeb96..a258b99fc93 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.118 2013/10/19 14:46:31 mpi Exp $ */
+/* $OpenBSD: if_tun.c,v 1.119 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -65,7 +65,6 @@
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/if_ether.h>
#endif
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 254a5fd07e2..4cd98f27af7 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.851 2013/10/23 11:06:56 mikeb Exp $ */
+/* $OpenBSD: pf.c,v 1.852 2013/10/23 15:12:42 mpi Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -62,7 +62,6 @@
#include <net/radix_mpath.h>
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c
index 88252bb2cf3..f313bfade01 100644
--- a/sys/net/pf_lb.c
+++ b/sys/net/pf_lb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.26 2013/10/17 16:27:42 bluhm Exp $ */
+/* $OpenBSD: pf_lb.c,v 1.27 2013/10/23 15:12:42 mpi Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -62,7 +62,6 @@
#include <net/radix_mpath.h>
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index 8d3ffaf5a94..ad5122cdc5e 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.45 2013/10/19 10:51:41 henning Exp $ */
+/* $OpenBSD: pipex.c,v 1.46 2013/10/23 15:12:42 mpi Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -64,7 +64,6 @@
#ifdef INET
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 0598ed96fc6..42b2728e8b9 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.99 2013/10/23 13:39:35 mpi Exp $ */
+/* $OpenBSD: in.h,v 1.100 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -824,6 +824,8 @@ in_cksum_addword(u_int16_t a, u_int16_t b)
return (sum);
}
+extern int inetctlerrmap[];
+extern struct ifqueue ipintrq; /* ip packet input queue */
extern struct in_addr zeroin_addr;
int in_broadcast(struct in_addr, struct ifnet *, u_int);
@@ -832,9 +834,13 @@ int in_cksum(struct mbuf *, int);
int in4_cksum(struct mbuf *, u_int8_t, int, int);
void in_delayed_cksum(struct mbuf *);
int in_localaddr(struct in_addr, u_int);
-char *inet_ntoa(struct in_addr);
void in_proto_cksum_out(struct mbuf *, struct ifnet *);
void in_ifdetach(struct ifnet *);
+int in_mask2len(struct in_addr *);
+
+char *inet_ntoa(struct in_addr);
+int inet_nat64(int, const void *, void *, const void *, u_int8_t);
+int inet_nat46(int, const void *, void *, const void *, u_int8_t);
#define in_hosteq(s,t) ((s).s_addr == (t).s_addr)
#define in_nullhost(x) ((x).s_addr == INADDR_ANY)
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h
index 88b593ea058..249966bb78a 100644
--- a/sys/netinet/in_var.h
+++ b/sys/netinet/in_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_var.h,v 1.25 2013/10/23 13:39:35 mpi Exp $ */
+/* $OpenBSD: in_var.h,v 1.26 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: in_var.h,v 1.16 1996/02/13 23:42:15 christos Exp $ */
/*
@@ -83,9 +83,6 @@ struct in_aliasreq {
#ifdef _KERNEL
TAILQ_HEAD(in_ifaddrhead, in_ifaddr);
extern struct in_ifaddrhead in_ifaddr;
-extern struct ifqueue ipintrq; /* ip packet input queue */
-extern int inetctlerrmap[];
-
/*
* Macro for finding the interface (ifnet structure) corresponding to one
@@ -182,10 +179,6 @@ struct in_multi *in_addmulti(struct in_addr *, struct ifnet *);
void in_delmulti(struct in_multi *);
void in_ifscrub(struct ifnet *, struct in_ifaddr *);
int in_control(struct socket *, u_long, caddr_t, struct ifnet *);
-
-int inet_nat64(int, const void *, void *, const void *, u_int8_t);
-int inet_nat46(int, const void *, void *, const void *, u_int8_t);
-int in_mask2len(struct in_addr *);
#endif
#endif /* _NETINET_IN_VAR_H_ */
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index 50e1bb8271f..2a6e3a8e079 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_gre.c,v 1.45 2013/10/17 16:27:44 bluhm Exp $ */
+/* $OpenBSD: ip_gre.c,v 1.46 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -55,7 +55,6 @@
#ifdef INET
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 708d134783e..4181361edde 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.49 2013/10/17 16:27:44 bluhm Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.50 2013/10/23 15:12:42 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -57,7 +57,6 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
#include <netinet/ip_var.h>
#include <netinet/ip_ecn.h>
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 4f5cc91ad41..a2c5ce349c7 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.c,v 1.61 2013/05/02 11:54:10 mpi Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.62 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
@@ -79,7 +79,6 @@
#include <net/raw_cb.h>
#include <netinet/in.h>
-#include <netinet/in_var.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index f563c8266a0..66fa68c37c4 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.67 2013/05/14 14:29:08 mpi Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.68 2013/10/23 15:12:42 mpi Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -40,7 +40,6 @@
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
#endif /* INET */
#ifdef INET6
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index 3e99bc30653..d503816c75b 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.116 2013/10/17 16:27:44 bluhm Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.117 2013/10/23 15:12:42 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -59,7 +59,6 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
-#include <netinet/in_var.h>
#include <netinet/ip_icmp.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index c2143fb161b..a4107481eea 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.123 2013/10/21 08:42:24 phessler Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.124 2013/10/23 15:12:42 mpi Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -84,7 +84,6 @@
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#include <netinet/in_var.h>
#include <netinet/in_pcb.h>
#include <netinet/ip_var.h>
#include <netinet/ip_icmp.h>