The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
subrequest.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: 120d0f5849f9a54d403ee934cf7973754cb56dee $
20 *
21 * @file unlang/subrequest.h
22 *
23 * @copyright 2019 The FreeRADIUS server project
24 * @copyright 2021 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
25 */
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#include <freeradius-devel/server/request.h>
32#include <freeradius-devel/server/rcode.h>
33#include <stdbool.h>
34
35typedef struct {
36 bool enable; //!< Whether we should store/restore sessions.
37 void const *unique_ptr; //!< Session unique ptr identifier.
38 int unique_int; //!< Session unique int identifier.
40
42
44
46 rlm_rcode_t *p_result, void const *unique_session_ptr, bool free_child, bool top_frame);
47
49
50#ifdef __cplusplus
51}
52#endif
rlm_rcode_t
Return codes indicating the result of the module call.
Definition rcode.h:40
int unlang_subrequest_child_push(request_t *child, rlm_rcode_t *p_result, void const *unique_session_ptr, bool free_child, bool top_frame)
Push a pre-existing child back onto the stack as a subrequest.
Definition subrequest.c:422
int unlang_subrequest_child_push_and_detach(request_t *child)
Add a child request to the runnable queue.
Definition subrequest.c:496
int unique_int
Session unique int identifier.
Definition subrequest.h:38
void const * unique_ptr
Session unique ptr identifier.
Definition subrequest.h:37
request_t * unlang_subrequest_alloc(request_t *parent, fr_dict_t const *namespace)
Allocate a subrequest to run through a virtual server at some point in the future.
Definition subrequest.c:303
void unlang_subrequest_detach_and_free(request_t **child)
Free a child request, detaching it from its parent and freeing allocated memory.
Definition subrequest.c:288
bool enable
Whether we should store/restore sessions.
Definition subrequest.h:36
static fr_slen_t parent
Definition pair.h:845