The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Variables
mod_action.h File Reference

Unlang module actions. More...

#include <freeradius-devel/server/rcode.h>
#include <freeradius-devel/util/retry.h>
+ Include dependency graph for mod_action.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  unlang_mod_actions_t
 

Macros

#define DEFAULT_MOD_ACTIONS   { .actions = {}, .retry = RETRY_INIT }
 
#define MOD_ACTION_VALID(_x)   ((((_x) >= 0) && ((_x) <= 3)) || (((_x) >= MOD_PRIORITY_MIN) && ((_x) <= MOD_PRIORITY_MAX)))
 
#define MOD_ACTION_VALID_SET(_x)   ((((_x) > 0) && ((_x) <= 3)) || (((_x) >= MOD_PRIORITY_MIN) && ((_x) <= MOD_PRIORITY_MAX)))
 
#define MOD_ACTIONS_FAIL_TIMEOUT_RETURN   { .actions = { [RLM_MODULE_FAIL] = MOD_ACTION_RETURN, [RLM_MODULE_TIMEOUT] = MOD_ACTION_RETURN,}, .retry = RETRY_INIT }
 
#define MOD_PRIORITY(_x)   ((_x) | 0x80)
 
#define MOD_PRIORITY_MIN   MOD_PRIORITY_1
 

Enumerations

enum  unlang_mod_action_t {
  MOD_ACTION_NOT_SET = 0 ,
  MOD_ACTION_RETRY = 1 ,
  MOD_ACTION_REJECT = 2 ,
  MOD_ACTION_RETURN = 3 ,
  MOD_PRIORITY_1 = MOD_PRIORITY(1) ,
  MOD_PRIORITY_2 = MOD_PRIORITY(2) ,
  MOD_PRIORITY_3 = MOD_PRIORITY(3) ,
  MOD_PRIORITY_4 = MOD_PRIORITY(4) ,
  MOD_PRIORITY_MAX = MOD_PRIORITY(64)
}
 

Variables

const char * mod_action_name [MOD_PRIORITY_MAX+1]
 
unlang_mod_actions_t const mod_actions_accounting
 
unlang_mod_actions_t const mod_actions_authenticate
 
unlang_mod_actions_t const mod_actions_authorize
 
unlang_mod_actions_t const mod_actions_postauth
 
unlang_mod_actions_t const mod_actions_preacct
 

Detailed Description

Unlang module actions.

Id
23fadd2f8d3b972c94873ec7d715b87774cf26c6

Definition in file mod_action.h.


Data Structure Documentation

◆ unlang_mod_actions_t

struct unlang_mod_actions_t

Definition at line 63 of file mod_action.h.

+ Collaboration diagram for unlang_mod_actions_t:
Data Fields
unlang_mod_action_t actions[RLM_MODULE_NUMCODES]
fr_retry_config_t retry

Macro Definition Documentation

◆ DEFAULT_MOD_ACTIONS

#define DEFAULT_MOD_ACTIONS   { .actions = {}, .retry = RETRY_INIT }

Definition at line 68 of file mod_action.h.

◆ MOD_ACTION_VALID

#define MOD_ACTION_VALID (   _x)    ((((_x) >= 0) && ((_x) <= 3)) || (((_x) >= MOD_PRIORITY_MIN) && ((_x) <= MOD_PRIORITY_MAX)))

Definition at line 60 of file mod_action.h.

◆ MOD_ACTION_VALID_SET

#define MOD_ACTION_VALID_SET (   _x)    ((((_x) > 0) && ((_x) <= 3)) || (((_x) >= MOD_PRIORITY_MIN) && ((_x) <= MOD_PRIORITY_MAX)))

Definition at line 61 of file mod_action.h.

◆ MOD_ACTIONS_FAIL_TIMEOUT_RETURN

#define MOD_ACTIONS_FAIL_TIMEOUT_RETURN   { .actions = { [RLM_MODULE_FAIL] = MOD_ACTION_RETURN, [RLM_MODULE_TIMEOUT] = MOD_ACTION_RETURN,}, .retry = RETRY_INIT }

Definition at line 69 of file mod_action.h.

◆ MOD_PRIORITY

#define MOD_PRIORITY (   _x)    ((_x) | 0x80)

Definition at line 34 of file mod_action.h.

◆ MOD_PRIORITY_MIN

#define MOD_PRIORITY_MIN   MOD_PRIORITY_1

Definition at line 59 of file mod_action.h.

Enumeration Type Documentation

◆ unlang_mod_action_t

Enumerator
MOD_ACTION_NOT_SET 

default "not set by anything"

MOD_ACTION_RETRY 

retry the instruction, MUST also set a retry config

MOD_ACTION_REJECT 

change the rcode to REJECT, with unset priority

MOD_ACTION_RETURN 

stop processing the section, and return the rcode with unset priority

MOD_PRIORITY_1 
MOD_PRIORITY_2 
MOD_PRIORITY_3 
MOD_PRIORITY_4 
MOD_PRIORITY_MAX 

Definition at line 36 of file mod_action.h.

Variable Documentation

◆ mod_action_name

const char* mod_action_name[MOD_PRIORITY_MAX+1]
extern

Definition at line 113 of file mod_action.c.

◆ mod_actions_accounting

unlang_mod_actions_t const mod_actions_accounting
extern

Definition at line 78 of file mod_action.c.

◆ mod_actions_authenticate

unlang_mod_actions_t const mod_actions_authenticate
extern

Definition at line 30 of file mod_action.c.

◆ mod_actions_authorize

unlang_mod_actions_t const mod_actions_authorize
extern

Definition at line 46 of file mod_action.c.

◆ mod_actions_postauth

unlang_mod_actions_t const mod_actions_postauth
extern

Definition at line 93 of file mod_action.c.

◆ mod_actions_preacct

unlang_mod_actions_t const mod_actions_preacct
extern

Definition at line 62 of file mod_action.c.