24 RCSID(
"$Id: ada9f2de91c0d12ee681d7c0ef86de1757f07a65 $")
26 #include <freeradius-devel/server/base.h>
27 #include <freeradius-devel/server/module_rlm.h>
28 #include <freeradius-devel/unlang/xlat_func.h>
115 if (
inst->use_std3_ascii_rules) {
116 flags |= IDNA_USE_STD3_ASCII_RULES;
118 if (
inst->allow_unassigned) {
119 flags |= IDNA_ALLOW_UNASSIGNED;
122 res = idna_to_ascii_8z(arg->vb_strvalue, &idna, flags);
128 REDEBUG(
"%s", idna_strerror(res));
137 REDEBUG(
"Conversion was truncated");
#define CONF_PARSER_TERMINATOR
#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
Defines a CONF_PAIR to C data type mapping.
static int fr_dcursor_append(fr_dcursor_t *cursor, void *v)
Insert a single item at the end of the list.
void *_CONST data
Module instance's parsed configuration.
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static xlat_action_t xlat_idna(TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
Convert domain name to ASCII punycode.
@ FR_TYPE_STRING
String of printable characters.
dl_module_inst_t const * inst
Dynamic loader API handle for the module.
dl_module_inst_t const * inst
Dynamic loader API handle for the module.
Temporary structure to hold arguments for instantiation calls.
module_t common
Common fields presented by all modules.
static const conf_parser_t config[]
bool use_std3_ascii_rules
static xlat_arg_parser_t const xlat_idna_arg[]
static int mod_bootstrap(module_inst_ctx_t const *mctx)
static const conf_parser_t mod_config[]
@ MODULE_TYPE_THREAD_SAFE
Module is threadsafe.
MEM(pair_append_request(&vp, attr_eap_aka_sim_identity) >=0)
eap_aka_sim_process_conf_t * inst
bool required
Argument must be present, and non-empty.
#define XLAT_ARG_PARSER_TERMINATOR
@ XLAT_ACTION_FAIL
An xlat function failed.
@ XLAT_ACTION_DONE
We're done evaluating this level of nesting.
Definition for a single argument consumend by an xlat function.
int fr_value_box_strdup(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_dict_attr_t const *enumv, char const *src, bool tainted)
Copy a nul terminated string to a fr_value_box_t.
#define fr_value_box_alloc_null(_ctx)
Allocate a value box for later use with a value assignment function.
static size_t char ** out
module_ctx_t const * mctx
Synthesised module calling ctx.
void xlat_func_flags_set(xlat_t *x, xlat_func_flags_t flags)
Specify flags that alter the xlat's behaviour.
int xlat_func_mono_set(xlat_t *x, xlat_arg_parser_t const args[])
Register the argument of an xlat.
xlat_t * xlat_func_register_module(TALLOC_CTX *ctx, module_inst_ctx_t const *mctx, char const *name, xlat_func_t func, fr_type_t return_type)
Register an xlat function for a module.