]> arthur.barton.de Git - netdata.git/blobdiff - src/main.h
Command line: Follow IEEE Std 1003.1, 2013 Edition
[netdata.git] / src / main.h
index 6a90efd9d42f6f9e47915af081963b4da4fa4a2b..701f8ff24a7e11e44e76f60424a4d210ed0d09e9 100644 (file)
@@ -1,7 +1,32 @@
+#include <getopt.h>
+
 #ifndef NETDATA_MAIN_H
 #define NETDATA_MAIN_H 1
 
-extern int netdata_exit;
+#include <signal.h>
+
+extern volatile sig_atomic_t netdata_exit;
+
+/**
+ * This struct contains information about command line options.
+ */
+struct option_def {
+       /** The option character */
+       const char val;
+       /** The name of the long option. */
+       const char *description;
+       /** Short descripton what the option does */
+       /** Name of the argument displayed in SYNOPSIS */
+       const char *arg_name;
+       /** Default value if not set */
+       const char *default_value;
+};
+
+/**
+ * List of command line options.
+ * This can be used to compute manpage, help messages, ect.
+ */
+extern struct option_def options[];
 
 extern void kill_childs(void);
 extern int killpid(pid_t pid, int signal);