24 #include <freeradius-devel/io/listen.h>
25 #include <freeradius-devel/server/module_rlm.h>
26 #include <freeradius-devel/util/debug.h>
132 inst->io.app_instance = instance;
135 inst->max_packet_size,
inst->num_messages);
156 if (!
inst->max_packet_size &&
inst->io.app_io)
inst->max_packet_size =
inst->io.app_io->default_message_size;
158 if (!
inst->num_messages)
inst->num_messages = 256;
194 if (!
inst->io.submodule) {
195 cf_log_err(
conf,
"The control server MUST have a 'listener' section.");
module_t common
Common fields to all loadable modules.
module_t common
Common fields provided by all modules.
Describes a new application (protocol)
#define CONF_PARSER_TERMINATOR
#define FR_INTEGER_BOUND_CHECK(_name, _var, _op, _bound)
#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
#define FR_CONF_POINTER(_name, _type, _flags, _res_p)
conf_parser_t which parses a single CONF_PAIR producing a single global result
#define FR_TIME_DELTA_BOUND_CHECK(_name, _var, _op, _bound)
@ CONF_FLAG_SUBSECTION
Instead of putting the information into a configuration structure, the configuration file routines MA...
#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
Defines a CONF_PAIR to C data type mapping.
Common header for all CONF_* types.
A section grouping multiple CONF_PAIR.
CONF_PAIR * cf_item_to_pair(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_PAIR.
CONF_SECTION * cf_section_find(CONF_SECTION const *cs, char const *name1, char const *name2)
Find a CONF_SECTION with name1 and optionally name2.
char const * cf_pair_value(CONF_PAIR const *pair)
Return the value of a CONF_PAIR.
void * cf_data_value(CONF_DATA const *cd)
Return the user assigned value of CONF_DATA.
CONF_SECTION * cf_item_to_section(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_SECTION.
#define cf_log_err(_cf, _fmt,...)
#define cf_data_find(_cf, _type, _name)
#define cf_section_alloc(_ctx, _parent, _name1, _name2)
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Specifies a dictionary which must be loaded/loadable for the module to function.
int dl_module_instance(TALLOC_CTX *ctx, dl_module_inst_t **out, dl_module_inst_t const *parent, dl_module_type_t type, char const *mod_name, char const *inst_name)
Load a module and parse its CONF_SECTION in one operation.
char const * dl_module_inst_name_from_conf(CONF_SECTION *conf)
Avoid boilerplate when setting the module instance name.
dl_module_inst_t const * dl_module_instance_by_data(void const *data)
Lookup a dl_module_inst_t via instance data.
int dl_module_conf_parse(dl_module_inst_t *dl_inst, CONF_SECTION *conf)
@ DL_MODULE_TYPE_SUBMODULE
Driver (or method in the case of EAP)
void *_CONST data
Module instance's parsed configuration.
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
CONF_SECTION *_CONST conf
Module's instance configuration.
fr_app_io_t fr_master_app_io
int fr_master_io_listen(TALLOC_CTX *ctx, fr_io_instance_t *inst, fr_schedule_t *sc, size_t default_message_size, size_t num_messages)
#define MODULE_INST_CTX(_dl_inst)
Wrapper to create a module_inst_ctx_t as a compound literal.
dl_module_inst_t const * inst
Dynamic loader API handle for the module.
Temporary structure to hold arguments for instantiation calls.
static conf_parser_t const proto_control_config[]
How to parse a CONTROL listen section.
static conf_parser_t const limit_config[]
static fr_dict_t const * dict_control
static int mod_bootstrap(module_inst_ctx_t const *mctx)
Bootstrap the application.
fr_dict_autoload_t proto_control_dict[]
static int mod_instantiate(module_inst_ctx_t const *mctx)
Instantiate the application.
static int mod_open(void *instance, fr_schedule_t *sc, UNUSED CONF_SECTION *conf)
Open listen sockets/connect to external event source.
static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
An instance of a proto_control listen section.
static int instantiate(module_inst_ctx_t const *mctx)
module_instantiate_t instantiate
module_instantiate_t bootstrap
static const uchar sc[16]
eap_aka_sim_process_conf_t * inst
static fr_time_delta_t fr_time_delta_from_sec(int64_t sec)
static size_t char ** out