The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
coord_priv.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: 9950069a180a9d536389a36c6b24a02e7f647efc $
20 *
21 * @file io/coord_priv.h
22 * @brief Coordination thread management private structures and functions
23 *
24 * @copyright 2026 Network RADIUS SAS (legal@networkradius.com)
25 */
26RCSIDH(coord_priv_h, "$Id: 9950069a180a9d536389a36c6b24a02e7f647efc $")
27
28#include <freeradius-devel/io/coord.h>
29
30/** Generic control message used between workers and coordinators
31 */
32typedef struct {
33 int32_t worker; //!< Worker ID
35
36/** List / data message used between workers and coordinators
37 */
38typedef struct {
39 fr_message_t m; //!< Message containing data being sent.
40 uint32_t coord_cb_id; //!< Callback ID for this message.
42
43typedef void (*fr_coord_inst_event_cb_t)(fr_event_list_t *el, void *uctx);
44typedef void (*fr_coord_inst_exit_cb_t)(fr_coord_t *coord, fr_event_list_t *el, void *uctx);
46 void *inst_data; //!< Instance data.
47 fr_event_status_cb_t event_pre_cb; //!< Pre-event callback
48 fr_event_post_cb_t event_post_cb; //!< Post-event callback
49 fr_coord_inst_exit_cb_t exit_cb; //!< Callback run when coordinator is asked to exit.
50};
#define RCSIDH(h, id)
Definition build.h:561
A coordinator which receives messages from workers.
Definition coord.c:49
fr_coord_inst_exit_cb_t exit_cb
Callback run when coordinator is asked to exit.
Definition coord_priv.h:49
void(* fr_coord_inst_event_cb_t)(fr_event_list_t *el, void *uctx)
Definition coord_priv.h:43
void * inst_data
Instance data.
Definition coord_priv.h:46
int32_t worker
Worker ID.
Definition coord_priv.h:33
uint32_t coord_cb_id
Callback ID for this message.
Definition coord_priv.h:40
void(* fr_coord_inst_exit_cb_t)(fr_coord_t *coord, fr_event_list_t *el, void *uctx)
Definition coord_priv.h:44
fr_event_status_cb_t event_pre_cb
Pre-event callback.
Definition coord_priv.h:47
fr_event_post_cb_t event_post_cb
Post-event callback.
Definition coord_priv.h:48
fr_message_t m
Message containing data being sent.
Definition coord_priv.h:39
List / data message used between workers and coordinators.
Definition coord_priv.h:38
Generic control message used between workers and coordinators.
Definition coord_priv.h:32
int(* fr_event_status_cb_t)(fr_time_t now, fr_time_delta_t wake, void *uctx)
Called after each event loop cycle.
Definition event.h:141
void(* fr_event_post_cb_t)(fr_event_list_t *el, fr_time_t now, void *uctx)
Called when a post event fires.
Definition event.h:184
Stores all information relating to an event list.
Definition event.c:377
unsigned int uint32_t
static fr_event_list_t * el