24 #include <freeradius-devel/util/dict.h>
25 #include <freeradius-devel/util/dict_priv.h>
177 unsigned int base,
int inst)
254 if (!our_dict_gctx)
return -1;
272 if (dict_p) *dict_p =
dict;
int fr_dict_enum_add_name(fr_dict_attr_t *da, char const *name, fr_value_box_t const *value, bool coerce, bool replace)
Add a value name.
fr_dict_attr_t * fr_dict_attr_unconst(fr_dict_attr_t const *da)
Coerce to non-const.
fr_dict_attr_t const * fr_dict_attr_by_name(fr_dict_attr_err_t *err, fr_dict_attr_t const *parent, char const *attr))
Locate a fr_dict_attr_t by its name.
fr_dict_t * fr_dict_alloc(char const *proto_name, unsigned int proto_number)
fr_dict_attr_t const * fr_dict_root(fr_dict_t const *dict)
Return the root attribute of a dictionary.
int fr_dict_global_ctx_free(fr_dict_gctx_t const *gctx)
Explicitly free all data associated with a global dictionary context.
int fr_dict_attr_add(fr_dict_t *dict, fr_dict_attr_t const *parent, char const *name, unsigned int attr, fr_type_t type, fr_dict_attr_flags_t const *flags))
Add an attribute to the dictionary.
fr_dict_gctx_t * fr_dict_global_ctx_init(TALLOC_CTX *ctx, bool free_at_exit, char const *dict_dir)
Initialise the global protocol hashes.
Values of the encryption flags.
fr_dict_attr_t const * fr_dict_attr_test_struct
fr_dict_attr_t const * fr_dict_attr_test_ethernet
fr_dict_attr_t const * fr_dict_attr_test_ipv6_addr
fr_dict_attr_t const * fr_dict_attr_test_tlv_string
fr_dict_test_attr_t const fr_dict_test_attrs[]
fr_dict_attr_t const * fr_dict_attr_test_nested_leaf_string
fr_dict_attr_t const * fr_dict_attr_test_enum
static fr_value_box_t enum_test_0
fr_dict_attr_t const * fr_dict_attr_test_time_delta
fr_dict_attr_t const * fr_dict_attr_test_date
fr_dict_attr_t const * fr_dict_attr_test_combo_ip_prefix
fr_dict_attr_t const * fr_dict_attr_test_vendor
fr_dict_attr_t const * fr_dict_attr_test_int32
fr_dict_attr_t const * fr_dict_attr_test_tlv
fr_dict_attr_t const * fr_dict_attr_test_uint64
fr_dict_attr_t const * fr_dict_attr_test_int16
fr_dict_attr_t const * fr_dict_attr_test_ifid
fr_dict_attr_t const * fr_dict_attr_test_nested_top_tlv
fr_dict_attr_t const * fr_dict_attr_test_uint32
fr_dict_attr_t const * fr_dict_attr_test_vendor_string
fr_dict_attr_t const * fr_dict_attr_test_int8
fr_dict_attr_t const * fr_dict_attr_test_ipv6_prefix
fr_dict_attr_t const * fr_dict_attr_test_octets
fr_dict_attr_t const * fr_dict_attr_test_ipv4_prefix
int fr_dict_test_attrs_init(fr_dict_t *dict, fr_dict_test_attr_t const *test_defs, unsigned int base, int inst)
Add our test attributes to our test dictionary.
fr_dict_attr_t const * fr_dict_attr_test_string
fr_dict_attr_t const * fr_dict_attr_test_ipv4_addr
fr_dict_attr_t const * fr_dict_attr_test_nested_child_tlv
int fr_dict_test_init(TALLOC_CTX *ctx, fr_dict_t **dict_p, fr_dict_test_attr_t const *test_defs)
Initialise a test dictionary and add our test_defs to it.
fr_dict_attr_t const * fr_dict_attr_test_uint8
fr_dict_attr_t const * fr_dict_attr_test_float32
fr_dict_attr_t const * fr_dict_attr_test_group
fr_dict_attr_t const * fr_dict_attr_test_nested_leaf_int32
fr_dict_attr_t const * fr_dict_attr_test_struct_uint32
fr_dict_attr_t const * fr_dict_attr_test_uint16
fr_dict_attr_t const * fr_dict_attr_test_int64
fr_dict_attr_t const * fr_dict_attr_test_combo_ip_addr
fr_dict_attr_t const * fr_dict_attr_test_bool
static fr_value_box_t enum_test_1
fr_dict_attr_t const * fr_dict_attr_test_float64
fr_dict_attr_t const * fr_dict_attr_test_vsa
fr_dict_attr_t const * fr_dict_attr_test_size
Functions to create test dictionaries for unit tests.
fr_value_box_t * val
Enumeration value.
@ FR_TEST_ATTR_IPV4_PREFIX
@ FR_TEST_ATTR_TLV_STRING
@ FR_TEST_ATTR_IPV6_PREFIX
@ FR_TEST_ATTR_NESTED_LEAF_INT32
@ FR_TEST_ATTR_VENDOR_STRING
@ FR_TEST_ATTR_NESTED_CHILD_TLV
@ FR_TEST_ATTR_NESTED_LEAF_STRING
@ FR_TEST_ATTR_TIME_DELTA
@ FR_TEST_ATTR_NESTED_TOP_TLV
fr_dict_test_attr_number_t attr
Attribute number to create.
fr_dict_attr_t const ** parent
The parent of this attribute.
fr_dict_test_attr_value_t * values
Array of enumeration values to add to this attribute.
char const * key
Enumeration name.
fr_type_t type
What type the attribute.
fr_dict_attr_t const ** da
Where to write a pointer to this attribute.
char const * name
What to call this attribute.
Test enumeration attributes.
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
@ FR_TYPE_FLOAT32
Single precision floating point.
@ FR_TYPE_IPV4_ADDR
32 Bit IPv4 Address.
@ FR_TYPE_INT8
8 Bit signed integer.
@ FR_TYPE_TLV
Contains nested attributes.
@ FR_TYPE_ETHERNET
48 Bit Mac-Address.
@ FR_TYPE_IPV6_PREFIX
IPv6 Prefix.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_UINT16
16 Bit unsigned integer.
@ FR_TYPE_INT64
64 Bit signed integer.
@ FR_TYPE_INT16
16 Bit signed integer.
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
@ FR_TYPE_UINT8
8 Bit unsigned integer.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_STRUCT
like TLV, but without T or L, and fixed-width children
@ FR_TYPE_INT32
32 Bit signed integer.
@ FR_TYPE_VENDOR
Attribute that represents a vendor in the attribute tree.
@ FR_TYPE_UINT64
64 Bit unsigned integer.
@ FR_TYPE_IPV6_ADDR
128 Bit IPv6 Address.
@ FR_TYPE_IPV4_PREFIX
IPv4 Prefix.
@ FR_TYPE_SIZE
Unsigned integer capable of representing any memory address on the local system.
@ FR_TYPE_VSA
Vendor-Specific, for RADIUS attribute 26.
@ FR_TYPE_IFID
Interface ID.
@ FR_TYPE_OCTETS
Raw octets.
@ FR_TYPE_GROUP
A grouping of other attributes.
@ FR_TYPE_FLOAT64
Double precision floating point.
static char buff[sizeof("18446744073709551615")+3]
eap_aka_sim_process_conf_t * inst
#define fr_strerror_printf(_fmt,...)
Log to thread local error buffer.
#define FR_VALUE_BOX_INITIALISER(_vb, _type, _field, _val)
A static initialiser for stack/globally allocated boxes.