The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Enumerations | Functions | Variables
radict.c File Reference

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>
+ Include dependency graph for radict.c:

Go to the source code of this file.

Macros

#define DEBUG(fmt, ...)   if (fr_log_fp && (fr_debug_lvl > 1)) fprintf(fr_log_fp , fmt "\n", ## __VA_ARGS__)
 
#define DEBUG2(fmt, ...)   if (fr_log_fp && (fr_debug_lvl > 2)) fprintf(fr_log_fp , fmt "\n", ## __VA_ARGS__)
 
#define INFO(fmt, ...)   if (fr_log_fp && (fr_debug_lvl > 0)) fprintf(fr_log_fp , fmt "\n", ## __VA_ARGS__)
 

Enumerations

enum  radict_out_t {
  RADICT_OUT_FANCY = 1 ,
  RADICT_OUT_CSV
}
 

Functions

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 void da_print_info_td (fr_dict_t const *dict, fr_dict_attr_t const *da)
 
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)
 

Variables

static fr_dict_t ** dict_end = dicts
 
static fr_dict_tdicts [255]
 
static radict_out_t output_format = RADICT_OUT_FANCY
 
static bool print_headers = false
 
static bool print_values = false
 

Detailed Description

Utility to print attribute data in tab delimited format.

Id
0934122f6e55427387b7637585df9e33b1c5fafe

Definition in file radict.c.

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   fmt,
  ... 
)    if (fr_log_fp && (fr_debug_lvl > 1)) fprintf(fr_log_fp , fmt "\n", ## __VA_ARGS__)

Definition at line 53 of file radict.c.

◆ DEBUG2

#define DEBUG2 (   fmt,
  ... 
)    if (fr_log_fp && (fr_debug_lvl > 2)) fprintf(fr_log_fp , fmt "\n", ## __VA_ARGS__)

Definition at line 52 of file radict.c.

◆ INFO

#define INFO (   fmt,
  ... 
)    if (fr_log_fp && (fr_debug_lvl > 0)) fprintf(fr_log_fp , fmt "\n", ## __VA_ARGS__)

Definition at line 54 of file radict.c.

Enumeration Type Documentation

◆ radict_out_t

Enumerator
RADICT_OUT_FANCY 
RADICT_OUT_CSV 

Definition at line 40 of file radict.c.

Function Documentation

◆ _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

Definition at line 234 of file radict.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ da_print_info_td()

static void da_print_info_td ( fr_dict_t const *  dict,
fr_dict_attr_t const *  da 
)
static

Definition at line 150 of file radict.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_dicts()

static int load_dicts ( char const *  dict_dir,
char const *  protocol 
)
static

Definition at line 71 of file radict.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 288 of file radict.c.

◆ raddict_export()

static void raddict_export ( uint64_t *  count,
uintptr_t *  low,
uintptr_t *  high,
fr_dict_t dict 
)
static

Definition at line 275 of file radict.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ usage()

static void usage ( void  )
static

Definition at line 57 of file radict.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ dict_end

fr_dict_t** dict_end = dicts
static

Definition at line 49 of file radict.c.

◆ dicts

fr_dict_t* dicts[255]
static

Definition at line 45 of file radict.c.

◆ output_format

radict_out_t output_format = RADICT_OUT_FANCY
static

Definition at line 48 of file radict.c.

◆ print_headers

bool print_headers = false
static

Definition at line 47 of file radict.c.

◆ print_values

bool print_values = false
static

Definition at line 46 of file radict.c.