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

DNS services via libunbound. More...

#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/log.h>
#include <fcntl.h>
#include <unbound.h>
+ Include dependency graph for rlm_unbound.c:

Go to the source code of this file.

Data Structures

struct  rlm_unbound_t
 

Typedefs

typedef struct rlm_unbound_t rlm_unbound_t
 

Functions

static void link_ubres (void *my_arg, int err, struct ub_result *result)
 
static void log_spew (UNUSED fr_event_list_t *el, UNUSED int sock, void *ctx)
 
static int mod_bootstrap (CONF_SECTION *conf, void *instance)
 
static int mod_detach (UNUSED void *instance)
 
static int mod_instantiate (CONF_SECTION *conf, void *instance)
 
static int rrlabels_tostr (char *out, char *rr, size_t left)
 
static int ub_common_fail (REQUEST *request, char const *tag, struct ub_result *ub)
 
static int ub_common_wait (rlm_unbound_t const *inst, REQUEST *request, char const *tag, struct ub_result **ub, int async_id)
 
static void ub_fd_handler (UNUSED fr_event_list_t *el, UNUSED int sock, void *ctx)
 
static ssize_t xlat_a (char **out, size_t outlen, void const *mod_inst, UNUSED void const *xlat_inst, REQUEST *request, char const *fmt)
 
static ssize_t xlat_aaaa (char **out, size_t outlen, void const *mod_inst, UNUSED void const *xlat_inst, REQUEST *request, char const *fmt)
 
static ssize_t xlat_ptr (char **out, size_t outlen, void const *mod_inst, UNUSED void const *xlat_inst, REQUEST *request, char const *fmt)
 

Variables

static const CONF_PARSER module_config []
 
module_t rlm_unbound
 

Detailed Description

DNS services via libunbound.

Id:
08c990916f14c6044b6c9ee8058f1923821634c1

Definition in file rlm_unbound.c.


Data Structure Documentation

struct rlm_unbound_t

Definition at line 33 of file rlm_unbound.c.

+ Collaboration diagram for rlm_unbound_t:
Data Fields
fr_event_list_t * el
char const * filename
int log_fd
int log_pipe[2]
bool log_pipe_in_use
FILE * log_pipe_stream[2]
FILE * log_stream
char const * name
uint32_t timeout
struct ub_ctx * ub
char const * xlat_a_name
char const * xlat_aaaa_name
char const * xlat_ptr_name

Typedef Documentation

typedef struct rlm_unbound_t rlm_unbound_t

Function Documentation

static void link_ubres ( void *  my_arg,
int  err,
struct ub_result *  result 
)
static

Definition at line 68 of file rlm_unbound.c.

+ Here is the caller graph for this function:

static void log_spew ( UNUSED fr_event_list_t el,
UNUSED int  sock,
void *  ctx 
)
static

Definition at line 373 of file rlm_unbound.c.

+ Here is the caller graph for this function:

static int mod_bootstrap ( CONF_SECTION conf,
void *  instance 
)
static

Definition at line 397 of file rlm_unbound.c.

+ Here is the call graph for this function:

static int mod_detach ( UNUSED void *  instance)
static

Definition at line 728 of file rlm_unbound.c.

+ Here is the call graph for this function:

static int mod_instantiate ( CONF_SECTION conf,
void *  instance 
)
static

Definition at line 425 of file rlm_unbound.c.

+ Here is the call graph for this function:

static int rrlabels_tostr ( char *  out,
char *  rr,
size_t  left 
)
static

Definition at line 94 of file rlm_unbound.c.

+ Here is the caller graph for this function:

static int ub_common_fail ( REQUEST request,
char const *  tag,
struct ub_result *  ub 
)
static

Definition at line 193 of file rlm_unbound.c.

+ Here is the caller graph for this function:

static int ub_common_wait ( rlm_unbound_t const *  inst,
REQUEST request,
char const *  tag,
struct ub_result **  ub,
int  async_id 
)
static

Definition at line 151 of file rlm_unbound.c.

+ Here is the caller graph for this function:

static void ub_fd_handler ( UNUSED fr_event_list_t el,
UNUSED int  sock,
void *  ctx 
)
static

Definition at line 358 of file rlm_unbound.c.

+ Here is the caller graph for this function:

static ssize_t xlat_a ( char **  out,
size_t  outlen,
void const *  mod_inst,
UNUSED void const *  xlat_inst,
REQUEST request,
char const *  fmt 
)
static

Definition at line 213 of file rlm_unbound.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ssize_t xlat_aaaa ( char **  out,
size_t  outlen,
void const *  mod_inst,
UNUSED void const *  xlat_inst,
REQUEST request,
char const *  fmt 
)
static

Definition at line 260 of file rlm_unbound.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ssize_t xlat_ptr ( char **  out,
size_t  outlen,
void const *  mod_inst,
UNUSED void const *  xlat_inst,
REQUEST request,
char const *  fmt 
)
static

Definition at line 305 of file rlm_unbound.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const CONF_PARSER module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("filename", PW_TYPE_FILE_INPUT | PW_TYPE_REQUIRED, rlm_unbound_t, filename), .dflt = "${modconfdir}/unbound/default.conf" },
{ FR_CONF_OFFSET("timeout", PW_TYPE_INTEGER, rlm_unbound_t, timeout), .dflt = "3000" },
}
#define PW_TYPE_FILE_INPUT
File matching value must exist, and must be readable.
Definition: conffile.h:204
#define CONF_PARSER_TERMINATOR
Definition: conffile.h:289
static float timeout
Definition: radclient.c:43
32 Bit unsigned integer.
Definition: radius.h:34
#define FR_CONF_OFFSET(_n, _t, _s, _f)
Definition: conffile.h:168
#define PW_TYPE_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
Definition: conffile.h:200

Definition at line 57 of file rlm_unbound.c.

module_t rlm_unbound
Initial value:
= {
.magic = RLM_MODULE_INIT,
.name = "unbound",
.inst_size = sizeof(rlm_unbound_t),
.config = module_config,
.bootstrap = mod_bootstrap,
.instantiate = mod_instantiate,
.detach = mod_detach
}
#define RLM_TYPE_THREAD_SAFE
Module is threadsafe.
Definition: modules.h:75
#define RLM_MODULE_INIT
Definition: modules.h:86
static int mod_detach(UNUSED void *instance)
Definition: rlm_unbound.c:728
struct rlm_unbound_t rlm_unbound_t
static int mod_bootstrap(CONF_SECTION *conf, void *instance)
Definition: rlm_unbound.c:397
static int mod_instantiate(CONF_SECTION *conf, void *instance)
Definition: rlm_unbound.c:425
static const CONF_PARSER module_config[]
Definition: rlm_unbound.c:57

Definition at line 765 of file rlm_unbound.c.