]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Moved all kernel plugins to libhydra.
authorTobias Brunner <tobias@strongswan.org>
Mon, 12 Jul 2010 16:10:16 +0000 (18:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 2 Sep 2010 17:01:26 +0000 (19:01 +0200)
30 files changed:
configure.in
src/libcharon/Android.mk
src/libcharon/Makefile.am
src/libhydra/Android.mk
src/libhydra/Makefile.am
src/libhydra/plugins/kernel_klips/Makefile.am [moved from src/libcharon/plugins/kernel_klips/Makefile.am with 90% similarity]
src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c [moved from src/libcharon/plugins/kernel_klips/kernel_klips_ipsec.c with 99% similarity]
src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.h [moved from src/libcharon/plugins/kernel_klips/kernel_klips_ipsec.h with 100% similarity]
src/libhydra/plugins/kernel_klips/kernel_klips_plugin.c [moved from src/libcharon/plugins/kernel_klips/kernel_klips_plugin.c with 100% similarity]
src/libhydra/plugins/kernel_klips/kernel_klips_plugin.h [moved from src/libcharon/plugins/kernel_klips/kernel_klips_plugin.h with 98% similarity]
src/libhydra/plugins/kernel_klips/pfkeyv2.h [moved from src/libcharon/plugins/kernel_klips/pfkeyv2.h with 100% similarity]
src/libhydra/plugins/kernel_netlink/Makefile.am [moved from src/libcharon/plugins/kernel_netlink/Makefile.am with 77% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c with 99% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.h [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.h with 100% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c with 99% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_net.h [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_net.h with 100% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_plugin.c [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_plugin.c with 100% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_plugin.h [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_plugin.h with 98% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.c [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c with 99% similarity]
src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h [moved from src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.h with 100% similarity]
src/libhydra/plugins/kernel_pfkey/Makefile.am [moved from src/libcharon/plugins/kernel_pfkey/Makefile.am with 87% similarity]
src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c [moved from src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c with 99% similarity]
src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.h [moved from src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.h with 100% similarity]
src/libhydra/plugins/kernel_pfkey/kernel_pfkey_plugin.c [moved from src/libcharon/plugins/kernel_pfkey/kernel_pfkey_plugin.c with 100% similarity]
src/libhydra/plugins/kernel_pfkey/kernel_pfkey_plugin.h [moved from src/libcharon/plugins/kernel_pfkey/kernel_pfkey_plugin.h with 98% similarity]
src/libhydra/plugins/kernel_pfroute/Makefile.am [moved from src/libcharon/plugins/kernel_pfroute/Makefile.am with 87% similarity]
src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c [moved from src/libcharon/plugins/kernel_pfroute/kernel_pfroute_net.c with 99% similarity]
src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.h [moved from src/libcharon/plugins/kernel_pfroute/kernel_pfroute_net.h with 100% similarity]
src/libhydra/plugins/kernel_pfroute/kernel_pfroute_plugin.c [moved from src/libcharon/plugins/kernel_pfroute/kernel_pfroute_plugin.c with 100% similarity]
src/libhydra/plugins/kernel_pfroute/kernel_pfroute_plugin.h [moved from src/libcharon/plugins/kernel_pfroute/kernel_pfroute_plugin.h with 98% similarity]

index 996b87f4db8c46af40ae04c896ba136ddd7d13c1..ea49f1c953b02ed4e1f7ac3a922e93861d9554c0 100644 (file)
@@ -724,12 +724,12 @@ ADD_PLUGIN([gcm],                  [s libcharon scripts])
 ADD_PLUGIN([xauth],                [p pluto])
 ADD_PLUGIN([attr],                 [h libcharon pluto])
 ADD_PLUGIN([attr-sql],             [h libcharon pluto])
+ADD_PLUGIN([kernel-pfkey],         [h libcharon pluto])
+ADD_PLUGIN([kernel-pfroute],       [h libcharon pluto])
+ADD_PLUGIN([kernel-klips],         [h libcharon pluto])
+ADD_PLUGIN([kernel-netlink],       [h libcharon pluto])
 ADD_PLUGIN([resolve],              [h libcharon pluto])
 ADD_PLUGIN([load-tester],          [c libcharon])
-ADD_PLUGIN([kernel-pfkey],         [c libcharon])
-ADD_PLUGIN([kernel-pfroute],       [c libcharon])
-ADD_PLUGIN([kernel-klips],         [c libcharon])
-ADD_PLUGIN([kernel-netlink],       [c libcharon])
 ADD_PLUGIN([socket-default],       [c libcharon])
 ADD_PLUGIN([socket-raw],           [c libcharon])
 ADD_PLUGIN([socket-dynamic],       [c libcharon])
@@ -847,10 +847,6 @@ AM_CONDITIONAL(USE_EAP_TLS, test x$eap_tls = xtrue)
 AM_CONDITIONAL(USE_EAP_TTLS, test x$eap_ttls = xtrue)
 AM_CONDITIONAL(USE_EAP_TNC, test x$eap_tnc = xtrue)
 AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
-AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
-AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
-AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
-AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
 AM_CONDITIONAL(USE_SOCKET_DEFAULT, test x$socket_default = xtrue)
 AM_CONDITIONAL(USE_SOCKET_RAW, test x$socket_raw = xtrue)
 AM_CONDITIONAL(USE_SOCKET_DYNAMIC, test x$socket_dynamic = xtrue)
@@ -861,6 +857,10 @@ dnl hydra plugins
 dnl =============
 AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
 AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue -o x$sql = xtrue)
+AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
+AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
+AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
+AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
 AM_CONDITIONAL(USE_RESOLVE, test x$resolve = xtrue)
 
 dnl pluto plugins
@@ -955,6 +955,10 @@ AC_OUTPUT(
        src/libhydra/Makefile
        src/libhydra/plugins/attr/Makefile
        src/libhydra/plugins/attr_sql/Makefile
+       src/libhydra/plugins/kernel_klips/Makefile
+       src/libhydra/plugins/kernel_netlink/Makefile
+       src/libhydra/plugins/kernel_pfkey/Makefile
+       src/libhydra/plugins/kernel_pfroute/Makefile
        src/libhydra/plugins/resolve/Makefile
        src/libfreeswan/Makefile
        src/libsimaka/Makefile
@@ -979,10 +983,6 @@ AC_OUTPUT(
        src/libcharon/plugins/eap_ttls/Makefile
        src/libcharon/plugins/eap_tnc/Makefile
        src/libcharon/plugins/eap_radius/Makefile
-       src/libcharon/plugins/kernel_netlink/Makefile
-       src/libcharon/plugins/kernel_pfkey/Makefile
-       src/libcharon/plugins/kernel_pfroute/Makefile
-       src/libcharon/plugins/kernel_klips/Makefile
        src/libcharon/plugins/socket_default/Makefile
        src/libcharon/plugins/socket_raw/Makefile
        src/libcharon/plugins/socket_dynamic/Makefile
index 2724b9b76826526633c26f817ea5e73c20111c07..e7de8e5866b2216cedf5f7ac4eb4d9001c715a0c 100644 (file)
@@ -135,10 +135,6 @@ LOCAL_SRC_FILES += $(addprefix ../libsimaka/, \
        )
 endif
 
-LOCAL_SRC_FILES += $(call add_plugin, kernel-netlink)
-
-LOCAL_SRC_FILES += $(call add_plugin, kernel-pfkey)
-
 LOCAL_SRC_FILES += $(call add_plugin, load-tester)
 
 LOCAL_SRC_FILES += $(call add_plugin, socket-default)
index ca2b8ffafab2b21c2287434bd49526b851eddfe6..ef5f9f499b6fea72a98ec78a0066ac82f786a446 100644 (file)
@@ -137,34 +137,6 @@ if MONOLITHIC
 endif
 endif
 
-if USE_KERNEL_PFKEY
-  SUBDIRS += plugins/kernel_pfkey
-if MONOLITHIC
-  libcharon_la_LIBADD += plugins/kernel_pfkey/libstrongswan-kernel-pfkey.la
-endif
-endif
-
-if USE_KERNEL_PFROUTE
-  SUBDIRS += plugins/kernel_pfroute
-if MONOLITHIC
-  libcharon_la_LIBADD += plugins/kernel_pfroute/libstrongswan-kernel-pfroute.la
-endif
-endif
-
-if USE_KERNEL_KLIPS
-  SUBDIRS += plugins/kernel_klips
-if MONOLITHIC
-  libcharon_la_LIBADD += plugins/kernel_klips/libstrongswan-kernel-klips.la
-endif
-endif
-
-if USE_KERNEL_NETLINK
-  SUBDIRS += plugins/kernel_netlink
-if MONOLITHIC
-  libcharon_la_LIBADD += plugins/kernel_netlink/libstrongswan-kernel-netlink.la
-endif
-endif
-
 if USE_SOCKET_DEFAULT
   SUBDIRS += plugins/socket_default
 if MONOLITHIC
index 8439cf8ba3ef6776d1b21a68795ffb512324fab7..47183c6eae78c5543758c1c82387d36c47b88d0c 100644 (file)
@@ -21,6 +21,10 @@ processing/scheduler.c processing/scheduler.h
 
 LOCAL_SRC_FILES += $(call add_plugin, attr)
 
+LOCAL_SRC_FILES += $(call add_plugin, kernel-pfkey)
+
+LOCAL_SRC_FILES += $(call add_plugin, kernel-netlink)
+
 # build libcharon --------------------------------------------------------------
 
 LOCAL_C_INCLUDES += \
index 62ec8f4a256a84b7da99d7bb00e96fbed0f73de8..ebaf792334df3d5ba30330d767fb7154a34de78e 100644 (file)
@@ -48,6 +48,34 @@ if MONOLITHIC
 endif
 endif
 
+if USE_KERNEL_PFKEY
+  SUBDIRS += plugins/kernel_pfkey
+if MONOLITHIC
+  libhydra_la_LIBADD += plugins/kernel_pfkey/libstrongswan-kernel-pfkey.la
+endif
+endif
+
+if USE_KERNEL_PFROUTE
+  SUBDIRS += plugins/kernel_pfroute
+if MONOLITHIC
+  libhydra_la_LIBADD += plugins/kernel_pfroute/libstrongswan-kernel-pfroute.la
+endif
+endif
+
+if USE_KERNEL_KLIPS
+  SUBDIRS += plugins/kernel_klips
+if MONOLITHIC
+  libhydra_la_LIBADD += plugins/kernel_klips/libstrongswan-kernel-klips.la
+endif
+endif
+
+if USE_KERNEL_NETLINK
+  SUBDIRS += plugins/kernel_netlink
+if MONOLITHIC
+  libhydra_la_LIBADD += plugins/kernel_netlink/libstrongswan-kernel-netlink.la
+endif
+endif
+
 if USE_RESOLVE
   SUBDIRS += plugins/resolve
 if MONOLITHIC
similarity index 90%
rename from src/libcharon/plugins/kernel_klips/Makefile.am
rename to src/libhydra/plugins/kernel_klips/Makefile.am
index 540bbe106458800a00780659dc02b1173cff88fe..df639b255ea5bcddcb4ab43bd6202188793c0714 100644 (file)
@@ -1,6 +1,5 @@
 
-INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
-       -I$(top_srcdir)/src/libcharon
+INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra
 
 AM_CFLAGS = -rdynamic
 
similarity index 99%
rename from src/libcharon/plugins/kernel_klips/kernel_klips_ipsec.c
rename to src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
index 68cab1762890107bea6e13568e86e2604f8dfebf..28ca697c2a00a6a0bb9fef8c9d766418b1d531b9 100644 (file)
@@ -29,7 +29,8 @@
 #include "kernel_klips_ipsec.h"
 
 #include <hydra.h>
-#include <daemon.h>
+#include <debug.h>
+#include <utils/linked_list.h>
 #include <threading/thread.h>
 #include <threading/mutex.h>
 #include <processing/jobs/callback_job.h>
@@ -1488,9 +1489,6 @@ static job_requeue_t sa_expires(sa_expire_t *expire)
        }
        this->mutex->unlock(this->mutex);
 
-       DBG2(DBG_KNL, "%N CHILD_SA with SPI %.8x and reqid {%d} expired",
-                       protocol_id_names, protocol, ntohl(spi), reqid);
-
        hydra->kernel_interface->expire(hydra->kernel_interface, reqid, protocol,
                                                                        spi, hard);
        return JOB_REQUEUE_NONE;
@@ -1537,9 +1535,6 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
        /* charon's SPIs lie within the range from 0xc0000000 to 0xcFFFFFFF */
        spi_gen = 0xc0000000 | (spi_gen & 0x0FFFFFFF);
 
-       DBG2(DBG_KNL, "allocated SPI %.8x for %N SA between %#H..%#H",
-                       spi_gen, protocol_id_names, protocol, src, dst);
-
        *spi = htonl(spi_gen);
 
        this->mutex->lock(this->mutex);
similarity index 98%
rename from src/libcharon/plugins/kernel_klips/kernel_klips_plugin.h
rename to src/libhydra/plugins/kernel_klips/kernel_klips_plugin.h
index 6086217ad0adf3eae66f9fdc6d675639d74203f8..8dd386a66e57a94968040bafd7dd796fb2cc7938 100644 (file)
@@ -15,7 +15,7 @@
 
 /**
  * @defgroup kernel_klips kernel_klips
- * @ingroup cplugins
+ * @ingroup hplugins
  *
  * @defgroup kernel_klips_plugin kernel_klips_plugin
  * @{ @ingroup kernel_klips
similarity index 77%
rename from src/libcharon/plugins/kernel_netlink/Makefile.am
rename to src/libhydra/plugins/kernel_netlink/Makefile.am
index 2bb00ec0dbda2f8f86a78f7b1ccc9d0a2f170c36..1ad379421f6e7482e0f65ae3556e3493983481a9 100644 (file)
@@ -1,6 +1,6 @@
 
 INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan \
-       -I$(top_srcdir)/src/libhydra -I$(top_srcdir)/src/libcharon
+       -I$(top_srcdir)/src/libhydra
 
 AM_CFLAGS = -rdynamic \
 -DROUTING_TABLE=${routing_table} \
@@ -14,7 +14,8 @@ endif
 
 libstrongswan_kernel_netlink_la_SOURCES = \
        kernel_netlink_plugin.h kernel_netlink_plugin.c \
-       kernel_netlink_ipsec.h kernel_netlink_ipsec.c kernel_netlink_net.h kernel_netlink_net.c \
+       kernel_netlink_ipsec.h kernel_netlink_ipsec.c \
+       kernel_netlink_net.h kernel_netlink_net.c \
        kernel_netlink_shared.h kernel_netlink_shared.c
 
 libstrongswan_kernel_netlink_la_LDFLAGS = -module -avoid-version
similarity index 99%
rename from src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
rename to src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
index 7de60b00a35e7d28b8aeb87c70d97f0da3266849..1db6ee9e3b6cd371efc45222597c73ab73a86aae 100644 (file)
@@ -36,7 +36,7 @@
 #include "kernel_netlink_shared.h"
 
 #include <hydra.h>
-#include <daemon.h>
+#include <debug.h>
 #include <threading/thread.h>
 #include <threading/mutex.h>
 #include <utils/hashtable.h>
similarity index 99%
rename from src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
rename to src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
index 0beb32d4bd7ccd8ba280fd18d8ce3ce1de93f008..8e7a0a93584a2c84faabf2991dc2206c8955a41a 100644 (file)
@@ -48,7 +48,7 @@
 #include "kernel_netlink_shared.h"
 
 #include <hydra.h>
-#include <daemon.h>
+#include <debug.h>
 #include <threading/thread.h>
 #include <threading/condvar.h>
 #include <threading/mutex.h>
similarity index 98%
rename from src/libcharon/plugins/kernel_netlink/kernel_netlink_plugin.h
rename to src/libhydra/plugins/kernel_netlink/kernel_netlink_plugin.h
index 74c9ae24fd048e2492faced4fb6e3109ba729e36..a795486ca7294d6d621c053493c114408788b0e0 100644 (file)
@@ -15,7 +15,7 @@
 
 /**
  * @defgroup kernel_netlink kernel_netlink
- * @ingroup cplugins
+ * @ingroup hplugins
  *
  * @defgroup kernel_netlink_plugin kernel_netlink_plugin
  * @{ @ingroup kernel_netlink
similarity index 99%
rename from src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
rename to src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.c
index 5ed568150e3e55a40ca45886951381f2b1b265d1..c26fd2e51421d81c0197c4b91cd992a6895e6604 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "kernel_netlink_shared.h"
 
-#include <daemon.h>
+#include <debug.h>
 #include <threading/mutex.h>
 
 typedef struct private_netlink_socket_t private_netlink_socket_t;
similarity index 87%
rename from src/libcharon/plugins/kernel_pfkey/Makefile.am
rename to src/libhydra/plugins/kernel_pfkey/Makefile.am
index 778a7f9a92f338440aba7a0ff3d05e690b2d8df9..1d1488a6bafb5dd5ff348bfa23143a4adeb4b24b 100644 (file)
@@ -1,6 +1,6 @@
 
 INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan \
-       -I$(top_srcdir)/src/libhydra -I$(top_srcdir)/src/libcharon
+       -I$(top_srcdir)/src/libhydra
 
 AM_CFLAGS = -rdynamic
 
similarity index 99%
rename from src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
rename to src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index 735978317e3f68f0ae0220891b72501299aeec7f..b6d2c5f6659c55e5426f7d3b2b1dc3252b703660 100644 (file)
@@ -55,8 +55,9 @@
 #include "kernel_pfkey_ipsec.h"
 
 #include <hydra.h>
-#include <daemon.h>
+#include <debug.h>
 #include <utils/host.h>
+#include <utils/linked_list.h>
 #include <threading/thread.h>
 #include <threading/mutex.h>
 #include <processing/jobs/callback_job.h>
similarity index 98%
rename from src/libcharon/plugins/kernel_pfkey/kernel_pfkey_plugin.h
rename to src/libhydra/plugins/kernel_pfkey/kernel_pfkey_plugin.h
index ecccc6303130a8a6c25b5be940795f043d97c40f..51db4d8d30fd971386cd140a1ef82ce80c9e35bb 100644 (file)
@@ -15,7 +15,7 @@
 
 /**
  * @defgroup kernel_pfkey kernel_pfkey
- * @ingroup cplugins
+ * @ingroup hplugins
  *
  * @defgroup kernel_pfkey_plugin kernel_pfkey_plugin
  * @{ @ingroup kernel_pfkey
similarity index 87%
rename from src/libcharon/plugins/kernel_pfroute/Makefile.am
rename to src/libhydra/plugins/kernel_pfroute/Makefile.am
index 83db4816032ea55ccb54f9b0239e2374fae00678..df3109eb8c59de3b37a38ec8d170d820290e562d 100644 (file)
@@ -1,6 +1,6 @@
 
 INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan \
-       -I$(top_srcdir)/src/libhydra -I$(top_srcdir)/src/libcharon
+       -I$(top_srcdir)/src/libhydra
 
 AM_CFLAGS = -rdynamic
 
similarity index 99%
rename from src/libcharon/plugins/kernel_pfroute/kernel_pfroute_net.c
rename to src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
index b471a10a0dcdbc55acc0b5c7f42191bee7abf6e5..99b99a274c902f63354014938ed23aa4657fd019 100644 (file)
@@ -24,7 +24,7 @@
 #include "kernel_pfroute_net.h"
 
 #include <hydra.h>
-#include <daemon.h>
+#include <debug.h>
 #include <utils/host.h>
 #include <threading/thread.h>
 #include <threading/mutex.h>
similarity index 98%
rename from src/libcharon/plugins/kernel_pfroute/kernel_pfroute_plugin.h
rename to src/libhydra/plugins/kernel_pfroute/kernel_pfroute_plugin.h
index 50642a572d629801d792fd44de1b1f43d9f4f74c..b8ee31a1d35525315222258c443265a0edb03c74 100644 (file)
@@ -15,7 +15,7 @@
 
 /**
  * @defgroup kernel_pfroute kernel_pfroute
- * @ingroup cplugins
+ * @ingroup hplugins
  *
  * @defgroup kernel_pfroute_plugin kernel_pfroute_plugin
  * @{ @ingroup kernel_pfroute