Read and map CSV files.
More...
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
#include <freeradius-devel/map_proc.h>
Go to the source code of this file.
|
static bool | buf2entry (rlm_csv_t *inst, char *buf, char **out) |
|
static int | csv_entry_cmp (void const *one, void const *two) |
|
static int | csv_map_getvalue (TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, vp_map_t const *map, void *uctx) |
|
static int | csv_map_verify (UNUSED void *proc_inst, void *mod_inst, UNUSED vp_tmpl_t const *src, vp_map_t const *maps) |
|
static int | fieldname2offset (rlm_csv_t *inst, char const *field_name) |
|
static rlm_csv_entry_t * | file2csv (CONF_SECTION *conf, rlm_csv_t *inst, int lineno, char *buffer) |
|
static int | mod_bootstrap (CONF_SECTION *conf, void *instance) |
|
static rlm_rcode_t | mod_map_proc (void *mod_inst, UNUSED void *proc_inst, REQUEST *request, char const *key, vp_map_t const *maps) |
| Perform a search and map the result of the search to server attributes. More...
|
|
Read and map CSV files.
- Id:
- c53c827422b264f43057d5928740abd18228a4af
- Copyright
- 2015 The FreeRADIUS server project
-
2015 Alan DeKok aland.nosp@m.@fre.nosp@m.eradi.nosp@m.us.o.nosp@m.rg
Definition in file rlm_csv.c.
Definition at line 43 of file rlm_csv.c.
Data Fields |
char const * |
delimiter |
|
char const ** |
field_names |
|
int * |
field_offsets |
|
char const * |
filename |
|
char const * |
header |
|
char const * |
key |
|
int |
key_field |
|
char const * |
name |
|
int |
num_fields |
|
rbtree_t * |
tree |
|
int |
used_fields |
|
static bool buf2entry |
( |
rlm_csv_t * |
inst, |
|
|
char * |
buf, |
|
|
char ** |
out |
|
) |
| |
|
static |
static int csv_entry_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
static int fieldname2offset |
( |
rlm_csv_t * |
inst, |
|
|
char const * |
field_name |
|
) |
| |
|
static |
static int mod_bootstrap |
( |
CONF_SECTION * |
conf, |
|
|
void * |
instance |
|
) |
| |
|
static |
Perform a search and map the result of the search to server attributes.
- Parameters
-
[in] | mod_inst | rlm_csv_t |
[in] | proc_inst | mapping map entries to field numbers. |
[in,out] | request | The current request. |
[in] | key | key to look for |
[in] | maps | Head of the map list. |
- Returns
-
Definition at line 474 of file rlm_csv.c.
Initial value:= {
}
#define PW_TYPE_FILE_INPUT
File matching value must exist, and must be readable.
#define CONF_PARSER_TERMINATOR
#define PW_TYPE_NOT_EMPTY
CONF_PAIR is required to have a non zero length value.
#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.
String of printable characters.
Definition at line 68 of file rlm_csv.c.
Initial value:= {
.name = "csv",
.type = 0,
}
static const CONF_PARSER module_config[]
static int mod_bootstrap(CONF_SECTION *conf, void *instance)
struct rlm_csv_t rlm_csv_t
Definition at line 527 of file rlm_csv.c.