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: 0c671b4630eccc3ff93e48832eaf33700eb7a69f $
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 <freeradius-devel/unlang/interpret.h>
34#include <stdbool.h>
35
36typedef struct {
37 bool enable; //!< Whether we should store/restore sessions.
38 void const *unique_ptr; //!< Session unique ptr identifier.
39 int unique_int; //!< Session unique int identifier.
41
43
45
47 void const *unique_session_ptr, bool free_child, bool top_frame);
48
50
51#ifdef __cplusplus
52}
53#endif
int unlang_subrequest_child_push_and_detach(request_t *child)
Add a child request to the runnable queue.
Definition subrequest.c:501
int unique_int
Session unique int identifier.
Definition subrequest.h:39
void const * unique_ptr
Session unique ptr identifier.
Definition subrequest.h:38
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:304
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:289
bool enable
Whether we should store/restore sessions.
Definition subrequest.h:37
int unlang_subrequest_child_push(unlang_result_t *p_result, request_t *child, 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:428
static fr_slen_t parent
Definition pair.h:839