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

Register escape/unescape xlat functions. More...

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

Go to the source code of this file.

Data Structures

struct  rlm_escape_t
 

Functions

static xlat_action_t escape_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Equivalent to the old safe_characters functionality in rlm_sql but with utf8 support. More...
 
static int mod_bootstrap (module_inst_ctx_t const *mctx)
 
static xlat_action_t unescape_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 Equivalent to the old safe_characters functionality in rlm_sql. More...
 

Variables

static xlat_arg_parser_t const escape_xlat_arg []
 
static char const hextab [] = "0123456789abcdef"
 
static const conf_parser_t module_config []
 
module_rlm_t rlm_escape
 
static xlat_arg_parser_t const unescape_xlat_arg []
 

Detailed Description

Register escape/unescape xlat functions.

Id
4a9d6b2cb0673e0aadc59954b4705abb9c329658

Definition in file rlm_escape.c.


Data Structure Documentation

◆ rlm_escape_t

struct rlm_escape_t

Definition at line 39 of file rlm_escape.c.

Data Fields
char const * allowed_chars

Function Documentation

◆ mod_bootstrap()

static int mod_bootstrap ( module_inst_ctx_t const *  mctx)
static

Definition at line 194 of file rlm_escape.c.

+ Here is the call graph for this function:

Variable Documentation

◆ escape_xlat_arg

xlat_arg_parser_t const escape_xlat_arg[]
static
Initial value:
= {
{ .required = true, .concat = 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 50 of file rlm_escape.c.

◆ hextab

char const hextab[] = "0123456789abcdef"
static

Definition at line 48 of file rlm_escape.c.

◆ module_config

const conf_parser_t module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("safe_characters", rlm_escape_t, allowed_chars), .dflt = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /" },
}
#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 43 of file rlm_escape.c.

◆ rlm_escape

module_rlm_t rlm_escape
Initial value:
= {
.common = {
.name = "escape",
.inst_size = sizeof(rlm_escape_t),
.bootstrap = mod_bootstrap
}
}
#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_bootstrap(module_inst_ctx_t const *mctx)
Definition: rlm_escape.c:194
static const conf_parser_t module_config[]
Definition: rlm_escape.c:43

Definition at line 219 of file rlm_escape.c.

◆ unescape_xlat_arg

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

Definition at line 124 of file rlm_escape.c.