Execute scripts when a server event occurs.
More...
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/module.h>
#include <freeradius-devel/server/request.h>
#include <freeradius-devel/unlang/interpret.h>
#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/util/talloc.h>
Go to the source code of this file.
|
void | trigger_args_afrom_server (TALLOC_CTX *ctx, fr_pair_list_t *list, char const *server, uint16_t port) |
| Create trigger arguments to describe the server the pool connects to. More...
|
|
bool | trigger_enabled (void) |
| Return whether triggers are enabled. More...
|
|
int | trigger_exec (unlang_interpret_t *intp, CONF_SECTION const *cs, char const *name, bool rate_limit, fr_pair_list_t *args)) |
| Execute a trigger - call an executable to process an event. More...
|
|
int | trigger_exec_init (CONF_SECTION const *cs) |
|
xlat_action_t | trigger_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| Retrieve attributes from a special trigger list. More...
|
|
Execute scripts when a server event occurs.
- Id
- 5756656992b38b8e2fafae15a4c98e3fabf0d82f
- Copyright
- 2015 The FreeRADIUS server project
Definition in file trigger.h.
◆ fr_trigger_worker_t
◆ trigger_args_afrom_server()
void trigger_args_afrom_server |
( |
TALLOC_CTX * |
ctx, |
|
|
fr_pair_list_t * |
list, |
|
|
char const * |
server, |
|
|
uint16_t |
port |
|
) |
| |
Create trigger arguments to describe the server the pool connects to.
- Note
- trigger_exec_init must be called before calling this function, else it will return NULL.
- Parameters
-
[in] | ctx | to allocate fr_pair_t s in. |
[out] | list | to append Pool-Server and Pool-Port pairs to |
[in] | server | we're connecting to. |
[in] | port | on that server. |
Definition at line 454 of file trigger.c.
◆ trigger_enabled()
bool trigger_enabled |
( |
void |
| ) |
|
Return whether triggers are enabled.
Definition at line 135 of file trigger.c.
◆ trigger_exec()
Execute a trigger - call an executable to process an event.
- Note
- Calls to this function will be ignored if trigger_exec_init has not been called.
- Parameters
-
[in] | intp | Interpreter to run the trigger with. If this is NULL the trigger will be executed synchronously. |
[in] | cs | to search for triggers in. If cs is not NULL, the portion after the last '.' in name is used for the trigger. If cs is NULL, the entire name is used to find the trigger in the global trigger section. |
[in] | name | the path relative to the global trigger section ending in the trigger name e.g. module.ldap.pool.start. |
[in] | rate_limit | whether to rate limit triggers. |
[in] | args | to make available via the%trigger(<arg>) xlat. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 233 of file trigger.c.
◆ trigger_exec_init()
◆ trigger_xlat()
Retrieve attributes from a special trigger list.
Definition at line 73 of file trigger.c.
◆ trigger_xlat_args