configure recommendation policy via strongswan.conf
[strongswan.git] / src / libcharon / tnc / imv / imv_recommendations.h
1 /*
2 * Copyright (C) 2010 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 imv_recommendations imv_recommendations
18 * @{ @ingroup libcharon
19 */
20
21 #ifndef IMV_RECOMMENDATIONS_H_
22 #define IMV_RECOMMENDATIONS_H_
23
24 #include <tnc/tncifimv.h>
25 #include <library.h>
26
27 typedef enum recommendation_policy_t recommendation_policy_t;
28
29 enum recommendation_policy_t {
30 RECOMMENDATION_POLICY_NONE,
31 RECOMMENDATION_POLICY_ANY,
32 RECOMMENDATION_POLICY_ALL
33 };
34
35 extern enum_name_t *recommendation_policy_names;
36
37
38 typedef struct recommendations_t recommendations_t;
39
40 /**
41 * Collection of all IMV action recommendations and evaluation results
42 */
43 struct recommendations_t {
44
45 /**
46 * Deliver an IMV action recommendation and IMV evaluation result to the TNCS
47 *
48 * @param imv_id ID of the IMV providing the recommendation
49 * @param recommendation action recommendation
50 * @param evaluation evaluation result
51 */
52 TNC_Result (*provide_recommendation)(recommendations_t *this,
53 TNC_IMVID imv_id,
54 TNC_IMV_Action_Recommendation rec,
55 TNC_IMV_Evaluation_Result eval);
56
57 bool (*have_recommendation)(recommendations_t *this,
58 TNC_IMV_Action_Recommendation *rec,
59 TNC_IMV_Evaluation_Result *eval);
60
61 /**
62 * Destroys an imv_t object.
63 */
64 void (*destroy)(recommendations_t *this);
65 };
66
67 #endif /** IMV_RECOMMENDATIONS_H_ @}*/