diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-10-24 11:31:44 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-10-24 11:31:44 +0000 |
commit | 136fdf7e9dc1a1f341afcb8045eec2144920aec0 (patch) | |
tree | 4504bf6e2f3c1088b1f696a7353d1cd5ba3d3305 /sys | |
parent | 29d19e36891dce247a1a79fee765288dc7366aed (diff) |
Remove the number of in6_var.h inclusions by moving some functions and
global variables to in6.h.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_loop.c | 3 | ||||
-rw-r--r-- | sys/net/if_mpe.c | 3 | ||||
-rw-r--r-- | sys/net/if_pflog.c | 4 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 6 | ||||
-rw-r--r-- | sys/net/if_tun.c | 6 | ||||
-rw-r--r-- | sys/net/pf_lb.c | 4 | ||||
-rw-r--r-- | sys/net/pf_osfp.c | 5 | ||||
-rw-r--r-- | sys/net/pfkeyv2_convert.c | 5 | ||||
-rw-r--r-- | sys/net/pipex.c | 3 | ||||
-rw-r--r-- | sys/netinet/ip_gre.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_ipip.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_ipsp.c | 3 | ||||
-rw-r--r-- | sys/netinet/ip_spd.c | 3 | ||||
-rw-r--r-- | sys/netinet/ipsec_output.c | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 7 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 | ||||
-rw-r--r-- | sys/netinet6/in6.h | 22 | ||||
-rw-r--r-- | sys/netinet6/in6_var.h | 15 | ||||
-rw-r--r-- | sys/netmpls/mpls_input.c | 4 |
19 files changed, 37 insertions, 75 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index b78857354cd..5e873cb8c36 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_loop.c,v 1.52 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: if_loop.c,v 1.53 2013/10/24 11:31:43 mpi Exp $ */ /* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */ /* @@ -132,7 +132,6 @@ #ifndef INET #include <netinet/in.h> #endif -#include <netinet6/in6_var.h> #include <netinet/ip6.h> #endif diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index eaf75b562a5..9270e7beeb3 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.31 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.32 2013/10/24 11:31:43 mpi Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -36,7 +36,6 @@ #endif #ifdef INET6 -#include <netinet6/in6_var.h> #include <netinet/ip6.h> #ifndef INET #include <netinet/in.h> diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c index 369b8d7be57..5be313f307a 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.56 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.57 2013/10/24 11:31:43 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -62,9 +62,7 @@ #ifndef INET #include <netinet/in.h> #endif -#include <netinet6/in6_var.h> #include <netinet/ip6.h> -#include <netinet6/nd6.h> #include <netinet/icmp6.h> #endif /* INET6 */ diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 66a61597b2d..5dd6c1d9368 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.108 2013/10/01 20:22:13 sf Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.109 2013/10/24 11:31:43 mpi Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -83,10 +83,6 @@ # endif #endif -#ifdef INET6 -#include <netinet6/in6_var.h> -#endif - #include <net/if_sppp.h> #if defined (__FreeBSD__) diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index a258b99fc93..d36479b438e 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.119 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: if_tun.c,v 1.120 2013/10/24 11:31:43 mpi Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -69,10 +69,6 @@ #include <netinet/if_ether.h> #endif -#ifdef INET6 -#include <netinet6/in6_var.h> -#endif - #ifdef PIPEX #include <net/pipex.h> #endif diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c index f313bfade01..58bd7af9078 100644 --- a/sys/net/pf_lb.c +++ b/sys/net/pf_lb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_lb.c,v 1.27 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: pf_lb.c,v 1.28 2013/10/24 11:31:43 mpi Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -86,11 +86,9 @@ #endif /* NPFSYNC > 0 */ #ifdef INET6 -#include <netinet6/in6_var.h> #include <netinet/ip6.h> #include <netinet/in_pcb.h> #include <netinet/icmp6.h> -#include <netinet6/nd6.h> #endif /* INET6 */ diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c index eff891848b7..e778ecca255 100644 --- a/sys/net/pf_osfp.c +++ b/sys/net/pf_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_osfp.c,v 1.26 2011/09/28 17:15:45 bluhm Exp $ */ +/* $OpenBSD: pf_osfp.c,v 1.27 2013/10/24 11:31:43 mpi Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org> @@ -35,9 +35,6 @@ #include <net/pfvar.h> #include <netinet/ip6.h> -#ifdef _KERNEL -#include <netinet6/in6_var.h> -#endif #ifdef _KERNEL diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c index 3ba2f29177d..47d0dc4b027 100644 --- a/sys/net/pfkeyv2_convert.c +++ b/sys/net/pfkeyv2_convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_convert.c,v 1.41 2013/10/12 11:55:46 henning Exp $ */ +/* $OpenBSD: pfkeyv2_convert.c,v 1.42 2013/10/24 11:31:43 mpi Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@keromytis.org) * @@ -108,9 +108,6 @@ #endif #include <netinet/ip_ipsp.h> -#ifdef INET6 -#include <netinet6/in6_var.h> -#endif #include <net/pfkeyv2.h> #include <crypto/cryptodev.h> #include <crypto/xform.h> diff --git a/sys/net/pipex.c b/sys/net/pipex.c index ad5122cdc5e..89cb33c71b0 100644 --- a/sys/net/pipex.c +++ b/sys/net/pipex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pipex.c,v 1.46 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: pipex.c,v 1.47 2013/10/24 11:31:43 mpi Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -68,7 +68,6 @@ #include <netinet/ip.h> #include <netinet/ip_var.h> #ifdef INET6 -#include <netinet6/in6_var.h> #include <netinet/ip6.h> #include <netinet6/ip6_var.h> #endif diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 2a6e3a8e079..f012de9a884 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_gre.c,v 1.46 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: ip_gre.c,v 1.47 2013/10/24 11:31:43 mpi Exp $ */ /* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -65,10 +65,6 @@ #error "ip_gre used without inet" #endif -#ifdef INET6 -#include <netinet6/in6_var.h> -#endif - #ifdef MPLS #include <netmpls/mpls.h> #endif diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c index 4181361edde..fd67c21695c 100644 --- a/sys/netinet/ip_ipip.c +++ b/sys/netinet/ip_ipip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipip.c,v 1.50 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: ip_ipip.c,v 1.51 2013/10/24 11:31:43 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -67,10 +67,6 @@ #include <netinet/ip_ipsp.h> #include <netinet/ip_ipip.h> -#ifdef INET6 -#include <netinet6/in6_var.h> -#endif - #include "bpfilter.h" #if NPF > 0 diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index 1e99246aa69..42acf37e8a6 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.190 2013/07/04 09:48:48 mpi Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.191 2013/10/24 11:31:43 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -71,7 +71,6 @@ #ifndef INET #include <netinet/in.h> #endif -#include <netinet6/in6_var.h> #endif /* INET6 */ #include <netinet/ip_ipsp.h> diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c index 66fa68c37c4..00ce081307a 100644 --- a/sys/netinet/ip_spd.c +++ b/sys/netinet/ip_spd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_spd.c,v 1.68 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: ip_spd.c,v 1.69 2013/10/24 11:31:43 mpi Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -46,7 +46,6 @@ #ifndef INET #include <netinet/in.h> #endif -#include <netinet6/in6_var.h> #endif /* INET6 */ #include <netinet/ip_ipsp.h> diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index a95e8bcfb5d..962d5cade52 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.49 2013/08/03 12:45:41 markus Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.50 2013/10/24 11:31:43 mpi Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -48,7 +48,6 @@ #ifndef INET #include <netinet/in.h> #endif -#include <netinet6/in6_var.h> #endif /* INET6 */ #include <netinet/udp.h> diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index d3b8c768bd9..4ef6806d37d 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.100 2013/10/19 10:38:55 henning Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.101 2013/10/24 11:31:43 mpi Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -95,11 +95,6 @@ #include <netinet/tcpip.h> #include <netinet/tcp_debug.h> -#ifdef INET6 -#include <netinet6/tcpipv6.h> -#include <netinet6/in6_var.h> -#endif /* INET6 */ - #ifdef notyet extern struct mbuf *m_copypack(); #endif diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index a4107481eea..5cbe000edd6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.124 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.125 2013/10/24 11:31:43 mpi Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -96,8 +96,6 @@ #include <dev/rndvar.h> #ifdef INET6 -#include <netinet6/in6_var.h> -#include <netinet6/ip6_var.h> #include <netinet6/ip6protosw.h> #endif /* INET6 */ diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index b598c467592..250b2cd71d3 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.h,v 1.67 2013/10/24 11:20:18 deraadt Exp $ */ +/* $OpenBSD: in6.h,v 1.68 2013/10/24 11:31:43 mpi Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -417,17 +417,33 @@ typedef __socklen_t socklen_t; /* length type for network syscalls */ #endif /* __BSD_VISIBLE */ #ifdef _KERNEL + +extern u_char inet6ctlerrmap[]; +extern struct ifqueue ip6intrq; /* IP6 packet input queue */ +extern struct in6_addr zeroin6_addr; +extern unsigned long in6_maxmtu; + struct cmsghdr; int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); -extern void in6_proto_cksum_out(struct mbuf *, struct ifnet *); +void in6_proto_cksum_out(struct mbuf *, struct ifnet *); int in6_localaddr(struct in6_addr *); int in6_addrscope(struct in6_addr *); struct in6_ifaddr *in6_ifawithscope(struct ifnet *, struct in6_addr *, u_int); -extern void in6_if_up(struct ifnet *); +void in6_if_up(struct ifnet *); void in6_get_rand_ifid(struct ifnet *, struct in6_addr *); int in6_mask2len(struct in6_addr *, u_char *); +char *ip6_sprintf(struct in6_addr *); + +struct inpcb; + +int in6_embedscope(struct in6_addr *, const struct sockaddr_in6 *, + struct inpcb *, struct ifnet **); +int in6_recoverscope(struct sockaddr_in6 *, const struct in6_addr *, + struct ifnet *); +void in6_clearscope(struct in6_addr *); + struct sockaddr; struct sockaddr_in6; struct ifaddr; diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index f391cc7bcd9..28a15e92525 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_var.h,v 1.43 2013/10/24 11:20:18 deraadt Exp $ */ +/* $OpenBSD: in6_var.h,v 1.44 2013/10/24 11:31:43 mpi Exp $ */ /* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */ /* @@ -457,11 +457,6 @@ do { \ ((struct in6_ifextra *)((ifp)->if_afdata[AF_INET6]))->in6_ifstat->tag++; \ } while (0) -extern struct ifqueue ip6intrq; /* IP6 packet input queue */ -extern struct in6_addr zeroin6_addr; -extern u_char inet6ctlerrmap[]; -extern unsigned long in6_maxmtu; - /* * Macro for finding the internet address structure (in6_ifaddr) corresponding * to a given interface (ifnet structure). @@ -549,7 +544,6 @@ void in6_purgemkludge(struct ifnet *); struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); int in6_ifpprefix(const struct ifnet *, const struct in6_addr *); -char *ip6_sprintf(struct in6_addr *); int in6_addr2scopeid(struct ifnet *, struct in6_addr *); int in6_matchlen(struct in6_addr *, struct in6_addr *); int in6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int); @@ -557,13 +551,6 @@ void in6_prefixlen2mask(struct in6_addr *, int); void in6_purgeprefix(struct ifnet *); void in6_ifaddloop(struct ifaddr *); void in6_ifremloop(struct ifaddr *); - -struct inpcb; -int in6_embedscope(struct in6_addr *, const struct sockaddr_in6 *, - struct inpcb *, struct ifnet **); -int in6_recoverscope(struct sockaddr_in6 *, const struct in6_addr *, - struct ifnet *); -void in6_clearscope(struct in6_addr *); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_VAR_H_ */ diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c index 1dd52c0afa6..46ca07e541b 100644 --- a/sys/netmpls/mpls_input.c +++ b/sys/netmpls/mpls_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_input.c,v 1.36 2013/10/17 16:27:47 bluhm Exp $ */ +/* $OpenBSD: mpls_input.c,v 1.37 2013/10/24 11:31:43 mpi Exp $ */ /* * Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org> @@ -30,7 +30,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> @@ -38,7 +37,6 @@ #endif #ifdef INET6 -#include <netinet6/in6_var.h> #include <netinet/ip6.h> #ifndef INET #include <netinet/in.h> |