The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Write plaintext versions of packets to flatfiles. More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/exfile.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/perm.h>
#include <ctype.h>
#include <fcntl.h>
#include <sys/stat.h>
Go to the source code of this file.
Data Structures | |
struct | rlm_detail_env_t |
struct | rlm_detail_t |
Instance configuration for rlm_detail. More... | |
Macros | |
#define | WRITE(fmt, ...) |
Functions | |
static int | call_env_filename_parse (TALLOC_CTX *ctx, void *out, tmpl_rules_t const *t_rules, CONF_ITEM *ci, call_env_ctx_t const *cec, UNUSED call_env_parser_t const *rule) |
static int | call_env_suppress_parse (TALLOC_CTX *ctx, call_env_parsed_head_t *out, tmpl_rules_t const *t_rules, CONF_ITEM *ci, UNUSED call_env_ctx_t const *cec, UNUSED call_env_parser_t const *rule) |
static int8_t | detail_cmp (void const *a, void const *b) |
static unlang_action_t | detail_do (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request, fr_packet_t *packet, fr_pair_list_t *list, bool compat) |
static void | detail_fr_pair_fprint (TALLOC_CTX *ctx, FILE *out, fr_pair_t const *stacked) |
int | detail_group_parse (UNUSED TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
int | detail_group_parse (UNUSED TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule) |
Generic function for parsing conf pair values as int. More... | |
static uint32_t | detail_hash (void const *data) |
static int | detail_write (FILE *out, rlm_detail_t const *inst, request_t *request, fr_value_box_t *header, fr_packet_t *packet, fr_pair_list_t *list, bool compat, fr_hash_table_t *ht) |
Write a single detail entry to file pointer. More... | |
static void | fr_pair_fprint (FILE *fp, fr_pair_t const *vp) |
Print one attribute and value to FP. More... | |
static unlang_action_t | mod_accounting (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
static unlang_action_t | mod_authorize (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
static unlang_action_t | mod_post_auth (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
Variables | |
static fr_dict_attr_t const * | attr_net |
static fr_dict_attr_t const * | attr_net_dst_address |
static fr_dict_attr_t const * | attr_net_dst_port |
static fr_dict_attr_t const * | attr_net_src_address |
static fr_dict_attr_t const * | attr_net_src_port |
static fr_dict_attr_t const * | attr_protocol |
static fr_dict_attr_t const * | attr_user_password |
static fr_dict_t const * | dict_freeradius |
static fr_dict_t const * | dict_radius |
static const call_env_method_t | method_env |
static const conf_parser_t | module_config [] |
module_rlm_t | rlm_detail |
fr_dict_autoload_t | rlm_detail_dict [] |
fr_dict_attr_autoload_t | rlm_detail_dict_attr [] |
Write plaintext versions of packets to flatfiles.
Definition in file rlm_detail.c.
struct rlm_detail_env_t |
Definition at line 63 of file rlm_detail.c.
Data Fields | ||
---|---|---|
fr_value_box_t | filename | File / path to write to. |
tmpl_t * | filename_tmpl | tmpl used to expand filename (for debug output) |
fr_value_box_t | header | Header format. |
fr_hash_table_t * | ht | Holds suppressed attributes. |
struct rlm_detail_t |
Instance configuration for rlm_detail.
Holds the configuration and preparsed data for a instance of rlm_detail.
Definition at line 49 of file rlm_detail.c.
Data Fields | ||
---|---|---|
exfile_t * | ef | Log file handler. |
bool | escape | do filename escaping, yes / no |
gid_t | group | Resolved group. |
bool | group_is_set | Whether group was set. |
bool | locking | Whether the file should be locked. |
bool | log_srcdst | Add IP src/dst attributes to entries. |
uint32_t | perm | Permissions to use for new files. |
|
static |
|
static |
|
static |
|
static |
Definition at line 323 of file rlm_detail.c.
|
static |
Definition at line 198 of file rlm_detail.c.
int detail_group_parse | ( | UNUSED TALLOC_CTX * | ctx, |
void * | out, | ||
void * | parent, | ||
CONF_ITEM * | ci, | ||
conf_parser_t const * | rule | ||
) |
int detail_group_parse | ( | UNUSED TALLOC_CTX * | ctx, |
void * | out, | ||
void * | parent, | ||
CONF_ITEM * | ci, | ||
UNUSED conf_parser_t const * | rule | ||
) |
Generic function for parsing conf pair values as int.
Definition at line 147 of file rlm_detail.c.
|
static |
Definition at line 167 of file rlm_detail.c.
|
static |
Write a single detail entry to file pointer.
[in] | out | Where to write entry. |
[in] | inst | Instance of rlm_detail. |
[in] | request | The current request. |
[in] | header | To print above packet |
[in] | packet | associated with the request (request, reply...). |
[in] | list | of pairs to write. |
[in] | compat | Write out entry in compatibility mode. |
[in] | ht | Hash table containing attributes to be suppressed in the output. |
Definition at line 222 of file rlm_detail.c.
|
static |
Print one attribute and value to FP.
Complete string with '\t' and '\n' is written to buffer before printing to avoid issues when running with multiple threads.
fp | to output to. |
vp | to print. |
Definition at line 125 of file rlm_detail.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 92 of file rlm_detail.c.
|
static |
Definition at line 94 of file rlm_detail.c.
|
static |
Definition at line 96 of file rlm_detail.c.
|
static |
Definition at line 93 of file rlm_detail.c.
|
static |
Definition at line 95 of file rlm_detail.c.
|
static |
Definition at line 97 of file rlm_detail.c.
|
static |
Definition at line 99 of file rlm_detail.c.
|
static |
Definition at line 82 of file rlm_detail.c.
|
static |
Definition at line 83 of file rlm_detail.c.
|
static |
Definition at line 490 of file rlm_detail.c.
|
static |
Definition at line 73 of file rlm_detail.c.
module_rlm_t rlm_detail |
Definition at line 504 of file rlm_detail.c.
fr_dict_autoload_t rlm_detail_dict |
Definition at line 86 of file rlm_detail.c.
fr_dict_attr_autoload_t rlm_detail_dict_attr |
Definition at line 102 of file rlm_detail.c.