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

Return preconfigured fixed rcodes. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/unlang/xlat_func.h>
+ Include dependency graph for rlm_always.c:

Go to the source code of this file.

Data Structures

struct  rlm_always_mutable_t
 
struct  rlm_always_t
 

Macros

#define LOG_PREFIX   mctx->mi->name
 

Functions

static xlat_action_t always_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Set module status or rcode. More...
 
static unlang_action_t mod_always_return (rlm_rcode_t *p_result, module_ctx_t const *mctx, UNUSED request_t *request)
 
static int mod_bootstrap (module_inst_ctx_t const *mctx)
 
static int mod_detach (module_detach_ctx_t const *mctx)
 
static int mod_instantiate (module_inst_ctx_t const *mctx)
 

Variables

static xlat_arg_parser_t const always_xlat_args []
 
static const conf_parser_t module_config []
 
module_rlm_t rlm_always
 

Detailed Description

Return preconfigured fixed rcodes.

Id
f954669b977ef0da53694bfe10ae3ed4889588f1

Definition in file rlm_always.c.


Data Structure Documentation

◆ rlm_always_mutable_t

struct rlm_always_mutable_t

Definition at line 41 of file rlm_always.c.

Data Fields
bool force If true, we force the rcode.
rlm_rcode_t rcode The integer constant representing rcode_str.

◆ rlm_always_t

struct rlm_always_t

Definition at line 50 of file rlm_always.c.

+ Collaboration diagram for rlm_always_t:
Data Fields
module_instance_t * mi
rlm_always_mutable_t * mutable
char const * rcode_str The base value.

Macro Definition Documentation

◆ LOG_PREFIX

#define LOG_PREFIX   mctx->mi->name

Definition at line 27 of file rlm_always.c.

Function Documentation

◆ always_xlat()

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

Set module status or rcode.

Look ma, no locks...

Example: db_status(fail)

Definition at line 75 of file rlm_always.c.

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

◆ mod_always_return()

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

Definition at line 130 of file rlm_always.c.

◆ mod_bootstrap()

static int mod_bootstrap ( module_inst_ctx_t const *  mctx)
static

Definition at line 173 of file rlm_always.c.

+ Here is the call graph for this function:

◆ mod_detach()

static int mod_detach ( module_detach_ctx_t const *  mctx)
static

Definition at line 137 of file rlm_always.c.

+ Here is the call graph for this function:

◆ mod_instantiate()

static int mod_instantiate ( module_inst_ctx_t const *  mctx)
static

Definition at line 145 of file rlm_always.c.

+ Here is the call graph for this function:

Variable Documentation

◆ always_xlat_args

xlat_arg_parser_t const always_xlat_args[]
static
Initial value:
= {
{ .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 64 of file rlm_always.c.

◆ module_config

const conf_parser_t module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("rcode", rlm_always_t, rcode_str), .dflt = "fail" },
}
#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

Definition at line 59 of file rlm_always.c.

◆ rlm_always

module_rlm_t rlm_always
Initial value:
= {
.common = {
.name = "always",
.inst_size = sizeof(rlm_always_t),
.bootstrap = mod_bootstrap,
.detach = mod_detach
},
.method_group = {
.bindings = (module_method_binding_t[]){
}
}
}
#define CF_IDENT_ANY
Definition: cf_util.h:78
#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)
Definition: rlm_always.c:137
static unlang_action_t mod_always_return(rlm_rcode_t *p_result, module_ctx_t const *mctx, UNUSED request_t *request)
Definition: rlm_always.c:130
static int mod_bootstrap(module_inst_ctx_t const *mctx)
Definition: rlm_always.c:173
static const conf_parser_t module_config[]
Definition: rlm_always.c:59
static int mod_instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_always.c:145
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 184 of file rlm_always.c.