aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-11-18 11:26:05 +0100
committerToni Uhlig <matzeton@googlemail.com>2022-11-21 11:26:05 +0100
commit64f6abfdbedf00994f3614757efbeabe14afd87e (patch)
tree28946fd8385147a80abe006b8739cad383bf248e /utils.h
parent77ee336cc941694b078906b7afda51dd21538450 (diff)
Unified nDPId/nDPIsrvd command line argument storage.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 2db510067..fb170fbb5 100644
--- a/utils.h
+++ b/utils.h
@@ -3,6 +3,23 @@
#include <stdarg.h>
+#define CMDARG(_default_value) \
+ { \
+ .value = NULL, .default_value = (_default_value) \
+ }
+
+struct cmdarg
+{
+ char * value;
+ char const * const default_value;
+};
+
+void set_cmdarg(struct cmdarg * const ca, char const * const val);
+
+char const * get_cmdarg(struct cmdarg const * const ca);
+
+int is_cmdarg_set(struct cmdarg const * const ca);
+
int is_path_absolute(char const * const prefix, char const * const path);
void daemonize_enable(void);