The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
dict_ext.c File Reference

Extensions to dictionary structures. More...

#include <freeradius-devel/util/dict_priv.h>
#include <freeradius-devel/util/dict_ext_priv.h>
+ Include dependency graph for dict_ext.c:

Go to the source code of this file.

Functions

static int dict_ext_protocol_specific_copy (UNUSED int ext, TALLOC_CTX *dst_chunk, void *dst_ext_ptr, size_t dst_ext_len, TALLOC_CTX const *src_chunk, void *src_ext_ptr, size_t src_ext_len)
 
void fr_dict_attr_ext_debug (fr_dict_attr_t const *da)
 
static int fr_dict_attr_ext_enumv_copy (UNUSED int ext, TALLOC_CTX *chunk_dst, UNUSED void *dst_ext_ptr, UNUSED size_t dst_ext_len, TALLOC_CTX const *chunk_src, void *src_ext_ptr, UNUSED size_t src_ext_len)
 Copy all enumeration values from one attribute to another. More...
 
static int fr_dict_attr_ext_name_fixup (UNUSED int ext, TALLOC_CTX *chunk, void *ext_ptr, UNUSED size_t ext_ptr_len)
 Fixup name pointer on realloc. More...
 
static int fr_dict_attr_ext_vendor_copy (UNUSED int ext, TALLOC_CTX *chunk_dst, void *dst_ext_ptr, UNUSED size_t dst_ext_len, UNUSED TALLOC_CTX const *chunk_src, void *src_ext_ptr, UNUSED size_t src_ext_len)
 Rediscover the parent of this attribute, and cache it. More...
 

Variables

static fr_table_num_ordered_t const dict_attr_ext_table []
 
static size_t dict_attr_ext_table_len = NUM_ELEMENTS(dict_attr_ext_table)
 
static fr_table_num_ordered_t const dict_enum_ext_table []
 
static size_t dict_enum_ext_table_len = NUM_ELEMENTS(dict_enum_ext_table)
 
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...
 

Detailed Description

Extensions to dictionary structures.

Definition in file dict_ext.c.

Function Documentation

◆ dict_ext_protocol_specific_copy()

static int dict_ext_protocol_specific_copy ( UNUSED int  ext,
TALLOC_CTX *  dst_chunk,
void *  dst_ext_ptr,
size_t  dst_ext_len,
TALLOC_CTX const *  src_chunk,
void *  src_ext_ptr,
size_t  src_ext_len 
)
static

Definition at line 158 of file dict_ext.c.

+ Here is the call graph for this function:

◆ fr_dict_attr_ext_debug()

void fr_dict_attr_ext_debug ( fr_dict_attr_t const *  da)

Definition at line 267 of file dict_ext.c.

+ Here is the call graph for this function:

◆ fr_dict_attr_ext_enumv_copy()

static int fr_dict_attr_ext_enumv_copy ( UNUSED int  ext,
TALLOC_CTX *  chunk_dst,
UNUSED void *  dst_ext_ptr,
UNUSED size_t  dst_ext_len,
TALLOC_CTX const *  chunk_src,
void *  src_ext_ptr,
UNUSED size_t  src_ext_len 
)
static

Copy all enumeration values from one attribute to another.

Definition at line 58 of file dict_ext.c.

+ Here is the call graph for this function:

◆ fr_dict_attr_ext_name_fixup()

static int fr_dict_attr_ext_name_fixup ( UNUSED int  ext,
TALLOC_CTX *  chunk,
void *  ext_ptr,
UNUSED size_t  ext_ptr_len 
)
static

Fixup name pointer on realloc.

Definition at line 44 of file dict_ext.c.

◆ fr_dict_attr_ext_vendor_copy()

static int fr_dict_attr_ext_vendor_copy ( UNUSED int  ext,
TALLOC_CTX *  chunk_dst,
void *  dst_ext_ptr,
UNUSED size_t  dst_ext_len,
UNUSED TALLOC_CTX const *  chunk_src,
void *  src_ext_ptr,
UNUSED size_t  src_ext_len 
)
static

