IPsec policy manager added
[strongswan.git] / src / libipsec / ipsec.h
1 /*
2 * Copyright (C) 2012 Giuliano Grassi
3 * Copyright (C) 2012 Ralf Sager
4 * Copyright (C) 2012 Tobias Brunner
5 * Hochschule fuer Technik Rapperswil
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
16 */
17
18 /**
19 * @defgroup libipsec libipsec
20 *
21 * @addtogroup libipsec
22 * @{
23 */
24
25 #ifndef IPSEC_H_
26 #define IPSEC_H_
27
28 #include "ipsec_sa_mgr.h"
29 #include "ipsec_policy_mgr.h"
30 #include "ipsec_event_relay.h"
31
32 #include <library.h>
33
34 typedef struct ipsec_t ipsec_t;
35
36 /**
37 * User space IPsec implementation.
38 */
39 struct ipsec_t {
40
41 /**
42 * IPsec SA manager instance
43 */
44 ipsec_sa_mgr_t *sas;
45
46 /**
47 * IPsec policy manager instance
48 */
49 ipsec_policy_mgr_t *policies;
50
51 /**
52 * Event relay instance
53 */
54 ipsec_event_relay_t *events;
55
56 };
57
58 /**
59 * The single instance of ipsec_t.
60 *
61 * Set between calls to libipsec_init() and libipsec_deinit() calls.
62 */
63 extern ipsec_t *ipsec;
64
65 /**
66 * Initialize libipsec.
67 *
68 * @return FALSE if integrity check failed
69 */
70 bool libipsec_init();
71
72 /**
73 * Deinitialize libipsec.
74 */
75 void libipsec_deinit();
76
77 #endif /** IPSEC_H_ @}*/