2 * onak-conf.h - Routines related to runtime config.
4 * Copyright 2002 Jonathan McDowell <noodles@earth.li>
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __ONAK_CONF_H_
21 #define __ONAK_CONF_H_
26 * struct onak_config - Runtime configuration for onak.
27 * @maxkeys: The maximum number of keys a query should return.
28 * @thissite: Our email address that servers sync with.
29 * @adminemail: The email address of the server admin.
30 * @mta: The mta to invoke to send sync mails.
31 * @syncsites: A linked list of sites we sync with.
33 * @db_dir: The path to the directory containing the database files.
35 * @pg_dbhost: The host that Postgres is running on.
36 * @pg_dbname: The database name.
37 * @pg_dbuser: The user we should connect as.
38 * @pg_dbpass: The password for the user.
40 * This structure holds various runtime configuration options for onak. It
41 * will eventually be populated from the config file.
55 * Set if we're using keyd as the backend.
60 * Options for any database backend that needs a directory, be it the
61 * file, db2 or db3 options.
66 * Options for the Postgres backend.
74 * Options for the dynamic backend.
79 struct dbfuncs *dbbackend;
85 * config - The variable containing our runtime config.
87 extern struct onak_config config;
90 * readconfig - read the onak config.
91 * @configfile - the config file to read.
93 * Read in our config file. If config file is NULL read in the compile
96 void readconfig(const char *configfile);
99 * cleanupconfig - clean up the config when we're shutting down.
101 void cleanupconfig(void);
103 #endif /* __ONAK_CONF_H_ */