summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-05 01:10:32 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-05 01:10:32 +0200
commit62ea92c1c38ef83adbec1b56ef7968941d128553 (patch)
tree30b4a1158bcaa1aad6c606f44b643b04e0cf704b /plugin
parent727d91f8a4d038f07618ceaafb073a2eb00eb749 (diff)
downloadeurephia-62ea92c1c38ef83adbec1b56ef7968941d128553.tar.gz
eurephia-62ea92c1c38ef83adbec1b56ef7968941d128553.tar.xz
eurephia-62ea92c1c38ef83adbec1b56ef7968941d128553.zip
Cleaned up and added some missing comments
Diffstat (limited to 'plugin')
-rw-r--r--plugin/eurephia.c4
-rw-r--r--plugin/eurephia.h2
-rw-r--r--plugin/firewall/eurephiafw_intf.h24
-rw-r--r--plugin/firewall/iptables/efw-iptables.c6
4 files changed, 26 insertions, 10 deletions
diff --git a/plugin/eurephia.c b/plugin/eurephia.c
index 2669734..518ba34 100644
--- a/plugin/eurephia.c
+++ b/plugin/eurephia.c
@@ -35,7 +35,7 @@
#include <string.h>
#include <getopt.h>
-#define EUREPHIA_FWINTF
+#define EUREPHIA_FWINTF /**< Include the proper eurephiaFWINTF declaration in eurephiaCTX */
#include <eurephiafw_struct.h>
#include <eurephia_context.h>
#include <eurephiadb.h>
@@ -49,7 +49,7 @@
#include <randstr.h>
#include <passwd.h>
-#define MAX_ARGUMENTS 64
+#define MAX_ARGUMENTS 64 /**< Maximum arguments we will parse from the openvpn plug-in configuration */
/**
diff --git a/plugin/eurephia.h b/plugin/eurephia.h
index 95e6b98..ef71f44 100644
--- a/plugin/eurephia.h
+++ b/plugin/eurephia.h
@@ -33,7 +33,7 @@
#include <stdarg.h>
-const char *get_env(eurephiaCTX *ctx, const int mask, const char **envp, const char *fmt, ...);
+const char *get_env(eurephiaCTX *ctx, int logmasking, const char *envp[], const char *fmt, ... );
eurephiaCTX *eurephiaInit(const char **argv);
int eurephiaShutdown(eurephiaCTX *ctx);
diff --git a/plugin/firewall/eurephiafw_intf.h b/plugin/firewall/eurephiafw_intf.h
index c4fc065..88719e9 100644
--- a/plugin/firewall/eurephiafw_intf.h
+++ b/plugin/firewall/eurephiafw_intf.h
@@ -32,10 +32,26 @@
#ifndef EUREPHIAFW_INTF_H_
#define EUREPHIAFW_INTF_H_
-// Mandatory functions for all FW interfaces
-const char *(*eFWinterfaceVersion) (void);
-int (*eFWinterfaceAPIversion) (void);
+/**
+ * Mandatory function, contains driver information.
+ *
+ * @return Should retun a static string, containing the version information.
+ */
+const char *(*eFWinterfaceVersion) ();
+
+/**
+ * Mandatory function, contains driver information.
+ *
+ * @return Should retun an integer which correponds to the API level the interface driver uses.
+ */
+int (*eFWinterfaceAPIversion) ();
-void (*eFW_RunFirewall) (void *);
+/**
+ * The main routine of the firewall interface. This function should not return before
+ * the firewall interface is supposed to shut down.
+ *
+ * @param fwargs efw_threaddata pointer, with needed information to communicate with the openvpn process.
+ */
+void (*eFW_RunFirewall) (void *fwargs);
#endif /* !EUREPHIAFW_INTF_H_ */
diff --git a/plugin/firewall/iptables/efw-iptables.c b/plugin/firewall/iptables/efw-iptables.c
index b686ca9..1329973 100644
--- a/plugin/firewall/iptables/efw-iptables.c
+++ b/plugin/firewall/iptables/efw-iptables.c
@@ -37,15 +37,15 @@
#include <pthread.h>
#include <sys/wait.h>
-#define EUREPHIA_FWINTF
+#define EUREPHIA_FWINTF /**< Include the proper eurephiaFWINTF declaration in eurephiaCTX */
#include <eurephiafw_struct.h>
#include <eurephia_context.h>
#include <eurephia_nullsafe.h>
#include <eurephia_log.h>
#include <eurephiafw_helpers.h>
-#define INTERFACEVER "1.0"
-#define INTERFACEAPIVER 1
+#define INTERFACEVER "1.0" /**< The version of this firewall interface (driver) */
+#define INTERFACEAPIVER 1 /**< Define the API level this firewall interface uses. */
/**
* Mandatory function, contains driver information.