Be a little more verbose why a peer_cfg is inacceptable
[strongswan.git] / src / libtnccs / tnc / tnc.h
1 /*
2 * Copyright (C) 2011 Andreas Steffen
3 * HSR 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 tnc tnc
18 *
19 * @addtogroup tnc
20 * @{
21 */
22
23 #ifndef TNC_H_
24 #define TNC_H_
25
26 typedef struct tnc_t tnc_t;
27
28 #include "tnc/imc/imc_manager.h"
29 #include "tnc/imv/imv_manager.h"
30 #include "tnc/tnccs/tnccs_manager.h"
31
32 #include <library.h>
33
34 /**
35 * TNC management support object.
36 */
37 struct tnc_t {
38
39 /**
40 * TNC-IMC manager controlling Integrity Measurement Collectors
41 */
42 imc_manager_t *imcs;
43
44 /**
45 * TNC-IMV manager controlling Integrity Measurement Verifiers
46 */
47 imv_manager_t *imvs;
48
49 /**
50 * TNC-TNCCS manager controlling the TNC Server and Client protocols
51 */
52 tnccs_manager_t *tnccs;
53
54 };
55
56 /**
57 * The single instance of tnc_t.
58 *
59 * Exists between calls to libtnccs_init() and libtnccs_deinit().
60 */
61 extern tnc_t *tnc;
62
63 /**
64 * Initialize libtnccs.
65 */
66 void libtnccs_init(void);
67
68 /**
69 * Deinitialize libtnccs
70 */
71 void libtnccs_deinit(void);
72
73 /**
74 * Helper function to (un-)register TNC managers from plugin features.
75 *
76 * This function is a plugin_feature_callback_t and can be used with the
77 * PLUGIN_CALLBACK macro to register a TNC manager constructor.
78 *
79 * @param plugin plugin registering the TNC manager
80 * @param feature associated plugin feature
81 * @param reg TRUE to register, FALSE to unregister.
82 * @param data data passed to callback, a TNC manager constructor
83 */
84 bool tnc_manager_register(plugin_t *plugin, plugin_feature_t *feature,
85 bool reg, void *data);
86
87 #endif /** TNC_H_ @}*/