The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Functions | Variables
rlm_cache.c File Reference

Cache values and merge them back into future requests. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/server/modpriv.h>
#include <freeradius-devel/server/dl_module.h>
#include <freeradius-devel/server/rcode.h>
#include <freeradius-devel/server/tmpl.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/types.h>
#include <freeradius-devel/util/value.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include <freeradius-devel/unlang/call_env.h>
#include "rlm_cache.h"
+ Include dependency graph for rlm_cache.c:

Go to the source code of this file.

Data Structures

struct  cache_call_env_t
 
struct  cache_htrie_t
 

Macros

#define LOG_PREFIX   mctx->mi->name
 

Functions

static int cache_acquire (rlm_cache_handle_t **out, rlm_cache_t const *inst, request_t *request)
 Get exclusive use of a handle to access the cache. More...
 
static rlm_cache_entry_tcache_alloc (rlm_cache_t const *inst, request_t *request)
 Allocate a cache entry. More...
 
static unlang_action_t cache_expire (rlm_rcode_t *p_result, rlm_cache_t const *inst, request_t *request, rlm_cache_handle_t **handle, fr_value_box_t const *key)
 Expire a cache entry (removing it from the datastore) More...
 
static unlang_action_t cache_find (rlm_rcode_t *p_result, rlm_cache_entry_t **out, rlm_cache_t const *inst, request_t *request, rlm_cache_handle_t **handle, fr_value_box_t const *key)
 Find a cached entry. More...
 
static void cache_free (rlm_cache_t const *inst, rlm_cache_entry_t **c)
 Free memory associated with a cache entry. More...
 
static unlang_action_t cache_insert (rlm_rcode_t *p_result, rlm_cache_t const *inst, request_t *request, rlm_cache_handle_t **handle, fr_value_box_t const *key, map_list_t const *maps, fr_time_delta_t ttl)
 Create and insert a cache entry. More...
 
static int cache_key_parse (TALLOC_CTX *ctx, void *out, tmpl_rules_t const *t_rules, CONF_ITEM *ci, call_env_ctx_t const *cec, call_env_parser_t const *rule)
 
static rlm_rcode_t cache_merge (rlm_cache_t const *inst, request_t *request, rlm_cache_entry_t *c)
 Merge a cached entry into a request_t. More...
 
static int cache_reconnect (rlm_cache_handle_t **handle, rlm_cache_t const *inst, request_t *request)
 Reconnect an suspected inviable handle. More...
 
static void cache_release (rlm_cache_t const *inst, request_t *request, rlm_cache_handle_t **handle)
 Release a handle we previously acquired. More...
 
static unlang_action_t cache_set_ttl (rlm_rcode_t *p_result, rlm_cache_t const *inst, request_t *request, rlm_cache_handle_t **handle, rlm_cache_entry_t *c)
 Update the TTL of an entry. More...
 
static xlat_action_t cache_ttl_get_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, UNUSED fr_value_box_list_t *in)
 
static void cache_unref (request_t *request, rlm_cache_t const *inst, rlm_cache_entry_t *entry, rlm_cache_handle_t *handle)
 Release the allocated resources and cleanup the avps. More...
 
static int cache_update_section_parse (TALLOC_CTX *ctx, call_env_parsed_head_t *out, tmpl_rules_t const *t_rules, CONF_ITEM *ci, call_env_ctx_t const *cec, call_env_parser_t const *rule)
 
static int cache_update_section_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 int cache_verify (map_t *map, void *uctx)
 Verify that a map in the cache section makes sense. More...
 
static xlat_action_t cache_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Allow single attribute values to be retrieved from the cache. More...
 
static int mod_bootstrap (module_inst_ctx_t const *mctx)
 Register module xlats. More...
 
