aboutsummaryrefslogtreecommitdiff
path: root/sys/netipsec
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2022-10-04 03:53:04 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2022-10-04 03:53:04 +0000
commit809fef2913574cb37d2dadc00abfd62619d52040 (patch)
treeed8adc1cc7507c6d6ece893819cdeb1b5af53121 /sys/netipsec
parentc0fc81e9138b4bc636333285087f1c3e1c7bc1e5 (diff)
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/ipsec.h9
-rw-r--r--sys/netipsec/ipsec6.h7
-rw-r--r--sys/netipsec/ipsec_input.c1
-rw-r--r--sys/netipsec/ipsec_output.c1
-rw-r--r--sys/netipsec/ipsec_support.h22
5 files changed, 24 insertions, 16 deletions
diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h
index 85360f9b737c..e29fdbe29fa0 100644
--- a/sys/netipsec/ipsec.h
+++ b/sys/netipsec/ipsec.h
@@ -325,8 +325,6 @@ u_int ipsec_get_reqlevel(struct secpolicy *, u_int);
void udp_ipsec_adjust_cksum(struct mbuf *, struct secasvar *, int, int);
int udp_ipsec_output(struct mbuf *, struct secasvar *);
-int udp_ipsec_input(struct mbuf *, int, int);
-int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *);
int ipsec_chkreplay(uint32_t, uint32_t *, struct secasvar *);
int ipsec_updatereplay(uint32_t, struct secasvar *);
@@ -338,14 +336,7 @@ void ipsec_setspidx_inpcb(struct inpcb *, struct secpolicyindex *, u_int);
void ipsec4_setsockaddrs(const struct mbuf *, union sockaddr_union *,
union sockaddr_union *);
-int ipsec4_in_reject(const struct mbuf *, struct inpcb *);
-int ipsec4_input(struct mbuf *, int, int);
-int ipsec4_forward(struct mbuf *);
-int ipsec4_pcbctl(struct inpcb *, struct sockopt *);
-int ipsec4_output(struct mbuf *, struct inpcb *);
-int ipsec4_capability(struct mbuf *, u_int);
int ipsec4_common_input_cb(struct mbuf *, struct secasvar *, int, int);
-int ipsec4_ctlinput(int, struct sockaddr *, void *);
int ipsec4_check_pmtu(struct mbuf *, struct secpolicy *, int);
int ipsec4_process_packet(struct mbuf *, struct secpolicy *, struct inpcb *);
int ipsec_process_done(struct mbuf *, struct secpolicy *, struct secasvar *,
diff --git a/sys/netipsec/ipsec6.h b/sys/netipsec/ipsec6.h
index f690102fae2b..3654466a2889 100644
--- a/sys/netipsec/ipsec6.h
+++ b/sys/netipsec/ipsec6.h
@@ -66,14 +66,7 @@ struct secpolicy *ipsec6_checkpolicy(const struct mbuf *,
void ipsec6_setsockaddrs(const struct mbuf *, union sockaddr_union *,
union sockaddr_union *);
-int ipsec6_input(struct mbuf *, int, int);
-int ipsec6_in_reject(const struct mbuf *, struct inpcb *);
-int ipsec6_forward(struct mbuf *);
-int ipsec6_pcbctl(struct inpcb *, struct sockopt *);
-int ipsec6_output(struct mbuf *, struct inpcb *);
-int ipsec6_capability(struct mbuf *, u_int);
int ipsec6_common_input_cb(struct mbuf *, struct secasvar *, int, int);
-int ipsec6_ctlinput(int, struct sockaddr *, void *);
int ipsec6_check_pmtu(struct mbuf *, struct secpolicy *, int);
int ipsec6_process_packet(struct mbuf *, struct secpolicy *, struct inpcb *);
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index 7effed48121a..fcc0b1999c63 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$");
#ifdef INET6
#include <netipsec/ipsec6.h>
#endif
+#include <netipsec/ipsec_support.h>
#include <netipsec/ah_var.h>
#include <netipsec/esp.h>
#include <netipsec/esp_var.h>
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index 26588db6371b..ff0175e417cd 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -84,6 +84,7 @@
#ifdef INET6
#include <netipsec/ipsec6.h>
#endif
+#include <netipsec/ipsec_support.h>
#include <netipsec/ah_var.h>
#include <netipsec/esp_var.h>
#include <netipsec/ipcomp_var.h>
diff --git a/sys/netipsec/ipsec_support.h b/sys/netipsec/ipsec_support.h
index e4d0aea906f1..f285c31efa05 100644
--- a/sys/netipsec/ipsec_support.h
+++ b/sys/netipsec/ipsec_support.h
@@ -44,6 +44,28 @@ int ipsec_init_pcbpolicy(struct inpcb *);
int ipsec_delete_pcbpolicy(struct inpcb *);
int ipsec_copy_pcbpolicy(struct inpcb *, struct inpcb *);
+#ifdef INET
+int udp_ipsec_input(struct mbuf *, int, int);
+int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *);
+int ipsec4_in_reject(const struct mbuf *, struct inpcb *);
+int ipsec4_input(struct mbuf *, int, int);
+int ipsec4_forward(struct mbuf *);
+int ipsec4_pcbctl(struct inpcb *, struct sockopt *);
+int ipsec4_output(struct mbuf *, struct inpcb *);
+int ipsec4_capability(struct mbuf *, u_int);
+int ipsec4_ctlinput(int, struct sockaddr *, void *);
+#endif /* INET */
+
+#ifdef INET6
+int ipsec6_input(struct mbuf *, int, int);
+int ipsec6_in_reject(const struct mbuf *, struct inpcb *);
+int ipsec6_forward(struct mbuf *);
+int ipsec6_pcbctl(struct inpcb *, struct sockopt *);
+int ipsec6_output(struct mbuf *, struct inpcb *);
+int ipsec6_capability(struct mbuf *, u_int);
+int ipsec6_ctlinput(int, struct sockaddr *, void *);
+#endif /* INET6 */
+
struct ipsec_methods {
int (*input)(struct mbuf *, int, int);
int (*check_policy)(const struct mbuf *, struct inpcb *);