diff options
author | 1999-03-09 05:31:50 +0000 | |
---|---|---|
committer | 1999-03-09 05:31:50 +0000 | |
commit | 0b10f62c181e0d99aece67b3406c3b597ae0a95a (patch) | |
tree | 0ed9da508a7321e2c2f5b444b90c7ac3e260a5d7 | |
parent | Add support for disabling the processor serial number on the P3. (diff) | |
download | wireguard-openbsd-0b10f62c181e0d99aece67b3406c3b597ae0a95a.tar.xz wireguard-openbsd-0b10f62c181e0d99aece67b3406c3b597ae0a95a.zip |
Demangled the INET6 stuff so as not to require any extra options and not to
be mutually exclusive with the IPSEC option.
-rw-r--r-- | sys/netinet6/debug.h | 11 | ||||
-rw-r--r-- | sys/netinet6/icmpv6_var.h | 4 | ||||
-rw-r--r-- | sys/netinet6/in6.c | 11 | ||||
-rw-r--r-- | sys/netinet6/in6.h | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_pcb.c | 24 | ||||
-rw-r--r-- | sys/netinet6/in6_proto.c | 19 | ||||
-rw-r--r-- | sys/netinet6/ipv6_addrconf.c | 11 | ||||
-rw-r--r-- | sys/netinet6/ipv6_discovery.c | 33 | ||||
-rw-r--r-- | sys/netinet6/ipv6_icmp.c | 24 | ||||
-rw-r--r-- | sys/netinet6/ipv6_input.c | 18 | ||||
-rw-r--r-- | sys/netinet6/ipv6_output.c | 18 | ||||
-rw-r--r-- | sys/netinet6/ipv6_rtrequest.c | 11 | ||||
-rw-r--r-- | sys/netinet6/ipv6_trans.c | 22 | ||||
-rw-r--r-- | sys/netinet6/osdep.h | 4 | ||||
-rw-r--r-- | sys/netinet6/raw_ipv6.c | 20 |
15 files changed, 150 insertions, 84 deletions
diff --git a/sys/netinet6/debug.h b/sys/netinet6/debug.h index 738283d8a28..a27b9fb427b 100644 --- a/sys/netinet6/debug.h +++ b/sys/netinet6/debug.h @@ -14,12 +14,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #ifndef _SYS_DEBUG_H #define _SYS_DEBUG_H 1 -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/osdep.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/osdep.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/osdep.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* Non-ANSI compilers don't stand a chance. You PROBABLY need GNU C. */ #ifndef __STDC__ diff --git a/sys/netinet6/icmpv6_var.h b/sys/netinet6/icmpv6_var.h index dd2aa78148c..d92bd7bb120 100644 --- a/sys/netinet6/icmpv6_var.h +++ b/sys/netinet6/icmpv6_var.h @@ -46,7 +46,7 @@ struct icmpv6stat 0, \ } -#if defined(KERNEL) || defined(_KERNEL) +#if defined(_KERNEL) || defined(KERNEL) struct icmpv6stat icmpv6stat; -#endif /* defined(KERNEL) || defined(_KERNEL) */ +#endif /* defined(_KERNEL) || defined(KERNEL) */ #endif /* _NETINET6_ICMPV6_VAR_H */ diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 3e734a9eef2..3277c4a914d 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -33,12 +33,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_var.h> #include <netinet6/ipv6_icmp.h> -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * Globals diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 1c078f82043..961a0f80b2e 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -185,8 +185,8 @@ struct route6 }; #endif RTM_VERSION -#ifdef _KERNEL +#if defined(_KERNEL) || defined(KERNEL) /* Function prototypes go here. */ int in6_cksum __P((struct mbuf *,int, u_int, u_int)); -#endif /* _KERNEL */ +#endif /* defined(_KERNEL) || defined(KERNEL) */ #endif /* _NETINET6_IN6_H */ diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index bf694454e1b..2758be96b87 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -73,9 +73,12 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6.h> #include <netinet6/ipv6_var.h> -#if __OpenBSD__ && defined(NRL_IPSEC) +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC #define IPSEC 1 -#endif /* __OpenBSD__ && defined(NRL_IPSEC) */ +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ #ifdef IPSEC #include <sys/osdep.h> @@ -83,17 +86,20 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <net/netproc_var.h> #endif /* IPSEC */ -#ifdef DEBUG_NRL_SYS -#include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 -#include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ - #if defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199802) #include <machine/pcpu.h> #endif /* defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199802) */ +#ifdef DEBUG_NRL +#include <sys/debug.h> +#else /* DEBUG_NRL */ +#if __OpenBSD__ +#include <netinet6/debug.h> +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ + /* * External globals */ diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 5192f8980b3..873aab95b4e 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -49,10 +49,17 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_var.h> #include <netinet6/ipv6_icmp.h> -#if defined(IPSEC) || defined(NRL_IPSEC) +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC +#define IPSEC 1 +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ + +#ifdef IPSEC #include <sys/osdep.h> #include <netsec/ipsec.h> -#endif /* defined(IPSEC) || defined(NRL_IPSEC) */ +#endif /* IPSEC */ #if __FreeBSD__ #include <sys/sysctl.h> @@ -155,7 +162,7 @@ struct protosw inet6sw[] = { #endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199802 */ }, -#if defined(IPSEC) || defined(NRL_IPSEC) +#ifdef IPSEC /* IPv6 & IPv4 Authentication Header */ { SOCK_RAW, &inet6domain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, @@ -181,7 +188,7 @@ struct protosw inet6sw[] = { #endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199802 */ }, #endif /* IPSEC_ESP */ -#endif /* defined(IPSEC) || defined(NRL_IPSEC) */ +#endif /* IPSEC */ /* Unknown header. */ @@ -280,7 +287,7 @@ struct protosw inet6sw[] = { &tcp_usrreqs, }, -#if defined(IPSEC) || defined(NRL_IPSEC) +#ifdef IPSEC /* IPv6 & IPv4 Authentication Header */ { SOCK_RAW, &inet6domain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, @@ -300,7 +307,7 @@ struct protosw inet6sw[] = { &nousrreqs }, #endif /* IPSEC_ESP */ -#endif /* defined(IPSEC) || defined(NRL_IPSEC) */ +#endif /* IPSEC */ /* Unknown header. */ diff --git a/sys/netinet6/ipv6_addrconf.c b/sys/netinet6/ipv6_addrconf.c index 9ef5302faea..a036cfe8e98 100644 --- a/sys/netinet6/ipv6_addrconf.c +++ b/sys/netinet6/ipv6_addrconf.c @@ -35,12 +35,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_icmp.h> #include <netinet6/ipv6_addrconf.h> -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * External Globals diff --git a/sys/netinet6/ipv6_discovery.c b/sys/netinet6/ipv6_discovery.c index 7f0cfc9340c..b5b2506408d 100644 --- a/sys/netinet6/ipv6_discovery.c +++ b/sys/netinet6/ipv6_discovery.c @@ -39,29 +39,36 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_var.h> #include <netinet6/ipv6_icmp.h> -#ifdef DEBUG_NRL_SYS -#include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 -#include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ - -#if __OpenBSD__ && defined(NRL_IPSEC) +#if __OpenBSD__ +#ifdef IPSEC +#undef IPSEC +#endif /* IPSEC */ +#ifdef NRL_IPSEC #define IPSEC 1 -#endif /* __OpenBSD__ && defined(NRL_IPSEC) */ +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ #ifdef IPSEC -#include <netsec/ipsec.h> +/* #include <netsec/ipsec.h> */ +#include <net/netproc.h> +#include <net/netproc_var.h> #endif /* IPSEC */ #if defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199802) #include <machine/pcpu.h> #endif /* defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199802) */ -#ifdef IPSEC -#include <net/netproc.h> -#include <net/netproc_var.h> +#ifdef DEBUG_NRL +#include <sys/debug.h> +#else /* DEBUG_NRL */ +#if __OpenBSD__ +#include <netinet6/debug.h> +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ +#ifdef IPSEC extern struct netproc_security fixedencrypt; extern struct netproc_auth fixedauth; #endif /* IPSEC */ diff --git a/sys/netinet6/ipv6_icmp.c b/sys/netinet6/ipv6_icmp.c index 0e92f8d38d8..01424305243 100644 --- a/sys/netinet6/ipv6_icmp.c +++ b/sys/netinet6/ipv6_icmp.c @@ -34,9 +34,12 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_icmp.h> #include <netinet6/icmpv6_var.h> -#if __OpenBSD__ && defined(NRL_IPSEC) +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC #define IPSEC 1 -#endif /* __OpenBSD__ && defined(NRL_IPSEC) */ +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ #ifdef IPSEC #include <sys/osdep.h> @@ -47,17 +50,20 @@ extern struct netproc_security fixedencrypt; extern struct netproc_auth fixedauth; #endif /* IPSEC */ -#ifdef DEBUG_NRL_SYS -#include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 -#include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ - #if __FreeBSD__ #include <sys/sysctl.h> #endif /* __FreeBSD__ */ +#ifdef DEBUG_NRL +#include <sys/debug.h> +#else /* DEBUG_NRL */ +#if __OpenBSD__ +#include <netinet6/debug.h> +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ + /* * Globals. */ diff --git a/sys/netinet6/ipv6_input.c b/sys/netinet6/ipv6_input.c index 1e3866903cf..a0e01faf481 100644 --- a/sys/netinet6/ipv6_input.c +++ b/sys/netinet6/ipv6_input.c @@ -40,9 +40,12 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet/ip.h> #include <netinet/in_pcb.h> -#if __OpenBSD__ && defined(NRL_IPSEC) +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC #define IPSEC 1 -#endif /* __OpenBSD__ && defined(NRL_IPSEC) */ +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ #ifdef IPSEC #include <sys/osdep.h> @@ -56,12 +59,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <sys/sysctl.h> #endif /* __FreeBSD__ */ -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * Globals diff --git a/sys/netinet6/ipv6_output.c b/sys/netinet6/ipv6_output.c index a48927216a3..574c0328895 100644 --- a/sys/netinet6/ipv6_output.c +++ b/sys/netinet6/ipv6_output.c @@ -35,9 +35,12 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet/tcpip.h> #include <netinet/tcp_var.h> -#if __OpenBSD__ && NRL_IPSEC +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC #define IPSEC 1 -#endif /* __OpenBSD__ && NRL_IPSEC */ +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ #if IPSEC #include <sys/osdep.h> @@ -46,12 +49,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <sys/nbuf.h> #endif /* IPSEC */ -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * Globals and function definitions. diff --git a/sys/netinet6/ipv6_rtrequest.c b/sys/netinet6/ipv6_rtrequest.c index 7a62f7c5500..84489c22218 100644 --- a/sys/netinet6/ipv6_rtrequest.c +++ b/sys/netinet6/ipv6_rtrequest.c @@ -37,12 +37,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_var.h> #include <netinet6/ipv6_icmp.h> -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * Globals (and forward function declarations). diff --git a/sys/netinet6/ipv6_trans.c b/sys/netinet6/ipv6_trans.c index 7276441df56..ccd0bbc58fb 100644 --- a/sys/netinet6/ipv6_trans.c +++ b/sys/netinet6/ipv6_trans.c @@ -33,16 +33,22 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6.h> #include <netinet6/ipv6_var.h> -#ifdef DEBUG_NRL_SYS +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC +#define IPSEC 1 +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ + +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ - -#if __OpenBSD__ && defined(NRL_IPSEC) -#define IPSEC 1 -#endif /* __OpenBSD__ && defined(NRL_IPSEC) */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * External globals. diff --git a/sys/netinet6/osdep.h b/sys/netinet6/osdep.h index 13f87c7c9e2..3e3f2a93f7a 100644 --- a/sys/netinet6/osdep.h +++ b/sys/netinet6/osdep.h @@ -145,6 +145,10 @@ static inline uint8_t __osdep_sa_len(struct sockaddr *sockaddr) #if __NetBSD__ || __bsdi__ || __OpenBSD__ || __FreeBSD__ #define OSDEP_BSD 1 +#if __OpenBSD__ || __NetBSD__ +#define KERNEL 1 +#endif /* __OpenBSD__ || __NetBSD__ */ + #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> diff --git a/sys/netinet6/raw_ipv6.c b/sys/netinet6/raw_ipv6.c index ddaab0ec8d9..e6ed96e4428 100644 --- a/sys/netinet6/raw_ipv6.c +++ b/sys/netinet6/raw_ipv6.c @@ -42,7 +42,7 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. * SUCH DAMAGE. * * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 - * $Id: raw_ipv6.c,v 1.2 1999/02/24 04:36:46 cmetz Exp $ + * $Id: raw_ipv6.c,v 1.3 1999/03/09 05:31:55 cmetz Exp $ */ #include <sys/param.h> @@ -78,9 +78,12 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet6/ipv6_var.h> #include <netinet6/icmpv6.h> -#if __OpenBSD__ && defined(NRL_IPSEC) +#if __OpenBSD__ +#undef IPSEC +#ifdef NRL_IPSEC #define IPSEC 1 -#endif /* __OpenBSD__ && defined(NRL_IPSEC) */ +#endif /* NRL_IPSEC */ +#endif /* __OpenBSD__ */ #ifdef IPSEC #include <sys/osdep.h> @@ -88,12 +91,15 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <net/netproc_var.h> #endif /* IPSEC */ -#ifdef DEBUG_NRL_SYS +#ifdef DEBUG_NRL #include <sys/debug.h> -#endif /* DEBUG_NRL_SYS */ -#ifdef DEBUG_NRL_NETINET6 +#else /* DEBUG_NRL */ +#if __OpenBSD__ #include <netinet6/debug.h> -#endif /* DEBUG_NRL_NETINET6 */ +#else /* __OpenBSD__ */ +#include <sys/debug.h> +#endif /* __OpenBSD__ */ +#endif /* DEBUG_NRL */ /* * Globals |