summaryrefslogtreecommitdiffstats
path: root/utils/eurephia_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/eurephia_init.c')
-rw-r--r--utils/eurephia_init.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/utils/eurephia_init.c b/utils/eurephia_init.c
index 7b72eb5..e0f998d 100644
--- a/utils/eurephia_init.c
+++ b/utils/eurephia_init.c
@@ -49,13 +49,24 @@
#include <eurephia_values.h>
#include <eurephia_xml.h>
-#define MODULE "eurephia_init"
+#define MODULE "eurephia_init" /**< Set the module name to eurephia_init */
#include <client_context.h>
#include <argparser.h>
#include <get_console_input.h>
+/**
+ * @copydoc benchmark()
+ */
int benchmark(int *min, int *max, int thr_min, int thr_max);
+
+/**
+ * Prints program version information to stdout
+ *
+ * @param fprg String containing full path to this binary (argv[0])
+ *
+ * @return Returns the basename value of the binary
+ */
char *print_version(char *fprg) {
char *prg = basename(fprg);
@@ -65,6 +76,12 @@ char *print_version(char *fprg) {
return prg;
}
+
+/**
+ * Prints a help screen for all arguments eurephia_init can process
+ *
+ * @param fprg String containing full path to this binary (argv[0])
+ */
void print_help(char *fprg) {
print_version(fprg);
@@ -530,6 +547,15 @@ int setup_iptables(eurephiaCTX *ctx) {
}
#endif
+
+/**
+ * Main function of eurephia_init
+ *
+ * @param argc
+ * @param argv
+ *
+ * @return Returns 0 on success, otherwise a positive integer on failure.
+ */
int main(int argc, char **argv) {
// Default hash calculation thresholds for benchmarking
int hash_thr_min = 95; // 95ms