3 * @brief Routines related to runtime config.
5 * Copyright 2002 Jonathan McDowell <noodles@earth.li>
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 51
18 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef __ONAK_CONF_H_
22 #define __ONAK_CONF_H_
27 * @brief Runtime configuration for onak.
29 * This structure holds various runtime configuration options for onak. It
30 * will eventually be populated from the config file.
36 /** The maximum number of keys a query should return. */
38 /** Our email address that servers sync with. */
40 /** The email address of the server admin. */
42 /** The mta to invoke to send sync mails. */
44 /** List of email address for sites we sync with via email */
46 /** A linked list of sites we sync with. */
49 /** Set if we're using keyd as the backend. */
51 /** The path to the directory the keyd socket lives in. */
55 * Options for any database backend that needs a directory, be it the
56 * file, fs or db4 options.
58 /** The path to the directory containing the database files. */
62 * Options for the Postgres backend.
64 /** The host that Postgres is running on. */
66 /** The database name. */
68 /** The user we should connect as. */
70 /** The password for the user. */
74 * Options for the dynamic backend.
76 /** Name of the DB backend we're using */
78 /** Directory where backend .so files can be found */
81 /** Pointer to the initialisation function for our loaded DB backend */
82 struct onak_dbctx *(*dbinit)(bool);
84 /** Should we verify signature hashes match? */
89 * @brief The variable containing our runtime config.
91 extern struct onak_config config;
94 * @brief read the onak config.
95 * @param configfile the config file to read.
97 * Read in our config file. If config file is NULL read in the compile
100 void readconfig(const char *configfile);
103 * @brief clean up the config when we're shutting down.
105 void cleanupconfig(void);
107 #endif /* __ONAK_CONF_H_ */