aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-15 14:21:34 +0200
committerTobias Brunner <tobias@strongswan.org>2013-06-21 17:03:21 +0200
commit7045defbffb2917279b3b8222b700fed4d7af925 (patch)
tree8d86fe438b44499c5593abd2544f14efba7a49fb /src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h
parent554c4276a5afec3fb28562c757791258c5803c9e (diff)
downloadstrongswan-7045defbffb2917279b3b8222b700fed4d7af925.tar.bz2
strongswan-7045defbffb2917279b3b8222b700fed4d7af925.tar.xz
kernel-libipsec: Use separate class to route packets between charon, libipsec and TUN device
Diffstat (limited to 'src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h')
-rw-r--r--src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h b/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h
new file mode 100644
index 000000000..a7ef27c0a
--- /dev/null
+++ b/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_router.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2013 Tobias Brunner
+ * Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+/**
+ * @defgroup kernel_libipsec_router kernel_libipsec_router
+ * @{ @ingroup kernel_libipsec
+ */
+
+#ifndef KERNEL_LIBIPSEC_ROUTER_H_
+#define KERNEL_LIBIPSEC_ROUTER_H_
+
+typedef struct kernel_libipsec_router_t kernel_libipsec_router_t;
+
+/**
+ * Class that routes the network packets between TUN device, libipsec and
+ * charon's IKE socket.
+ */
+struct kernel_libipsec_router_t {
+
+ /**
+ * Destroy the given instance
+ */
+ void (*destroy)(kernel_libipsec_router_t *this);
+};
+
+/**
+ * Create a kernel_libipsec_router_t instance.
+ *
+ * @return kernel_libipsec_router_t instance
+ */
+kernel_libipsec_router_t *kernel_libipsec_router_create();
+
+#endif /** KERNEL_LIBIPSEC_ROUTER_H_ @}*/