The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Functions
interpret_synchronous.c File Reference

Synchronous interpreter. More...

#include "interpret_priv.h"
#include <freeradius-devel/server/module_rlm.h>
+ Include dependency graph for interpret_synchronous.c:

Go to the source code of this file.

Data Structures

struct  unlang_interpret_synchronous_t
 

Functions

static void _request_detach (request_t *request, UNUSED void *uctx)
 We don't need to do anything for internal -> detached. More...
 
static void _request_done_detached (request_t *request, UNUSED rlm_rcode_t rcode, UNUSED void *uctx)
 
static void _request_done_external (request_t *request, UNUSED rlm_rcode_t rcode, UNUSED void *uctx)
 External request is now complete. More...
 
static void _request_done_internal (request_t *request, UNUSED rlm_rcode_t rcode, UNUSED void *uctx)
 Internal request (i.e. More...
 
static void _request_init_internal (request_t *request, void *uctx)
 Internal request (i.e. More...
 
static void _request_resume (request_t *request, UNUSED void *uctx)
 Interpreter is starting to work on request again. More...
 
static void _request_runnable (request_t *request, void *uctx)
 Request is now runnable. More...
 
static bool _request_scheduled (request_t const *request, UNUSED void *uctx)
 
static void _request_stop (request_t *request, void *uctx)
 Request has been stopped. More...
 
static void _request_yield (request_t *request, void *uctx)
 Interpreter yielded request. More...
 
rlm_rcode_t unlang_interpret_synchronous (fr_event_list_t *el, request_t *request)
 Execute an unlang section synchronously. More...
 
static unlang_interpret_synchronous_tunlang_interpret_synchronous_alloc (TALLOC_CTX *ctx, fr_event_list_t *el)
 Allocate a new temporary interpreter. More...
 

Detailed Description

Synchronous interpreter.

Id
d12359e471a84ab2e309616282dc79df6b212db2

Definition in file interpret_synchronous.c.


Data Structure Documentation

◆ unlang_interpret_synchronous_t

struct unlang_interpret_synchronous_t

Definition at line 29 of file interpret_synchronous.c.

+ Collaboration diagram for unlang_interpret_synchronous_t:
Data Fields
fr_event_list_t * el
unlang_interpret_t * intp
fr_heap_t * runnable
int yielded

Function Documentation

◆ _request_detach()

static void _request_detach ( request_t request,
UNUSED void *  uctx 
)
static

We don't need to do anything for internal -> detached.

Definition at line 101 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_done_detached()

static void _request_done_detached ( request_t request,
UNUSED rlm_rcode_t  rcode,
UNUSED void *  uctx 
)
static

Definition at line 84 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_done_external()

static void _request_done_external ( request_t request,
UNUSED rlm_rcode_t  rcode,
UNUSED void *  uctx 
)
static

External request is now complete.

Definition at line 51 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_done_internal()

static void _request_done_internal ( request_t request,
UNUSED rlm_rcode_t  rcode,
UNUSED void *  uctx 
)
static

Internal request (i.e.

one generated by the interpreter) is now complete

Definition at line 77 of file interpret_synchronous.c.

◆ _request_init_internal()

static void _request_init_internal ( request_t request,
void *  uctx 
)
static

Internal request (i.e.

one generated by the interpreter) is now complete

Definition at line 39 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_resume()

static void _request_resume ( request_t request,
UNUSED void *  uctx 
)
static

Interpreter is starting to work on request again.

Definition at line 154 of file interpret_synchronous.c.

◆ _request_runnable()

static void _request_runnable ( request_t request,
void *  uctx 
)
static

Request is now runnable.

Definition at line 129 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_scheduled()

static bool _request_scheduled ( request_t const *  request,
UNUSED void *  uctx 
)
static

Definition at line 159 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_stop()

static void _request_stop ( request_t request,
void *  uctx 
)
static

Request has been stopped.

Clean up execution state

Definition at line 112 of file interpret_synchronous.c.

+ Here is the call graph for this function:

◆ _request_yield()

static void _request_yield ( request_t request,
void *  uctx 
)
static

Interpreter yielded request.

Definition at line 142 of file interpret_synchronous.c.

◆ unlang_interpret_synchronous()

rlm_rcode_t unlang_interpret_synchronous ( fr_event_list_t el,
request_t request 
)

Execute an unlang section synchronously.

Create a temporary event loop and swap it out for the one in the request. Execute unlang operations until we receive a non-yield return code then return.

Note
The use cases for this are very limited. If you need to use it, chances are what you're doing could be done better using one of the thread event loops.
Parameters
[in]elEvent list for the temporary interpreter. If NULL a temporary list will be allocated.
[in]requestThe current request.
Returns
One of the RLM_MODULE_* macros.

Definition at line 212 of file interpret_synchronous.c.

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

◆ unlang_interpret_synchronous_alloc()

static unlang_interpret_synchronous_t* unlang_interpret_synchronous_alloc ( TALLOC_CTX *  ctx,
fr_event_list_t el 
)
static

Allocate a new temporary interpreter.

Definition at line 167 of file interpret_synchronous.c.

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