The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
map.c
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17/**
18 * $Id: a25cb00f2919c50c33b40f4b17080451cd62c80c $
19 *
20 * @brief map and unlang integration.
21 * @brief Unlang "map" keyword evaluation.
22 *
23 * @ingroup AVP
24 *
25 * @copyright 2018 The FreeRADIUS server project
26 * @copyright 2018 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
27 */
28RCSID("$Id: a25cb00f2919c50c33b40f4b17080451cd62c80c $")
29
30#include <freeradius-devel/server/base.h>
31#include <freeradius-devel/server/map.h>
32#include <freeradius-devel/unlang/tmpl.h>
33#include <freeradius-devel/unlang/map.h>
34
35#include "map_priv.h"
36
37/** State of a map block
38 *
39 */
40typedef struct {
41 fr_value_box_list_t src_result; //!< Result of expanding the map source.
42
43 /** @name Resumption and signalling
44 * @{
45 */
46 void *rctx; //!< for resume / signal
47 map_proc_func_t resume; //!< resumption handler
48 unlang_map_signal_t signal; //!< for signal handlers
49 fr_signal_t sigmask; //!< Signals to block.
50
51 /** @} */
53
54/** Wrapper to create a map_ctx_t as a compound literal
55 *
56 * @param[in] _mod_inst of the module being called.
57 * @param[in] _map_inst of the map being called.
58 * @param[in] _rctx Resume ctx (if any).
59 */
60#define MAP_CTX(_mod_inst, _map_inst, _rctx) &(map_ctx_t){ .moi = _mod_inst, .mpi = _map_inst, .rctx = _rctx }
61
63#ifdef WITH_VERIFY_PTR
65#else
67#endif
68 )
69{
70 unlang_frame_state_map_proc_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
71 unlang_frame_state_map_proc_t *map_proc_state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
72 map_proc_func_t resume;
73 unlang_group_t *g = unlang_generic_to_group(frame->instruction);
77
78#ifdef WITH_VERIFY_PTR
79 VALUE_BOX_LIST_VERIFY(&map_proc_state->src_result);
80#endif
81 resume = state->resume;
82 state->resume = NULL;
83
84 /*
85 * Call any map resume function
86 */
87 if (resume) ua = resume(p_result, MAP_CTX(inst->proc->mod_inst, inst->data, state->rctx),
88 request, &map_proc_state->src_result, inst->maps);
89 return ua;
90}
91
92/** Yield a request back to the interpreter from within a module
93 *
94 * This passes control of the request back to the unlang interpreter, setting
95 * callbacks to execute when the request is 'signalled' asynchronously, or whatever
96 * timer or I/O event the module was waiting for occurs.
97 *
98 * @note The module function which calls #unlang_module_yield should return control
99 * of the C stack to the unlang interpreter immediately after calling #unlang_module_yield.
100 * A common pattern is to use ``return unlang_module_yield(...)``.
101 *
102 * @param[in] request The current request.
103 * @param[in] resume Called on unlang_interpret_mark_runnable().
104 * @param[in] signal Called on unlang_action().
105 * @param[in] sigmask Set of signals to block.
106 * @param[in] rctx to pass to the callbacks.
107 * @return
108 * - UNLANG_ACTION_YIELD.
109 */
111 map_proc_func_t resume, unlang_map_signal_t signal, fr_signal_t sigmask, void *rctx)
112{
113 unlang_stack_t *stack = request->stack;
114 unlang_stack_frame_t *frame = &stack->frame[stack->depth];
115 unlang_frame_state_map_proc_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
116
117 REQUEST_VERIFY(request); /* Check the yielded request is sane */
118
119 state->rctx = rctx;
120 state->resume = resume;
121 state->signal = signal;
122 state->sigmask = sigmask;
123
124 /*
125 * We set the repeatable flag here,
126 * so that the resume function is always
127 * called going back up the stack.
128 */
130
131 return UNLANG_ACTION_YIELD;
132}
133
135{
138
140 unlang_frame_state_map_proc_t *map_proc_state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
141
142 RDEBUG2("MAP %s \"%pM\"", inst->proc->name, &map_proc_state->src_result);
143
144 VALUE_BOX_LIST_VERIFY(&map_proc_state->src_result);
146
147 return inst->proc->evaluate(p_result, MAP_CTX(inst->proc->mod_inst, inst->data, NULL),
148 request, &map_proc_state->src_result, inst->maps);
149}
150
152{
156 unlang_frame_state_map_proc_t *map_proc_state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
157
158 /*
159 * Initialise the frame state
160 */
161 repeatable_set(frame);
162
163 fr_value_box_list_init(&map_proc_state->src_result);
164 /*
165 * Set this BEFORE doing anything else, as we will be
166 * called again after unlang_xlat_push() returns.
167 */
168 frame->process = map_proc_apply;
169
170 /*
171 * Expand the map source
172 */
173 if (inst->src) switch (inst->src->type) {
174 default:
175 {
176 fr_value_box_t *src_result = NULL;
177 if (tmpl_aexpand(frame->state, &src_result,
178 request, inst->src, NULL, NULL) < 0) {
179 REDEBUG("Failed expanding map src");
180 error:
182 }
183 fr_value_box_list_insert_head(&map_proc_state->src_result, src_result);
184 break;
185 }
186 case TMPL_TYPE_EXEC:
187 if (unlang_tmpl_push(map_proc_state, NULL, &map_proc_state->src_result,
188 request, inst->src, NULL, UNLANG_SUB_FRAME) < 0) {
190 }
192
193 case TMPL_TYPE_XLAT:
194 if (unlang_xlat_push(map_proc_state, NULL, &map_proc_state->src_result,
195 request, tmpl_xlat(inst->src), false) < 0) {
197 }
199
200
201 case TMPL_TYPE_REGEX:
206 fr_assert(0);
207 goto error;
208 }
209
210 return map_proc_apply(p_result, request, frame);
211}
212
214{
216
217 /*
218 * map <module-name> <arg>
219 */
220 if (gext->vpt) {
221 char quote;
222 size_t quoted_len;
223 char *quoted_str;
224
225 switch (cf_section_argv_quote(g->cs, 0)) {
227 quote = '"';
228 break;
229
231 quote = '\'';
232 break;
233
235 quote = '`';
236 break;
237
238 default:
239 quote = '\0';
240 break;
241 }
242
243 quoted_len = fr_snprint_len(gext->vpt->name, gext->vpt->len, quote);
244 quoted_str = talloc_array(g, char, quoted_len);
245 fr_snprint(quoted_str, quoted_len, gext->vpt->name, gext->vpt->len, quote);
246
247 g->self.name = talloc_typed_asprintf(g, "map %s %s", cf_section_name2(g->cs), quoted_str);
248 g->self.debug_name = g->self.name;
249 talloc_free(quoted_str);
250
251 return 0;
252 }
253
254 g->self.name = talloc_typed_asprintf(g, "map %s", cf_section_name2(g->cs));
255 g->self.debug_name = g->self.name;
256
257 return 0;
258}
259
260/** Validate and fixup a map that's part of an map section.
261 *
262 * @param map to validate.
263 * @param ctx data to pass to fixup function (currently unused).
264 * @return 0 if valid else -1.
265 */
266static int fixup_map_cb(map_t *map, UNUSED void *ctx)
267{
268 switch (map->lhs->type) {
269 case TMPL_TYPE_ATTR:
271 case TMPL_TYPE_XLAT:
272 break;
273
274 default:
275 cf_log_err(map->ci, "Left side of map must be an attribute "
276 "or an xlat (that expands to an attribute), not a %s",
277 tmpl_type_to_str(map->lhs->type));
278 return -1;
279 }
280
281 switch (map->rhs->type) {
284 case TMPL_TYPE_DATA:
285 case TMPL_TYPE_XLAT:
286 case TMPL_TYPE_ATTR:
287 case TMPL_TYPE_EXEC:
288 break;
289
290 default:
291 cf_log_err(map->ci, "Right side of map must be an attribute, literal, xlat or exec, got type %s",
292 tmpl_type_to_str(map->rhs->type));
293 return -1;
294 }
295
296 if (!fr_assignment_op[map->op] && !fr_comparison_op[map->op]) {
297 cf_log_err(map->ci, "Invalid operator \"%s\" in map section. "
298 "Only assignment or filter operators are allowed",
299 fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"));
300 return -1;
301 }
302
303 return 0;
304}
305
307{
309 int rcode;
310
312 unlang_map_t *gext;
313
314 unlang_t *c;
315 CONF_SECTION *modules;
316 char const *tmpl_str;
317
318 tmpl_t *vpt = NULL;
319
320 map_proc_t *proc;
321 map_proc_inst_t *proc_inst;
322
323 char const *name2 = cf_section_name2(cs);
324
325 tmpl_rules_t t_rules;
326
327 /*
328 * The RHS is NOT resolved in the context of the LHS.
329 */
330 t_rules = *(unlang_ctx->rules);
331 t_rules.attr.disallow_rhs_resolve = true;
332 RULES_VERIFY(&t_rules);
333
334 modules = cf_section_find(cf_root(cs), "modules", NULL);
335 if (!modules) {
336 cf_log_err(cs, "'map' sections require a 'modules' section");
337 return NULL;
338 }
339
340 proc = map_proc_find(name2);
341 if (!proc) {
342 cf_log_err(cs, "Failed to find map processor '%s'", name2);
343 return NULL;
344 }
346
348 if (!g) return NULL;
349
350 gext = unlang_group_to_map(g);
351
352 /*
353 * If there's a third string, it's the map src.
354 *
355 * Convert it into a template.
356 */
357 tmpl_str = cf_section_argv(cs, 0); /* AFTER name1, name2 */
358 if (tmpl_str) {
360
362
363 /*
364 * Try to parse the template.
365 */
366 (void) tmpl_afrom_substr(gext, &vpt,
367 &FR_SBUFF_IN(tmpl_str, talloc_array_length(tmpl_str) - 1),
368 type,
369 NULL,
370 &t_rules);
371 if (!vpt) {
372 cf_log_perr(cs, "Failed parsing map");
373 error:
374 talloc_free(g);
375 return NULL;
376 }
377
378 /*
379 * Limit the allowed template types.
380 */
381 switch (vpt->type) {
383 case TMPL_TYPE_ATTR:
385 case TMPL_TYPE_XLAT:
387 case TMPL_TYPE_EXEC:
389 case TMPL_TYPE_DATA:
390 break;
391
392 default:
394 cf_log_err(cs, "Invalid third argument for map");
395 return NULL;
396 }
397 }
398
399 /*
400 * This looks at cs->name2 to determine which list to update
401 */
402 map_list_init(&gext->map);
403 rcode = map_afrom_cs(gext, &gext->map, cs, unlang_ctx->rules, &t_rules, fixup_map_cb, NULL, 256);
404 if (rcode < 0) return NULL; /* message already printed */
405 if (map_list_empty(&gext->map)) {
406 cf_log_err(cs, "'map' sections cannot be empty");
407 goto error;
408 }
409
410
411 /*
412 * Call the map's instantiation function to validate
413 * the map and perform any caching required.
414 */
415 proc_inst = map_proc_instantiate(gext, proc, cs, vpt, &gext->map);
416 if (!proc_inst) {
417 cf_log_err(cs, "Failed instantiating map function '%s'", name2);
418 goto error;
419 }
421
422 gext->vpt = vpt;
423 gext->proc_inst = proc_inst;
424
426
427 /*
428 * Cache the module in the unlang_group_t struct.
429 *
430 * Ensure that the module has a "map" entry in its module
431 * header? Or ensure that the map is registered in the
432 * "bootstrap" phase, so that it's always available here.
433 */
434 if (!pass2_fixup_map_rhs(g, unlang_ctx->rules)) goto error;
435
436 return c;
437}
438
439
441{
443 .name = "map",
444 .type = UNLANG_TYPE_MAP,
446
447 .compile = unlang_compile_map,
448 .interpret = unlang_map_state_init,
449
450 .unlang_size = sizeof(unlang_map_t),
451 .unlang_name = "unlang_map_t",
452
453 .frame_state_size = sizeof(unlang_frame_state_map_proc_t),
454 .frame_state_type = "unlang_frame_state_map_proc_t",
455 });
456}
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition action.h:35
@ UNLANG_ACTION_PUSHED_CHILD
unlang_t pushed a new child onto the stack, execute it instead of continuing.
Definition action.h:39
@ UNLANG_ACTION_STOP_PROCESSING
Break out of processing the current request (unwind).
Definition action.h:42
@ UNLANG_ACTION_CALCULATE_RESULT
Calculate a new section rlm_rcode_t value.
Definition action.h:37
@ UNLANG_ACTION_YIELD
Temporarily pause execution until an event occurs.
Definition action.h:41
#define RCSID(id)
Definition build.h:485
#define UNUSED
Definition build.h:317
#define RULES_VERIFY(_cs, _rules)
Definition cf_file.c:180
Common header for all CONF_* types.
Definition cf_priv.h:49
A section grouping multiple CONF_PAIR.
Definition cf_priv.h:101
fr_token_t cf_section_argv_quote(CONF_SECTION const *cs, int argc)
Return the quoting for one of the variadic arguments.
Definition cf_util.c:1247
char const * cf_section_name2(CONF_SECTION const *cs)
Return the second identifier of a CONF_SECTION.
Definition cf_util.c:1184
CONF_SECTION * cf_section_find(CONF_SECTION const *cs, char const *name1, char const *name2)
Find a CONF_SECTION with name1 and optionally name2.
Definition cf_util.c:1027
CONF_SECTION * cf_item_to_section(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_SECTION.
Definition cf_util.c:683
char const * cf_section_argv(CONF_SECTION const *cs, int argc)
Return variadic argument at the specified index.
Definition cf_util.c:1212
#define cf_log_err(_cf, _fmt,...)
Definition cf_util.h:286
#define cf_root(_cf)
Definition cf_util.h:98
#define cf_log_perr(_cf, _fmt,...)
Definition cf_util.h:293
bool pass2_fixup_map_rhs(unlang_group_t *g, tmpl_rules_t const *rules)
Definition compile.c:214
unlang_group_t * unlang_group_allocate(unlang_t *parent, CONF_SECTION *cs, unlang_type_t type)
Definition compile.c:446
#define UNLANG_SUB_FRAME
Definition interpret.h:37
int map_afrom_cs(TALLOC_CTX *ctx, map_list_t *out, CONF_SECTION *cs, tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules, map_validate_t validate, void *uctx, unsigned int max)
Convert a config section into an attribute map.
Definition map.c:1131
static TALLOC_CTX * unlang_ctx
Definition base.c:71
void unlang_register(unlang_op_t *op)
Register an operation with the interpreter.
Definition base.c:56
map_proc_func_t resume
resumption handler
Definition map.c:47
unlang_action_t unlang_map_yield(request_t *request, map_proc_func_t resume, unlang_map_signal_t signal, fr_signal_t sigmask, void *rctx)
Yield a request back to the interpreter from within a module.
Definition map.c:110
static int fixup_map_cb(map_t *map, UNUSED void *ctx)
Validate and fixup a map that's part of an map section.
Definition map.c:266
static unlang_t * unlang_compile_map(unlang_t *parent, unlang_compile_ctx_t *unlang_ctx, CONF_ITEM const *ci)
Definition map.c:306
fr_signal_t sigmask
Signals to block.
Definition map.c:49
static int compile_map_name(unlang_group_t *g)
Definition map.c:213
void unlang_map_init(void)
Definition map.c:440
static unlang_action_t map_proc_resume(unlang_result_t *p_result, request_t *request, UNUSED unlang_stack_frame_t *frame)
Definition map.c:62
void * rctx
for resume / signal
Definition map.c:46
static unlang_action_t map_proc_apply(unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Definition map.c:134
static unlang_action_t unlang_map_state_init(unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Definition map.c:151
unlang_map_signal_t signal
for signal handlers
Definition map.c:48
#define MAP_CTX(_mod_inst, _map_inst, _rctx)
Wrapper to create a map_ctx_t as a compound literal.
Definition map.c:60
fr_value_box_list_t src_result
Result of expanding the map source.
Definition map.c:41
map and unlang integration.
Definition map.c:40
talloc_free(reap)
static char * stack[MAX_STACK]
Definition radmin.c:159
map_proc_inst_t * proc_inst
Definition map_priv.h:35
static unlang_map_t * unlang_group_to_map(unlang_group_t *g)
Cast a group structure to the map keyword extension.
Definition map_priv.h:41
map_list_t map
Head of the map list.
Definition map_priv.h:34
tmpl_t * vpt
Definition map_priv.h:33
map_proc_t * map_proc_find(char const *name)
Find a map processor by name.
Definition map_proc.c:81
map_proc_inst_t * map_proc_instantiate(TALLOC_CTX *ctx, map_proc_t const *proc, CONF_SECTION *cs, tmpl_t const *src, map_list_t const *maps)
Create a new map proc instance.
Definition map_proc.c:204
fr_value_box_safe_for_t map_proc_literals_safe_for(map_proc_t const *proc)
Definition map_proc.c:69
unlang_action_t(* map_proc_func_t)(unlang_result_t *p_result, map_ctx_t const *mpctx, request_t *request, fr_value_box_list_t *result, map_list_t const *maps)
Function to evaluate the src string and map the result to server attributes.
Definition map_proc.h:71
Map processor registration.
Map processor instance.
size_t fr_snprint(char *out, size_t outlen, char const *in, ssize_t inlen, char quote)
Escape any non printable or non-UTF8 characters in the input string.
Definition print.c:227
size_t fr_snprint_len(char const *in, ssize_t inlen, char quote)
Find the length of the buffer required to fully escape a string with fr_prints.
Definition print.c:409
#define fr_assert(_expr)
Definition rad_assert.h:38
#define REDEBUG(fmt,...)
Definition radclient.h:52
#define RDEBUG2(fmt,...)
Definition radclient.h:54
#define RETURN_UNLANG_FAIL
Definition rcode.h:59
#define REQUEST_VERIFY(_x)
Definition request.h:309
#define FR_SBUFF_IN(_start, _len_or_end)
static char const * tmpl_type_to_str(tmpl_type_t type)
Return a static string containing the type name.
Definition tmpl.h:634
fr_value_box_safe_for_t literals_safe_for
safe_for value assigned to literal values in xlats, execs, and data.
Definition tmpl.h:347
#define tmpl_xlat(_tmpl)
Definition tmpl.h:930
@ TMPL_TYPE_REGEX_UNCOMPILED
Regex where compilation is possible but hasn't been performed yet.
Definition tmpl.h:158
@ TMPL_TYPE_ATTR_UNRESOLVED
An attribute reference that we couldn't resolve but looked valid.
Definition tmpl.h:185
@ TMPL_TYPE_ATTR
Reference to one or more attributes.
Definition tmpl.h:142
@ TMPL_TYPE_XLAT
Pre-parsed xlat expansion.
Definition tmpl.h:146
@ TMPL_TYPE_EXEC
Callout to an external script or program.
Definition tmpl.h:150
@ TMPL_TYPE_REGEX_XLAT_UNRESOLVED
A regular expression with unresolved xlat functions or attribute references.
Definition tmpl.h:197
@ TMPL_TYPE_DATA
Value in native boxed format.
Definition tmpl.h:138
@ TMPL_TYPE_REGEX
Compiled (and possibly JIT'd) regular expression.
Definition tmpl.h:154
@ TMPL_TYPE_DATA_UNRESOLVED
Unparsed literal string.
Definition tmpl.h:179
@ TMPL_TYPE_XLAT_UNRESOLVED
A xlat expansion with unresolved xlat functions or attribute references.
Definition tmpl.h:193
@ TMPL_TYPE_REGEX_XLAT
A regex containing xlat expansions.
Definition tmpl.h:162
@ TMPL_TYPE_EXEC_UNRESOLVED
An exec with unresolved xlat function or attribute references.
Definition tmpl.h:189
ssize_t tmpl_afrom_substr(TALLOC_CTX *ctx, tmpl_t **out, fr_sbuff_t *in, fr_token_t quote, fr_sbuff_parse_rules_t const *p_rules, tmpl_rules_t const *t_rules))
Convert an arbitrary string into a tmpl_t.
static fr_slen_t vpt
Definition tmpl.h:1269
tmpl_attr_rules_t attr
Rules/data for parsing attribute references.
Definition tmpl.h:335
#define tmpl_aexpand(_ctx, _out, _request, _vpt, _escape, _escape_ctx)
Expand a tmpl to a C type, allocing a new buffer to hold the string.
Definition tmpl.h:1062
Optional arguments passed to vp_tmpl functions.
Definition tmpl.h:332
fr_signal_t
Signals that can be generated/processed by request signal handlers.
Definition signal.h:38
eap_aka_sim_process_conf_t * inst
fr_aka_sim_id_type_t type
eap_type_t type
The preferred EAP-Type of this instance of the EAP-SIM/AKA/AKA' state machine.
Value pair map.
Definition map.h:77
fr_token_t op
The operator that controls insertion of the dst attribute.
Definition map.h:82
tmpl_t * lhs
Typically describes the attribute to add, modify or compare.
Definition map.h:78
tmpl_t * rhs
Typically describes a literal value or a src attribute to copy or compare.
Definition map.h:79
CONF_ITEM * ci
Config item that the map was created from.
Definition map.h:85
uint8_t disallow_rhs_resolve
map RHS is NOT immediately resolved in the context of the LHS.
Definition tmpl.h:320
#define fr_table_str_by_value(_table, _number, _def)
Convert an integer to a string.
Definition table.h:772
char * talloc_typed_asprintf(TALLOC_CTX *ctx, char const *fmt,...)
Call talloc vasprintf, setting the type on the new chunk correctly.
Definition talloc.c:514
int unlang_tmpl_push(TALLOC_CTX *ctx, unlang_result_t *p_result, fr_value_box_list_t *out, request_t *request, tmpl_t const *tmpl, unlang_tmpl_args_t *args, bool top_frame)
Push a tmpl onto the stack for evaluation.
Definition tmpl.c:276
const bool fr_assignment_op[T_TOKEN_LAST]
Definition token.c:169
fr_table_num_ordered_t const fr_tokens_table[]
Definition token.c:34
const bool fr_comparison_op[T_TOKEN_LAST]
Definition token.c:199
enum fr_token fr_token_t
@ T_SINGLE_QUOTED_STRING
Definition token.h:122
@ T_BACK_QUOTED_STRING
Definition token.h:123
@ T_DOUBLE_QUOTED_STRING
Definition token.h:121
void(* unlang_map_signal_t)(map_ctx_t const *mpctx, request_t *request, fr_signal_t action)
A callback when the request gets a fr_signal_t.
Definition map.h:43
int unlang_xlat_push(TALLOC_CTX *ctx, unlang_result_t *p_result, fr_value_box_list_t *out, request_t *request, xlat_exp_head_t const *xlat, bool top_frame)
Push a pre-compiled xlat onto the stack for evaluation.
Definition xlat.c:270
CONF_SECTION * cs
char const * debug_name
Printed in log messages when the node is executed.
void * state
Stack frame specialisations.
static unlang_t * unlang_group_to_generic(unlang_group_t const *p)
static unlang_group_t * unlang_generic_to_group(unlang_t const *p)
char const * name
Unknown...
@ UNLANG_TYPE_MAP
Mapping section (like #UNLANG_TYPE_UPDATE, but uses values from a map_proc_t call).
Definition unlang_priv.h:65
static void frame_repeat(unlang_stack_frame_t *frame, unlang_process_t process)
Mark the current stack frame up for repeat, and set a new process function.
unlang_t const * instruction
The unlang node we're evaluating.
@ UNLANG_OP_FLAG_RCODE_SET
Set request->rcode to the result of this operation.
static void repeatable_set(unlang_stack_frame_t *frame)
unlang_process_t process
function to call for interpreting this stack frame
Generic representation of a grouping.
An unlang operation.
A node in a graph of unlang_op_t (s) that we execute.
Our interpreter stack, as distinct from the C stack.
An unlang stack associated with a request.
static fr_slen_t parent
Definition pair.h:841
#define VALUE_BOX_LIST_VERIFY(_x)
Definition value.h:1322