diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-27 17:31:49 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-27 17:31:49 +0100 |
| commit | 570a80dfadd2513f628b4d540fc719883fa8674a (patch) | |
| tree | 5578666ac6c2189b079cc93fba6343e64cfbe5a3 /plugin | |
| parent | e6b8cb93fad578321eb3d33dd14490b18069886f (diff) | |
| download | eurephia-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 'plugin')
| -rw-r--r-- | plugin/eurephia.c | 2 | ||||
| -rw-r--r-- | plugin/eurephia_struct.h | 54 | ||||
| -rw-r--r-- | plugin/eurephiadb_session.c | 2 | ||||
| -rw-r--r-- | plugin/eurephiadb_session.h | 5 | ||||
| -rw-r--r-- | plugin/firewall/eurephiafw.c | 2 | ||||
| -rw-r--r-- | plugin/firewall/eurephiafw_helpers.c | 2 | ||||
| -rw-r--r-- | plugin/firewall/eurephiafw_struct.h | 3 | ||||
| -rw-r--r-- | plugin/firewall/iptables/efw-iptables.c | 2 |
8 files changed, 13 insertions, 59 deletions
diff --git a/plugin/eurephia.c b/plugin/eurephia.c index 0326c62..26d60b3 100644 --- a/plugin/eurephia.c +++ b/plugin/eurephia.c @@ -23,7 +23,7 @@ #include <string.h> #include <getopt.h> -#include <eurephia_struct.h> +#include <eurephia_context.h> #include <eurephiadb.h> #include <eurephiadb_driver.h> #include <eurephiafw.h> diff --git a/plugin/eurephia_struct.h b/plugin/eurephia_struct.h deleted file mode 100644 index 75ca250..0000000 --- a/plugin/eurephia_struct.h +++ /dev/null @@ -1,54 +0,0 @@ -/* eurephia_struct.h -- Structures and defines used by the eurephia module - * - * 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 ***/ - -#include <mqueue.h> -#include <semaphore.h> - -#ifndef EUREPHIASTRUCT_H_ -#define EUREPHIASTRUCT_H_ - -#define SESSION_NEW 1 -#define SESSION_EXISTING 2 -#define SESSION_REGISTERED 3 -#define SESSION_LOGGEDOUT 4 - -#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/plugin/eurephiadb_session.c b/plugin/eurephiadb_session.c index cb314ee..952e016 100644 --- a/plugin/eurephiadb_session.c +++ b/plugin/eurephiadb_session.c @@ -27,7 +27,7 @@ #include <time.h> #include <openssl/rand.h> -#include "eurephia_struct.h" +#include <eurephia_context.h> #include "eurephia_nullsafe.h" #include "eurephia_log.h" #include "eurephiadb_session.h" diff --git a/plugin/eurephiadb_session.h b/plugin/eurephiadb_session.h index f364529..17271be 100644 --- a/plugin/eurephiadb_session.h +++ b/plugin/eurephiadb_session.h @@ -23,6 +23,11 @@ #include <eurephiadb_session_struct.h> +#define SESSION_NEW 1 +#define SESSION_EXISTING 2 +#define SESSION_REGISTERED 3 +#define SESSION_LOGGEDOUT 4 + #define SESSVAL_NEW 10 #define SESSVAL_UPDATE 11 #define SESSVAL_DELETE 12 diff --git a/plugin/firewall/eurephiafw.c b/plugin/firewall/eurephiafw.c index 1aba1c7..f1b15a1 100644 --- a/plugin/firewall/eurephiafw.c +++ b/plugin/firewall/eurephiafw.c @@ -30,7 +30,7 @@ #include <sys/wait.h> #include <time.h> -#include "eurephia_struct.h" +#include <eurephia_context.h> #include "eurephia_log.h" #include "eurephiafw.h" #include "eurephiafw_intf.h" diff --git a/plugin/firewall/eurephiafw_helpers.c b/plugin/firewall/eurephiafw_helpers.c index ceb6d25..29d2f06 100644 --- a/plugin/firewall/eurephiafw_helpers.c +++ b/plugin/firewall/eurephiafw_helpers.c @@ -28,7 +28,7 @@ #include <semaphore.h> #include <mqueue.h> -#include "eurephia_struct.h" +#include <eurephia_context.h> #include "eurephia_log.h" #include "eurephiafw.h" #include "eurephiafw_helpers.h" diff --git a/plugin/firewall/eurephiafw_struct.h b/plugin/firewall/eurephiafw_struct.h index 149d47d..b714975 100644 --- a/plugin/firewall/eurephiafw_struct.h +++ b/plugin/firewall/eurephiafw_struct.h @@ -21,6 +21,9 @@ #ifndef EUREPHIAFW_STRUCT_H_ #define EUREPHIAFW_STRUCT_H_ +#include <mqueue.h> +#include <semaphore.h> + #include <eurephia_values_struct.h> // diff --git a/plugin/firewall/iptables/efw-iptables.c b/plugin/firewall/iptables/efw-iptables.c index a0807f9..f7ebb0d 100644 --- a/plugin/firewall/iptables/efw-iptables.c +++ b/plugin/firewall/iptables/efw-iptables.c @@ -30,7 +30,7 @@ #include <eurephia_nullsafe.h> #include <eurephia_log.h> -#include <eurephia_struct.h> +#include <eurephia_context.h> #include <eurephiafw_helpers.h> #define INTERFACEVER "1.0" |
