diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-05 01:10:32 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-05 01:10:32 +0200 |
commit | 62ea92c1c38ef83adbec1b56ef7968941d128553 (patch) | |
tree | 30b4a1158bcaa1aad6c606f44b643b04e0cf704b | |
parent | 727d91f8a4d038f07618ceaafb073a2eb00eb749 (diff) | |
download | eurephia-62ea92c1c38ef83adbec1b56ef7968941d128553.tar.gz eurephia-62ea92c1c38ef83adbec1b56ef7968941d128553.tar.xz eurephia-62ea92c1c38ef83adbec1b56ef7968941d128553.zip |
Cleaned up and added some missing comments
-rw-r--r-- | eurephiadm/argparser.h | 4 | ||||
-rw-r--r-- | eurephiadm/eurephiadm.c | 2 | ||||
-rw-r--r-- | eurephiadm/parse_certificate_files.c | 6 | ||||
-rw-r--r-- | plugin/eurephia.c | 4 | ||||
-rw-r--r-- | plugin/eurephia.h | 2 | ||||
-rw-r--r-- | plugin/firewall/eurephiafw_intf.h | 24 | ||||
-rw-r--r-- | plugin/firewall/iptables/efw-iptables.c | 6 |
7 files changed, 34 insertions, 14 deletions
diff --git a/eurephiadm/argparser.h b/eurephiadm/argparser.h index 76c8d0b..6f3c678 100644 --- a/eurephiadm/argparser.h +++ b/eurephiadm/argparser.h @@ -39,6 +39,10 @@ #define MAX_ARGUMENTS 64 /**< Defines the maximum arguments the parsers handles */ +/** + * Contains the valid short and long argument definition, in addition to number of options + * the current argument takes. + */ typedef struct { char *longarg; /**< char* containing the valid long argument */ char *shortarg; /**< char* containing the short argument */ diff --git a/eurephiadm/eurephiadm.c b/eurephiadm/eurephiadm.c index aceae91..2061f98 100644 --- a/eurephiadm/eurephiadm.c +++ b/eurephiadm/eurephiadm.c @@ -43,7 +43,7 @@ #include <eurephiadb_session_common.h> #include <eurephiadb.h> -#define MODULE "eurephiadm" +#define MODULE "eurephiadm" /**< Need to define the active module before including argparser.h */ #include "argparser.h" #include "client_context.h" #include "client_config.h" diff --git a/eurephiadm/parse_certificate_files.c b/eurephiadm/parse_certificate_files.c index 1a5d3e1..4925ddf 100644 --- a/eurephiadm/parse_certificate_files.c +++ b/eurephiadm/parse_certificate_files.c @@ -109,12 +109,12 @@ char *ExtractCertInfo(const char *module, X509 *cert, const char *fieldname) { * Internal function, usually called via the Cert_ParseFile(...) macro. Parses a certificate * file of a given format. * - * @param cfile File name of the input file - * @param cformat Certificate format of the file + * @param module String containing a module name, only used in error situations + * @param certfile File name of the input file + * @param certfile_format Certificate format of the file * * @return Returns a certinfo struct pointer with the parsed result on success, otherwise NULL. */ - certinfo *_Cert_ParseFile(const char *module, const char *certfile, int certfile_format) { BIO *bio_err = NULL; PKCS12 *p12 = NULL; 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. |