The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
rlm_tacacs.c File Reference

A TACACS client library. More...

#include <freeradius-devel/io/application.h>
#include <freeradius-devel/server/modpriv.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/dlist.h>
#include "rlm_tacacs.h"
+ Include dependency graph for rlm_tacacs.c:

Go to the source code of this file.

Functions

static int mod_instantiate (module_inst_ctx_t const *mctx)
 
static int mod_load (void)
 
static unlang_action_t mod_process (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 Send packets outbound. More...
 
static void mod_tacacs_signal (module_ctx_t const *mctx, request_t *request, fr_signal_t action)
 
static void mod_unload (void)
 
static int type_parse (TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
 
static int type_parse (UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule)
 Set which types of packets we can parse. More...
 

Variables

static fr_dict_attr_t const * attr_packet_type
 
static fr_dict_t const * dict_tacacs
 
static conf_parser_t const module_config []
 
static conf_parser_t retry_config []
 
module_rlm_t rlm_tacacs
 
fr_dict_autoload_t rlm_tacacs_dict []
 
fr_dict_attr_autoload_t rlm_tacacs_dict_attr []
 

Detailed Description

A TACACS client library.

Id
7726cc5ca69687a52d4766188008f39f9679184d

Definition in file rlm_tacacs.c.

Function Documentation

◆ mod_instantiate()

static int mod_instantiate ( module_inst_ctx_t const *  mctx)
static

Definition at line 188 of file rlm_tacacs.c.

+ Here is the call graph for this function:

◆ mod_load()

static int mod_load ( void  )
static

Definition at line 231 of file rlm_tacacs.c.

+ Here is the call graph for this function:

◆ mod_process()

static unlang_action_t mod_process ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Send packets outbound.

Definition at line 152 of file rlm_tacacs.c.

+ Here is the call graph for this function:

◆ mod_tacacs_signal()

static void mod_tacacs_signal ( module_ctx_t const *  mctx,
request_t request,
fr_signal_t  action 
)
static

Definition at line 131 of file rlm_tacacs.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mod_unload()

static void mod_unload ( void  )
static

Definition at line 240 of file rlm_tacacs.c.

+ Here is the call graph for this function:

◆ type_parse() [1/2]

static int type_parse ( TALLOC_CTX *  ctx,
void *  out,
UNUSED void *  parent,
CONF_ITEM ci,
conf_parser_t const *  rule 
)
static

◆ type_parse() [2/2]

static int type_parse ( UNUSED TALLOC_CTX *  ctx,
void *  out,
UNUSED void *  parent,
CONF_ITEM ci,
UNUSED conf_parser_t const *  rule 
)
static

Set which types of packets we can parse.

Parameters
[in]ctxto allocate data in (instance of rlm_tacacs).
[out]outWhere to write the parsed data.
[in]parentBase structure address.
[in]ciCONF_PAIR specifying the name of the type module.
[in]ruleunused.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 98 of file rlm_tacacs.c.

+ Here is the call graph for this function:

Variable Documentation

◆ attr_packet_type

fr_dict_attr_t const* attr_packet_type
static

Definition at line 79 of file rlm_tacacs.c.

◆ dict_tacacs

fr_dict_t const* dict_tacacs
static

Definition at line 71 of file rlm_tacacs.c.

◆ module_config

conf_parser_t const module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET_TYPE_FLAGS("transport", FR_TYPE_VOID, 0, rlm_tacacs_t, io_submodule),
.func = type_parse },
{ FR_CONF_OFFSET("max_attributes", rlm_tacacs_t, max_attributes), .dflt = STRINGIFY(FR_MAX_ATTRIBUTES) },
{ FR_CONF_OFFSET("response_window", rlm_tacacs_t, response_window), .dflt = STRINGIFY(20) },
{ FR_CONF_OFFSET("zombie_period", rlm_tacacs_t, zombie_period), .dflt = STRINGIFY(40) },
{ FR_CONF_OFFSET("revive_interval", rlm_tacacs_t, revive_interval) },
{ FR_CONF_OFFSET_SUBSECTION("pool", 0, rlm_tacacs_t, trunk_conf, trunk_config ) },
}
#define STRINGIFY(x)
Definition: build.h:195
#define CONF_PARSER_TERMINATOR
Definition: cf_parse.h:627
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:268
#define FR_CONF_OFFSET_FLAGS(_name, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:256
#define FR_CONF_OFFSET_SUBSECTION(_name, _flags, _struct, _field, _subcs)
conf_parser_t which populates a sub-struct using a CONF_SECTION
Definition: cf_parse.h:297
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
Definition: cf_parse.h:405
@ CONF_FLAG_MULTI
CONF_PAIR can have multiple copies.
Definition: cf_parse.h:419
@ CONF_FLAG_NOT_EMPTY
CONF_PAIR is required to have a non zero length value.
Definition: cf_parse.h:420
#define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:241
@ FR_TYPE_VOID
User data.
Definition: merged_model.c:127
int module_rlm_submodule_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
Generic conf_parser_t func for loading drivers.
Definition: module_rlm.c:950
static conf_parser_t retry_config[]
Definition: rlm_tacacs.c:38
static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
#define FR_MAX_ATTRIBUTES
Definition: tacacs.h:28
conf_parser_t const trunk_config[]
Config parser definitions to populate a trunk_conf_t.
Definition: trunk.c:312

