[PATCH v2 12/15] Add RTEMS_BSD_CONFIG_IPSEC.

Christian Mauderer christian.mauderer at embedded-brains.de
Thu Aug 2 08:55:44 UTC 2018


---
 rtemsbsd/include/machine/rtems-bsd-config.h  | 21 +++++++++++++++++++++
 rtemsbsd/include/machine/rtems-bsd-sysinit.h |  6 ++++++
 2 files changed, 27 insertions(+)

diff --git a/rtemsbsd/include/machine/rtems-bsd-config.h b/rtemsbsd/include/machine/rtems-bsd-config.h
index 72876d01..491d9a72 100644
--- a/rtemsbsd/include/machine/rtems-bsd-config.h
+++ b/rtemsbsd/include/machine/rtems-bsd-config.h
@@ -29,6 +29,7 @@
  * Configuration defines:
  *
  *  RTEMS_BSD_CONFIG_DOMAIN_PAGE_MBUFS_SIZE : Memory in bytes for mbufs
+ *  RTEMS_BSD_CONFIG_IPSEC                  : IPSec support.
  *  RTEMS_BSD_CONFIG_NET_PF_UNIX            : Packet Filter.
  *  RTEMS_BSD_CONFIG_NET_IF_LAGG            : Link Aggregetion and Failover.
  *  RTEMS_BSD_CONFIG_NET_IF_VLAN            : Virtual LAN.
@@ -165,6 +166,20 @@ extern "C" {
 #endif /* RTEMS_BSD_CONFIG_FIREWALL_PFSYNC */
 
 /*
+ * IPSec
+ */
+#if defined(RTEMS_BSD_CONFIG_IPSEC)
+  #define RTEMS_BSD_CFGDECL_IPSEC \
+      SYSINIT_NEED_NET_IF_GIF; \
+      SYSINIT_NEED_CRYPTODEV
+  #define RTEMS_BSD_CFGDECL_IPSEC_SERVICE \
+      RTEMS_BSD_RC_CONF_SYSINT(rc_conf_ipsec)
+#else
+  #define RTEMS_BSD_CFGDECL_IPSEC
+  #define RTEMS_BSD_CFGDECL_IPSEC_SERVICE
+#endif /* RTEMS_BSD_CONFIG_FIREWALL_PF */
+
+/*
  * FTPD
  */
 #if defined(RTEMS_BSD_CONFIG_SERVICE_FTPD)
@@ -234,6 +249,12 @@ extern "C" {
   RTEMS_BSD_CFGDECL_FIREWALL_PFSYNC;
 
   /*
+   * IPSec related stuff.
+   */
+  RTEMS_BSD_CFGDECL_IPSEC;
+  RTEMS_BSD_CFGDECL_IPSEC_SERVICE;
+
+  /*
    * Create the services.
    */
   RTEMS_BSD_CFGDECL_TELNETD;
diff --git a/rtemsbsd/include/machine/rtems-bsd-sysinit.h b/rtemsbsd/include/machine/rtems-bsd-sysinit.h
index 6f18cc2e..ab126c9e 100644
--- a/rtemsbsd/include/machine/rtems-bsd-sysinit.h
+++ b/rtemsbsd/include/machine/rtems-bsd-sysinit.h
@@ -44,6 +44,9 @@
 #include <sys/queue.h>
 #include <sys/kernel.h>
 
+#define SYSINIT_NEED_CRYPTODEV \
+	SYSINIT_MODULE_REFERENCE(cryptodev)
+
 #define SYSINIT_NEED_USB_CORE \
 	SYSINIT_REFERENCE(usb_quirk_init); \
 	SYSINIT_DRIVER_REFERENCE(uhub, usbus)
@@ -93,6 +96,9 @@
 #define SYSINIT_NEED_NET_IF_BFE \
 	SYSINIT_DRIVER_REFERENCE(bfe, pci)
 
+#define SYSINIT_NEED_NET_IF_GIF \
+	SYSINIT_MODULE_REFERENCE(if_gif)
+
 #define SYSINIT_NEED_NET_IF_RE \
 	SYSINIT_DRIVER_REFERENCE(re, pci)
 
-- 
2.13.7




More information about the devel mailing list