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 *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
a6d3d24ae3a56d4e58240f819fd737b74c43c0fc

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 *  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_names = (module_method_name_t[]){
{ .name1 = CF_IDENT_ANY, .name2 = 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:65
Specifies a module method identifier.
Definition: module_method.c:36
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
@ MODULE_TYPE_THREAD_SAFE
Module is threadsafe.
Definition: module.h:49
#define MODULE_NAME_TERMINATOR
Definition: module.h:135

Definition at line 380 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.