The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
map.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2, or (at your option)
6 * any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 */
17
18/**
19 * $Id: f44c18ce56082f6ad0e75157106dcd74cc5fb167 $
20 *
21 * @file unlang/map.h
22 *
23 * @copyright 2025 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
24 */
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <freeradius-devel/server/signal.h>
30#include <freeradius-devel/server/request.h>
31#include <freeradius-devel/server/map.h>
32#include <freeradius-devel/server/map_proc.h>
33#include <freeradius-devel/unlang/interpret.h>
34
35/** A callback when the request gets a fr_signal_t.
36 *
37 * @note The callback is automatically removed on unlang_interpret_mark_runnable().
38 *
39 * @param[in] mpctx calling context for the map function.
40 * @param[in] request The current request.
41 * @param[in] action which is signalling the request.
42 */
43typedef void (*unlang_map_signal_t)(map_ctx_t const *mpctx, request_t *request, fr_signal_t action);
44
46 map_proc_func_t resume, unlang_map_signal_t signal, fr_signal_t sigmask, void *rctx);
47#ifdef __cplusplus
48}
49#endif
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition action.h:35
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
Temporary structure to hold arguments for map calls.
Definition map_proc.h:52
fr_signal_t
Signals that can be generated/processed by request signal handlers.
Definition signal.h:38
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
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