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

Example module code. More...

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

Go to the source code of this file.

Data Structures

struct  rlm_example_t


typedef struct rlm_example_t rlm_example_t


static rlm_rcode_t CC_HINT (nonnull)
static int mod_detach (UNUSED void *instance)
static int mod_instantiate (CONF_SECTION *conf, void *instance)
static int rlm_example_cmp (UNUSED void *instance, REQUEST *request, UNUSED VALUE_PAIR *thing, VALUE_PAIR *check, UNUSED VALUE_PAIR *check_pairs, UNUSED VALUE_PAIR **reply_pairs)


static const CONF_PARSER module_config []
module_t rlm_example

Detailed Description

Example module code.


Definition in file rlm_example.c.

Data Structure Documentation

struct rlm_example_t

Definition at line 38 of file rlm_example.c.

+ Collaboration diagram for rlm_example_t:
Data Fields
bool boolean
fr_ipaddr_t ipaddr
char const * string
uint32_t value

Typedef Documentation

typedef struct rlm_example_t rlm_example_t

Function Documentation

static rlm_rcode_t CC_HINT ( nonnull  )

Definition at line 97 of file rlm_example.c.

+ Here is the call graph for this function:

static int mod_detach ( UNUSED void *  instance)

Definition at line 175 of file rlm_example.c.

static int mod_instantiate ( CONF_SECTION conf,
void *  instance 

Definition at line 73 of file rlm_example.c.

+ Here is the call graph for this function:

static int rlm_example_cmp ( UNUSED void *  instance,
REQUEST request,
UNUSED VALUE_PAIR check_pairs,
UNUSED VALUE_PAIR **  reply_pairs 

Definition at line 56 of file rlm_example.c.

+ Here is the caller graph for this function:

Variable Documentation

const CONF_PARSER module_config[]
Initial value:
= {
{ FR_CONF_OFFSET("integer", PW_TYPE_INTEGER, rlm_example_t, value), .dflt = "1" },
{ FR_CONF_OFFSET("boolean", PW_TYPE_BOOLEAN, rlm_example_t, boolean), .dflt = "no" },
{ FR_CONF_OFFSET("string", PW_TYPE_STRING, rlm_example_t, string) },
{ FR_CONF_OFFSET("ipaddr", PW_TYPE_IPV4_ADDR, rlm_example_t, ipaddr), .dflt = "*" },
Definition: conffile.h:289
A truth value.
Definition: radius.h:56
32 Bit unsigned integer.
Definition: radius.h:34
#define FR_CONF_OFFSET(_n, _t, _s, _f)
Definition: conffile.h:168
String of printable characters.
Definition: radius.h:33
32 Bit IPv4 Address.
Definition: radius.h:35

Definition at line 48 of file rlm_example.c.

module_t rlm_example
Initial value:
= {
.name = "example",
.inst_size = sizeof(rlm_example_t),
.config = module_config,
.instantiate = mod_instantiate,
.detach = mod_detach,
.methods = {
[MOD_PREACCT] = mod_preacct,
static rlm_rcode_t mod_accounting(void *instance, REQUEST *request)
Write accounting data to Couchbase documents.
struct rlm_example_t rlm_example_t
static const CONF_PARSER module_config[]
Definition: rlm_example.c:48
static rlm_rcode_t mod_authorize(void *instance, REQUEST *request)
Handle authorization requests using Couchbase document data.
Module is threadsafe.
Definition: modules.h:75
Definition: modules.h:86
static rlm_rcode_t mod_authenticate(void *instance, REQUEST *request) CC_HINT(nonnull)
4 methods index for checksimul section.
Definition: modules.h:45
3 methods index for accounting section.
Definition: modules.h:44
static rlm_rcode_t mod_checksimul(void *instance, REQUEST *request)
Check if a given user is already logged in.
static int mod_detach(UNUSED void *instance)
Definition: rlm_example.c:175
0 methods index for authenticate section.
Definition: modules.h:41
static int mod_instantiate(CONF_SECTION *conf, void *instance)
Definition: rlm_example.c:73
2 methods index for preacct section.
Definition: modules.h:43
1 methods index for authorize section.
Definition: modules.h:42

Definition at line 191 of file rlm_example.c.