X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftools%2Fsysdbd%2Fconfigfile.h;fp=src%2Ftools%2Fsysdbd%2Fconfigfile.h;h=19abe9ac55f25f041008c63315c0d828ec9e149c;hb=52f0df58b96af940cf6f527b4dd052a051f299bd;hp=0000000000000000000000000000000000000000;hpb=084367e407391cea853fb5c1d0f0dd7049905ee8;p=sysdb.git diff --git a/src/tools/sysdbd/configfile.h b/src/tools/sysdbd/configfile.h new file mode 100644 index 0000000..19abe9a --- /dev/null +++ b/src/tools/sysdbd/configfile.h @@ -0,0 +1,56 @@ +/* + * SysDB - src/tools/sysdbd/configfile.h + * Copyright (C) 2012 Sebastian 'tokkee' Harl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#ifndef DAEMON_CONFIG_H +#define DAEMON_CONFIG_H 1 + +/* + * parse result values + */ + +extern char **listen_addresses; +extern size_t listen_addresses_num; + +/* + * daemon_parse_config: + * Parse the specified configuration file. + * + * Returns: + * - 0 on success + * - a negative value when loading the configuration failed because of errors + * in the daemon or libsysdb + * - a positive value on parser errors + */ +int +daemon_parse_config(const char *filename); + +#endif /* ! DAEMON_CONFIG_H */ + +/* vim: set tw=78 sw=4 ts=4 noexpandtab : */ +