Private data structures and types for cf_*.c.  
More...
#include <stdint.h>
#include <sys/stat.h>
#include <freeradius-devel/server/cf_parse.h>
#include <freeradius-devel/util/rb.h>
#include <freeradius-devel/util/dlist.h>
Go to the source code of this file.
|  | 
| #define | cf_item_foreach(_ci,  _iter)   	for (CONF_ITEM *_iter = fr_dlist_head(&(_ci)->children); _iter; _iter = fr_dlist_next(&(_ci)->children, _iter)) | 
|  | Iterate over the contents of a list. 
 | 
|  | 
| #define | cf_item_foreach_next(_ci,  _iter,  _prev)   	for (CONF_ITEM *_iter = fr_dlist_next(&(_ci)->children, _prev); _iter; _iter = fr_dlist_next(&(_ci)->children, _iter)) | 
|  | Iterate over the contents of a list. 
 | 
|  | 
| #define | cf_item_foreach_prev(_ci,  _iter,  _prev)   	for (CONF_ITEM *_iter = fr_dlist_prev(&(_ci)->children, _prev); _iter; _iter = fr_dlist_prev(&(_ci)->children, _iter)) | 
|  | Iterate over the contents of a list in reverse order. 
 | 
|  | 
|  | 
| enum | cf_unlang_t { CF_UNLANG_NONE = 0
,
 CF_UNLANG_ALLOW
,
 CF_UNLANG_SERVER
,
 CF_UNLANG_POLICY
,
 CF_UNLANG_MODULES
,
 CF_UNLANG_EDIT
,
 CF_UNLANG_ASSIGNMENT
,
 CF_UNLANG_DICTIONARY
,
 CF_UNLANG_CAN_HAVE_UPDATE
 }
 | 
|  | 
| enum | conf_type { CONF_ITEM_INVALID = 0
,
 CONF_ITEM_PAIR
,
 CONF_ITEM_SECTION
,
 CONF_ITEM_DATA
 }
 | 
|  | 
Private data structures and types for cf_*.c. 
- Id
- 920897e6b9709a891c6909faffa11f4f105f0f85 
- Copyright
- 2017 The FreeRADIUS server project 
Definition in file cf_priv.h.
◆ cf_data
Internal data that is associated with a configuration section. 
Definition at line 125 of file cf_priv.h.
| Data Fields | 
|---|
| void const  * | data | User data. | 
| bool | free | If true, free data with talloc if parent node is freed. | 
| bool | is_talloced | If true we can do extra checks. | 
| CONF_ITEM | item | Common set of fields. | 
| char const  * | name | Additional qualification of type. | 
| char const  * | type | C type of data being stored. | 
 
 
◆ cf_file_t
Definition at line 136 of file cf_priv.h.
 