static unlang_action_t mod_cache_it (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Do caching checks. More...
 
static int mod_detach (module_detach_ctx_t const *mctx)
 Free any memory allocated under the instance. More...
 
static int mod_instantiate (module_inst_ctx_t const *mctx)
 Create a new rlm_cache_instance. More...
 
static unlang_action_t mod_method_clear (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Delete the entries by ${key}. More...
 
static unlang_action_t mod_method_load (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Load the avps by ${key}. More...
 
static unlang_action_t mod_method_status (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Get the status by ${key} (without load) More...
 
static unlang_action_t mod_method_store (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Create, or update a cache entry. More...
 
static unlang_action_t mod_method_ttl (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Change the TTL on an existing entry. More...
 
static unlang_action_t mod_method_update (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Create, or update a cache entry. More...
 
int submodule_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
 

Variables

static fr_dict_attr_t const * attr_cache_allow_insert
 
static fr_dict_attr_t const * attr_cache_allow_merge
 
static fr_dict_attr_t const * attr_cache_entry_hits
 
static fr_dict_attr_t const * attr_cache_merge_new
 
static fr_dict_attr_t const * attr_cache_status_only
 
static fr_dict_attr_t const * attr_cache_ttl
 
static const call_env_method_t cache_method_env
 
static xlat_arg_parser_t const cache_xlat_args []
 
static fr_dict_t const * dict_freeradius
 
static const conf_parser_t module_config []
 
module_rlm_t rlm_cache
 
fr_dict_autoload_t rlm_cache_dict []
 
fr_dict_attr_autoload_t rlm_cache_dict_attr []
 

Detailed Description

Cache values and merge them back into future requests.

Id
bddb466012355efd65b87ad783c546339d8d0943

Definition in file rlm_cache.c.


Data Structure Documentation

◆ cache_call_env_t

struct cache_call_env_t

Definition at line 61 of file rlm_cache.c.

+ Collaboration diagram for cache_call_env_t:
Data Fields
fr_value_box_t * key To lookup the cache entry with.
map_list_t * maps Attribute map applied to cache entries.

◆ cache_htrie_t

struct cache_htrie_t

Definition at line 66 of file rlm_cache.c.

Data Fields
fr_type_t ktype Key type.

Macro Definition Documentation

◆ LOG_PREFIX

#define LOG_PREFIX   mctx->mi->name

Definition at line 27 of file rlm_cache.c.

Function Documentation

◆ cache_acquire()

static int cache_acquire ( rlm_cache_handle_t **  out,
rlm_cache_t const *  inst,
request_t request 
)
static

Get exclusive use of a handle to access the cache.

Definition at line 167 of file rlm_cache.c.

+ Here is the caller graph for this function:

◆ cache_alloc()

static rlm_cache_entry_t* cache_alloc ( rlm_cache_t const *  inst,
request_t request 
)
static

Allocate a cache entry.

This is used so that drivers may use their own allocation functions to allocate structures larger than the normal rlm_cache_entry_t.

If the driver doesn't specify a custom allocation function, the cache entry is talloced in the NULL ctx.

Definition at line 207 of file rlm_cache.c.

+ Here is the caller graph for this function:

◆ cache_expire()

static unlang_action_t cache_expire ( rlm_rcode_t p_result,
rlm_cache_t const *  inst,
request_t request,
rlm_cache_handle_t **  handle,
fr_value_box_t const *  key 
)
static

Expire a cache entry (removing it from the datastore)

Returns

Definition at line 359 of file rlm_cache.c.

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

◆ cache_find()

static unlang_action_t cache_find ( rlm_rcode_t p_result,
rlm_cache_entry_t **  out,
rlm_cache_t const *  inst,
request_t request,
rlm_cache_handle_t **  handle,
fr_value_box_t const *  key 
)
static

Find a cached entry.

Returns

Definition at line 289 of file rlm_cache.c.

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

◆ cache_free()

static void cache_free ( rlm_cache_t const *  inst,
rlm_cache_entry_t **  c 
)
static

Free memory associated with a cache entry.

This does not necessarily remove the entry from the cache, cache_expire should be used for that.

This function should be called when an entry that is known to have been retrieved or inserted into a data store successfully, is no longer needed.

Some drivers (like rlm_cache_rbtree) don't register a free function. This means that the cache entry never needs to be explicitly freed.

Parameters
[in]instModule instance.
[in,out]cCache entry to free.

Definition at line 228 of file rlm_cache.c.

+ Here is the caller graph for this function:

◆ cache_insert()

static unlang_action_t cache_insert ( rlm_rcode_t p_result,
rlm_cache_t const *  inst,
request_t request,
rlm_cache_handle_t **  handle,
fr_value_box_t const *  key,
map_list_t const *  maps,
fr_time_delta_t  ttl 
)
static

Create and insert a cache entry.

Returns

Definition at line 387 of file rlm_cache.c.

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

◆ cache_key_parse()

static int cache_key_parse ( TALLOC_CTX *  ctx,
void *  out,
tmpl_rules_t const *  t_rules,
CONF_ITEM ci,
call_env_ctx_t const *  cec,
call_env_parser_t const *  rule 
)
static

Definition at line 120 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ cache_merge()

static rlm_rcode_t cache_merge ( rlm_cache_t const *  inst,
request_t request,
rlm_cache_entry_t c 
)
static

Merge a cached entry into a request_t.

Returns

Definition at line 243 of file rlm_cache.c.

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

◆ cache_reconnect()

static int cache_reconnect ( rlm_cache_handle_t **  handle,
rlm_cache_t const *  inst,
request_t request 
)
static

Reconnect an suspected inviable handle.

Definition at line 192 of file rlm_cache.c.

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

◆ cache_release()

static void cache_release ( rlm_cache_t const *  inst,
request_t request,
rlm_cache_handle_t **  handle 
)
static

Release a handle we previously acquired.

Definition at line 180 of file rlm_cache.c.

+ Here is the caller graph for this function:

◆ cache_set_ttl()

static unlang_action_t cache_set_ttl ( rlm_rcode_t p_result,
rlm_cache_t const *  inst,
request_t request,
rlm_cache_handle_t **  handle,
rlm_cache_entry_t c 
)
static

Update the TTL of an entry.

Returns

Definition at line 564 of file rlm_cache.c.

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

◆ cache_ttl_get_xlat()

static xlat_action_t cache_ttl_get_xlat ( TALLOC_CTX *  ctx,
fr_dcursor_t out,
xlat_ctx_t const *  xctx,
request_t request,
UNUSED fr_value_box_list_t *  in 
)
static

Definition at line 960 of file rlm_cache.c.

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

◆ cache_unref()

static void cache_unref ( request_t request,
rlm_cache_t const *  inst,
rlm_cache_entry_t entry,
rlm_cache_handle_t handle 
)
static

Release the allocated resources and cleanup the avps.

Definition at line 1000 of file rlm_cache.c.

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

◆ cache_update_section_parse() [1/2]

static int cache_update_section_parse ( TALLOC_CTX *  ctx,
call_env_parsed_head_t *  out,
tmpl_rules_t const *  t_rules,
CONF_ITEM ci,
call_env_ctx_t const *  cec,
call_env_parser_t const *  rule 
)
static

◆ cache_update_section_parse() [2/2]

static int cache_update_section_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

Definition at line 1419 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ cache_verify()

static int cache_verify ( map_t map,
void *  uctx 
)
static

Verify that a map in the cache section makes sense.

Definition at line 1407 of file rlm_cache.c.

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

◆ mod_bootstrap()

static int mod_bootstrap ( module_inst_ctx_t const *  mctx)
static

Register module xlats.

Definition at line 1482 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_cache_it()

static unlang_action_t mod_cache_it ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Do caching checks.

Since we can update ANY VP list, we do exactly the same thing for all sections (autz / auth / etc.)

If you want to cache something different in different sections, configure another cache module.

Definition at line 620 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_detach()

static int mod_detach ( module_detach_ctx_t const *  mctx)
static

Free any memory allocated under the instance.

Definition at line 1387 of file rlm_cache.c.

◆ mod_instantiate()

static int mod_instantiate ( module_inst_ctx_t const *  mctx)
static

Create a new rlm_cache_instance.

Definition at line 1453 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_method_clear()

static unlang_action_t mod_method_clear ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Delete the entries by ${key}.

Returns

Definition at line 1279 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_method_load()

static unlang_action_t mod_method_load ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Load the avps by ${key}.

Returns

Definition at line 1082 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_method_status()

static unlang_action_t mod_method_status ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Get the status by ${key} (without load)

Returns

Definition at line 1044 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_method_store()

static unlang_action_t mod_method_store ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Create, or update a cache entry.

Returns

Definition at line 1212 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_method_ttl()

static unlang_action_t mod_method_ttl ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Change the TTL on an existing entry.

Returns

Definition at line 1323 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ mod_method_update()

static unlang_action_t mod_method_update ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Create, or update a cache entry.

Returns

Definition at line 1124 of file rlm_cache.c.

+ Here is the call graph for this function:

◆ submodule_parse()

int submodule_parse ( TALLOC_CTX *  ctx,
void *  out,
void *  parent,
CONF_ITEM ci,
conf_parser_t const *  rule 
)

Definition at line 106 of file rlm_cache.c.

+ Here is the call graph for this function:

Variable Documentation

◆ attr_cache_allow_insert

fr_dict_attr_t const* attr_cache_allow_insert
static

Definition at line 91 of file rlm_cache.c.

◆ attr_cache_allow_merge

fr_dict_attr_t const* attr_cache_allow_merge
static

Definition at line 90 of file rlm_cache.c.

◆ attr_cache_entry_hits

fr_dict_attr_t const* attr_cache_entry_hits
static

Definition at line 93 of file rlm_cache.c.

◆ attr_cache_merge_new

fr_dict_attr_t const* attr_cache_merge_new
static

Definition at line 88 of file rlm_cache.c.

◆ attr_cache_status_only

fr_dict_attr_t const* attr_cache_status_only
static

Definition at line 89 of file rlm_cache.c.

◆ attr_cache_ttl

fr_dict_attr_t const* attr_cache_ttl
static

Definition at line 92 of file rlm_cache.c.

◆ cache_method_env

const call_env_method_t cache_method_env
static
Initial value:
= {
.env = (call_env_parser_t[]) {
}
}
#define CALL_ENV_TERMINATOR
Definition: call_env.h:231
#define FR_CALL_ENV_METHOD_OUT(_inst)
Helper macro for populating the size/type fields of a call_env_method_t from the output structure typ...
Definition: call_env.h:235
@ CALL_ENV_FLAG_NONE
Definition: call_env.h:74
@ CALL_ENV_FLAG_REQUIRED
Associated conf pair or section is required.
Definition: call_env.h:75
#define FR_CALL_ENV_SUBSECTION_FUNC(_name, _name2, _flags, _func)
Specify a call_env_parser_t which parses a subsection using a callback function.
Definition: call_env.h:407
#define FR_CALL_ENV_OFFSET(_name, _cast_type, _flags, _struct, _field)
Specify a call_env_parser_t which writes out runtime results to the specified field.
Definition: call_env.h:335
Per method call config.
Definition: call_env.h:175
#define CF_IDENT_ANY
Definition: cf_util.h:78
@ FR_TYPE_VOID
User data.
Definition: merged_model.c:127
static int cache_key_parse(TALLOC_CTX *ctx, void *out, tmpl_rules_t const *t_rules, CONF_ITEM *ci, call_env_ctx_t const *cec, call_env_parser_t const *rule)
Definition: rlm_cache.c:120
static int cache_update_section_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *out, tmpl_rules_t const *t_rules, CONF_ITEM *ci, call_env_ctx_t const *cec, call_env_parser_t const *rule)

Definition at line 71 of file rlm_cache.c.

◆ cache_xlat_args

xlat_arg_parser_t const cache_xlat_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
}
@ FR_TYPE_STRING
String of printable characters.
Definition: merged_model.c:83
#define XLAT_ARG_PARSER_TERMINATOR
Definition: xlat.h:166

Definition at line 878 of file rlm_cache.c.

◆ dict_freeradius

fr_dict_t const* dict_freeradius
static

Definition at line 80 of file rlm_cache.c.

◆ module_config

const conf_parser_t module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET_TYPE_FLAGS("driver", FR_TYPE_VOID, 0, rlm_cache_t, driver_submodule), .dflt = "rbtree",
.func = submodule_parse },
{ FR_CONF_OFFSET("ttl", rlm_cache_config_t, ttl), .dflt = "500s" },
{ FR_CONF_OFFSET("max_entries", rlm_cache_config_t, max_entries), .dflt = "0" },
{ FR_CONF_OFFSET("epoch", rlm_cache_config_t, epoch), .dflt = "0" },
{ FR_CONF_OFFSET("add_stats", rlm_cache_config_t, stats), .dflt = "no" },
}
#define CONF_PARSER_TERMINATOR
Definition: cf_parse.h:627
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:268
#define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:241
static rc_stats_t stats
Definition: radclient-ng.c:74
int submodule_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
Definition: rlm_cache.c:106
Configuration for the rlm_cache module.
Definition: rlm_cache.h:51

Definition at line 49 of file rlm_cache.c.

◆ rlm_cache

module_rlm_t rlm_cache
Initial value:
= {
.common = {
.name = "cache",
.inst_size = sizeof(rlm_cache_t),
.bootstrap = mod_bootstrap,
.detach = mod_detach
},
.method_group = {
.bindings = (module_method_binding_t[]){
{ .section = SECTION_NAME("clear", CF_IDENT_ANY), .method = mod_method_clear, .method_env = &cache_method_env },
{ .section = SECTION_NAME("load", CF_IDENT_ANY), .method = mod_method_load, .method_env = &cache_method_env },
{ .section = SECTION_NAME("status", CF_IDENT_ANY), .method = mod_method_status, .method_env = &cache_method_env },
{ .section = SECTION_NAME("store", CF_IDENT_ANY), .method = mod_method_store, .method_env = &cache_method_env },
{ .section = SECTION_NAME("ttl", CF_IDENT_ANY), .method = mod_method_ttl, .method_env = &cache_method_env },
{ .section = SECTION_NAME("update", CF_IDENT_ANY), .method = mod_method_update, .method_env = &cache_method_env },
{ .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_cache_it, .method_env = &cache_method_env },
}
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:63
static const conf_parser_t config[]
Definition: base.c:183
static int mod_detach(module_detach_ctx_t const *mctx)
Free any memory allocated under the instance.
Definition: rlm_cache.c:1387
static unlang_action_t mod_method_update(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Create, or update a cache entry.
Definition: rlm_cache.c:1124
static unlang_action_t mod_method_ttl(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Change the TTL on an existing entry.
Definition: rlm_cache.c:1323
static unlang_action_t mod_cache_it(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Do caching checks.
Definition: rlm_cache.c:620
static int mod_bootstrap(module_inst_ctx_t const *mctx)
Register module xlats.
Definition: rlm_cache.c:1482
static unlang_action_t mod_method_status(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Get the status by ${key} (without load)
Definition: rlm_cache.c:1044
static unlang_action_t mod_method_store(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Create, or update a cache entry.
Definition: rlm_cache.c:1212
static unlang_action_t mod_method_load(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Load the avps by ${key}.
Definition: rlm_cache.c:1082
static const call_env_method_t cache_method_env
Definition: rlm_cache.c:71
static const conf_parser_t module_config[]
Definition: rlm_cache.c:49
static unlang_action_t mod_method_clear(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Delete the entries by ${key}.
Definition: rlm_cache.c:1279
static int mod_instantiate(module_inst_ctx_t const *mctx)
Create a new rlm_cache_instance.
Definition: rlm_cache.c:1453
static int instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_rest.c:1302
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
Definition: section.h:40
#define MODULE_BINDING_TERMINATOR
Terminate a module binding list.
Definition: module.h:151
Named methods exported by a module.
Definition: module.h:173

Definition at line 1508 of file rlm_cache.c.

◆ rlm_cache_dict

fr_dict_autoload_t rlm_cache_dict
Initial value:
= {
{ .out = &dict_freeradius, .proto = "freeradius" },
{ NULL }
}
static fr_dict_t const * dict_freeradius
Definition: rlm_cache.c:80

Definition at line 83 of file rlm_cache.c.

◆ rlm_cache_dict_attr

fr_dict_attr_autoload_t rlm_cache_dict_attr
Initial value:
= {
{ .out = &attr_cache_merge_new, .name = "Cache-Merge-New", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
{ .out = &attr_cache_status_only, .name = "Cache-Status-Only", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
{ .out = &attr_cache_allow_merge, .name = "Cache-Allow-Merge", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
{ .out = &attr_cache_allow_insert, .name = "Cache-Allow-Insert", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
{ .out = &attr_cache_ttl, .name = "Cache-TTL", .type = FR_TYPE_INT32, .dict = &dict_freeradius },
{ .out = &attr_cache_entry_hits, .name = "Cache-Entry-Hits", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
{ NULL }
}
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
@ FR_TYPE_INT32
32 Bit signed integer.
Definition: merged_model.c:105
@ FR_TYPE_BOOL
A truth value.
Definition: merged_model.c:95
static fr_dict_attr_t const * attr_cache_allow_merge
Definition: rlm_cache.c:90
static fr_dict_attr_t const * attr_cache_ttl
Definition: rlm_cache.c:92
static fr_dict_attr_t const * attr_cache_merge_new
Definition: rlm_cache.c:88
static fr_dict_attr_t const * attr_cache_allow_insert
Definition: rlm_cache.c:91
static fr_dict_attr_t const * attr_cache_status_only
Definition: rlm_cache.c:89
static fr_dict_attr_t const * attr_cache_entry_hits
Definition: rlm_cache.c:93

Definition at line 96 of file rlm_cache.c.