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

Reads client definitions from flat files as required. More...

#include "lib/server/cf_util.h"
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/server/map_proc.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/unlang/xlat_func.h>
+ Include dependency graph for rlm_client.c:

Go to the source code of this file.

Data Structures

struct  client_get_vp_ctx_t
 Client field. More...
 

Functions

static int _map_proc_client_get_vp (TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, map_t const *map, void *uctx)
 
static unlang_action_t map_proc_client (rlm_rcode_t *p_result, UNUSED void const *mod_inst, UNUSED void *proc_inst, request_t *request, fr_value_box_list_t *client_override, map_list_t const *maps)
 Map multiple attributes from a client into the request. More...
 
static unlang_action_t mod_authorize (rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
 
static int mod_load (void)
 
static void mod_unload (void)
 
static xlat_action_t xlat_client (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 xlat to get client config data More...
 

Variables

module_rlm_t rlm_client
 
static xlat_arg_parser_t const xlat_client_args []
 

Detailed Description

Reads client definitions from flat files as required.

Id
b6fbff0dfcd0570fa97dfe40577d722a66276e8d

Definition in file rlm_client.c.


Data Structure Documentation

◆ client_get_vp_ctx_t

struct client_get_vp_ctx_t

Client field.

Definition at line 38 of file rlm_client.c.

+ Collaboration diagram for client_get_vp_ctx_t:
Data Fields
CONF_PAIR * cp First instance of the field in the client's CONF_SECTION.
CONF_SECTION * cs Client's CONF_SECTION.
char const * field Field name.

Function Documentation

◆ _map_proc_client_get_vp()

static int _map_proc_client_get_vp ( TALLOC_CTX *  ctx,
fr_pair_list_t out,
request_t request,
map_t const *  map,
void *  uctx 
)
static

Definition at line 44 of file rlm_client.c.

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

◆ map_proc_client()

static unlang_action_t map_proc_client ( rlm_rcode_t p_result,
UNUSED void const *  mod_inst,
UNUSED void *  proc_inst,
request_t request,
fr_value_box_list_t *  client_override,
map_list_t const *  maps 
)
static

Map multiple attributes from a client into the request.

Parameters
[out]p_resultResult of applying the map:
[in]mod_instNULL.
[in]proc_instNULL.
[in]requestThe current request.
[in]client_overrideIf NULL, use the current client, else use the client matching the ip given.
[in]mapsHead of the map list.
Returns
UNLANG_ACTION_CALCULATE_RESULT

Definition at line 119 of file rlm_client.c.

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

◆ mod_authorize()

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

Definition at line 291 of file rlm_client.c.

+ Here is the call graph for this function:

◆ mod_load()

static int mod_load ( void  )
static

Definition at line 353 of file rlm_client.c.

+ Here is the call graph for this function:

◆ mod_unload()

static void mod_unload ( void  )
static

Definition at line 365 of file rlm_client.c.

+ Here is the call graph for this function:

Variable Documentation

◆ rlm_client

module_rlm_t rlm_client
Initial value:
= {
.common = {
.name = "dynamic_clients",
.onload = mod_load,
.unload = mod_unload
},
.method_group = {
.bindings = (module_method_binding_t[]){
{ .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize },
}
}
}
#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 int mod_load(void)
Definition: rlm_client.c:353
static void mod_unload(void)
Definition: rlm_client.c:365
static unlang_action_t mod_authorize(rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
Definition: rlm_client.c:291
#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 381 of file rlm_client.c.

◆ xlat_client_args

xlat_arg_parser_t const xlat_client_args[]
static
Initial value:
= {
{ .required = true, .single = true, .type = FR_TYPE_STRING },
{ .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 219 of file rlm_client.c.