5 * conffile.h Defines for the conffile parsing routines.
13 typedef struct conf_pair {
18 struct conf_pair *next;
21 typedef struct conf_part {
26 struct conf_part *sub;
27 struct conf_part *next;
31 * Instead of putting the information into a configuration structure,
32 * the configuration file routines MAY just parse it directly into
33 * user-supplied variables.
35 #define PW_TYPE_STRING_PTR 100
36 #define PW_TYPE_BOOLEAN 101
38 typedef struct CONF_PARSER {
40 int type; /* PW_TYPE_STRING, etc. */
41 void *data; /* pointer to where to put it */
44 CONF_SECTION *conf_read(const char *conffile);
45 CONF_PAIR *cf_pair_alloc(const char *attr, const char *value, int operator);
46 void cf_pair_add(CONF_SECTION *cs, CONF_PAIR *cp_new);
47 void cf_pair_free(CONF_PAIR *cp);
48 CONF_SECTION *cf_section_alloc(const char *name1, const char *name2);
49 void cf_section_free(CONF_SECTION *cp);
50 void cf_section_free_all(CONF_SECTION *cp);
51 int cf_section_parse(CONF_SECTION *cs, const CONF_PARSER *variables);
53 /* JLN -- Newly added */
55 CONF_PAIR *cf_pair_find(CONF_SECTION *section, const char *name);
56 CONF_PAIR *cf_pair_find_next(CONF_SECTION *section, CONF_PAIR *pair, const char *name);
57 CONF_SECTION *cf_section_find(const char *name);
58 CONF_SECTION *cf_section_sub_find(CONF_SECTION *section, const char *name);
59 CONF_SECTION *cf_module_config_find(const char *modulename);
60 char *cf_section_value_find(CONF_SECTION *section, const char *attr);
62 int read_radius_conf_file(void);
64 char *cf_pair_value(CONF_PAIR *pair);
65 int dump_config(void);
66 CONF_SECTION *cf_subsection_find_next(CONF_SECTION *section,
67 CONF_SECTION *subsection,
69 #endif /* _CONFFILE_H */