The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Pair serialisation API. More...
#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/util/talloc.h>
#include <freeradius-devel/util/proto.h>
#include <freeradius-devel/util/pair_legacy.h>
Go to the source code of this file.
Functions | |
void | _fr_pair_list_log (fr_log_t const *log, int lvl, fr_pair_t *parent, fr_pair_list_t const *list, char const *file, int line) |
Print a list of attributes and enumv. More... | |
void | fr_pair_debug (fr_pair_t const *pair) |
Dumps a pair to the default logging destination - Useful for calling from debuggers. More... | |
void | fr_pair_list_debug (fr_pair_list_t const *list) |
Dumps a list to the default logging destination - Useful for calling from debuggers. More... | |
static void | fr_pair_list_log_sbuff (fr_log_t const *log, int lvl, fr_pair_t *parent, fr_pair_list_t const *list, char const *file, int line, fr_sbuff_t *sbuff) |
ssize_t | fr_pair_list_print (fr_sbuff_t *out, fr_dict_attr_t const *parent, fr_pair_list_t const *list) |
Print a pair list. More... | |
ssize_t | fr_pair_print (fr_sbuff_t *out, fr_dict_attr_t const *parent, fr_pair_t const *vp) |
Print one attribute and value to a string. More... | |
ssize_t | fr_pair_print_secure (fr_sbuff_t *out, fr_dict_attr_t const *parent, fr_pair_t const *vp) |
Print one attribute and value to a string with escape rules. More... | |
ssize_t | fr_pair_print_value_quoted (fr_sbuff_t *out, fr_pair_t const *vp, fr_token_t quote) |
Print the value of an attribute to a string. More... | |
Pair serialisation API.
Definition in file pair_print.c.
void _fr_pair_list_log | ( | fr_log_t const * | log, |
int | lvl, | ||
fr_pair_t * | parent, | ||
fr_pair_list_t const * | list, | ||
char const * | file, | ||
int | line | ||
) |
Print a list of attributes and enumv.
[in] | log | to output to. |
[in] | lvl | depth in structural attribute. |
[in] | parent | parent attribute |
[in] | list | to print. |
[in] | file | where the message originated |
[in] | line | where the message originated |
Definition at line 305 of file pair_print.c.
void fr_pair_debug | ( | fr_pair_t const * | pair | ) |
Dumps a pair to the default logging destination - Useful for calling from debuggers.
Definition at line 327 of file pair_print.c.
void fr_pair_list_debug | ( | fr_pair_list_t const * | list | ) |
Dumps a list to the default logging destination - Useful for calling from debuggers.
Definition at line 318 of file pair_print.c.
|
static |
Definition at line 260 of file pair_print.c.
ssize_t fr_pair_list_print | ( | fr_sbuff_t * | out, |
fr_dict_attr_t const * | parent, | ||
fr_pair_list_t const * | list | ||
) |
Print a pair list.
[in] | out | Where to write the string. |
[in] | parent | parent da to start from |
[in] | list | pair list |
Definition at line 233 of file pair_print.c.
ssize_t fr_pair_print | ( | fr_sbuff_t * | out, |
fr_dict_attr_t const * | parent, | ||
fr_pair_t const * | vp | ||
) |
Print one attribute and value to a string.
Print a fr_pair_t in the format:
<attribute_name> <op> <value>
to a string.
[in] | out | Where to write the string. |
[in] | parent | If not NULL, only print OID components from this parent to the VP. |
[in] | vp | to print. |
Definition at line 104 of file pair_print.c.
ssize_t fr_pair_print_secure | ( | fr_sbuff_t * | out, |
fr_dict_attr_t const * | parent, | ||
fr_pair_t const * | vp | ||
) |
Print one attribute and value to a string with escape rules.
Similar to fr_pair_print(), but secrets are omitted. This function duplicates parts of the functionality of fr_pair_print(). fr_pair_print_value_quoted(), and fr_value_box_print_quoted(), but for the special case of secure strings.
Note that only secrets of type "string" and "octets" are omitted. Other "secret" data types are still printed as-is.
"octets" are still printed as "<<< secret >>>". Which won't parse correctly, but that's fine. Because omitted data is not meant to be parsed into real data.
[in] | out | Where to write the string. |
[in] | parent | If not NULL, only print OID components from this parent to the VP. |
[in] | vp | to print. |
Definition at line 166 of file pair_print.c.
ssize_t fr_pair_print_value_quoted | ( | fr_sbuff_t * | out, |
fr_pair_t const * | vp, | ||
fr_token_t | quote | ||
) |
Print the value of an attribute to a string.
[in] | out | Where to write the string. |
[in] | vp | to print. |
[in] | quote | Char to add before and after printed value, if 0 no char will be added, if < 0 raw string will be added. |
Definition at line 40 of file pair_print.c.