implemented the RFC 5792 PA-TNC protocol and an example IMC/IMV pair
[strongswan.git] / src / libimcv / imv / imv_state.h
1 /*
2 * Copyright (C) 2011 Andreas Steffen, HSR Hochschule fuer Technik Rapperswil
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 */
14
15 /**
16 *
17 * @defgroup imv_state_t imv_state
18 * @{ @ingroup imv_state
19 */
20
21 #ifndef IMV_STATE_H_
22 #define IMV_STATE_H_
23
24 #include <tnc/tncifimv.h>
25 #include <library.h>
26
27 typedef struct imv_state_t imv_state_t;
28
29 /**
30 * Internal state of an IMV connection instance
31 */
32 struct imv_state_t {
33
34 /**
35 * Get the TNCS connection ID attached to the state
36 *
37 * @return TNCS connection ID of the state
38 */
39 TNC_ConnectionID (*get_connection_id)(imv_state_t *this);
40
41 /**
42 * Change the connection state
43 *
44 * @param new_state new connection state
45 */
46 void (*change_state)(imv_state_t *this, TNC_ConnectionState new_state);
47
48 /**
49 * Get IMV action recommendation and evaluation result
50 *
51 * @param rec IMV action recommendation
52 * @param eval IMV evaluation result
53 *
54 */
55 void (*get_recommendation)(imv_state_t *this,
56 TNC_IMV_Action_Recommendation *rec,
57 TNC_IMV_Evaluation_Result *eval);
58
59 /**
60 * Set IMV action recommendation and evaluation result
61 *
62 * @param rec IMV action recommendation
63 * @param eval IMV evaluation result
64 *
65 */
66 void (*set_recommendation)(imv_state_t *this,
67 TNC_IMV_Action_Recommendation rec,
68 TNC_IMV_Evaluation_Result eval);
69
70 /**
71 * Destroys an imv_state_t object
72 */
73 void (*destroy)(imv_state_t *this);
74 };
75
76 #endif /** IMV_STATE_H_ @}*/