The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Multi-protocol AVP dictionary API. More...
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/util/ext.h>
#include <freeradius-devel/util/hash.h>
#include <limits.h>
Go to the source code of this file.
Data Structures | |
struct | fr_dict_attr_ext_children_t |
Attribute extension - Holds children for an attribute. More... | |
struct | fr_dict_attr_ext_da_stack_t |
Attribute extension - Stack of dictionary attributes that describe the path back to the root of the dictionary. More... | |
struct | fr_dict_attr_ext_enumv_t |
Attribute extension - Holds enumeration values. More... | |
struct | fr_dict_attr_ext_namespace_t |
Attribute extension - Holds a hash table with the names of all children of this attribute. More... | |
struct | fr_dict_attr_ext_ref_t |
Attribute extension - Holds a reference to an attribute in another dictionary. More... | |
union | fr_dict_attr_ext_ref_t.__unnamed118__ |
struct | fr_dict_attr_ext_vendor_t |
Attribute extension - Cached vendor pointer. More... | |
struct | fr_dict_enum_ext_union_ref_t |
Enum extension - Sub-struct or union pointer. More... | |
Macros | |
#define | fr_dict_attr_ref_is_unresolved(_type) ((_type) & FR_DICT_ATTR_REF_UNRESOLVED) |
#define | fr_dict_attr_ref_type(_type) ((_type) & ~FR_DICT_ATTR_REF_UNRESOLVED) |
Enumerations | |
enum | fr_dict_attr_ref_type_t { FR_DICT_ATTR_REF_NONE = 0x00 , FR_DICT_ATTR_REF_ALIAS = 0x01 , FR_DICT_ATTR_REF_CLONE = 0x02 , FR_DICT_ATTR_REF_ENUM = 0x04 , FR_DICT_ATTR_REF_UNRESOLVED = 0x10 } |
Functions | |
void | fr_dict_attr_ext_debug (fr_dict_attr_t const *da) |
Variables | |
fr_ext_t const | fr_dict_attr_ext_def |
Holds additional information about extension structures. More... | |
fr_ext_t const | fr_dict_enum_ext_def |
Holds additional information about extension structures. More... | |
Add extension structures to attributes | |
static fr_dict_attr_t const ** | fr_dict_attr_da_stack (fr_dict_attr_t const *da) |
Return the cached da stack (if any) associated with an attribute. More... | |
static void * | fr_dict_attr_ext (fr_dict_attr_t const *da, fr_dict_attr_ext_t ext) |
static bool | fr_dict_attr_has_ext (fr_dict_attr_t const *da, fr_dict_attr_ext_t ext) |
Return whether a da has a given extension or not. More... | |
static fr_dict_attr_t const * | fr_dict_attr_ref (fr_dict_attr_t const *da) |
Return the reference associated with a group type attribute. More... | |
static fr_dict_attr_t const * | fr_dict_vendor_da_by_da (fr_dict_attr_t const *da) |
Return the vendor da for an attribute. More... | |
static uint32_t | fr_dict_vendor_num_by_da (fr_dict_attr_t const *da) |
Return the vendor number for an attribute. More... | |
Multi-protocol AVP dictionary API.
Definition in file dict_ext.h.
struct fr_dict_attr_ext_children_t |
Attribute extension - Holds children for an attribute.
Children are possible for:
FR_TYPE_TLV, FR_TYPE_VENDOR, FR_TYPE_VSA, FR_TYPE_STRUCT
or where the parent->parent->type is FR_TYPE_STRUCT, and "parent" is a "key" field. Note that these attributes therefore cannot have VALUEs, as the child defines their VALUE. See dict_attr_can_have_children() for details.
Definition at line 52 of file dict_ext.h.
Data Fields | ||
---|---|---|
fr_hash_table_t * | child_by_name | Namespace at this level in the hierarchy. |
fr_dict_attr_t const ** | children | Children of this attribute. |
struct fr_dict_attr_ext_da_stack_t |
Attribute extension - Stack of dictionary attributes that describe the path back to the root of the dictionary.
Definition at line 94 of file dict_ext.h.
Data Fields | ||
---|---|---|
fr_dict_attr_t const * | da_stack[] | Stack of dictionary attributes. |
bool | unused |
Zero length arrays are apparently GNU extensions and we're not allowed to have structs with a single variable array as its member. We'll likely want to store something else here at some point, so we just have a dummy field to avoid changing all the code. |
struct fr_dict_attr_ext_enumv_t |
Attribute extension - Holds enumeration values.
Definition at line 107 of file dict_ext.h.
Data Fields | ||
---|---|---|
size_t | max_name_len | maximum length of a name |
fr_hash_table_t * | name_by_value | Lookup a name by value. |
fr_hash_table_t * | value_by_name | Lookup an enumeration value by name. |
struct fr_dict_attr_ext_namespace_t |
Attribute extension - Holds a hash table with the names of all children of this attribute.
Definition at line 116 of file dict_ext.h.
struct fr_dict_attr_ext_ref_t |
Attribute extension - Holds a reference to an attribute in another dictionary.
Definition at line 76 of file dict_ext.h.
Data Fields | ||
---|---|---|
union fr_dict_attr_ext_ref_t | __unnamed__ | |
fr_dict_attr_ref_type_t | type | The state of the reference. |
union fr_dict_attr_ext_ref_t.__unnamed118__ |
Definition at line 78 of file dict_ext.h.
Data Fields | ||
---|---|---|
fr_dict_attr_t const * | ref | A resolved pointer to the referenced attribute. |
char * | unresolved | An unresolved reference (will need resolving later). |
struct fr_dict_attr_ext_vendor_t |
Attribute extension - Cached vendor pointer.
Definition at line 87 of file dict_ext.h.
Data Fields | ||
---|---|---|
fr_dict_attr_t const * | vendor | ancestor which has type FR_TYPE_VENDOR |
struct fr_dict_enum_ext_union_ref_t |
Enum extension - Sub-struct or union pointer.
Definition at line 123 of file dict_ext.h.
Data Fields | ||
---|---|---|
fr_dict_attr_t const * | union_ref | The union da this value points into. |
#define fr_dict_attr_ref_is_unresolved | ( | _type | ) | ((_type) & FR_DICT_ATTR_REF_UNRESOLVED) |
Definition at line 70 of file dict_ext.h.
#define fr_dict_attr_ref_type | ( | _type | ) | ((_type) & ~FR_DICT_ATTR_REF_UNRESOLVED) |
Definition at line 71 of file dict_ext.h.
Definition at line 58 of file dict_ext.h.
|
inlinestatic |
Return the cached da stack (if any) associated with an attribute.
[in] | da | to return cached da stack for. |
Definition at line 167 of file dict_ext.h.
|
inlinestatic |
Definition at line 140 of file dict_ext.h.
void fr_dict_attr_ext_debug | ( | fr_dict_attr_t const * | da | ) |
|
inlinestatic |
Return whether a da has a given extension or not.
[in] | da | to check for extensions. |
[in] | ext | to check. |
Definition at line 155 of file dict_ext.h.
|
inlinestatic |
Return the reference associated with a group type attribute.
[in] | da | to return the reference for. |
Definition at line 184 of file dict_ext.h.
|
inlinestatic |
Return the vendor da for an attribute.
[in] | da | The dictionary attribute to find the vendor for. |
Definition at line 232 of file dict_ext.h.
|
inlinestatic |
Return the vendor number for an attribute.
[in] | da | The dictionary attribute to find the vendor for. |
Definition at line 212 of file dict_ext.h.
|
extern |
Holds additional information about extension structures.
Definition at line 213 of file dict_ext.c.
|
extern |
Holds additional information about extension structures.
Definition at line 275 of file dict_ext.c.