![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Common child request management code. More...
#include <freeradius-devel/server/state.h>
#include <freeradius-devel/server/request.h>
#include <freeradius-devel/server/signal.h>
#include "lib/server/rcode.h"
#include "lib/util/talloc.h"
#include "unlang_priv.h"
#include "child_request_priv.h"
Go to the source code of this file.
Data Structures | |
struct | unlang_frame_state_child_request_t |
Functions | |
static unlang_action_t | unlang_child_request_done (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
When the child is done, tell the parent that we've exited. | |
int | unlang_child_request_init (TALLOC_CTX *ctx, unlang_child_request_t *out, request_t *child, rlm_rcode_t *p_result, unsigned int *sibling_count, void const *unique_session_ptr, bool free_child) |
Initialize a child request. | |
int | unlang_child_request_op_init (void) |
static void | unlang_child_request_signal (request_t *request, UNUSED unlang_stack_frame_t *frame, fr_signal_t action) |
Process a detach signal in the child. | |
static int | unlang_child_request_stack_init (unlang_child_request_t *cr) |
Push a resumption frame onto a child's stack. | |
Variables | |
fr_table_num_ordered_t const | unlang_child_states_table [] |
size_t | unlang_child_states_table_len = NUM_ELEMENTS(unlang_child_states_table) |
Common child request management code.
Definition in file child_request.c.
struct unlang_frame_state_child_request_t |
Definition at line 34 of file child_request.c.
Data Fields | ||
---|---|---|
unlang_child_request_t * | cr | A pointer to memory in the parent's frame state allocated for this child to write results to. |
|
static |
When the child is done, tell the parent that we've exited.
This is pushed as a frame at the top of the child's stack, so when the child is done executing, it runs this to inform the parent that its done.
Definition at line 128 of file child_request.c.
int unlang_child_request_init | ( | TALLOC_CTX * | ctx, |
unlang_child_request_t * | out, | ||
request_t * | child, | ||
rlm_rcode_t * | p_result, | ||
unsigned int * | sibling_count, | ||
void const * | unique_session_ptr, | ||
bool | free_child | ||
) |
Initialize a child request.
This initializes the child request result and configuration structure, and pushes a resumption frame onto the child's stack.
[in] | ctx | Memory to use for any additional memory allocated to the unlang_child_request_t. |
[out] | out | Child request to initialize. |
[in] | child | The child request to initialize. |
[in] | p_result | Where to write out the rcode from the child. |
[in,out] | sibling_count | If non-null the bumber of siblings. This is incremented for each child created. |
[in] | unique_session_ptr | Unique session pointer for this child. If NULL session data won't be stored/restored for the child. |
[in] | free_child | Free the child when done? |
Definition at line 265 of file child_request.c.
int unlang_child_request_op_init | ( | void | ) |
Definition at line 287 of file child_request.c.
|
static |
Process a detach signal in the child.
This processes any detach signals the child receives The child doesn't actually do the detaching
Definition at line 54 of file child_request.c.
|
static |
Push a resumption frame onto a child's stack.
Push a frame onto the stack of the child to inform the parent when it's complete. An additional frame is pushed onto the child's stack by the 'run' function which executes in the context of the parent.
[in] | cr | state for this child request. This is a pointer to a structure in the parent's frame state. |
Definition at line 207 of file child_request.c.
fr_table_num_ordered_t const unlang_child_states_table[] |
Definition at line 39 of file child_request.c.
size_t unlang_child_states_table_len = NUM_ELEMENTS(unlang_child_states_table) |
Definition at line 47 of file child_request.c.