Utility to print attribute data in tab delimited format.
More...
#include <freeradius-devel/util/conf.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/atexit.h>
#include <freeradius-devel/util/dict_priv.h>
#include <dirent.h>
#include <sys/stat.h>
#include <stdbool.h>
Go to the source code of this file.
|
| static void | _raddict_export (fr_dict_t const *dict, uint64_t *count, uintptr_t *low, uintptr_t *high, fr_dict_attr_t const *da, unsigned int lvl) |
| |
| static bool | children_ok (fr_dict_attr_t const *parent) |
| |
| static void | da_normalize_name (fr_dict_attr_t const *da, char buffer[static FR_DICT_ATTR_MAX_NAME_LEN+1]) |
| |
| static void | da_print_attr_autoload (FILE *fp, fr_dict_attr_t const *parent) |
| |
| static void | da_print_base_c_da_def (FILE *fp, fr_dict_attr_t const *parent) |
| |
| static void | da_print_info (fr_dict_t const *dict, fr_dict_attr_t const *da, int depth) |
| |
| static void | da_print_name (FILE *fp, fr_dict_attr_t const *da) |
| |
| static void | da_print_stats_h (FILE *fp, fr_dict_attr_t const *parent) |
| |
| static void | da_print_stats_link (FILE *fp, fr_dict_attr_t const *parent) |
| |
| static void | da_print_struct (FILE *fp, fr_dict_attr_t const *parent) |
| | Print structures and mappings, mainly for statistics.
|
| |
| static int | load_dicts (char const *dict_dir, char const *protocol) |
| |
| int | main (int argc, char *argv[]) |
| |
| static void | raddict_export (uint64_t *count, uintptr_t *low, uintptr_t *high, fr_dict_t *dict) |
| |
| static void | usage (void) |
| |
Utility to print attribute data in tab delimited format.
- Id
- 646c727293efc6c076dc809c408f2a914fdbb3aa
- Copyright
- 2017 The FreeRADIUS server project
-
2017 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
Definition in file radict.c.
◆ CHECK_TYPE
Value:do { \
fprintf(stderr,
"%s is not a struct or tlv\n",
parent->name); \
return; \
} \
} while (0)
#define fr_exit(_x)
Exit, producing a log message in debug builds.
@ FR_TYPE_TLV
Contains nested attributes.
@ FR_TYPE_STRUCT
like TLV, but without T or L, and fixed-width children
static bool children_ok(fr_dict_attr_t const *parent)
Definition at line 419 of file radict.c.
◆ DEBUG
◆ DEBUG2
◆ ENUM_NAME
Map data types to enum names representing those types.
Definition at line 528 of file radict.c.
◆ INFO
◆ da_print_func_t
◆ radict_out_t
| Enumerator |
|---|
| RADICT_OUT_INVALID | |
| RADICT_OUT_FANCY | |
| RADICT_OUT_CSV | |
| RADICT_OUT_DICT | |
| RADICT_OUT_STRUCT | |
| RADICT_OUT_STATS_LINK | |
| RADICT_OUT_BASE_C_DA_DEF | |
| RADICT_OUT_ATTR_AUTOLOAD | |
| RADICT_OUT_STATS_H | |
Definition at line 40 of file radict.c.
◆ _raddict_export()
| static void _raddict_export |
( |
fr_dict_t const * |
dict, |
|
|
uint64_t * |
count, |
|
|
uintptr_t * |
low, |
|
|
uintptr_t * |
high, |
|
|
fr_dict_attr_t const * |
da, |
|
|
unsigned int |
lvl |
|
) |
| |
|
static |
◆ children_ok()
◆ da_normalize_name()
| static void da_normalize_name |
( |
fr_dict_attr_t const * |
da, |
|
|
char |
buffer[static FR_DICT_ATTR_MAX_NAME_LEN+1] |
|
) |
| |
|
static |
◆ da_print_attr_autoload()
| static void da_print_attr_autoload |
( |
FILE * |
fp, |
|
|
fr_dict_attr_t const * |
parent |
|
) |
| |
|
static |
◆ da_print_base_c_da_def()
| static void da_print_base_c_da_def |
( |
FILE * |
fp, |
|
|
fr_dict_attr_t const * |
parent |
|
) |
| |
|
static |
◆ da_print_info()
◆ da_print_name()
◆ da_print_stats_h()
| static void da_print_stats_h |
( |
FILE * |
fp, |
|
|
fr_dict_attr_t const * |
parent |
|
) |
| |
|
static |
◆ da_print_stats_link()
| static void da_print_stats_link |
( |
FILE * |
fp, |
|
|
fr_dict_attr_t const * |
parent |
|
) |
| |
|
static |
◆ da_print_struct()
| static void da_print_struct |
( |
FILE * |
fp, |
|
|
fr_dict_attr_t const * |
parent |
|
) |
| |
|
static |
Print structures and mappings, mainly for statistics.
Definition at line 430 of file radict.c.
◆ load_dicts()
| static int load_dicts |
( |
char const * |
dict_dir, |
|
|
char const * |
protocol |
|
) |
| |
|
static |
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ raddict_export()
| static void raddict_export |
( |
uint64_t * |
count, |
|
|
uintptr_t * |
low, |
|
|
uintptr_t * |
high, |
|
|
fr_dict_t * |
dict |
|
) |
| |
|
static |
◆ usage()
| static void usage |
( |
void |
| ) |
|
|
static |
◆ dict_end
◆ dicts
◆ format_table
Initial value:= {
}
#define L(_str)
Helper for initialising arrays of string literals.
@ RADICT_OUT_ATTR_AUTOLOAD
@ RADICT_OUT_BASE_C_DA_DEF
Definition at line 728 of file radict.c.
◆ format_table_len
◆ fr_type_to_enum_name
| char const* fr_type_to_enum_name[] |
|
static |
◆ function_table
Initial value:= {
}
static void da_print_struct(FILE *fp, fr_dict_attr_t const *parent)
Print structures and mappings, mainly for statistics.
static void da_print_stats_link(FILE *fp, fr_dict_attr_t const *parent)
static void da_print_stats_h(FILE *fp, fr_dict_attr_t const *parent)
static void da_print_attr_autoload(FILE *fp, fr_dict_attr_t const *parent)
static void da_print_base_c_da_def(FILE *fp, fr_dict_attr_t const *parent)
Definition at line 740 of file radict.c.
◆ function_table_len
◆ length_to_c_type
| char const* length_to_c_type[] |
|
static |
Initial value:= {
[2] = "uint16_t",
[4] = "uint32_t",
[8] = "uint64_t",
}
Definition at line 316 of file radict.c.
◆ mib
◆ output_format
◆ parent_oid
| char const* parent_oid = NULL |
|
static |
◆ print_headers
| bool print_headers = false |
|
static |
◆ print_recursive
| bool print_recursive = false |
|
static |
◆ print_values
| bool print_values = false |
|
static |
◆ spaces
◆ type_allowed
Initial value:= {
}
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
@ FR_TYPE_IPV4_ADDR
32 Bit IPv4 Address.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_UINT16
16 Bit unsigned integer.
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_UINT64
64 Bit unsigned integer.
@ FR_TYPE_IPV6_ADDR
128 Bit IPv6 Address.
@ FR_TYPE_OCTETS
Raw octets.
Definition at line 391 of file radict.c.
◆ type_to_c_type
| char const* type_to_c_type[] |
|
static |
Initial value:= {
}
@ FR_TYPE_INT8
8 Bit signed integer.
@ FR_TYPE_MAX
Number of defined data types.
@ FR_TYPE_INT64
64 Bit signed integer.
@ FR_TYPE_INT16
16 Bit signed integer.
@ FR_TYPE_UINT8
8 Bit unsigned integer.
@ FR_TYPE_INT32
32 Bit signed integer.
Definition at line 290 of file radict.c.