The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
main_loop.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: b353c0381b2b6c2cec3e097fdc26b47469adb842 $
20  *
21  * @file lib/server/main_loop.h
22  * @brief Creates a global event loop, and manages signalling between the forked child
23  * and its parent as the server starts.
24  *
25  * @copyright 2012 The FreeRADIUS server project
26  * @copyright 2012 Alan DeKok (aland@deployingradius.com)
27  */
28 RCSIDH(process_h, "$Id: b353c0381b2b6c2cec3e097fdc26b47469adb842 $")
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 typedef enum {
39  RADIUS_SIGNAL_SELF_MAX = (1 << 3)
41 
42 #include <freeradius-devel/server/client.h>
43 #include <freeradius-devel/server/listen.h>
44 #include <freeradius-devel/server/signal.h>
45 
47 
48 void main_loop_signal_raise(int flag);
49 
50 #ifdef HAVE_SYSTEMD_WATCHDOG
51 void main_loop_set_sd_watchdog_interval(void);
52 #endif
53 
54 void main_loop_free(void);
55 
56 int main_loop_start(void);
57 
58 int main_loop_init(void);
59 #ifdef __cplusplus
60 }
61 #endif
#define RCSIDH(h, id)
Definition: build.h:482
Stores all information relating to an event list.
Definition: event.c:411
int main_loop_start(void)
Definition: main_loop.c:195
fr_event_list_t * main_loop_event_list(void)
Return the main loop event list.
Definition: main_loop.c:165
void main_loop_signal_raise(int flag)
Definition: main_loop.c:79
radius_signal_t
Definition: main_loop.h:34
@ RADIUS_SIGNAL_SELF_NONE
Definition: main_loop.h:35
@ RADIUS_SIGNAL_SELF_HUP
Definition: main_loop.h:36
@ RADIUS_SIGNAL_SELF_EXIT
Definition: main_loop.h:38
@ RADIUS_SIGNAL_SELF_MAX
Definition: main_loop.h:39
@ RADIUS_SIGNAL_SELF_TERM
Definition: main_loop.h:37
int main_loop_init(void)
Initialise the main event loop, setting up signal handlers.
Definition: main_loop.c:254
void main_loop_free(void)
Definition: main_loop.c:190