Moved scheduler and thread pool to libstrongswan.
[strongswan.git] / src / libhydra / hydra.h
1 /*
2 * Copyright (C) 2010 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup libhydra libhydra
18 *
19 * @defgroup attributes attributes
20 * @ingroup libhydra
21 *
22 * @defgroup hkernel kernel
23 * @ingroup libhydra
24 *
25 * @defgroup hplugins plugins
26 * @ingroup libhydra
27 *
28 * @addtogroup libhydra
29 * @{
30 */
31
32 #ifndef HYDRA_H_
33 #define HYDRA_H_
34
35 typedef struct hydra_t hydra_t;
36
37 #include <attributes/attribute_manager.h>
38 #include <kernel/kernel_interface.h>
39
40 #include <library.h>
41
42 /**
43 * IKE Daemon support object.
44 */
45 struct hydra_t {
46
47 /**
48 * manager for payload attributes
49 */
50 attribute_manager_t *attributes;
51
52 /**
53 * kernel interface to communicate with kernel
54 */
55 kernel_interface_t *kernel_interface;
56
57 /**
58 * name of the daemon that initialized the library
59 */
60 const char *daemon;
61 };
62
63 /**
64 * The single instance of hydra_t.
65 *
66 * Set between calls to libhydra_init() and libhydra_deinit() calls.
67 */
68 extern hydra_t *hydra;
69
70 /**
71 * Initialize libhydra.
72 *
73 * The daemon's name is used to load daemon-specific settings.
74 *
75 * @param daemon name of the daemon that initializes the library
76 * @return FALSE if integrity check failed
77 */
78 bool libhydra_init(const char *daemon);
79
80 /**
81 * Deinitialize libhydra.
82 */
83 void libhydra_deinit();
84
85 #endif /** HYDRA_H_ @}*/