-/* $OpenBSD: ip_ipsp.h,v 1.158 2014/12/23 03:24:08 tedu Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.159 2015/01/19 16:49:05 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
/* IPSP global definitions. */
#include <sys/types.h>
-#include <sys/queue.h>
+#ifdef _KERNEL
#include <sys/timeout.h>
+#endif
+#include <sys/queue.h>
#include <netinet/in.h>
union sockaddr_union {
#define IPSP_DIRECTION_IN 0x1
#define IPSP_DIRECTION_OUT 0x2
+#ifdef _KERNEL
+
#define sen_data Sen.Data
#define sen_ip_src Sen.Sip4.Src
#define sen_ip_dst Sen.Sip4.Dst
TAILQ_ENTRY(ipsec_acquire) ipa_inp_next;
};
+#endif /* _KERNEL */
+
struct ipsec_policy {
struct sockaddr_encap ipo_addr;
struct sockaddr_encap ipo_mask;
TAILQ_ENTRY(ipsec_policy) ipo_list; /* List of all policies */
};
+#ifdef _KERNEL
+
#define IPSP_POLICY_NONE 0x0000 /* No flags set */
#define IPSP_POLICY_SOCKET 0x0001 /* Socket-attached policy */
#define IPSP_POLICY_STATIC 0x0002 /* Static policy */
TAILQ_ENTRY(tdb) tdb_sync_entry;
};
+#endif /* _KERNEL */
+
struct tdb_ident {
u_int32_t spi;
union sockaddr_union dst;
-/* $OpenBSD: route.c,v 1.95 2015/01/16 06:40:10 deraadt Exp $ */
+/* $OpenBSD: route.c,v 1.96 2015/01/19 16:49:04 deraadt Exp $ */
/* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */
/*
#include <net/if_types.h>
#define _KERNEL
#include <net/route.h>
+#include <netinet/ip_ipsp.h>
#undef _KERNEL
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
-#include <netinet/ip_ipsp.h>
#include "netstat.h"
/* alignment constraint for routing socket */