All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions | Variables
rlm_sometimes.c File Reference

Switches between retuning different return codes. More...

#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
+ Include dependency graph for rlm_sometimes.c:

Go to the source code of this file.

Data Structures

struct  rlm_sometimes_t


typedef struct rlm_sometimes_t rlm_sometimes_t


static rlm_rcode_t CC_HINT (nonnull)
static int mod_instantiate (CONF_SECTION *conf, void *instance)
static rlm_rcode_t sometimes_return (void *instance, REQUEST *request, RADIUS_PACKET *packet, RADIUS_PACKET *reply)


static const CONF_PARSER module_config []
module_t rlm_sometimes

Detailed Description

Switches between retuning different return codes.


Definition in file rlm_sometimes.c.

Data Structure Documentation

struct rlm_sometimes_t

Definition at line 34 of file rlm_sometimes.c.

+ Collaboration diagram for rlm_sometimes_t:
Data Fields
uint32_t end
vp_tmpl_t * key
rlm_rcode_t rcode
char const * rcode_str
uint32_t start

Typedef Documentation

Function Documentation

static rlm_rcode_t CC_HINT ( nonnull  )

Definition at line 138 of file rlm_sometimes.c.

+ Here is the call graph for this function:

static int mod_instantiate ( CONF_SECTION conf,
void *  instance 

Definition at line 59 of file rlm_sometimes.c.

+ Here is the call graph for this function:

static rlm_rcode_t sometimes_return ( void *  instance,
REQUEST request,

Definition at line 78 of file rlm_sometimes.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const CONF_PARSER module_config[]
Initial value:
= {
{ FR_CONF_OFFSET("rcode", PW_TYPE_STRING, rlm_sometimes_t, rcode_str), .dflt = "fail" },
{ FR_CONF_OFFSET("key", PW_TYPE_TMPL | PW_TYPE_ATTRIBUTE, rlm_sometimes_t, key), .dflt = "&User-Name", .quote = T_BARE_WORD },
{ FR_CONF_OFFSET("start", PW_TYPE_INTEGER, rlm_sometimes_t, start), .dflt = "0" },
{ FR_CONF_OFFSET("end", PW_TYPE_INTEGER, rlm_sometimes_t, end), .dflt = "127" },
Definition: conffile.h:289
32 Bit unsigned integer.
Definition: radius.h:34
#define FR_CONF_OFFSET(_n, _t, _s, _f)
Definition: conffile.h:168
Value must resolve to attribute in dict (deprecated, use PW_TYPE_TMPL).
Definition: conffile.h:201
String of printable characters.
Definition: radius.h:33
#define PW_TYPE_TMPL
CONF_PAIR should be parsed as a template.
Definition: conffile.h:208

Definition at line 51 of file rlm_sometimes.c.

module_t rlm_sometimes
Initial value:
= {
.name = "sometimes",
.inst_size = sizeof(rlm_sometimes_t),
.config = module_config,
.instantiate = mod_instantiate,
.methods = {
[MOD_AUTHENTICATE] = mod_sometimes_packet,
[MOD_AUTHORIZE] = mod_sometimes_packet,
[MOD_PREACCT] = mod_sometimes_packet,
[MOD_ACCOUNTING] = mod_sometimes_packet,
[MOD_PRE_PROXY] = mod_pre_proxy,
[MOD_POST_PROXY] = mod_post_proxy,
[MOD_POST_AUTH] = mod_sometimes_reply,
[MOD_RECV_COA] = mod_sometimes_packet,
[MOD_SEND_COA] = mod_sometimes_reply,
5 methods index for preproxy section.
Definition: modules.h:46
7 methods index for postauth section.
Definition: modules.h:48
Definition: modules.h:86
Will be restarted on HUP.
Definition: modules.h:79
static const CONF_PARSER module_config[]
Definition: rlm_sometimes.c:51
static int mod_instantiate(CONF_SECTION *conf, void *instance)
Definition: rlm_sometimes.c:59
3 methods index for accounting section.
Definition: modules.h:44
0 methods index for authenticate section.
Definition: modules.h:41
struct rlm_sometimes_t rlm_sometimes_t
6 methods index for postproxy section.
Definition: modules.h:47
2 methods index for preacct section.
Definition: modules.h:43
8 methods index for recvcoa section.
Definition: modules.h:50
9 methods index for sendcoa section.
Definition: modules.h:51
1 methods index for authorize section.
Definition: modules.h:42

Definition at line 165 of file rlm_sometimes.c.