26RCSIDH(rcode_h,
"$Id: b4915b7926ffa5c8bff5ad13c991a86510c8bda4 $")
28#include <freeradius-devel/util/table.h>
29#include <freeradius-devel/unlang/action.h>
64#define RLM_MODULE_RCODE_VALID(_rcode) (((_rcode) > RLM_MODULE_NOT_SET) && ((_rcode) < RLM_MODULE_NUMCODES))
67#define RETURN_UNLANG_RCODE(_rcode) do { p_result->rcode = (_rcode); return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
68#define RETURN_UNLANG_REJECT RETURN_UNLANG_RCODE(RLM_MODULE_REJECT)
69#define RETURN_UNLANG_FAIL RETURN_UNLANG_RCODE(RLM_MODULE_FAIL)
70#define RETURN_UNLANG_OK RETURN_UNLANG_RCODE(RLM_MODULE_OK)
71#define RETURN_UNLANG_HANDLED RETURN_UNLANG_RCODE(RLM_MODULE_HANDLED)
72#define RETURN_UNLANG_INVALID RETURN_UNLANG_RCODE(RLM_MODULE_INVALID)
73#define RETURN_UNLANG_DISALLOW RETURN_UNLANG_RCODE(RLM_MODULE_DISALLOW)
74#define RETURN_UNLANG_NOTFOUND RETURN_UNLANG_RCODE(RLM_MODULE_NOTFOUND)
75#define RETURN_UNLANG_NOOP RETURN_UNLANG_RCODE(RLM_MODULE_NOOP)
76#define RETURN_UNLANG_UPDATED RETURN_UNLANG_RCODE(RLM_MODULE_UPDATED)
77#define RETURN_UNLANG_TIMEOUT RETURN_UNLANG_RCODE(RLM_MODULE_TIMEOUT)
85#define RLM_MODULE_USER_SECTION_REJECT \
87 case RLM_MODULE_FAIL: \
88 case RLM_MODULE_INVALID: \
89 case RLM_MODULE_DISALLOW: \
90 case RLM_MODULE_TIMEOUT
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_INVALID
The module considers the request invalid.
@ RLM_MODULE_OK
The module is OK, continue.
@ RLM_MODULE_FAIL
Module failed, don't reply.
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
@ RLM_MODULE_REJECT
Immediately reject the request.
@ RLM_MODULE_TIMEOUT
Module (or section) timed out.
@ RLM_MODULE_NOTFOUND
User not found.
@ RLM_MODULE_UPDATED
OK (pairs modified).
@ RLM_MODULE_NOT_SET
Error resolving rcode (should not be returned by modules).
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
@ RLM_MODULE_NUMCODES
How many valid return codes there are.
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
fr_table_num_sorted_t const rcode_table[]
An element in a lexicographically sorted array of name to num mappings.