1 /*
2  * $Id: com-config.h,v 1.2 2002/01/14 18:12:20 mt Exp $
3  *
4  * Header for common functions for configuration reading
5  *
6  * Author(s): Jens-Gero Boehm <jens-gero.boehm@suse.de>
7  *            Pieter Hollants <pieter.hollants@suse.de>
8  *            Marius Tomaschewski <mt@suse.de>
9  *            Volker Wiegand <volker.wiegand@suse.de>
10  *
11  * This file is part of the SuSE Proxy Suite
12  *            See also  http://proxy-suite.suse.de/
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version
17  * 2 of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the
26  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27  * Boston, MA 02111-1307, USA.
28  *
29  * A history log can be found at the end of this file.
30  */
31 
32 #if !defined(_COM_CONFIG_H_)
33 #define _COM_CONFIG_H_
34 
35 #include <config.h>
36 
37 #if defined(STDC_HEADERS)
38 #  include <stdio.h>
39 #endif
40 
41 /* ------------------------------------------------------------ */
42 
43 void      config_read(char *file, int dflg);
44 void      config_dump(FILE *fd);
45 int       config_sect(char *snam);
46 
47 int       config_int (char *snam, char *name, int       dflt);
48 int       config_bool(char *snam, char *name, int       dflt);
49 char     *config_str (char *snam, char *name, char     *dflt);
50 
51 u_int32_t config_addr(char *snam, char *name, u_int32_t dflt);
52 u_int16_t config_port(char *snam, char *name, u_int16_t dflt);
53 
54 uid_t     config_uid (char *snam, char *name, uid_t     dflt);
55 gid_t     config_gid (char *snam, char *name, gid_t     dflt);
56 
57 
58 /* ------------------------------------------------------------ */
59 
60 #endif /* defined(_COM_CONFIG_H_) */
61 
62 /* ------------------------------------------------------------
63  * $Log: com-config.h,v $
64  * Revision 1.2  2002/01/14 18:12:20  mt
65  * implemented config_dump function to dump in-memory config to a FILE stream
66  *
67  * Revision 1.1  1999/09/15 14:05:38  wiegand
68  * initial checkin
69  *
70  * ------------------------------------------------------------ */
71 
72