| Data Fields | 
|---|
| struct stat | buf | stat about the file | 
| CONF_SECTION * | cs | CONF_SECTION associated with the file. | 
| char const  * | filename | name of the file | 
| bool | from_dir | was read from a directory | 
| fr_rb_node_t | node |  | 
 
 
◆ cf_item
Common header for all CONF_* types. 
Definition at line 49 of file cf_priv.h.
| Data Fields | 
|---|
| fr_dlist_head_t | children | The head of the ordered list of children. | 
| fr_dlist_t | entry | Entry in dlist. | 
| char const  * | filename | The file the config item was parsed from. | 
| fr_rb_tree_t * | ident1 | Tree to store the first identifier (name1 || type || attr). | 
| fr_rb_node_t | ident1_node | Entry in the ident1 tree. | 
| fr_rb_tree_t * | ident2 | Tree to store the second identifier (name2 || name). | 
| fr_rb_node_t | ident2_node | Entry in the ident2 tree. | 
| int | lineno | The line number the config item began on. | 
| CONF_ITEM * | parent | Parent. | 
| CONF_ITEM_TYPE | type | Whether the config item is a config_pair, conf_section or cf_data. | 
 
 
◆ cf_pair
Configuration AVP similar to a fr_pair_t. 
Definition at line 70 of file cf_priv.h.
| Data Fields | 
|---|
| char const  * | attr | Attribute name. | 
| CONF_ITEM | item | Common set of fields. | 
| fr_token_t | lhs_quote | Name quoting style T_(DOUBLE|SINGLE|BACK)_QUOTE_STRING or T_BARE_WORD. | 
| fr_token_t | op | Operator e.g. =, :=. | 
| bool | parsed | Was this item used during parsing? | 
| bool | pass2 | do expansion in pass2. | 
| bool | printed | Was this item printed already in debug mode? | 
| bool | referenced | Was this item referenced in the config? | 
| fr_token_t | rhs_quote | Value Quoting style T_(DOUBLE|SINGLE|BACK)_QUOTE_STRING or T_BARE_WORD. | 
| char const  * | value | Attribute value. | 
 
 
◆ cf_section
A section grouping multiple CONF_PAIR. 
Definition at line 101 of file cf_priv.h.
| Data Fields | 
|---|
| bool | allow_locals | allow local variables | 
| int | argc | number of additional arguments | 
| char const  ** | argv | additional arguments | 
| fr_token_t * | argv_quote |  | 
| bool | at_reference | this thing was created from an ... | 
| void * | base |  | 
| int | depth |  | 
| CONF_ITEM | item | Common set of fields. | 
| char const  * | name1 | First name token. Given foo bar {}would befoo. | 
| char const  * | name2 | Second name token. Given foo bar {}would bebar. | 
| fr_token_t | name2_quote | The type of quoting around name2. | 
| CONF_SECTION * | template |  | 
| cf_unlang_t | unlang |  | 
 
 
◆ cf_item_foreach
Iterate over the contents of a list. 
- Parameters
- 
  
    | [in] | _ci | to iterate over. |  | [in] | _iter | Name of iteration variable. Will be declared in the scope of the loop. |  
 
Definition at line 150 of file cf_priv.h.
 
 
◆ cf_item_foreach_next
Iterate over the contents of a list. 
- Parameters
- 
  
    | [in] | _ci | to iterate over. |  | [in] | _iter | Name of iteration variable. Will be declared in the scope of the loop. |  | [in] | _prev | previous pointer |  
 
Definition at line 160 of file cf_priv.h.
 
 
◆ cf_item_foreach_prev
Iterate over the contents of a list in reverse order. 
- Parameters
- 
  
    | [in] | _ci | to iterate over. |  | [in] | _iter | Name of iteration variable. Will be declared in the scope of the loop. |  | [in] | _prev | previous pointer |  
 
Definition at line 170 of file cf_priv.h.
 
 
◆ CONF_ITEM_TYPE
◆ cf_unlang_t
| Enumerator | 
|---|
| CF_UNLANG_NONE | no unlang  | 
| CF_UNLANG_ALLOW | allow unlang in this section  | 
| CF_UNLANG_SERVER | this section is a virtual server, allow unlang 2 down  | 
| CF_UNLANG_POLICY | this section is a policy, allow unlang 2 down  | 
| CF_UNLANG_MODULES | this section is in "modules", allow unlang 2 down  | 
| CF_UNLANG_EDIT | only edit commands  | 
| CF_UNLANG_ASSIGNMENT | only assignments inside of map / update  | 
| CF_UNLANG_DICTIONARY | only local variable definitions  | 
| CF_UNLANG_CAN_HAVE_UPDATE | can have "update"  | 
Definition at line 86 of file cf_priv.h.
 
 
◆ conf_type
| Enumerator | 
|---|
| CONF_ITEM_INVALID |  | 
| CONF_ITEM_PAIR |  | 
| CONF_ITEM_SECTION |  | 
| CONF_ITEM_DATA |  | 
Definition at line 39 of file cf_priv.h.
 
 
◆ cf_item_has_no_children()
Check if the CONF_ITEM has no children. 
Which is the common use-case
- Parameters
- 
  
  
- Returns
- true/false 
Definition at line 180 of file cf_priv.h.