5 * conffile.h Defines for the conffile parsing routines.
13 typedef struct conf_pair {
17 struct conf_pair *next;
20 typedef struct conf_part {
24 struct conf_part *sub;
25 struct conf_part *next;
29 * Instead of putting the information into a configuration structure,
30 * the configuration file routines MAY just parse it directly into
31 * user-supplied variables.
33 #define PW_TYPE_STRING_PTR 100
34 #define PW_TYPE_BOOLEAN 101
36 typedef struct CONF_PARSER {
38 int type; /* PW_TYPE_STRING, etc. */
39 void *data; /* pointer to where to put it */
42 CONF_SECTION *conf_read(const char *conffile, const CONF_PARSER vars[]);
43 CONF_PAIR *cf_pair_alloc(const char *attr, const char *value, int operator);
44 void cf_pair_add(CONF_SECTION *cs, CONF_PAIR *cp_new);
45 void cf_pair_free(CONF_PAIR *cp);
46 CONF_SECTION *cf_section_alloc(const char *name1, const char *name2);
47 void cf_section_free(CONF_SECTION *cp);
48 void cf_section_free_all(CONF_SECTION *cp);
49 int cf_section_parse(CONF_SECTION *cs, const CONF_PARSER *variables);
51 /* JLN -- Newly added */
53 CONF_PAIR *cf_pair_find(CONF_SECTION *section, const char *name);
54 CONF_PAIR *cf_pair_find_next(CONF_SECTION *section, CONF_PAIR *pair, const char *name);
55 CONF_SECTION *cf_section_find(const char *name);
56 CONF_SECTION *cf_section_sub_find(CONF_SECTION *section, const char *name);
57 CONF_SECTION *cf_module_config_find(const char *modulename);
58 char *cf_section_value_find(CONF_SECTION *section, const char *attr);
60 int read_radius_conf_file(void);
62 #endif /* _CONFFILE_H */