Definition at line 49 of file rlm_tacacs.c.

◆ retry_config

conf_parser_t retry_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("initial_rtx_time", fr_retry_config_t, irt), .dflt = STRINGIFY(2) },
{ FR_CONF_OFFSET("max_rtx_time", fr_retry_config_t, mrt), .dflt = STRINGIFY(16) },
{ FR_CONF_OFFSET("max_rtx_count", fr_retry_config_t, mrc), .dflt = STRINGIFY(5) },
{ FR_CONF_OFFSET("max_rtx_duration", fr_retry_config_t, mrd), .dflt = STRINGIFY(30) },
}

Definition at line 38 of file rlm_tacacs.c.

◆ rlm_tacacs

module_rlm_t rlm_tacacs
Initial value:
= {
.common = {
.name = "tacacs",
.inst_size = sizeof(rlm_tacacs_t),
.onload = mod_load,
.unload = mod_unload,
},
.method_group = {
.bindings = (module_method_binding_t[]){
{ .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_process },
}
}
}
#define CF_IDENT_ANY
Definition: cf_util.h:78
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:63
static const conf_parser_t config[]
Definition: base.c:183
static int instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_rest.c:1302
static int mod_load(void)
Definition: rlm_tacacs.c:231
static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Send packets outbound.
Definition: rlm_tacacs.c:152
static void mod_unload(void)
Definition: rlm_tacacs.c:240
static int mod_instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_tacacs.c:188
static conf_parser_t const module_config[]
Definition: rlm_tacacs.c:49
struct rlm_tacacs_s rlm_tacacs_t
Definition: rlm_tacacs.h:36
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
Definition: section.h:40
#define MODULE_BINDING_TERMINATOR
Terminate a module binding list.
Definition: module.h:151
Named methods exported by a module.
Definition: module.h:173

Definition at line 255 of file rlm_tacacs.c.

◆ rlm_tacacs_dict

fr_dict_autoload_t rlm_tacacs_dict
Initial value:
= {
{ .out = &dict_tacacs, .proto = "tacacs" },
{ NULL }
}
static fr_dict_t const * dict_tacacs
Definition: rlm_tacacs.c:71

Definition at line 74 of file rlm_tacacs.c.

◆ rlm_tacacs_dict_attr

fr_dict_attr_autoload_t rlm_tacacs_dict_attr
Initial value:
= {
{ .out = &attr_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_tacacs },
{ NULL }
}
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
static fr_dict_attr_t const * attr_packet_type
Definition: rlm_tacacs.c:79

Definition at line 82 of file rlm_tacacs.c.