///< to all #fr_app_io_t can be performed by the #fr_app_t.
fr_app_entry_point_set_t entry_point_set;//!< Callback to Set the entry point into the state machine
- ///< provided by the fr_app_process_t.
- ///< We need a function this as the #fr_app_process_t might
+ ///< provided by the fr_app_worker_t.
+ ///< We need a function this as the #fr_app_worker_t might
///< change based on the packet we received.
fr_app_priority_get_t priority; //!< Assign a priority to the packet.
/** Public structure describing an application (protocol) specialisation
*
- * The fr_app_process_t provides the state machine that's used to process
+ * The fr_app_worker_t provides the state machine that's used to process
* the packet after its been decoded.
*/
typedef struct {
fr_app_bootstrap_t bootstrap;
fr_app_instantiate_t instantiate;
fr_io_process_t entry_point; //!< Entry point into the protocol subtype's state machine.
-} fr_app_process_t;
+} fr_app_worker_t;
/** Public structure describing an I/O path for a protocol
*
/** Process a request through the transport async state machine.
*
- * @param[in] instance Usually the #fr_app_process_t instance data.
- * for the #fr_app_process_t that gave us the
+ * @param[in] instance Usually the #fr_app_worker_t instance data.
+ * for the #fr_app_worker_t that gave us the
* entry point.
*/
typedef fr_io_final_t (*fr_io_process_t)(void const *instance, REQUEST *request, fr_io_action_t action);
static void mod_entry_point_set(void const *instance, REQUEST *request)
{
proto_detail_t const *inst = talloc_get_type_abort_const(instance, proto_detail_t);
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
/*
* Only one "process" function: proto_detail_process.
*/
- app_process = (fr_app_process_t const *)inst->type_submodule->module->common;
+ app_process = (fr_app_worker_t const *)inst->type_submodule->module->common;
request->server_cs = inst->server_cs;
request->async->process = app_process->entry_point;
* Instantiate the process module.
*/
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *)inst->type_submodule->module->common;
+ app_process = (fr_app_worker_t const *)inst->type_submodule->module->common;
if (app_process->instantiate && (app_process->instantiate(inst->type_submodule->data,
inst->type_submodule->conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
*/
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
dl_t const *module = talloc_get_type_abort_const(inst->type_submodule->module, dl_t);
- fr_app_process_t const *app_process = (fr_app_process_t const *)module->common;
+ fr_app_worker_t const *app_process = (fr_app_worker_t const *)module->common;
if (app_process->bootstrap && (app_process->bootstrap(inst->type_submodule->data,
inst->type_submodule->conf) < 0)) {
return 0;
}
-extern fr_app_process_t proto_detail_process;
-fr_app_process_t proto_detail_process = {
+extern fr_app_worker_t proto_detail_process;
+fr_app_worker_t proto_detail_process = {
.magic = RLM_MODULE_INIT,
.name = "detail_process",
.inst_size = sizeof(proto_detail_process_t),
* 'track' can be NULL when there's no network listener.
*/
if (inst->io.app_io && (track->dynamic == request->async->recv_time)) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *) inst->dynamic_submodule->module->common;
+ app_process = (fr_app_worker_t const *) inst->dynamic_submodule->module->common;
request->async->process = app_process->entry_point;
track->dynamic = 0;
return;
}
- request->async->process = ((fr_app_process_t const *)type_submodule->module->common)->entry_point;
+ request->async->process = ((fr_app_worker_t const *)type_submodule->module->common)->entry_point;
request->async->process_inst = type_submodule->data;
}
*/
i = 0;
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
fr_dict_enum_t const *enumv;
int code;
- app_process = (fr_app_process_t const *)inst->type_submodule[i]->module->common;
+ app_process = (fr_app_worker_t const *)inst->type_submodule[i]->module->common;
if (app_process->instantiate && (app_process->instantiate(inst->type_submodule[i]->data,
inst->type_submodule[i]->conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
* Instantiate proto_dhcpv4_dynamic_client
*/
{
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *)inst->dynamic_submodule->module->common;
+ app_process = (fr_app_worker_t const *)inst->dynamic_submodule->module->common;
if (app_process->instantiate && (app_process->instantiate(inst->dynamic_submodule->data, conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
return -1;
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
char const *value;
dl_t const *module = talloc_get_type_abort_const(inst->type_submodule[i]->module, dl_t);
- fr_app_process_t const *app_process = (fr_app_process_t const *)module->common;
+ fr_app_worker_t const *app_process = (fr_app_worker_t const *)module->common;
if (app_process->bootstrap && (app_process->bootstrap(inst->type_submodule[i]->data,
inst->type_submodule[i]->conf) < 0)) {
}
-extern fr_app_process_t proto_dhcpv4_base;
-fr_app_process_t proto_dhcpv4_base = {
+extern fr_app_worker_t proto_dhcpv4_base;
+fr_app_worker_t proto_dhcpv4_base = {
.magic = RLM_MODULE_INIT,
.name = "dhcpv4_base",
.entry_point = mod_process,
* 'track' can be NULL when there's no network listener.
*/
if (inst->io.app_io && (track->dynamic == request->async->recv_time)) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *) inst->dynamic_submodule->module->common;
+ app_process = (fr_app_worker_t const *) inst->dynamic_submodule->module->common;
request->async->process = app_process->entry_point;
request->async->process_inst = inst->dynamic_submodule;
return;
}
- request->async->process = ((fr_app_process_t const *)type_submodule->module->common)->entry_point;
+ request->async->process = ((fr_app_worker_t const *)type_submodule->module->common)->entry_point;
request->async->process_inst = type_submodule->data;
}
*/
i = 0;
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
fr_dict_enum_t const *enumv;
int code;
- app_process = (fr_app_process_t const *)inst->type_submodule[i]->module->common;
+ app_process = (fr_app_worker_t const *)inst->type_submodule[i]->module->common;
if (app_process->instantiate &&
(app_process->instantiate(inst->type_submodule[i]->data, inst->type_submodule[i]->conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
* Instantiate proto_radius_dynamic_client
*/
{
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *)inst->dynamic_submodule->module->common;
+ app_process = (fr_app_worker_t const *)inst->dynamic_submodule->module->common;
if (app_process->instantiate && (app_process->instantiate(inst->dynamic_submodule->data, conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
return -1;
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
char const *value;
dl_t const *module = talloc_get_type_abort_const(inst->type_submodule[i]->module, dl_t);
- fr_app_process_t const *app_process = (fr_app_process_t const *)module->common;
+ fr_app_worker_t const *app_process = (fr_app_worker_t const *)module->common;
if (app_process->bootstrap && (app_process->bootstrap(inst->type_submodule[i]->data,
inst->type_submodule[i]->conf) < 0)) {
}
-extern fr_app_process_t proto_radius_acct;
-fr_app_process_t proto_radius_acct = {
+extern fr_app_worker_t proto_radius_acct;
+fr_app_worker_t proto_radius_acct = {
.magic = RLM_MODULE_INIT,
.name = "radius_acct",
.entry_point = mod_process,
return 0;
}
-extern fr_app_process_t proto_radius_auth;
-fr_app_process_t proto_radius_auth = {
+extern fr_app_worker_t proto_radius_auth;
+fr_app_worker_t proto_radius_auth = {
.magic = RLM_MODULE_INIT,
.name = "radius_auth",
.config = proto_radius_auth_config,
}
-extern fr_app_process_t proto_radius_coa;
-fr_app_process_t proto_radius_coa = {
+extern fr_app_worker_t proto_radius_coa;
+fr_app_worker_t proto_radius_coa = {
.magic = RLM_MODULE_INIT,
.name = "radius_coa",
.entry_point = mod_process,
return 0;
}
-extern fr_app_process_t proto_radius_dynamic_client;
-fr_app_process_t proto_radius_dynamic_client = {
+extern fr_app_worker_t proto_radius_dynamic_client;
+fr_app_worker_t proto_radius_dynamic_client = {
.magic = RLM_MODULE_INIT,
.name = "radius_dynamic_client",
.instantiate = mod_instantiate,
}
-extern fr_app_process_t proto_radius_status;
-fr_app_process_t proto_radius_status = {
+extern fr_app_worker_t proto_radius_status;
+fr_app_worker_t proto_radius_status = {
.magic = RLM_MODULE_INIT,
.name = "radius_status",
.entry_point = mod_process,
* 'track' can be NULL when there's no network listener.
*/
if (inst->io.app_io && (track->dynamic == request->async->recv_time)) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *) inst->dynamic_submodule->module->common;
+ app_process = (fr_app_worker_t const *) inst->dynamic_submodule->module->common;
request->async->process = app_process->entry_point;
track->dynamic = 0;
*/
i = 0;
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
fr_dict_enum_t const *enumv;
- app_process = (fr_app_process_t const *)inst->type_submodule[i]->module->common;
+ app_process = (fr_app_worker_t const *)inst->type_submodule[i]->module->common;
if (app_process->instantiate && (app_process->instantiate(inst->type_submodule[i]->data,
inst->type_submodule[i]->conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
* Instantiate proto_vmps_dynamic_client
*/
{
- fr_app_process_t const *app_process;
+ fr_app_worker_t const *app_process;
- app_process = (fr_app_process_t const *)inst->dynamic_submodule->module->common;
+ app_process = (fr_app_worker_t const *)inst->dynamic_submodule->module->common;
if (app_process->instantiate && (app_process->instantiate(inst->dynamic_submodule->data, conf) < 0)) {
cf_log_err(conf, "Instantiation failed for \"%s\"", app_process->name);
return -1;
while ((cp = cf_pair_find_next(conf, cp, "type"))) {
char const *value;
dl_t const *module = talloc_get_type_abort_const(inst->type_submodule[i]->module, dl_t);
- fr_app_process_t const *app_process = (fr_app_process_t const *)module->common;
+ fr_app_worker_t const *app_process = (fr_app_worker_t const *)module->common;
if (app_process->bootstrap && (app_process->bootstrap(inst->type_submodule[i]->data,
inst->type_submodule[i]->conf) < 0)) {
}
-extern fr_app_process_t proto_vmps_all;
-fr_app_process_t proto_vmps_all = {
+extern fr_app_worker_t proto_vmps_all;
+fr_app_worker_t proto_vmps_all = {
.magic = RLM_MODULE_INIT,
.name = "vmps_all",
.entry_point = mod_process,
return 0;
}
-extern fr_app_process_t proto_vmps_dynamic_client;
-fr_app_process_t proto_vmps_dynamic_client = {
+extern fr_app_worker_t proto_vmps_dynamic_client;
+fr_app_worker_t proto_vmps_dynamic_client = {
.magic = RLM_MODULE_INIT,
.name = "vmps_dynamic_client",
.instantiate = mod_instantiate,