summaryrefslogtreecommitdiff
path: root/src/options.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-02-15 11:00:00 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-02-15 11:00:00 (GMT)
commitcef04da3c24cdcf1c1ffeb214c74f6ef0aaaa0ad (patch)
treefaa46b65dbeb61beab0d713ff075d6da18b1c1a8 /src/options.h
parentd32fab197970b9aac76ef90fb2f48adbbebea978 (diff)
added initial version
Diffstat (limited to 'src/options.h')
-rw-r--r--src/options.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/options.h b/src/options.h
new file mode 100644
index 0000000..5a4b33a
--- /dev/null
+++ b/src/options.h
@@ -0,0 +1,56 @@
+/*
+ * rharchive
+ *
+ * rharchive is a simple tcp connection proxy which combines the
+ * features of rinetd and 6tunnel. rharchive supports IPv4 and
+ * IPv6 and also supports connections from IPv6 to IPv4
+ * endpoints and vice versa.
+ *
+ *
+ * Copyright (C) 2010-2011 Christian Pointner <equinox@helsinki.at>
+ *
+ * This file is part of rharchive.
+ *
+ * rharchive is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * rharchive is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rharchive. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef RHARCHIVE_options_h_INCLUDED
+#define RHARCHIVE_options_h_INCLUDED
+
+#include "string_list.h"
+#include "datatypes.h"
+
+struct options_struct {
+ char* progname_;
+ int daemonize_;
+ char* username_;
+ char* groupname_;
+ char* chroot_dir_;
+ char* pid_file_;
+ string_list_t log_targets_;
+ int debug_;
+};
+typedef struct options_struct options_t;
+
+int options_parse_hex_string(const char* hex, buffer_t* buffer);
+
+int options_parse(options_t* opt, int argc, char* argv[]);
+void options_parse_post(options_t* opt);
+void options_default(options_t* opt);
+void options_clear(options_t* opt);
+void options_print_usage();
+void options_print_version();
+void options_print(options_t* opt);
+
+#endif