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

Retrieve attributes from a dict. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/server/log.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/sbuff.h>
#include <freeradius-devel/util/value.h>
#include <freeradius-devel/unlang/xlat.h>
#include <freeradius-devel/unlang/xlat_func.h>
+ Include dependency graph for rlm_dict.c:

Go to the source code of this file.

Macros

#define XLAT_REGISTER(_name, _func, _type, _args)
 

Functions

static int mod_load (void)
 
static void mod_unload (void)
 
static xlat_action_t xlat_attr (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Return the attribute name of an attribute reference. More...
 
static xlat_action_t xlat_attr_num (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Return the attribute number of an attribute reference. More...
 
static xlat_action_t xlat_attr_oid (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Return the attribute number of an attribute reference. More...
 
static xlat_action_t xlat_attr_type (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Return the data type of an attribute reference. More...
 
static xlat_action_t xlat_dict_attr_by_num (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Xlat for attr_by_num(<number>) More...
 
static xlat_action_t xlat_dict_attr_by_oid (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Xlat for attr_by_oid(<oid>) More...
 
static xlat_action_t xlat_vendor (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Return the vendor of an attribute reference. More...
 
static xlat_action_t xlat_vendor_num (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Return the vendor number of an attribute reference. More...
 

Variables

module_rlm_t rlm_dict
 
static xlat_arg_parser_t const xlat_attr_args []
 
static xlat_arg_parser_t const xlat_attr_num_args []
 
static xlat_arg_parser_t const xlat_attr_oid_args []
 
static xlat_arg_parser_t const xlat_dict_attr_by_num_args []
 
static xlat_arg_parser_t const xlat_dict_attr_by_oid_args []
 
static xlat_arg_parser_t const xlat_vendor_args []
 
static xlat_arg_parser_t const xlat_vendor_num_args []
 

Detailed Description

Retrieve attributes from a dict.

Id
514598e551e7ae91e15b6aaf930aac2d3613edd5

Definition in file rlm_dict.c.

Macro Definition Documentation

◆ XLAT_REGISTER

#define XLAT_REGISTER (   _name,
  _func,
  _type,
  _args 
)
Value:
if (unlikely(!(xlat = xlat_func_register(NULL, _name, _func, _type)))) return -1; \
xlat_func_args_set(xlat, _args)
#define unlikely(_x)
Definition: build.h:378
xlat_t * xlat_func_register(TALLOC_CTX *ctx, char const *name, xlat_func_t func, fr_type_t return_type)
Register an xlat function.
Definition: xlat_func.c:195

Definition at line 283 of file rlm_dict.c.

Function Documentation

◆ mod_load()

static int mod_load ( void  )
static

Definition at line 287 of file rlm_dict.c.

+ Here is the call graph for this function:

◆ mod_unload()

static void mod_unload ( void  )
static

Definition at line 302 of file rlm_dict.c.

+ Here is the call graph for this function:

Variable Documentation

◆ rlm_dict

module_rlm_t rlm_dict
Initial value:
= {
.common = {
.name = "dict",
.onload = mod_load,
.unload = mod_unload
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:65
static int mod_load(void)
Definition: rlm_dict.c:287
static void mod_unload(void)
Definition: rlm_dict.c:302

Definition at line 315 of file rlm_dict.c.

◆ xlat_attr_args

xlat_arg_parser_t const xlat_attr_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 167 of file rlm_dict.c.

◆ xlat_attr_num_args

xlat_arg_parser_t const xlat_attr_num_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
}

Definition at line 197 of file rlm_dict.c.

◆ xlat_attr_oid_args

xlat_arg_parser_t const xlat_attr_oid_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
}

Definition at line 223 of file rlm_dict.c.

◆ xlat_dict_attr_by_num_args

xlat_arg_parser_t const xlat_dict_attr_by_num_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_UINT32 },
}
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99

Definition at line 35 of file rlm_dict.c.

◆ xlat_dict_attr_by_oid_args

xlat_arg_parser_t const xlat_dict_attr_by_oid_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
}

Definition at line 69 of file rlm_dict.c.

◆ xlat_vendor_args

xlat_arg_parser_t const xlat_vendor_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
}

Definition at line 108 of file rlm_dict.c.

◆ xlat_vendor_num_args

xlat_arg_parser_t const xlat_vendor_num_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
}

Definition at line 142 of file rlm_dict.c.