Tracks data usage and other counters using SQL.
More...
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
#include <ctype.h>
Go to the source code of this file.
|
static rlm_rcode_t | CC_HINT (nonnull) |
|
static int | counter_cmp (void *instance, REQUEST *request, UNUSED VALUE_PAIR *req, VALUE_PAIR *check, UNUSED VALUE_PAIR *check_pairs, UNUSED VALUE_PAIR **reply_pairs) |
|
static int | find_next_reset (rlm_sqlcounter_t *inst, time_t timeval) |
|
static int | find_prev_reset (rlm_sqlcounter_t *inst, time_t timeval) |
|
static int | mod_bootstrap (CONF_SECTION *conf, void *instance) |
|
static int | mod_instantiate (CONF_SECTION *conf, void *instance) |
|
static size_t | sqlcounter_expand (char *out, int outlen, rlm_sqlcounter_t *inst, REQUEST *request, char const *fmt) |
|
Tracks data usage and other counters using SQL.
- Id:
- 90f9bc1feac97015c3ee3533683a7c994adadf07
- Copyright
- 2001,2006 The FreeRADIUS server project
-
2001 Alan DeKok aland.nosp@m.@ox..nosp@m.org
Definition in file rlm_sqlcounter.c.
Definition at line 60 of file rlm_sqlcounter.c.
Data Fields |
vp_tmpl_t * |
key_attr |
User-Name. |
time_t |
last_reset |
|
vp_tmpl_t * |
limit_attr |
Max-Daily-Session. |
vp_tmpl_t * |
paircmp_attr |
Daily-Session-Time. |
char const * |
query |
SQL query to retrieve current session time. |
vp_tmpl_t * |
reply_attr |
Session-Timeout. |
char const * |
reset |
Daily, weekly, monthly, never or user defined. |
time_t |
reset_time |
|
char const * |
sqlmod_inst |
Instance of SQL module to use, usually just 'sql'. |
#define MAX_QUERY_LEN 1024 |
static int mod_bootstrap |
( |
CONF_SECTION * |
conf, |
|
|
void * |
instance |
|
) |
| |
|
static |
static int mod_instantiate |
( |
CONF_SECTION * |
conf, |
|
|
void * |
instance |
|
) |
| |
|
static |
static size_t sqlcounter_expand |
( |
char * |
out, |
|
|
int |
outlen, |
|
|
rlm_sqlcounter_t * |
inst, |
|
|
REQUEST * |
request, |
|
|
char const * |
fmt |
|
) |
| |
|
static |
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#define PW_TYPE_XLAT
string will be dynamically expanded.
#define FR_CONF_OFFSET(_n, _t, _s, _f)
#define PW_TYPE_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
#define PW_TYPE_ATTRIBUTE
Value must resolve to attribute in dict (deprecated, use PW_TYPE_TMPL).
String of printable characters.
#define PW_TYPE_TMPL
CONF_PAIR should be parsed as a template.
Definition at line 83 of file rlm_sqlcounter.c.
Initial value:= {
.name = "sqlcounter",
.methods = {
},
}
static rlm_rcode_t mod_authorize(void *instance, REQUEST *request)
Handle authorization requests using Couchbase document data.
#define RLM_TYPE_THREAD_SAFE
Module is threadsafe.
struct rlm_sqlcounter_t rlm_sqlcounter_t
static const CONF_PARSER module_config[]
static int mod_bootstrap(CONF_SECTION *conf, void *instance)
static int mod_instantiate(CONF_SECTION *conf, void *instance)
1 methods index for authorize section.
Definition at line 628 of file rlm_sqlcounter.c.