summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-11-27 17:31:49 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-11-27 17:31:49 +0100
commit570a80dfadd2513f628b4d540fc719883fa8674a (patch)
tree5578666ac6c2189b079cc93fba6343e64cfbe5a3 /common
parente6b8cb93fad578321eb3d33dd14490b18069886f (diff)
downloadeurephia-570a80dfadd2513f628b4d540fc719883fa8674a.tar.gz
eurephia-570a80dfadd2513f628b4d540fc719883fa8674a.tar.xz
eurephia-570a80dfadd2513f628b4d540fc719883fa8674a.zip
Renamed eurephia_struct.h to eurephia_context.h
Since this include file now only consists of eurephiaCTX definition, it was moved to the common/ directory and renamed. Moved the SESSION_* definitions out of this file and into plugin/eurephiadb_session.h where they belong. Moved the Posix MQ definitions into plugin/firewall/eurephiafw_struct.h where they belong. eurephia_context.h is now containing only context related things.
Diffstat (limited to 'common')
-rw-r--r--common/eurephia_context.h44
-rw-r--r--common/eurephia_getsym.c2
-rw-r--r--common/eurephia_log.c2
-rw-r--r--common/eurephia_log.h2
-rw-r--r--common/eurephia_values.c2
-rw-r--r--common/eurephia_values.h2
6 files changed, 49 insertions, 5 deletions
diff --git a/common/eurephia_context.h b/common/eurephia_context.h
new file mode 100644
index 0000000..2b6c5ed
--- /dev/null
+++ b/common/eurephia_context.h
@@ -0,0 +1,44 @@
+/* eurephia_context.h -- eurephiaCTX definition
+ *
+ * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ *
+ * 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; version 2
+ * of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+*/
+
+
+/*** Structures used by the eurphia module ***/
+
+#ifndef EUREPHIASTRUCT_H_
+#define EUREPHIASTRUCT_H_
+
+#include "eurephiadb_struct.h"
+#include "eurephiafw_struct.h"
+
+//
+// main structure for the eurephia module context
+// - the same context structure is used for all OpenVPN sessions
+//
+typedef struct {
+ void *eurephia_driver;
+ void *eurephia_fw_intf;
+ eDBconn *dbc;
+ eurephiaFWINTF *fwcfg;
+ FILE *log;
+ int loglevel;
+ int fatal_error;
+} eurephiaCTX;
+
+#endif
diff --git a/common/eurephia_getsym.c b/common/eurephia_getsym.c
index dc85c29..31ac05e 100644
--- a/common/eurephia_getsym.c
+++ b/common/eurephia_getsym.c
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <dlfcn.h>
-#include "eurephia_struct.h"
+#include <eurephia_context.h>
#include "eurephia_log.h"
void *eGetSym(eurephiaCTX *ctx, void *dlh, const char *symnam)
diff --git a/common/eurephia_log.c b/common/eurephia_log.c
index 9ea6a8e..08085e2 100644
--- a/common/eurephia_log.c
+++ b/common/eurephia_log.c
@@ -24,7 +24,7 @@
#include <time.h>
#include <pthread.h>
-#include "eurephia_struct.h"
+#include <eurephia_context.h>
#include "eurephia_log.h"
const char *erp_logtypes[] = {
diff --git a/common/eurephia_log.h b/common/eurephia_log.h
index 9a2b227..1e03286 100644
--- a/common/eurephia_log.h
+++ b/common/eurephia_log.h
@@ -21,7 +21,7 @@
#ifndef EUREPHIA_LOG_H_
#define EUREPHIA_LOG_H_
-#include <eurephia_struct.h>
+#include <eurephia_context.h>
#define LOG_INFO 1
#define LOG_DEBUG 2
diff --git a/common/eurephia_values.c b/common/eurephia_values.c
index d5473f9..06dc6b4 100644
--- a/common/eurephia_values.c
+++ b/common/eurephia_values.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <eurephia_nullsafe.h>
-#include <eurephia_struct.h>
+#include <eurephia_context.h>
#include <eurephia_log.h>
diff --git a/common/eurephia_values.h b/common/eurephia_values.h
index 8a48730..420da80 100644
--- a/common/eurephia_values.h
+++ b/common/eurephia_values.h
@@ -21,7 +21,7 @@
#ifndef EUREPHIA_VALUES_H_
# define EUREPHIA_VALUES_H_
-#include <eurephia_struct.h>
+#include <eurephia_context.h>
eurephiaVALUES *eGet_valuestruct(eurephiaVALUES *vls, const char *key);
char *eGet_value(eurephiaVALUES *vls, const char *key);