#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/parser.h>
#include <freeradius-devel/rad_assert.h>
#include <ctype.h>
Go to the source code of this file.
Data Structures | |
struct | cf_file_callback_t |
struct | cf_file_t |
struct | conf_data |
Internal data that is associated with a configuration section. More... | |
struct | conf_item |
struct | conf_pair |
Configuration AVP similar to a VALUE_PAIR. More... | |
struct | conf_part |
Typedefs | |
typedef struct cf_file_callback_t | cf_file_callback_t |
typedef struct cf_file_t | cf_file_t |
typedef enum conf_include_type | CONF_INCLUDE_TYPE |
typedef enum conf_type | CONF_ITEM_TYPE |
typedef enum conf_property | CONF_PROPERTY |
Enumerations | |
enum | conf_include_type { CONF_INCLUDE_FILE, CONF_INCLUDE_DIR, CONF_INCLUDE_FROMDIR } |
enum | conf_property { CONF_PROPERTY_INVALID = 0, CONF_PROPERTY_NAME, CONF_PROPERTY_INSTANCE } |
enum | conf_type { CONF_ITEM_INVALID = 0, CONF_ITEM_PAIR, CONF_ITEM_SECTION, CONF_ITEM_DATA } |
Functions | |
static int | _cf_data_free (CONF_DATA *cd) |
static int | _cf_section_free (CONF_SECTION *cs) |
static void | _pair_count (int *count, CONF_SECTION const *cs) |
int | cf_data_add (CONF_SECTION *cs, char const *name, void *data, void(*data_free)(void *)) |
static int | cf_data_add_internal (CONF_SECTION *cs, char const *name, void *data, void(*data_free)(void *), int flag) |
static CONF_DATA * | cf_data_alloc (CONF_SECTION *parent, char const *name, void *data, void(*data_free)(void *)) |
void * | cf_data_find (CONF_SECTION const *cs, char const *name) |
static void * | cf_data_find_internal (CONF_SECTION const *cs, char const *name, int flag) |
void * | cf_data_remove (CONF_SECTION *cs, char const *name) |
Remove named data from a configuration section. More... | |
static CONF_ITEM * | cf_data_to_item (CONF_DATA const *cd) |
Cast CONF_DATA to a CONF_ITEM. More... | |
static char const * | cf_expand_variables (char const *cf, int *lineno, CONF_SECTION *outercs, char *output, size_t outsize, char const *input, bool *soft_fail) |
int | cf_file_changed (CONF_SECTION *cs, rb_walker_t callback) |
void | cf_file_free (CONF_SECTION *cs) |
static int | cf_file_include (CONF_SECTION *cs, char const *filename_in, CONF_INCLUDE_TYPE file_type, char *buff[7]) |
static int | cf_file_include (CONF_SECTION *cs, char const *filename_in, UNUSED CONF_INCLUDE_TYPE file_type, char *buff[7]) |
static bool | cf_file_input (CONF_SECTION *cs, char const *filename) |
static FILE * | cf_file_open (CONF_SECTION *cs, char const *filename) |
int | cf_file_read (CONF_SECTION *cs, char const *filename) |
void | cf_item_add (CONF_SECTION *cs, CONF_ITEM *ci) |
CONF_ITEM * | cf_item_find_next (CONF_SECTION const *section, CONF_ITEM const *item) |
Return the next item after a CONF_ITEM. More... | |
bool | cf_item_is_pair (CONF_ITEM const *item) |
bool | cf_item_is_section (CONF_ITEM const *item) |
CONF_SECTION * | cf_item_parent (CONF_ITEM const *ci) |
CONF_PAIR * | cf_item_to_pair (CONF_ITEM const *ci) |
Cast a CONF_ITEM to a CONF_PAIR. More... | |
CONF_SECTION * | cf_item_to_section (CONF_ITEM const *ci) |
Cast a CONF_ITEM to a CONF_SECTION. More... | |
static char const * | cf_local_file (char const *base, char const *filename, char *buffer, size_t bufsize) |
void | cf_log_err (CONF_ITEM const *ci, char const *fmt,...) |
void | cf_log_err_cp (CONF_PAIR const *cp, char const *fmt,...) |
void | cf_log_err_cs (CONF_SECTION const *cs, char const *fmt,...) |
void | cf_log_info (CONF_SECTION const *cs, char const *fmt,...) |
void | cf_log_module (CONF_SECTION const *cs, char const *fmt,...) |
void | cf_pair_add (CONF_SECTION *parent, CONF_PAIR *cp) |
Add a configuration pair to a section. More... | |
CONF_PAIR * | cf_pair_alloc (CONF_SECTION *parent, char const *attr, char const *value, FR_TOKEN op, FR_TOKEN lhs_type, FR_TOKEN rhs_type) |
Allocate a CONF_PAIR. More... | |
char const * | cf_pair_attr (CONF_PAIR const *pair) |
FR_TOKEN | cf_pair_attr_type (CONF_PAIR const *pair) |
Return the value (lhs) type. More... | |
int | cf_pair_count (CONF_SECTION const *cs) |
Count the number of conf pairs beneath a section. More... | |
static int | cf_pair_default (CONF_PAIR **out, CONF_SECTION *cs, char const *name, int type, char const *dflt, FR_TOKEN dflt_quote) |
Allocate a pair using the dflt value and quotation. More... | |
CONF_PAIR * | cf_pair_dup (CONF_SECTION *parent, CONF_PAIR *cp) |
Duplicate a CONF_PAIR. More... | |
char const * | cf_pair_filename (CONF_PAIR const *pair) |
CONF_PAIR * | cf_pair_find (CONF_SECTION const *cs, char const *name) |
CONF_PAIR * | cf_pair_find_next (CONF_SECTION const *cs, CONF_PAIR const *pair, char const *attr) |
Find a pair with a name matching attr, after specified pair. More... | |
int | cf_pair_lineno (CONF_PAIR const *pair) |
FR_TOKEN | cf_pair_operator (CONF_PAIR const *pair) |
int | cf_pair_parse (CONF_SECTION *cs, char const *name, unsigned int type, void *data, char const *dflt, FR_TOKEN dflt_quote) |
Parses a CONF_PAIR into a C data type, with a default value. More... | |
static int | cf_pair_parse_value (void *out, TALLOC_CTX *ctx, CONF_SECTION *cs, CONF_PAIR *cp, unsigned int type) |
Parses a CONF_PAIR into a C data type. More... | |
int | cf_pair_replace (CONF_SECTION *cs, CONF_PAIR *cp, char const *value) |
Replace pair in a given section with a new pair, of the given value. More... | |
CONF_ITEM * | cf_pair_to_item (CONF_PAIR const *cp) |
Cast a CONF_PAIR to a CONF_ITEM. More... | |
char const * | cf_pair_value (CONF_PAIR const *pair) |
FR_TOKEN | cf_pair_value_type (CONF_PAIR const *pair) |
Return the value (rhs) type. More... | |
VALUE_PAIR * | cf_pairtovp (CONF_PAIR *pair) |
CONF_ITEM * | cf_reference_item (CONF_SECTION const *parentcs, CONF_SECTION *outercs, char const *ptr) |
void | cf_section_add (CONF_SECTION *parent, CONF_SECTION *cs) |
CONF_SECTION * | cf_section_alloc (CONF_SECTION *parent, char const *name1, char const *name2) |
Allocate a CONF_SECTION. More... | |
char const * | cf_section_argv (CONF_SECTION const *cs, int argc) |
FR_TOKEN | cf_section_argv_type (CONF_SECTION const *cs, int argc) |
CONF_SECTION * | cf_section_dup (CONF_SECTION *parent, CONF_SECTION const *cs, char const *name1, char const *name2, bool copy_meta) |
Duplicate a configuration section. More... | |
char const * | cf_section_filename (CONF_SECTION const *section) |
CONF_SECTION * | cf_section_find_name2 (CONF_SECTION const *cs, char const *name1, char const *name2) |
CONF_SECTION * | cf_section_find_next (CONF_SECTION const *section, CONF_SECTION const *subsection, char const *name1) |
int | cf_section_lineno (CONF_SECTION const *section) |
char const * | cf_section_name (CONF_SECTION const *cs) |
Return name2 if set, else name1. More... | |
char const * | cf_section_name1 (CONF_SECTION const *cs) |
char const * | cf_section_name2 (CONF_SECTION const *cs) |
FR_TOKEN | cf_section_name2_type (CONF_SECTION const *cs) |
int | cf_section_parse (CONF_SECTION *cs, void *base, CONF_PARSER const *variables) |
Parse a configuration section into user-supplied variables. More... | |
static void | cf_section_parse_init (CONF_SECTION *cs, void *base, CONF_PARSER const *variables) |
int | cf_section_parse_pass2 (CONF_SECTION *cs, void *base, CONF_PARSER const variables[]) |
Fixup xlat expansions and attributes. More... | |
const CONF_PARSER * | cf_section_parse_table (CONF_SECTION *cs) |
static void | cf_section_parse_warn (CONF_SECTION *cs) |
static int | cf_section_pass2 (CONF_SECTION *cs) |
static int | cf_section_read (char const *filename, int *lineno, FILE *fp, CONF_SECTION *current, char *buff[7]) |
CONF_SECTION * | cf_section_sub_find (CONF_SECTION const *cs, char const *name) |
Find a sub-section in a section. More... | |
CONF_SECTION * | cf_section_sub_find_name2 (CONF_SECTION const *cs, char const *name1, char const *name2) |
Find a CONF_SECTION with both names. More... | |
CONF_ITEM * | cf_section_to_item (CONF_SECTION const *cs) |
Cast a CONF_SECTION to a CONF_ITEM. More... | |
char const * | cf_section_value_find (CONF_SECTION const *cs, char const *attr) |
CONF_SECTION * | cf_subsection_find_next (CONF_SECTION const *section, CONF_SECTION const *subsection, char const *name1) |
static bool | cf_template_merge (CONF_SECTION *cs, CONF_SECTION const *template) |
CONF_SECTION * | cf_top_section (CONF_SECTION *cs) |
static int | data_cmp (void const *a, void const *b) |
static int | file_callback (void *ctx, void *data) |
static int | filename_cmp (void const *a, void const *b) |
static int | fr_item_validate_ipaddr (CONF_SECTION *cs, char const *name, PW_TYPE type, char const *value, fr_ipaddr_t *ipaddr) |
Validation function for ipaddr conffile types. More... | |
static bool | invalid_location (CONF_SECTION *this, char const *name, char const *filename, int lineno) |
static int | name2_cmp (void const *a, void const *b) |
static int | pair_cmp (void const *a, void const *b) |
static int | section_cmp (void const *a, void const *b) |
Variables | |
bool | check_config = false |
static const FR_NAME_NUMBER | conf_property_name [] |
static char const | parse_spaces [] = " " |
struct cf_file_callback_t |
Definition at line 443 of file conffile.c.
Data Fields | ||
---|---|---|
rb_walker_t | callback | |
CONF_SECTION * | modules | |
int | rcode |
struct cf_file_t |
Definition at line 152 of file conffile.c.
Data Fields | ||
---|---|---|
struct stat | buf | |
CONF_SECTION * | cs | |
char const * | filename | |
bool | input |
struct conf_item |
Definition at line 71 of file conffile.c.
Data Fields | ||
---|---|---|
char const * | filename | The file the config item was parsed from. |
int | lineno | The line number the config item began on. |
struct conf_item * | next | Sibling. |
struct conf_part * | parent | Parent. |
CONF_ITEM_TYPE | type | Whether the config item is a config_pair, conf_section or conf_data. |
struct conf_pair |
Configuration AVP similar to a VALUE_PAIR.
Definition at line 82 of file conffile.c.
Data Fields | ||
---|---|---|
char const * | attr | Attribute name. |
CONF_ITEM | item | |
FR_TOKEN | lhs_type | Name quoting style T_(DOUBLE|SINGLE|BACK)_QUOTE_STRING or T_BARE_WORD. |
FR_TOKEN | op | Operator e.g. =, :=. |
bool | parsed | Was this item used during parsing? |
bool | pass2 | do expansion in pass2. |
FR_TOKEN | rhs_type | Value Quoting style T_(DOUBLE|SINGLE|BACK)_QUOTE_STRING or T_BARE_WORD. |
char const * | value | Attribute value. |
struct conf_part |
Definition at line 107 of file conffile.c.
Data Fields | ||
---|---|---|
int | argc | number of additional arguments |
char const ** | argv | additional arguments |
FR_TOKEN * | argv_type | |
void * | base | |
CONF_ITEM * | children | |
rbtree_t * | data_tree | |
int | depth | |
CONF_ITEM | item | |
char const * | name1 |
First name token. Given foo bar {} would be foo . |
char const * | name2 |
Second name token. Given foo bar {} would be bar . |
rbtree_t * | name2_tree | for sections of the same name2 |
FR_TOKEN | name2_type | The type of quoting around name2. |
rbtree_t * | pair_tree | and a partridge.. |
rbtree_t * | section_tree | no jokes here. |
CONF_ITEM * | tail | For speed. |
CONF_SECTION * | template | |
CONF_PARSER const * | variables |
typedef struct cf_file_callback_t cf_file_callback_t |
typedef enum conf_include_type CONF_INCLUDE_TYPE |
typedef enum conf_type CONF_ITEM_TYPE |
typedef enum conf_property CONF_PROPERTY |
enum conf_include_type |
Enumerator | |
---|---|
CONF_INCLUDE_FILE | |
CONF_INCLUDE_DIR | |
CONF_INCLUDE_FROMDIR |
Definition at line 133 of file conffile.c.
enum conf_property |
Enumerator | |
---|---|
CONF_PROPERTY_INVALID | |
CONF_PROPERTY_NAME | |
CONF_PROPERTY_INSTANCE |
Definition at line 47 of file conffile.c.
enum conf_type |
Enumerator | |
---|---|
CONF_ITEM_INVALID | |
CONF_ITEM_PAIR | |
CONF_ITEM_SECTION | |
CONF_ITEM_DATA |
Definition at line 60 of file conffile.c.
|
static |
|
static |
Definition at line 508 of file conffile.c.
|
static |
Definition at line 3865 of file conffile.c.
int cf_data_add | ( | CONF_SECTION * | cs, |
char const * | name, | ||
void * | data, | ||
void(*)(void *) | data_free | ||
) |
Definition at line 4018 of file conffile.c.
|
static |
Definition at line 3993 of file conffile.c.
|
static |
Definition at line 3934 of file conffile.c.
void* cf_data_find | ( | CONF_SECTION const * | cs, |
char const * | name | ||
) |
Definition at line 3981 of file conffile.c.
|
static |
Definition at line 3960 of file conffile.c.
void* cf_data_remove | ( | CONF_SECTION * | cs, |
char const * | name | ||
) |
Remove named data from a configuration section.
Definition at line 4027 of file conffile.c.
Cast CONF_DATA to a CONF_ITEM.
Definition at line 237 of file conffile.c.
|
static |
Definition at line 1056 of file conffile.c.
int cf_file_changed | ( | CONF_SECTION * | cs, |
rb_walker_t | callback | ||
) |
Definition at line 486 of file conffile.c.
void cf_file_free | ( | CONF_SECTION * | cs | ) |
|
static |
|
static |
|
static |
Definition at line 395 of file conffile.c.
|
static |
Definition at line 331 of file conffile.c.
int cf_file_read | ( | CONF_SECTION * | cs, |
char const * | filename | ||
) |
Definition at line 3421 of file conffile.c.
void cf_item_add | ( | CONF_SECTION * | cs, |
CONF_ITEM * | ci | ||
) |
Definition at line 803 of file conffile.c.
CONF_ITEM* cf_item_find_next | ( | CONF_SECTION const * | section, |
CONF_ITEM const * | item | ||
) |
Return the next item after a CONF_ITEM.
Definition at line 3850 of file conffile.c.
bool cf_item_is_pair | ( | CONF_ITEM const * | item | ) |
bool cf_item_is_section | ( | CONF_ITEM const * | item | ) |
CONF_SECTION* cf_item_parent | ( | CONF_ITEM const * | ci | ) |
Cast a CONF_ITEM to a CONF_PAIR.
Definition at line 181 of file conffile.c.
CONF_SECTION* cf_item_to_section | ( | CONF_ITEM const * | ci | ) |
Cast a CONF_ITEM to a CONF_SECTION.
Definition at line 196 of file conffile.c.
|
static |
Definition at line 2415 of file conffile.c.
void cf_log_err | ( | CONF_ITEM const * | ci, |
char const * | fmt, | ||
... | |||
) |
Definition at line 4059 of file conffile.c.
void cf_log_err_cp | ( | CONF_PAIR const * | cp, |
char const * | fmt, | ||
... | |||
) |
Definition at line 4095 of file conffile.c.
void cf_log_err_cs | ( | CONF_SECTION const * | cs, |
char const * | fmt, | ||
... | |||
) |
Definition at line 4078 of file conffile.c.
void cf_log_info | ( | CONF_SECTION const * | cs, |
char const * | fmt, | ||
... | |||
) |
Definition at line 4112 of file conffile.c.
void cf_log_module | ( | CONF_SECTION const * | cs, |
char const * | fmt, | ||
... | |||
) |
void cf_pair_add | ( | CONF_SECTION * | parent, |
CONF_PAIR * | cp | ||
) |
Add a configuration pair to a section.
parent | section to add pair to. |
cp | to add. |
Definition at line 612 of file conffile.c.
CONF_PAIR* cf_pair_alloc | ( | CONF_SECTION * | parent, |
char const * | attr, | ||
char const * | value, | ||
FR_TOKEN | op, | ||
FR_TOKEN | lhs_type, | ||
FR_TOKEN | rhs_type | ||
) |
Allocate a CONF_PAIR.
parent | CONF_SECTION to hang this CONF_PAIR off of. |
attr | name. |
value | of CONF_PAIR. |
op | T_OP_EQ, T_OP_SET etc. |
lhs_type | T_BARE_WORD, T_DOUBLE_QUOTED_STRING, T_BACK_QUOTED_STRING |
rhs_type | T_BARE_WORD, T_DOUBLE_QUOTED_STRING, T_BACK_QUOTED_STRING |
Definition at line 546 of file conffile.c.
char const* cf_pair_attr | ( | CONF_PAIR const * | pair | ) |
Return the value (lhs) type.
pair | to extract value type from. |
Definition at line 3526 of file conffile.c.
int cf_pair_count | ( | CONF_SECTION const * | cs | ) |
Count the number of conf pairs beneath a section.
[in] | cs | to search for items in. |
Definition at line 3887 of file conffile.c.
|
static |
Allocate a pair using the dflt value and quotation.
The pair created by this function should fed to cf_pair_parse for parsing.
[out] | out | Where to write the CONF_PAIR we created with the default value. |
[in] | cs | to parent the CONF_PAIR from. |
[in] | name | of the CONF_PAIR to create. |
[in] | type | of conf item being parsed (determines default quoting). |
[in] | dflt | value to assign the CONF_PAIR. |
[in] | dflt_quote | surrounding the CONF_PAIR. |
Definition at line 1853 of file conffile.c.
CONF_PAIR* cf_pair_dup | ( | CONF_SECTION * | parent, |
CONF_PAIR * | cp | ||
) |
Duplicate a CONF_PAIR.
parent | to allocate new pair in. |
cp | to duplicate. |
Definition at line 589 of file conffile.c.
char const* cf_pair_filename | ( | CONF_PAIR const * | pair | ) |
CONF_PAIR* cf_pair_find | ( | CONF_SECTION const * | cs, |
char const * | name | ||
) |
Definition at line 3478 of file conffile.c.
CONF_PAIR* cf_pair_find_next | ( | CONF_SECTION const * | cs, |
CONF_PAIR const * | pair, | ||
char const * | attr | ||
) |
Find a pair with a name matching attr, after specified pair.
cs | to search in. |
pair | to search from (may be NULL). |
attr | to find (may be NULL in which case any attribute matches). |
Definition at line 3673 of file conffile.c.
int cf_pair_lineno | ( | CONF_PAIR const * | pair | ) |
int cf_pair_parse | ( | CONF_SECTION * | cs, |
char const * | name, | ||
unsigned int | type, | ||
void * | data, | ||
char const * | dflt, | ||
FR_TOKEN | dflt_quote | ||
) |
Parses a CONF_PAIR into a C data type, with a default value.
Takes fields from a CONF_PARSER struct and uses them to parse the string value of a CONF_PAIR into a C data type matching the type argument.
The format of the types are the same as value_data_t types.
PW_TYPE to data type mappings
PW_TYPE | Data type | Dynamically allocated |
---|---|---|
PW_TYPE_TMPL | vp_tmpl_t | Yes |
PW_TYPE_BOOLEAN | bool | No |
PW_TYPE_INTEGER | uint32_t | No |
PW_TYPE_SHORT | uint16_t | No |
PW_TYPE_INTEGER64 | uint64_t | No |
PW_TYPE_SIGNED | int32_t | No |
PW_TYPE_STRING | char const * | Yes |
PW_TYPE_IPV4_ADDR | fr_ipaddr_t | No |
PW_TYPE_IPV4_PREFIX | fr_ipaddr_t | No |
PW_TYPE_IPV6_ADDR | fr_ipaddr_t | No |
PW_TYPE_IPV6_PREFIX | fr_ipaddr_t | No |
PW_TYPE_COMBO_IP_ADDR | fr_ipaddr_t | No |
PW_TYPE_COMBO_IP_PREFIX | fr_ipaddr_t | No |
PW_TYPE_TIMEVAL | struct timeval | No |
cs | to search for matching CONF_PAIR in. |
name | of CONF_PAIR to search for. |
type | Data type to parse CONF_PAIR value as. Should be one of the following data types, and one or more of the following flag types or'd together:
|
data | Pointer to a global variable, or pointer to a field in the struct being populated with values. |
dflt | value to use, if no CONF_PAIR is found. |
dflt_quote | around the dflt value. |
Definition at line 1968 of file conffile.c.
|
static |
Parses a CONF_PAIR into a C data type.
[out] | out | Where to write the parsed value. |
[in] | ctx | to allocate any dynamic buffers in. |
[in] | cs | containing the cp. |
[in] | cp | to parse. |
[in] | type | to parse to. May contain flags. |
Definition at line 1560 of file conffile.c.
int cf_pair_replace | ( | CONF_SECTION * | cs, |
CONF_PAIR * | cp, | ||
char const * | value | ||
) |
Replace pair in a given section with a new pair, of the given value.
cs | to replace pair in. |
cp | to replace. |
value | New value to assign to cp. |
Definition at line 768 of file conffile.c.
Cast a CONF_PAIR to a CONF_ITEM.
Definition at line 211 of file conffile.c.
char const* cf_pair_value | ( | CONF_PAIR const * | pair | ) |
Return the value (rhs) type.
pair | to extract value type from. |
Definition at line 3541 of file conffile.c.
VALUE_PAIR* cf_pairtovp | ( | CONF_PAIR * | pair | ) |
CONF_ITEM* cf_reference_item | ( | CONF_SECTION const * | parentcs, |
CONF_SECTION * | outercs, | ||
char const * | ptr | ||
) |
Definition at line 906 of file conffile.c.
void cf_section_add | ( | CONF_SECTION * | parent, |
CONF_SECTION * | cs | ||
) |
Definition at line 754 of file conffile.c.
CONF_SECTION* cf_section_alloc | ( | CONF_SECTION * | parent, |
char const * | name1, | ||
char const * | name2 | ||
) |
Allocate a CONF_SECTION.
parent | CONF_SECTION to hang this CONF_SECTION off of. |
name1 | Primary name. |
name2 | Secondary name. |
Definition at line 626 of file conffile.c.
char const* cf_section_argv | ( | CONF_SECTION const * | cs, |
int | argc | ||
) |
FR_TOKEN cf_section_argv_type | ( | CONF_SECTION const * | cs, |
int | argc | ||
) |
CONF_SECTION* cf_section_dup | ( | CONF_SECTION * | parent, |
CONF_SECTION const * | cs, | ||
char const * | name1, | ||
char const * | name2, | ||
bool | copy_meta | ||
) |
Duplicate a configuration section.
parent | section (may be NULL). |
cs | to duplicate. |
name1 | of new section. |
name2 | of new section. |
copy_meta | Copy additional meta data for a section (like template, base, depth and variables). |
Definition at line 697 of file conffile.c.
char const* cf_section_filename | ( | CONF_SECTION const * | section | ) |
CONF_SECTION* cf_section_find_name2 | ( | CONF_SECTION const * | cs, |
char const * | name1, | ||
char const * | name2 | ||
) |
CONF_SECTION* cf_section_find_next | ( | CONF_SECTION const * | section, |
CONF_SECTION const * | subsection, | ||
char const * | name1 | ||
) |
Definition at line 3836 of file conffile.c.
int cf_section_lineno | ( | CONF_SECTION const * | section | ) |
char const* cf_section_name | ( | CONF_SECTION const * | cs | ) |
Return name2 if set, else name1.
Definition at line 3609 of file conffile.c.
char const* cf_section_name1 | ( | CONF_SECTION const * | cs | ) |
char const* cf_section_name2 | ( | CONF_SECTION const * | cs | ) |
FR_TOKEN cf_section_name2_type | ( | CONF_SECTION const * | cs | ) |
int cf_section_parse | ( | CONF_SECTION * | cs, |
void * | base, | ||
CONF_PARSER const * | variables | ||
) |
Parse a configuration section into user-supplied variables.
cs | to parse. |
base | pointer to a struct to fill with data. Any buffers will also be talloced using this parent as a pointer. |
variables | mappings between struct fields and CONF_ITEM s. |
Definition at line 2234 of file conffile.c.
|
static |
Definition at line 2145 of file conffile.c.
int cf_section_parse_pass2 | ( | CONF_SECTION * | cs, |
void * | base, | ||
CONF_PARSER const | variables[] | ||
) |
Fixup xlat expansions and attributes.
cs | CONF_SECTION to fixup. |
base | start of structure to write vp_tmpl_t s to. |
variables | Array of CONF_PARSER structs to process. |
Definition at line 1364 of file conffile.c.
const CONF_PARSER* cf_section_parse_table | ( | CONF_SECTION * | cs | ) |
|
static |
Definition at line 2194 of file conffile.c.
|
static |
Definition at line 3383 of file conffile.c.
|
static |
Definition at line 2504 of file conffile.c.
CONF_SECTION* cf_section_sub_find | ( | CONF_SECTION const * | cs, |
char const * | name | ||
) |
Find a sub-section in a section.
This finds ANY section having the same first name. The second name is ignored.
Definition at line 3708 of file conffile.c.
CONF_SECTION* cf_section_sub_find_name2 | ( | CONF_SECTION const * | cs, |
char const * | name1, | ||
char const * | name2 | ||
) |
Find a CONF_SECTION with both names.
Definition at line 3728 of file conffile.c.
CONF_ITEM* cf_section_to_item | ( | CONF_SECTION const * | cs | ) |
Cast a CONF_SECTION to a CONF_ITEM.
Definition at line 224 of file conffile.c.
char const* cf_section_value_find | ( | CONF_SECTION const * | cs, |
char const * | attr | ||
) |
CONF_SECTION* cf_subsection_find_next | ( | CONF_SECTION const * | section, |
CONF_SECTION const * | subsection, | ||
char const * | name1 | ||
) |
Definition at line 3799 of file conffile.c.
|
static |
Definition at line 2336 of file conffile.c.
CONF_SECTION* cf_top_section | ( | CONF_SECTION * | cs | ) |
|
static |
|
static |
|
static |
|
inlinestatic |
Validation function for ipaddr conffile types.
Definition at line 1307 of file conffile.c.
|
static |
|
static |
|
static |
|
static |
bool check_config = false |
Definition at line 45 of file conffile.c.
|
static |
Definition at line 53 of file conffile.c.
|
static |
Definition at line 1302 of file conffile.c.