pluto uses the libstrongswan leak detective and a stripped-down version of library_t
[strongswan.git] / src / pluto / library.h
1 /*
2 * Copyright (C) 2008 Martin Willi
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 * $Id: library.h 5003 2009-03-24 17:43:01Z martin $
16 */
17
18 #ifndef LIBRARY_H_
19 #define LIBRARY_H_
20
21 #include <utils.h>
22 #include <settings.h>
23
24 typedef struct library_t library_t;
25
26 /**
27 * Libstrongswan library context, contains library relevant globals.
28 */
29 struct library_t {
30 /**
31 * various settings loaded from settings file
32 */
33 settings_t *settings;
34
35 /**
36 * is leak detective running?
37 */
38 bool leak_detective;
39 };
40
41 /**
42 * Initialize library, creates "lib" instance.
43 *
44 * @param settings file to read settings from, may be NULL for none
45 */
46 void library_init(char *settings);
47
48 /**
49 * Deinitialize library, destroys "lib" instance.
50 */
51 void library_deinit();
52
53 /**
54 * Library instance, set after between library_init() and library_deinit() calls.
55 */
56 extern library_t *lib;
57
58 #endif /** LIBRARY_H_ @}*/