attributes: Move the configuration attributes framework to libcharon
[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 hkernel kernel
20 * @ingroup libhydra
21 *
22 * @defgroup hplugins plugins
23 * @ingroup libhydra
24 *
25 * @addtogroup libhydra
26 * @{
27 */
28
29 #ifndef HYDRA_H_
30 #define HYDRA_H_
31
32 typedef struct hydra_t hydra_t;
33
34 #include <kernel/kernel_interface.h>
35
36 #include <library.h>
37
38 /**
39 * IKE Daemon support object.
40 */
41 struct hydra_t {
42
43 /**
44 * kernel interface to communicate with kernel
45 */
46 kernel_interface_t *kernel_interface;
47 };
48
49 /**
50 * The single instance of hydra_t.
51 *
52 * Set between calls to libhydra_init() and libhydra_deinit() calls.
53 */
54 extern hydra_t *hydra;
55
56 /**
57 * Initialize libhydra.
58 *
59 * libhydra_init() may be called multiple times in a single process, but each
60 * caller must call libhydra_deinit() for each call to libhydra_init().
61 *
62 * @return FALSE if integrity check failed
63 */
64 bool libhydra_init();
65
66 /**
67 * Deinitialize libhydra.
68 */
69 void libhydra_deinit();
70
71 #endif /** HYDRA_H_ @}*/