From 45d9d4477663635bc77a1f2253535dfb20358821 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 27 Apr 2005 23:13:11 +0000 Subject: demon's dyndns updater --- parse.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 parse.h (limited to 'parse.h') 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 + * + * 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_ */ -- cgit v1.2.3