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. */
53 * Options for any database backend that needs a directory, be it the
54 * file, db2 or db3 options.
56 /** The path to the directory containing the database files. */
60 * Options for the Postgres backend.
62 /** The host that Postgres is running on. */
64 /** The database name. */
66 /** The user we should connect as. */
68 /** The password for the user. */
72 * Options for the dynamic backend.
74 /** Name of the DB backend we're using */
76 /** Directory where backend .so files can be found */
79 /** Pointer to the function table for our loaded DB backend */
80 struct dbfuncs *dbbackend;
82 /** Should we verify signature hashes match? */
87 * @brief The variable containing our runtime config.
89 extern struct onak_config config;
92 * @brief read the onak config.
93 * @param configfile the config file to read.
95 * Read in our config file. If config file is NULL read in the compile
98 void readconfig(const char *configfile);
101 * @brief clean up the config when we're shutting down.
103 void cleanupconfig(void);
105 #endif /* __ONAK_CONF_H_ */