summaryrefslogtreecommitdiffstats
path: root/eurephia_struct.h
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-08-20 00:08:12 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-08-20 00:08:12 +0200
commitc0da96e53cd8b5bac09975fe4bd7701bbb36f5bd (patch)
tree46bcdc38a2a6405ccdaae07892a4a34ab6f322d1 /eurephia_struct.h
parent084ffe9fb93691104a2ac8bdf1ab85fddb30062c (diff)
downloadeurephia-c0da96e53cd8b5bac09975fe4bd7701bbb36f5bd.tar.gz
eurephia-c0da96e53cd8b5bac09975fe4bd7701bbb36f5bd.tar.xz
eurephia-c0da96e53cd8b5bac09975fe4bd7701bbb36f5bd.zip
Added framework for putting a firewall module into its own thread
Diffstat (limited to 'eurephia_struct.h')
-rw-r--r--eurephia_struct.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/eurephia_struct.h b/eurephia_struct.h
index 8cc9838..b1dac41 100644
--- a/eurephia_struct.h
+++ b/eurephia_struct.h
@@ -21,6 +21,8 @@
/*** Structures used by the eurphia module ***/
+#include <mqueue.h>
+#include <semaphore.h>
#ifndef EUREPHIASTRUCT_H_
#define EUREPHIASTRUCT_H_
@@ -38,6 +40,10 @@ typedef struct __eurephiaVALUES {
struct __eurephiaVALUES *next;
} eurephiaVALUES;
+
+//
+// Struct which contains session unique data
+//
typedef struct {
char *sessionkey;
int sessionstatus;
@@ -45,6 +51,10 @@ typedef struct {
} eurephiaSESSION;
+
+//
+// Struct containing connection to the database we are using
+//
typedef struct {
void *dbhandle;
char *dbname;
@@ -52,13 +62,32 @@ typedef struct {
} eDBconn;
-/*
- * Our plugin context, where we keep our state.
- */
+
+//
+// structs used by the firewall interface
+//
+typedef struct {
+ mqd_t msgq;
+ sem_t semp_module;
+ sem_t semp_driver;
+} efw_threaddata;
+
+typedef struct {
+ pthread_t fw_thread;
+ pthread_attr_t fw_threadattr;
+ efw_threaddata thrdata;
+} eurephiaFWINTF;
+
+
+//
+// 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;