Rediscover the parent of this attribute, and cache it.

Definition at line 110 of file dict_ext.c.

+ Here is the call graph for this function:

Variable Documentation

◆ dict_attr_ext_table

fr_table_num_ordered_t const dict_attr_ext_table[]
static
Initial value:
= {
{ L("name"), FR_DICT_ATTR_EXT_NAME },
{ L("children"), FR_DICT_ATTR_EXT_CHILDREN },
{ L("ref"), FR_DICT_ATTR_EXT_REF },
{ L("vendor"), FR_DICT_ATTR_EXT_VENDOR },
{ L("da_stack"), FR_DICT_ATTR_EXT_DA_STACK },
{ L("enumv"), FR_DICT_ATTR_EXT_ENUMV },
{ L("namespace"), FR_DICT_ATTR_EXT_NAMESPACE },
{ L("protocol-specific"), FR_DICT_ATTR_EXT_PROTOCOL_SPECIFIC }
}
#define L(_str)
Helper for initialising arrays of string literals.
Definition: build.h:207
@ FR_DICT_ATTR_EXT_PROTOCOL_SPECIFIC
Protocol specific extensions.
Definition: dict.h:170
@ FR_DICT_ATTR_EXT_ENUMV
Enumeration values.
Definition: dict.h:168
@ FR_DICT_ATTR_EXT_NAMESPACE
Attribute has its own namespace.
Definition: dict.h:169
@ FR_DICT_ATTR_EXT_DA_STACK
Cached da stack.
Definition: dict.h:167
@ FR_DICT_ATTR_EXT_REF
Attribute references another attribute and/or dictionary.
Definition: dict.h:164
@ FR_DICT_ATTR_EXT_VENDOR
Cached vendor pointer.
Definition: dict.h:166
@ FR_DICT_ATTR_EXT_NAME
Name of the attribute.
Definition: dict.h:162
@ FR_DICT_ATTR_EXT_CHILDREN
Attribute has children.
Definition: dict.h:163

Definition at line 29 of file dict_ext.c.

◆ dict_attr_ext_table_len

size_t dict_attr_ext_table_len = NUM_ELEMENTS(dict_attr_ext_table)
static

Definition at line 39 of file dict_ext.c.

◆ dict_enum_ext_table

fr_table_num_ordered_t const dict_enum_ext_table[]
static
Initial value:
= {
{ L("union_ref"), FR_DICT_ENUM_EXT_UNION_REF }
}
@ FR_DICT_ENUM_EXT_UNION_REF
Reference to a union/subs-struct.
Definition: dict.h:218

Definition at line 262 of file dict_ext.c.

◆ dict_enum_ext_table_len

size_t dict_enum_ext_table_len = NUM_ELEMENTS(dict_enum_ext_table)
static

Definition at line 265 of file dict_ext.c.

◆ fr_dict_attr_ext_def

fr_ext_t const fr_dict_attr_ext_def

Holds additional information about extension structures.

Definition at line 213 of file dict_ext.c.

◆ fr_dict_enum_ext_def

fr_ext_t const fr_dict_enum_ext_def
Initial value:
= {
.offset_of_exts = offsetof(fr_dict_enum_value_t, ext),
.name_table = dict_enum_ext_table,
.name_table_len = &dict_enum_ext_table_len,
.info = (fr_ext_info_t[]){
.can_copy = true
},
}
}
@ FR_DICT_ENUM_EXT_MAX
Definition: dict.h:219
Value of an enumerated attribute.
Definition: dict.h:226
static size_t dict_enum_ext_table_len
Definition: dict_ext.c:265
static fr_table_num_ordered_t const dict_enum_ext_table[]
Definition: dict_ext.c:262
Enum extension - Sub-struct or union pointer.
Definition: dict_ext.h:123
Additional information for a given extension.
Definition: ext.h:111

Holds additional information about extension structures.

Definition at line 275 of file dict_ext.c.