summaryrefslogtreecommitdiff
path: root/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/parse.h b/parse.h
new file mode 100644
index 0000000..bb86334
--- /dev/null
+++ b/parse.h
@@ -0,0 +1,58 @@
+/* $Id$ */
+/*
+ * Copyright (c) 2004 demon <demon@vhost.dyndns.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _PARSE_H_
+#define _PARSE_H_
+
+#define _PATH_DDDUP "dddup.conf"
+
+#define SYS_DYN 0x1
+#define SYS_STAT 0x2
+#define SYS_CUST 0x4
+#define SYS_ALL SYS_DYN|SYS_STAT|SYS_CUST
+
+#if 0
+static struct dd_conf {
+ const char *name;
+ char *value;
+ const int system;
+ const int range;
+ const int optional;
+} conf[] = {
+ { "username", NULL, SYS_ALL, VAL_STR, OPT_NO },
+ { "password", NULL, SYS_ALL, VAL_STR, OPT_NO },
+// { "system", NULL, SYS_ALL, VAL_STR, OPT_YES },
+ { "dyndns", NULL, SYS_DYN, VAL_NONE, OPT_YES },
+ { "statdns", NULL, SYS_STAT, VAL_NONE, OPT_YES },
+ { "custdns", NULL, SYS_CUST, VAL_NONE, OPT_YES },
+ { "hostname", NULL, SYS_ALL, VAL_STR, OPT_NO },
+ { "myip", NULL, SYS_ALL, VAL_STR, OPT_YES },
+ { "intarface", NULL, SYS_ALL, VAL_STR, OPT_YES },
+ { "wildcard", NULL, SYS_DYN|SYS_STAT, VAL_WC, OPT_YES },
+ { "mx", NULL, SYS_DYN|SYS_STAT, VAL_STR, OPT_YES },
+ { "backmx", NULL, SYS_DYN|SYS_STAT, VAL_YN, OPT_YES },
+ { "offline", NULL, SYS_DYN|SYS_CUST, VAL_YN, OPT_YES },
+ { NULL, NULL, 0, 0, 0 }
+};
+#endif
+
+__BEGIN_DECLS
+int parse_config(char *, struct dd_request **);
+int free_config(int, struct dd_request **);
+__END_DECLS
+
+#endif /* Not _PARSE_H_ */