![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Deal with 'unknown' attributes, creating ephemeral dictionary attributes for them. More...
#include <freeradius-devel/util/dict_priv.h>
Include dependency graph for dict_unknown.c:Go to the source code of this file.
Functions | |
| static int | dict_attr_unknown_init (fr_dict_attr_t const *parent, UNUSED fr_dict_attr_t const *da, fr_type_t type, fr_dict_attr_flags_t *flags) |
| fr_dict_attr_t const * | fr_dict_attr_unknown_add (fr_dict_t *dict, fr_dict_attr_t const *unknown) |
| Converts an unknown to a known by adding it to the internal dictionaries. | |
| fr_dict_attr_t * | fr_dict_attr_unknown_afrom_da (TALLOC_CTX *ctx, fr_dict_attr_t const *da) |
| Copy a known or unknown attribute to produce an unknown attribute with the specified name. | |
| fr_slen_t | fr_dict_attr_unknown_afrom_oid_substr (TALLOC_CTX *ctx, fr_dict_attr_t const **out, fr_dict_attr_t const *parent, fr_sbuff_t *in, fr_type_t type) |
| Create a fr_dict_attr_t from an ASCII attribute and value. | |
| fr_dict_attr_t * | fr_dict_attr_unknown_alloc (TALLOC_CTX *ctx, fr_dict_attr_t const *da, fr_type_t type) |
| Allocate an unknown DA. | |
| void | fr_dict_attr_unknown_free (fr_dict_attr_t const **da) |
| Free dynamically allocated (unknown attributes) | |
| int | fr_dict_attr_unknown_parent_to_known (fr_dict_attr_t *da, fr_dict_attr_t const *parent) |
| Fixup the parent of an unknown attribute using an equivalent known attribute. | |
| fr_dict_attr_t const * | fr_dict_attr_unknown_resolve (fr_dict_t const *dict, fr_dict_attr_t const *da) |
| Check to see if we can convert a nested TLV structure to known attributes. | |
| fr_dict_attr_t * | fr_dict_attr_unknown_typed_afrom_num_raw (TALLOC_CTX *ctx, fr_dict_attr_t const *parent, unsigned int num, fr_type_t type, bool raw) |
| Initialise a fr_dict_attr_t from a number and a data type. | |
Deal with 'unknown' attributes, creating ephemeral dictionary attributes for them.
Definition in file dict_unknown.c.
|
static |
Definition at line 27 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_dict_attr_t const * fr_dict_attr_unknown_add | ( | fr_dict_t * | dict, |
| fr_dict_attr_t const * | unknown | ||
| ) |
Converts an unknown to a known by adding it to the internal dictionaries.
Does not free old fr_dict_attr_t, that is left up to the caller.
| [in] | dict | of protocol context we're operating in. If NULL the internal dictionary will be used. |
| [in] | unknown | attribute to add. |
Definition at line 117 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_dict_attr_t * fr_dict_attr_unknown_afrom_da | ( | TALLOC_CTX * | ctx, |
| fr_dict_attr_t const * | da | ||
| ) |
Copy a known or unknown attribute to produce an unknown attribute with the specified name.
Will copy the complete hierarchy down to the first known attribute.
Definition at line 339 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_slen_t fr_dict_attr_unknown_afrom_oid_substr | ( | TALLOC_CTX * | ctx, |
| fr_dict_attr_t const ** | out, | ||
| fr_dict_attr_t const * | parent, | ||
| fr_sbuff_t * | in, | ||
| fr_type_t | type | ||
| ) |
Create a fr_dict_attr_t from an ASCII attribute and value.
Where the attribute name is in the form:
| [in] | ctx | to alloc new attribute in. |
| [out] | out | Where to write the head of the chain unknown dictionary attributes. |
| [in] | parent | Attribute to use as the root for resolving OIDs in. Usually the root of a protocol dictionary. |
| [in] | in | OID string to parse |
| [in] | type | data type of the unknown attribute |
Definition at line 465 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_dict_attr_t * fr_dict_attr_unknown_alloc | ( | TALLOC_CTX * | ctx, |
| fr_dict_attr_t const * | da, | ||
| fr_type_t | type | ||
| ) |
Allocate an unknown DA.
Definition at line 244 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fr_dict_attr_unknown_free | ( | fr_dict_attr_t const ** | da | ) |
Free dynamically allocated (unknown attributes)
If the da was dynamically allocated it will be freed, else the function will return without doing anything.
| [in] | da | to free. |
Definition at line 227 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_dict_attr_unknown_parent_to_known | ( | fr_dict_attr_t * | da, |
| fr_dict_attr_t const * | parent | ||
| ) |
Fixup the parent of an unknown attribute using an equivalent known attribute.
This can be useful where an unknown attribute's ancestors are added to a dictionary but not the unknown attribute itself.
| [in] | da | to fixup. |
| [in] | parent | to assign. If NULL, we will attempt to resolve the parent in the dictionary the current unknown attribute extends. |
Definition at line 596 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_dict_attr_t const * fr_dict_attr_unknown_resolve | ( | fr_dict_t const * | dict, |
| fr_dict_attr_t const * | da | ||
| ) |
Check to see if we can convert a nested TLV structure to known attributes.
| [in] | dict | to search in. |
| [in] | da | Nested tlv structure to convert. |
Definition at line 649 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_dict_attr_t * fr_dict_attr_unknown_typed_afrom_num_raw | ( | TALLOC_CTX * | ctx, |
| fr_dict_attr_t const * | parent, | ||
| unsigned int | num, | ||
| fr_type_t | type, | ||
| bool | raw | ||
| ) |
Initialise a fr_dict_attr_t from a number and a data type.
| [in] | ctx | to allocate the attribute in. |
| [in] | parent | of the unknown attribute (may also be unknown). |
| [in] | num | of the unknown attribute. |
| [in] | type | data type |
| [in] | raw | is it raw, i.e. bad value, versus unknown? |
Definition at line 381 of file dict_unknown.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.9.8