![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Sending pair lists to and from coordination threads. More...
#include <freeradius-devel/io/coord.h>#include <freeradius-devel/server/request.h>#include <freeradius-devel/util/pair.h>
Include dependency graph for coord_pair.h:Go to the source code of this file.
Data Structures | |
| struct | fr_coord_pair_reg_ctx_t |
| struct | fr_coord_worker_pair_cb_reg_t |
Macros | |
| #define | FR_COORD_PAIR_CALLBACK(_id) [_id] = { .callback = fr_coord_pair_data_recv, .inst_create = fr_coord_pair_inst_create } |
| Set callback for handling worker -> coordinator pair list data. | |
| #define | FR_COORD_PAIR_CB_CTX_SET(_in_cb, _out_cb, _reg) |
| Set up ctx on pair list callbacks. | |
| #define | FR_COORD_WORKER_PAIR_CALLBACK(_id) [_id] = { .callback = fr_coord_worker_pair_data_recv } |
| Set callback for handling coordinator -> worker pair list data. | |
Typedefs | |
| typedef struct fr_coord_pair_reg_s | fr_coord_pair_reg_t |
| typedef struct fr_coord_pair_s | fr_coord_pair_t |
| typedef void(* | fr_coord_worker_pair_cb_t) (fr_coord_worker_t *cw, fr_coord_pair_reg_t *coord_pair_reg, fr_pair_list_t const *list, fr_time_t now, void *uctx) |
Functions | |
| void | fr_coord_pair_data_recv (fr_coord_t *coord, uint32_t worker_id, fr_dbuff_t *dbuff, fr_time_t now, void *parent, void *uctx) |
| fr_coord_cb_inst_t * | fr_coord_pair_inst_create (TALLOC_CTX *ctx, fr_coord_t *coord, fr_event_list_t *el, bool single_thread, void *uctx) |
| Plugin creation called during coordinator creation. | |
| uint32_t | fr_coord_pair_reg_cb_id (fr_coord_pair_reg_t *coord_pair_reg) |
| Return the coordinator callback ID associated with a coord_pair_reg_t. | |
| fr_coord_pair_reg_t * | fr_coord_pair_register (TALLOC_CTX *ctx, fr_coord_pair_reg_ctx_t *reg_ctx) |
| Register a set of callbacks for pair list based coordinator messages. | |
| int | fr_coord_to_worker_reply_send (request_t *request, uint32_t worker_id) |
| Send a reply list from a coordinator to a worker. | |
| void | fr_coord_worker_pair_data_recv (fr_coord_worker_t *cw, fr_dbuff_t *dbuff, fr_time_t now, void *uctx) |
| Callback run when a worker receives pair list data. | |
| int | fr_worker_to_coord_pair_send (fr_coord_worker_t *cw, fr_coord_pair_reg_t *coord_pair_reg, fr_pair_list_t *list) |
| Send a pair list from a worker to a coordinator. | |
Sending pair lists to and from coordination threads.
Definition in file coord_pair.h.
| struct fr_coord_pair_reg_ctx_t |
Definition at line 43 of file coord_pair.h.
Collaboration diagram for fr_coord_pair_reg_ctx_t:| Data Fields | ||
|---|---|---|
| uint32_t | cb_id | Coordinator callback id used for pair list messages. |
| CONF_SECTION * | cs | Module conf section. |
| fr_time_delta_t | max_request_time |
Maximum time for coordinator request processing. Defaults to main config max request time. |
| fr_dict_attr_t const * | root | Root attribute for decoding pair list messages. |
| fr_coord_worker_pair_cb_reg_t * | worker_cb | Callbacks for coordinator -> worker pair messages. |
| struct fr_coord_worker_pair_cb_reg_t |
Definition at line 37 of file coord_pair.h.
Collaboration diagram for fr_coord_worker_pair_cb_reg_t:| Data Fields | ||
|---|---|---|
| fr_coord_worker_pair_cb_t | callback | Function to call. |
| uint32_t | packet_type | Packet type value for this callback. |
| void * | uctx | Ctx to pass to callback. |
| #define FR_COORD_PAIR_CALLBACK | ( | _id | ) | [_id] = { .callback = fr_coord_pair_data_recv, .inst_create = fr_coord_pair_inst_create } |
Set callback for handling worker -> coordinator pair list data.
| _id | Callback ID to use |
Definition at line 72 of file coord_pair.h.
| #define FR_COORD_PAIR_CB_CTX_SET | ( | _in_cb, | |
| _out_cb, | |||
| _reg | |||
| ) |
Set up ctx on pair list callbacks.
| _in_cb | Array of worker -> coordinator callbacks. |
| _out_cb | Array of coordinator -> worker callbacks. |
| _reg | Registered coordinator pair list callback data. |
Definition at line 84 of file coord_pair.h.
| #define FR_COORD_WORKER_PAIR_CALLBACK | ( | _id | ) | [_id] = { .callback = fr_coord_worker_pair_data_recv } |
Set callback for handling coordinator -> worker pair list data.
| _id | Callback ID to use |
Definition at line 77 of file coord_pair.h.
| typedef struct fr_coord_pair_reg_s fr_coord_pair_reg_t |
Definition at line 32 of file coord_pair.h.
| typedef struct fr_coord_pair_s fr_coord_pair_t |
Definition at line 33 of file coord_pair.h.
| typedef void(* fr_coord_worker_pair_cb_t) (fr_coord_worker_t *cw, fr_coord_pair_reg_t *coord_pair_reg, fr_pair_list_t const *list, fr_time_t now, void *uctx) |
Definition at line 35 of file coord_pair.h.
| void fr_coord_pair_data_recv | ( | fr_coord_t * | coord, |
| uint32_t | worker_id, | ||
| fr_dbuff_t * | dbuff, | ||
| fr_time_t | now, | ||
| void * | parent, | ||
| void * | uctx | ||
| ) |
| fr_coord_cb_inst_t * fr_coord_pair_inst_create | ( | TALLOC_CTX * | ctx, |
| fr_coord_t * | coord, | ||
| fr_event_list_t * | el, | ||
| bool | single_thread, | ||
| void * | uctx | ||
| ) |
Plugin creation called during coordinator creation.
| ctx | to allocate the plugin in. |
| el | Event list for plugin to use. |
| single_thread | is the server in single thread mode. |
| uctx | configured for the callback this plugin relates to. |
Definition at line 783 of file coord_pair.c.
Here is the call graph for this function:| uint32_t fr_coord_pair_reg_cb_id | ( | fr_coord_pair_reg_t * | coord_pair_reg | ) |
Return the coordinator callback ID associated with a coord_pair_reg_t.
Definition at line 220 of file coord_pair.c.
| fr_coord_pair_reg_t * fr_coord_pair_register | ( | TALLOC_CTX * | ctx, |
| fr_coord_pair_reg_ctx_t * | reg_ctx | ||
| ) |
Register a set of callbacks for pair list based coordinator messages.
Returns a structure to pass as uctx to fr_coord_cb_t using the macro FR_COORD_PAIR_CB_CTX_SET.
| ctx | to allocate the registration under. |
| reg_ctx | Callback details to register. |
Definition at line 113 of file coord_pair.c.
Here is the call graph for this function:Send a reply list from a coordinator to a worker.
| request | containing the reply to send. |
| worker_id | to send the reply to. |
Definition at line 724 of file coord_pair.c.
Here is the call graph for this function:| void fr_coord_worker_pair_data_recv | ( | fr_coord_worker_t * | cw, |
| fr_dbuff_t * | dbuff, | ||
| fr_time_t | now, | ||
| void * | uctx | ||
| ) |
Callback run when a worker receives pair list data.
Finds the packet type attribute in the data and calls the callback registered against the value of that attribute.
| cw | Worker which received the message. |
| dbuff | Data received. |
| now | Time the data is received. |
| uctx | The coord_pair registration. |
Definition at line 685 of file coord_pair.c.
Here is the call graph for this function:| int fr_worker_to_coord_pair_send | ( | fr_coord_worker_t * | cw, |
| fr_coord_pair_reg_t * | coord_pair_reg, | ||
| fr_pair_list_t * | list | ||
| ) |
Send a pair list from a worker to a coordinator.
The pair list must include an attribute indicating the packet type
| cw | The coord worker sending the data. |
| list | of pairs to send. |
Definition at line 755 of file coord_pair.c.
Here is the call graph for this function:
1.9.8