The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions | Variables
child_request_priv.h File Reference
#include <freeradius-devel/server/request.h>
+ Include dependency graph for child_request_priv.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  unlang_child_request_t
 Each child has a state, a number, a request, and a count of their siblings. More...
 
struct  unlang_child_request_t.config
 
struct  unlang_child_request_t.result
 

Enumerations

enum  unlang_child_request_state_t {
  CHILD_INIT = 0 ,
  CHILD_RUNNABLE ,
  CHILD_EXITED ,
  CHILD_DETACHED ,
  CHILD_CANCELLED ,
  CHILD_DONE ,
  CHILD_FREED
}
 Parallel child states. More...
 

Functions

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)
 

Variables

fr_table_num_ordered_t const unlang_child_states_table []
 
size_t unlang_child_states_table_len
 

Data Structure Documentation

◆ unlang_child_request_t

struct unlang_child_request_t

Each child has a state, a number, a request, and a count of their siblings.

Definition at line 61 of file child_request_priv.h.

+ Collaboration diagram for unlang_child_request_t:
Data Fields
struct unlang_child_request_t.config config
char const * name Cache the request name.
int num The child number.
request_t * request Child request. The actual request the child will run.
struct unlang_child_request_t.result result
unsigned int * sibling_count Number of siblings.

as a child completes, it decrements this number. once it reaches zero, the parent is signalled to resume.

unlang_child_request_state_t state State of the child.

◆ unlang_child_request_t.config

struct unlang_child_request_t.config

Definition at line 73 of file child_request_priv.h.

Data Fields
bool free_child
void const * session_unique_ptr Session unique ptr identifier.

If not NULL, the child's session data will be stored in the parent, and be restored during a later request.

◆ unlang_child_request_t.result

struct unlang_child_request_t.result

Definition at line 80 of file child_request_priv.h.

Data Fields
rlm_rcode_t * p_result If not NULL, write the rcode here too.
int priority Priority of the highest frame on the stack of the child.
rlm_rcode_t rcode Where to store the result of the child.

Enumeration Type Documentation

◆ unlang_child_request_state_t

Parallel child states.

Enumerator
CHILD_INIT 

Initial state, has no request allocated.

CHILD_RUNNABLE 

Running/runnable.

The request is currently running, or is yielded but runnable.

CHILD_EXITED 

Child has run to completion, and is waiting to be reaped.

CHILD_DETACHED 

Child has detached, we can't signal it or communicate with it anymore.

It will be freed by the interpreter when it completes.

CHILD_CANCELLED 

Child was cancelled.

The request is still available, but the result from it should not be used and it should be free by the parent.

CHILD_DONE 

The child has been processed by the parent the request should still exist, and should be freed.

CHILD_FREED 

The child has been freed.

The request is no longer available, and should not be used. this is mostly for debugging purposes.

Definition at line 35 of file child_request_priv.h.

Function Documentation

◆ unlang_child_request_init()

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.

Parameters
[in]ctxMemory to use for any additional memory allocated to the unlang_child_request_t.
[out]outChild request to initialize.
[in]childThe child request to initialize.
[in]p_resultWhere to write out the rcode from the child.
[in,out]sibling_countIf non-null the bumber of siblings. This is incremented for each child created.
[in]unique_session_ptrUnique session pointer for this child. If NULL session data won't be stored/restored for the child.
[in]free_childFree the child when done?
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 265 of file child_request.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlang_child_request_op_init()

int unlang_child_request_op_init ( void  )

Definition at line 287 of file child_request.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ unlang_child_states_table

fr_table_num_ordered_t const unlang_child_states_table[]
extern

Definition at line 39 of file child_request.c.

◆ unlang_child_states_table_len

size_t unlang_child_states_table_len
extern

Definition at line 47 of file child_request.c.