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

Unlang "function" keyword evaluation. More...

#include "unlang_priv.h"
#include "function.h"
+ Include dependency graph for function.c:

Go to the source code of this file.

Data Structures

struct  unlang_frame_state_func_t
 

Functions

static unlang_action_t unlang_function_call (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
 Call a generic function. More...
 
static unlang_action_t unlang_function_call_repeat (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
 
int unlang_function_clear (request_t *request)
 Clear pending repeat function calls, and remove the signal handler. More...
 
static void unlang_function_dump (request_t *request, unlang_stack_frame_t *frame)
 Custom frame state dumper. More...
 
void unlang_function_init (void)
 
static void unlang_function_signal (request_t *request, unlang_stack_frame_t *frame, fr_signal_t action)
 Generic signal handler. More...
 

Variables

static unlang_t function_instruction
 Static instruction for allowing modules/xlats to call functions within themselves, or submodules. More...
 

Detailed Description

Unlang "function" keyword evaluation.

Id
4477a947db040f398f29b21d866e4493e7dfbbbd

Definition in file function.c.


Data Structure Documentation

◆ unlang_frame_state_func_t

struct unlang_frame_state_func_t

Definition at line 34 of file function.c.

+ Collaboration diagram for unlang_frame_state_func_t:
Data Fields
unlang_function_t func To call when going down the stack.
char const * func_name Debug name for the function.
unlang_function_t repeat To call when going back up the stack.
char const * repeat_name Debug name for the repeat function.
fr_signal_t sigmask Signals to block.
unlang_function_signal_t signal Signal function to call.
char const * signal_name Debug name for the signal function.
void * uctx Uctx to pass to function.

Function Documentation

◆ unlang_function_call()

static unlang_action_t unlang_function_call ( rlm_rcode_t p_result,
request_t request,
unlang_stack_frame_t frame 
)
static

Call a generic function.

Parameters
[out]p_resultThe frame result.
[in]requestThe current request.
[in]frameThe current frame.

Definition at line 109 of file function.c.

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

◆ unlang_function_call_repeat()

static unlang_action_t unlang_function_call_repeat ( rlm_rcode_t p_result,
request_t request,
unlang_stack_frame_t frame 
)
static

Definition at line 84 of file function.c.

+ Here is the caller graph for this function:

◆ unlang_function_clear()

int unlang_function_clear ( request_t request)

Clear pending repeat function calls, and remove the signal handler.

The function frame being modified must be at the top of the stack.

Parameters
[in]requestThe current request.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 160 of file function.c.

+ Here is the call graph for this function:

◆ unlang_function_dump()

static void unlang_function_dump ( request_t request,
unlang_stack_frame_t frame 
)
static

Custom frame state dumper.

Definition at line 327 of file function.c.

+ Here is the caller graph for this function:

◆ unlang_function_init()

void unlang_function_init ( void  )

Definition at line 337 of file function.c.

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

◆ unlang_function_signal()

static void unlang_function_signal ( request_t request,
unlang_stack_frame_t frame,
fr_signal_t  action 
)
static

Generic signal handler.

Parameters
[in]requestbeing signalled.
[in]framebeing signalled.
[in]actionType of signal.

Definition at line 74 of file function.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ function_instruction

unlang_t function_instruction
static
Initial value:
= {
.name = "function",
.debug_name = "function",
.actions = {
.actions = {
},
.retry = RETRY_INIT,
},
}
@ RLM_MODULE_INVALID
The module considers the request invalid.
Definition: rcode.h:45
@ RLM_MODULE_OK
The module is OK, continue.
Definition: rcode.h:43
@ RLM_MODULE_FAIL
Module failed, don't reply.
Definition: rcode.h:42
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
Definition: rcode.h:46
@ RLM_MODULE_REJECT
Immediately reject the request.
Definition: rcode.h:41
@ RLM_MODULE_NOTFOUND
User not found.
Definition: rcode.h:47
@ RLM_MODULE_UPDATED
OK (pairs modified).
Definition: rcode.h:49
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
Definition: rcode.h:48
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
Definition: rcode.h:44
@ UNLANG_TYPE_FUNCTION
Internal call to a function or submodule.
Definition: unlang_priv.h:57
#define RETRY_INIT
Definition: retry.h:39

Static instruction for allowing modules/xlats to call functions within themselves, or submodules.

Definition at line 48 of file function.c.