The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
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: 01ca28284443e0ed2f09d4ce9301704a462e36ae $
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 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #include <freeradius-devel/server/request.h>
31 #include <freeradius-devel/server/rcode.h>
32 #include <stdbool.h>
33 
34 typedef struct {
35  bool enable; //!< Whether we should store/restore sessions.
36  void const *unique_ptr; //!< Session unique ptr identifier.
37  int unique_int; //!< Session unique int identifier.
39 
41 
43 
45 
47  unlang_subrequest_session_t const *session,
48  bool free_child, bool top_frame);
49 
51 
52 #ifdef __cplusplus
53 }
54 #endif
rlm_rcode_t
Return codes indicating the result of the module call.
Definition: rcode.h:40
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:266
int unlang_subrequest_child_push_and_detach(request_t *child)
int unlang_subrequest_lifetime_set(request_t *request)
Initialize a detached child.
int unique_int
Session unique int identifier.
Definition: subrequest.h:37
void const * unique_ptr
Session unique ptr identifier.
Definition: subrequest.h:36
int unlang_subrequest_child_push(rlm_rcode_t *out, request_t *child, unlang_subrequest_session_t const *session, bool free_child, bool top_frame)
Push a pre-existing child back onto the stack as a subrequest.
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:251
bool enable
Whether we should store/restore sessions.
Definition: subrequest.h:35
static fr_slen_t parent
Definition: pair.h:844
static size_t char ** out
Definition: value.h:984