On 20/11/17(Mon) 14:15, Alexander Bluhm wrote:
> On Mon, Nov 20, 2017 at 12:37:35PM +0100, Martin Pieuchot wrote:
> > Merge multiple _KERNEL blocks, ok?
>
> My grep over /usr/src found these defines only within the kernel.
> So perhaps we should not export them to user land.
Indeed, updated diff below.
Index: netinet/ip_ipsp.h
===================================================================
RCS file: /cvs/src/sys/netinet/ip_ipsp.h,v
retrieving revision 1.188
diff -u -p -r1.188 ip_ipsp.h
--- netinet/ip_ipsp.h 15 Nov 2017 11:48:59 -0000 1.188
+++ netinet/ip_ipsp.h 20 Nov 2017 13:24:14 -0000
@@ -45,10 +45,6 @@ struct m_tag;
/* IPSP global definitions. */
#include <sys/types.h>
-#ifdef _KERNEL
-#include <sys/timeout.h>
-#include <sys/tree.h>
-#endif
#include <sys/queue.h>
#include <netinet/in.h>
#include <net/radix.h>
@@ -130,6 +126,8 @@ struct sockaddr_encap {
#define IPSP_DIRECTION_OUT 0x2
#ifdef _KERNEL
+#include <sys/timeout.h>
+#include <sys/tree.h>
#define sen_data Sen.Data
#define sen_ip_src Sen.Sip4.Src
@@ -352,7 +350,6 @@ struct tdb { /* tunnel
descriptor blo
TAILQ_ENTRY(tdb) tdb_sync_entry;
};
-#endif /* _KERNEL */
struct tdb_ident {
u_int32_t spi;
@@ -393,8 +390,6 @@ struct ipsecinit {
#define XFT_COMP 0x1000
#define IPSEC_ZEROES_SIZE 256 /* Larger than an IP6 extension
hdr. */
-
-#ifdef _KERNEL
struct xformsw {
u_short xf_type; /* Unique ID of xform */