store detected improper OS settings in database
[strongswan.git] / src / libpts / plugins / imc_attestation / imc_attestation_state.h
1 /*
2 * Copyright (C) 2011 Sansar Choinyambuu
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 *
18 * @defgroup imc_attestation_state_t imc_attestation_state
19 * @{ @ingroup imc_attestation_state
20 */
21
22 #ifndef IMC_ATTESTATION_STATE_H_
23 #define IMC_ATTESTATION_STATE_H_
24
25 #include <imc/imc_state.h>
26 #include <pts/pts.h>
27 #include <pts/components/pts_component.h>
28 #include <pts/components/pts_comp_evidence.h>
29 #include <library.h>
30
31 typedef struct imc_attestation_state_t imc_attestation_state_t;
32
33 /**
34 * Internal state of an imc_attestation_t connection instance
35 */
36 struct imc_attestation_state_t {
37
38 /**
39 * imc_state_t interface
40 */
41 imc_state_t interface;
42
43 /**
44 * Get the PTS object
45 *
46 * @return PTS object
47 */
48 pts_t* (*get_pts)(imc_attestation_state_t *this);
49
50 /**
51 * Create and add an entry to the list of Functional Components
52 *
53 * @param name Component Functional Name
54 * @param depth Sub-component Depth
55 * @return created functional component instance or NULL
56 */
57 pts_component_t* (*create_component)(imc_attestation_state_t *this,
58 pts_comp_func_name_t *name, u_int32_t depth);
59
60 /**
61 * Add an entry to the Component Evidence cache list
62 *
63 * @param evid Component Evidence entry
64 */
65 void (*add_evidence)(imc_attestation_state_t *this, pts_comp_evidence_t *evid);
66
67 /**
68 * Removes next entry from the Component Evidence cache list and returns it
69 *
70 * @param evid Next Component Evidence entry
71 * @return TRUE if next entry is available
72 */
73 bool (*next_evidence)(imc_attestation_state_t *this, pts_comp_evidence_t** evid);
74
75 };
76
77 /**
78 * Create an imc_attestation_state_t instance
79 *
80 * @param id connection ID
81 */
82 imc_state_t* imc_attestation_state_create(TNC_ConnectionID id);
83
84 #endif /** IMC_ATTESTATION_STATE_H_ @}*/