The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Enumerations | Variables
rcode.h File Reference

Return codes returned by modules and virtual server sections. More...

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

Go to the source code of this file.

Macros

#define RETURN_MODULE_DISALLOW   do { *p_result = RLM_MODULE_DISALLOW; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_FAIL   do { *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_HANDLED   do { *p_result = RLM_MODULE_HANDLED; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_INVALID   do { *p_result = RLM_MODULE_INVALID; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_NOOP   do { *p_result = RLM_MODULE_NOOP; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_NOTFOUND   do { *p_result = RLM_MODULE_NOTFOUND; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_OK   do { *p_result = RLM_MODULE_OK; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_RCODE(_rcode)   do { *p_result = (_rcode); return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_REJECT   do { *p_result = RLM_MODULE_REJECT; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RETURN_MODULE_UPDATED   do { *p_result = RLM_MODULE_UPDATED; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 
#define RLM_MODULE_USER_SECTION_REJECT
 Rcodes that translate to a user configurable section failing overall. More...
 

Enumerations

enum  rlm_rcode_t {
  RLM_MODULE_REJECT = 0 ,
  RLM_MODULE_FAIL ,
  RLM_MODULE_OK ,
  RLM_MODULE_HANDLED ,
  RLM_MODULE_INVALID ,
  RLM_MODULE_DISALLOW ,
  RLM_MODULE_NOTFOUND ,
  RLM_MODULE_NOOP ,
  RLM_MODULE_UPDATED ,
  RLM_MODULE_NUMCODES ,
  RLM_MODULE_NOT_SET
}
 Return codes indicating the result of the module call. More...
 

Variables

fr_table_num_sorted_t const rcode_table []
 
size_t rcode_table_len
 

Detailed Description

Return codes returned by modules and virtual server sections.

Id
74eed3d707af2d7844b432d5979fe876692db6a6

Definition in file rcode.h.

Macro Definition Documentation

◆ RETURN_MODULE_DISALLOW

#define RETURN_MODULE_DISALLOW   do { *p_result = RLM_MODULE_DISALLOW; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 60 of file rcode.h.

◆ RETURN_MODULE_FAIL

#define RETURN_MODULE_FAIL   do { *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 56 of file rcode.h.

◆ RETURN_MODULE_HANDLED

#define RETURN_MODULE_HANDLED   do { *p_result = RLM_MODULE_HANDLED; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 58 of file rcode.h.

◆ RETURN_MODULE_INVALID

#define RETURN_MODULE_INVALID   do { *p_result = RLM_MODULE_INVALID; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 59 of file rcode.h.

◆ RETURN_MODULE_NOOP

#define RETURN_MODULE_NOOP   do { *p_result = RLM_MODULE_NOOP; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 62 of file rcode.h.

◆ RETURN_MODULE_NOTFOUND

#define RETURN_MODULE_NOTFOUND   do { *p_result = RLM_MODULE_NOTFOUND; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 61 of file rcode.h.

◆ RETURN_MODULE_OK

#define RETURN_MODULE_OK   do { *p_result = RLM_MODULE_OK; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 57 of file rcode.h.

◆ RETURN_MODULE_RCODE

#define RETURN_MODULE_RCODE (   _rcode)    do { *p_result = (_rcode); return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 64 of file rcode.h.

◆ RETURN_MODULE_REJECT

#define RETURN_MODULE_REJECT   do { *p_result = RLM_MODULE_REJECT; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 55 of file rcode.h.

◆ RETURN_MODULE_UPDATED

#define RETURN_MODULE_UPDATED   do { *p_result = RLM_MODULE_UPDATED; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)

Definition at line 63 of file rcode.h.

◆ RLM_MODULE_USER_SECTION_REJECT

#define RLM_MODULE_USER_SECTION_REJECT
Value:
@ RLM_MODULE_INVALID
The module considers the request invalid.
Definition: rcode.h:45
@ 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

Rcodes that translate to a user configurable section failing overall.

Definition at line 72 of file rcode.h.

Enumeration Type Documentation

◆ rlm_rcode_t

Return codes indicating the result of the module call.

All module functions must return one of the codes listed below (apart from RLM_MODULE_NUMCODES, which is used to check for validity).

Enumerator
RLM_MODULE_REJECT 

Immediately reject the request.

RLM_MODULE_FAIL 

Module failed, don't reply.

RLM_MODULE_OK 

The module is OK, continue.

RLM_MODULE_HANDLED 

The module handled the request, so stop.

RLM_MODULE_INVALID 

The module considers the request invalid.

RLM_MODULE_DISALLOW 

Reject the request (user is locked out).

RLM_MODULE_NOTFOUND 

User not found.

RLM_MODULE_NOOP 

Module succeeded without doing anything.

RLM_MODULE_UPDATED 

OK (pairs modified).

RLM_MODULE_NUMCODES 

How many valid return codes there are.

RLM_MODULE_NOT_SET 

Error resolving rcode (should not be returned by modules).

Definition at line 40 of file rcode.h.

Variable Documentation

◆ rcode_table

fr_table_num_sorted_t const rcode_table[]
extern

Definition at line 35 of file rcode.c.

◆ rcode_table_len

size_t rcode_table_len
extern

Definition at line 46 of file rcode.c.