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: 8ccab42c2be9ec5be9bfba24747f1d43c27881e8 $
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: 8ccab42c2be9ec5be9bfba24747f1d43c27881e8 $")
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
37typedef enum {
38 UNLANG_UPDATE_MAP_INIT = 0, //!< Start processing a map.
39 UNLANG_UPDATE_MAP_EXPANDED_LHS, //!< Expand the LHS xlat or exec (if needed).
40 UNLANG_UPDATE_MAP_EXPANDED_RHS //!< Expand the RHS xlat or exec (if needed).
42
43/** State of an update block
44 *
45 */
46typedef struct {
47 fr_dcursor_t maps; //!< Cursor of maps to evaluate.
48
49 fr_dlist_head_t vlm_head; //!< Head of list of VP List Mod.
50
51 fr_value_box_list_t lhs_result; //!< Result of expanding the LHS
52 fr_value_box_list_t rhs_result; //!< Result of expanding the RHS.
53
54 unlang_update_state_t state; //!< What we're currently doing.
56
57/** State of a map block
58 *
59 */
60typedef struct {
61 fr_value_box_list_t src_result; //!< Result of expanding the map source.
62
63 /** @name Resumption and signalling
64 * @{
65 */
66 void *rctx; //!< for resume / signal
67 map_proc_func_t resume; //!< resumption handler
68 unlang_map_signal_t signal; //!< for signal handlers
69 fr_signal_t sigmask; //!< Signals to block.
70
71 /** @} */
73
74/** Wrapper to create a map_ctx_t as a compound literal
75 *
76 * @param[in] _mod_inst of the module being called.
77 * @param[in] _map_inst of the map being called.
78 * @param[in] _rctx Resume ctx (if any).
79 */
80#define MAP_CTX(_mod_inst, _map_inst, _rctx) &(map_ctx_t){ .moi = _mod_inst, .mpi = _map_inst, .rctx = _rctx }
81
82/** Apply a list of modifications on one or more fr_pair_t lists.
83 *
84 * @param[in] request The current request.
85 * @param[out] p_result The rcode indicating what the result
86 * of the operation was.
87 * @return
88 * - UNLANG_ACTION_CALCULATE_RESULT changes were applied.
89 * - UNLANG_ACTION_PUSHED_CHILD async execution of an expansion is required.
90 */
92{
93 unlang_stack_t *stack = request->stack;
94 unlang_stack_frame_t *frame = &stack->frame[stack->depth];
95 unlang_frame_state_update_t *update_state = frame->state;
96 vp_list_mod_t const *vlm = NULL;
97
98 /*
99 * No modifications...
100 */
101 if (fr_dlist_empty(&update_state->vlm_head)) {
102 RDEBUG2("Nothing to update");
103 goto done;
104 }
105
106 /*
107 * Apply the list of modifications. This should not fail
108 * except on memory allocation error.
109 */
110 while ((vlm = fr_dlist_next(&update_state->vlm_head, vlm))) {
111 int ret;
112
113 ret = map_list_mod_apply(request, vlm);
114 if (!fr_cond_assert(ret == 0)) {
115 TALLOC_FREE(frame->state);
116
117 return UNLANG_ACTION_FAIL;
118 }
119 }
120
121done:
123}
124
125/** Create a list of modifications to apply to one or more fr_pair_t lists
126 *
127 * @param[out] p_result The rcode indicating what the result
128 * of the operation was.
129 * @param[in] request The current request.
130 * @param[in] frame Current stack frame.
131 * @return
132 * - UNLANG_ACTION_CALCULATE_RESULT changes were applied.
133 * - UNLANG_ACTION_PUSHED_CHILD async execution of an expansion is required.
134 */
136{
137 unlang_frame_state_update_t *update_state = talloc_get_type_abort(frame->state, unlang_frame_state_update_t);
138 map_t *map;
139
140 /*
141 * Iterate over the maps producing a set of modifications to apply.
142 */
143 for (map = fr_dcursor_current(&update_state->maps);
144 map;
145 map = fr_dcursor_next(&update_state->maps)) {
146 repeatable_set(frame); /* Call us again when done */
147
148 switch (update_state->state) {
151
152 fr_assert(fr_value_box_list_empty(&update_state->lhs_result)); /* Should have been consumed */
153 fr_assert(fr_value_box_list_empty(&update_state->rhs_result)); /* Should have been consumed */
154
155 switch (map->lhs->type) {
156 default:
157 break;
158
159 case TMPL_TYPE_EXEC:
160 if (unlang_tmpl_push(update_state, &update_state->lhs_result,
161 request, map->lhs,
162 NULL) < 0) {
164 }
166
167 case TMPL_TYPE_XLAT:
168 if (unlang_xlat_push(update_state, NULL, &update_state->lhs_result,
169 request, tmpl_xlat(map->lhs), false) < 0) {
171 }
173
175 case TMPL_TYPE_REGEX:
179 fr_assert(0);
180 error:
181 TALLOC_FREE(frame->state);
182 repeatable_clear(frame);
183 return UNLANG_ACTION_FAIL;
184 }
186
188 /*
189 * map_to_list_mod() already concatenates the LHS, so we don't need to do it here.
190 */
191 if (!map->rhs) goto next;
192
194
195 switch (map->rhs->type) {
196 default:
197 break;
198
199 case TMPL_TYPE_EXEC:
200 if (unlang_tmpl_push(update_state, &update_state->rhs_result,
201 request, map->rhs, NULL) < 0) {
203 }
205
206 case TMPL_TYPE_XLAT:
207 if (unlang_xlat_push(update_state, NULL, &update_state->rhs_result,
208 request, tmpl_xlat(map->rhs), false) < 0) {
210 }
212
213 case TMPL_TYPE_REGEX:
218 fr_assert(0);
219 goto error;
220 }
222
224 {
225 vp_list_mod_t *new_mod;
226 /*
227 * Concat the top level results together
228 */
229 if (!fr_value_box_list_empty(&update_state->rhs_result) &&
231 fr_value_box_list_head(&update_state->rhs_result), &update_state->rhs_result, FR_TYPE_STRING,
233 SIZE_MAX) < 0)) {
234 RPEDEBUG("Failed concatenating RHS expansion results");
235 goto error;
236 }
237
238 if (map_to_list_mod(update_state, &new_mod,
239 request, map,
240 &update_state->lhs_result, &update_state->rhs_result) < 0) goto error;
241 if (new_mod) fr_dlist_insert_tail(&update_state->vlm_head, new_mod);
242
243 fr_value_box_list_talloc_free(&update_state->rhs_result);
244 }
245
246 next:
247 update_state->state = UNLANG_UPDATE_MAP_INIT;
248 fr_value_box_list_talloc_free(&update_state->lhs_result);
249
250 break;
251 }
252 }
253
254 return list_mod_apply(p_result, request);
255}
256
257
258/** Execute an update block
259 *
260 * Update blocks execute in two phases, first there's an evaluation phase where
261 * each input map is evaluated, outputting one or more modification maps. The modification
262 * maps detail a change that should be made to a list in the current request.
263 * The request is not modified during this phase.
264 *
265 * The second phase applies those modification maps to the current request.
266 * This re-enables the atomic functionality of update blocks provided in v2.x.x.
267 * If one map fails in the evaluation phase, no more maps are processed, and the current
268 * result is discarded.
269 */
271{
274 unlang_frame_state_update_t *update_state;
275
276 /*
277 * Initialise the frame state
278 */
279 MEM(frame->state = update_state = talloc_zero_pooled_object(request->stack, unlang_frame_state_update_t,
280 (sizeof(map_t) +
281 (sizeof(tmpl_t) * 2) + 128),
282 g->num_children)); /* 128 is for string buffers */
283
284 fr_dcursor_init(&update_state->maps, &gext->map.head);
285 fr_value_box_list_init(&update_state->lhs_result);
286 fr_value_box_list_init(&update_state->rhs_result);
287 fr_dlist_init(&update_state->vlm_head, vp_list_mod_t, entry);
288
289 /*
290 * Call list_mod_create
291 */
293 return list_mod_create(p_result, request, frame);
294}
295
297#ifdef WITH_VERIFY_PTR
299#else
301#endif
302 )
303{
304 unlang_frame_state_map_proc_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
305 unlang_frame_state_map_proc_t *map_proc_state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
306 map_proc_func_t resume;
307 unlang_group_t *g = unlang_generic_to_group(frame->instruction);
311
312#ifdef WITH_VERIFY_PTR
313 VALUE_BOX_LIST_VERIFY(&map_proc_state->src_result);
314#endif
315 resume = state->resume;
316 state->resume = NULL;
317
318 /*
319 * Call any map resume function
320 */
321 if (resume) ua = resume(p_result, MAP_CTX(inst->proc->mod_inst, inst->data, state->rctx),
322 request, &map_proc_state->src_result, inst->maps);
323 return ua;
324}
325
326/** Yield a request back to the interpreter from within a module
327 *
328 * This passes control of the request back to the unlang interpreter, setting
329 * callbacks to execute when the request is 'signalled' asynchronously, or whatever
330 * timer or I/O event the module was waiting for occurs.
331 *
332 * @note The module function which calls #unlang_module_yield should return control
333 * of the C stack to the unlang interpreter immediately after calling #unlang_module_yield.
334 * A common pattern is to use ``return unlang_module_yield(...)``.
335 *
336 * @param[in] request The current request.
337 * @param[in] resume Called on unlang_interpret_mark_runnable().
338 * @param[in] signal Called on unlang_action().
339 * @param[in] sigmask Set of signals to block.
340 * @param[in] rctx to pass to the callbacks.
341 * @return
342 * - UNLANG_ACTION_YIELD.
343 */
345 map_proc_func_t resume, unlang_map_signal_t signal, fr_signal_t sigmask, void *rctx)
346{
347 unlang_stack_t *stack = request->stack;
348 unlang_stack_frame_t *frame = &stack->frame[stack->depth];
349 unlang_frame_state_map_proc_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
350
351 REQUEST_VERIFY(request); /* Check the yielded request is sane */
352
353 state->rctx = rctx;
354 state->resume = resume;
355 state->signal = signal;
356 state->sigmask = sigmask;
357
358 /*
359 * We set the repeatable flag here,
360 * so that the resume function is always
361 * called going back up the stack.
362 */
364
365 return UNLANG_ACTION_YIELD;
366}
367
369{
372
374 unlang_frame_state_map_proc_t *map_proc_state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
375
376 RDEBUG2("MAP %s \"%pM\"", inst->proc->name, &map_proc_state->src_result);
377
378 VALUE_BOX_LIST_VERIFY(&map_proc_state->src_result);
380
381 return inst->proc->evaluate(p_result, MAP_CTX(inst->proc->mod_inst, inst->data, NULL),
382 request, &map_proc_state->src_result, inst->maps);
383}
384
386{
390 unlang_frame_state_map_proc_t *map_proc_state = talloc_get_type_abort(frame->state, unlang_frame_state_map_proc_t);
391
392 /*
393 * Initialise the frame state
394 */
395 repeatable_set(frame);
396
397 fr_value_box_list_init(&map_proc_state->src_result);
398 /*
399 * Set this BEFORE doing anything else, as we will be
400 * called again after unlang_xlat_push() returns.
401 */
402 frame->process = map_proc_apply;
403
404 /*
405 * Expand the map source
406 */
407 if (inst->src) switch (inst->src->type) {
408 default:
409 {
410 fr_value_box_t *src_result = NULL;
411 if (tmpl_aexpand(frame->state, &src_result,
412 request, inst->src, NULL, NULL) < 0) {
413 REDEBUG("Failed expanding map src");
414 error:
416 }
417 fr_value_box_list_insert_head(&map_proc_state->src_result, src_result);
418 break;
419 }
420 case TMPL_TYPE_EXEC:
421 if (unlang_tmpl_push(map_proc_state, &map_proc_state->src_result,
422 request, inst->src, NULL) < 0) {
424 }
426
427 case TMPL_TYPE_XLAT:
428 if (unlang_xlat_push(map_proc_state, NULL, &map_proc_state->src_result,
429 request, tmpl_xlat(inst->src), false) < 0) {
431 }
433
434
435 case TMPL_TYPE_REGEX:
440 fr_assert(0);
441 goto error;
442 }
443
444 return map_proc_apply(p_result, request, frame);
445}
446
448{
450 &(unlang_op_t){
451 .name = "update",
452 .interpret = unlang_update_state_init,
454 });
455
457 &(unlang_op_t){
458 .name = "map",
460 .interpret = unlang_map_state_init,
461 .frame_state_size = sizeof(unlang_frame_state_map_proc_t),
462 .frame_state_type = "unlang_frame_state_map_proc_t",
463 });
464}
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_FAIL
Encountered an unexpected error.
Definition action.h:36
@ 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 FALL_THROUGH
clang 10 doesn't recognised the FALL-THROUGH comment anymore
Definition build.h:324
#define UNUSED
Definition build.h:317
static void * fr_dcursor_next(fr_dcursor_t *cursor)
Advanced the cursor to the next item.
Definition dcursor.h:290
#define fr_dcursor_init(_cursor, _head)
Initialise a cursor.
Definition dcursor.h:710
static void * fr_dcursor_current(fr_dcursor_t *cursor)
Return the item the cursor current points to.
Definition dcursor.h:339
#define fr_cond_assert(_x)
Calls panic_action ifndef NDEBUG, else logs error and evaluates to value of _x.
Definition debug.h:139
#define MEM(x)
Definition debug.h:36
#define fr_dlist_init(_head, _type, _field)
Initialise the head structure of a doubly linked list.
Definition dlist.h:260
static bool fr_dlist_empty(fr_dlist_head_t const *list_head)
Check whether a list has any items.
Definition dlist.h:501
static int fr_dlist_insert_tail(fr_dlist_head_t *list_head, void *ptr)
Insert an item into the tail of a list.
Definition dlist.h:378
static void * fr_dlist_next(fr_dlist_head_t const *list_head, void const *ptr)
Get the next item in a list.
Definition dlist.h:555
Head of a doubly linked list.
Definition dlist.h:51
#define RPEDEBUG(fmt,...)
Definition log.h:376
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
Definition base.c:63
map_proc_func_t resume
resumption handler
Definition map.c:67
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:344
fr_value_box_list_t lhs_result
Result of expanding the LHS.
Definition map.c:51
fr_signal_t sigmask
Signals to block.
Definition map.c:69
unlang_update_state_t state
What we're currently doing.
Definition map.c:54
static unlang_action_t list_mod_apply(unlang_result_t *p_result, request_t *request)
Apply a list of modifications on one or more fr_pair_t lists.
Definition map.c:91
static unlang_action_t unlang_update_state_init(unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Execute an update block.
Definition map.c:270
void unlang_map_init(void)
Definition map.c:447
static unlang_action_t list_mod_create(unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Create a list of modifications to apply to one or more fr_pair_t lists.
Definition map.c:135
static unlang_action_t map_proc_resume(unlang_result_t *p_result, request_t *request, UNUSED unlang_stack_frame_t *frame)
Definition map.c:296
fr_dlist_head_t vlm_head
Head of list of VP List Mod.
Definition map.c:49
void * rctx
for resume / signal
Definition map.c:66
static unlang_action_t map_proc_apply(unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Definition map.c:368
unlang_update_state_t
map and unlang integration.
Definition map.c:37
@ UNLANG_UPDATE_MAP_EXPANDED_RHS
Expand the RHS xlat or exec (if needed).
Definition map.c:40
@ UNLANG_UPDATE_MAP_INIT
Start processing a map.
Definition map.c:38
@ UNLANG_UPDATE_MAP_EXPANDED_LHS
Expand the LHS xlat or exec (if needed).
Definition map.c:39
static unlang_action_t unlang_map_state_init(unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Definition map.c:385
fr_dcursor_t maps
Cursor of maps to evaluate.
Definition map.c:47
fr_value_box_list_t rhs_result
Result of expanding the RHS.
Definition map.c:52
unlang_map_signal_t signal
for signal handlers
Definition map.c:68
#define MAP_CTX(_mod_inst, _map_inst, _rctx)
Wrapper to create a map_ctx_t as a compound literal.
Definition map.c:80
fr_value_box_list_t src_result
Result of expanding the map source.
Definition map.c:61
State of a map block.
Definition map.c:60
State of an update block.
Definition map.c:46
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
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 instance.
@ FR_TYPE_STRING
String of printable characters.
#define fr_assert(_expr)
Definition rad_assert.h:38
static bool done
Definition radclient.c:81
#define REDEBUG(fmt,...)
Definition radclient.h:52
#define RDEBUG2(fmt,...)
Definition radclient.h:54
#define RETURN_UNLANG_FAIL
Definition rcode.h:57
#define RETURN_UNLANG_NOOP
Definition rcode.h:63
#define REQUEST_VERIFY(_x)
Definition request.h:305
int map_list_mod_apply(request_t *request, vp_list_mod_t const *vlm)
Apply the output of map_to_list_mod to a request.
Definition map_async.c:914
int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out, request_t *request, map_t const *map, fr_value_box_list_t *lhs_result, fr_value_box_list_t *rhs_result)
Evaluate a map creating a new map with TMPL_TYPE_ATTR LHS and TMPL_TYPE_DATA RHS.
Definition map_async.c:248
A list modification.
Definition map.h:99
#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_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_REGEX
Compiled (and possibly JIT'd) regular expression.
Definition tmpl.h:154
@ 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
#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
fr_signal_t
Signals that can be generated/processed by request signal handlers.
Definition signal.h:38
eap_aka_sim_process_conf_t * inst
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
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
#define talloc_zero_pooled_object(_ctx, _type, _num_subobjects, _total_subobjects_size)
Definition talloc.h:177
int unlang_tmpl_push(TALLOC_CTX *ctx, fr_value_box_list_t *out, request_t *request, tmpl_t const *tmpl, unlang_tmpl_args_t *args)
Push a tmpl onto the stack for evaluation.
Definition tmpl.c:254
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:282
static void repeatable_clear(unlang_stack_frame_t *frame)
void * state
Stack frame specialisations.
static unlang_group_t * unlang_generic_to_group(unlang_t const *p)
@ UNLANG_TYPE_UPDATE
Update block.
Definition unlang_priv.h:57
@ UNLANG_TYPE_MAP
Mapping section (like UNLANG_TYPE_UPDATE, but uses values from a map_proc_t call).
Definition unlang_priv.h:64
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_DEBUG_BRACES
Print debug braces.
@ 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.
Our interpreter stack, as distinct from the C stack.
An unlang stack associated with a request.
int fr_value_box_list_concat_in_place(TALLOC_CTX *ctx, fr_value_box_t *out, fr_value_box_list_t *list, fr_type_t type, fr_value_box_list_action_t proc_action, bool flatten, size_t max_size)
Concatenate a list of value boxes.
Definition value.c:5949
@ FR_VALUE_BOX_LIST_FREE
Definition value.h:237
#define VALUE_BOX_LIST_VERIFY(_x)
Definition value.h:1319