Add an artificial delay to requests.
More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/server/map_proc.h>
#include <freeradius-devel/util/time.h>
#include <freeradius-devel/unlang/xlat_func.h>
Go to the source code of this file.
|
static void | _delay_done (module_ctx_t const *mctx, request_t *request, fr_retry_t const *retry) |
| Called when the timeout has expired. More...
|
|
static void | _xlat_delay_done (xlat_ctx_t const *xctx, request_t *request, fr_time_t fired) |
|
static int | delay_add (request_t *request, fr_time_t *resume_at, fr_time_t now, fr_time_delta_t delay, bool force_reschedule, bool relative) |
|
static int | mod_bootstrap (module_inst_ctx_t const *mctx) |
|
static unlang_action_t | mod_delay (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
|
static unlang_action_t | mod_delay_return (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
| Called resume_at the delay is complete, and we're running from the interpreter. More...
|
|
static xlat_action_t | xlat_delay (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| Xlat to delay the request. More...
|
|
static void | xlat_delay_cancel (UNUSED xlat_ctx_t const *xctx, request_t *request, UNUSED fr_signal_t action) |
|
static xlat_action_t | xlat_delay_resume (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, UNUSED fr_value_box_list_t *in) |
|
Add an artificial delay to requests.
- Id
- c3a48b2342b9c7f7c9ae703f60904b63ab6d62ce
- Copyright
- 2016 The FreeRADIUS server project
-
2016 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
Definition in file rlm_delay.c.
◆ rlm_delay_retry_t
◆ rlm_delay_t
Definition at line 34 of file rlm_delay.c.
Data Fields |
tmpl_t * |
delay |
How long we delay for. |
bool |
force_reschedule |
Whether we should force rescheduling of the request. |
bool |
relative |
Whether the delay is relative to the start of request processing. |
◆ _delay_done()
Called when the timeout has expired.
Marks the request as resumable, and prints the delayed delay time.
Definition at line 59 of file rlm_delay.c.
◆ _xlat_delay_done()
◆ delay_add()
◆ mod_bootstrap()
◆ mod_delay()
◆ mod_delay_return()
Called resume_at the delay is complete, and we're running from the interpreter.
Definition at line 121 of file rlm_delay.c.
◆ xlat_delay_cancel()
◆ xlat_delay_resume()
◆ module_config
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#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 at line 43 of file rlm_delay.c.
◆ rlm_delay
Initial value:= {
.common = {
.name = "delay",
.flags = 0,
},
.method_group = {
}
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static const conf_parser_t config[]
static int mod_bootstrap(module_inst_ctx_t const *mctx)
static unlang_action_t mod_delay(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static const conf_parser_t module_config[]
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
#define MODULE_BINDING_TERMINATOR
Terminate a module binding list.
Named methods exported by a module.
Definition at line 274 of file rlm_delay.c.
◆ xlat_delay_args
Initial value:= {
}
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
#define XLAT_ARG_PARSER_TERMINATOR
Definition at line 206 of file rlm_delay.c.