Annotation of embedaddon/strongswan/src/libimcv/pts/components/pts_component.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2011-2012 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 pts_component pts_component
18: * @{ @ingroup pts
19: */
20:
21: #ifndef PTS_COMPONENT_H_
22: #define PTS_COMPONENT_H_
23:
24: typedef struct pts_component_t pts_component_t;
25:
26: #include "pts/pts.h"
27: #include "pts/pts_database.h"
28: #include "pts/pts_file_meas.h"
29: #include "pts/components/pts_comp_func_name.h"
30: #include "pts/components/pts_comp_evidence.h"
31:
32: #include <library.h>
33: #include <bio/bio_writer.h>
34:
35: /**
36: * PTS Functional Component Interface
37: */
38: struct pts_component_t {
39:
40: /**
41: * Get the PTS Component Functional Name
42: *
43: * @return PTS Component Functional Name
44: */
45: pts_comp_func_name_t* (*get_comp_func_name)(pts_component_t *this);
46:
47: /**
48: * Get the PTS Component Evidence Flags
49: *
50: * @return PTS Component Functional Name
51: */
52: uint8_t (*get_evidence_flags)(pts_component_t *this);
53:
54: /**
55: * Get the PTS Sub-component Depth
56: *
57: * @return PTS Sub-component Depth
58: */
59: uint32_t (*get_depth)(pts_component_t *this);
60:
61: /**
62: * Do evidence measurements on the PTS Functional Component
63: *
64: * @param qualifier PTS Component Functional Name Qualifier
65: * @param pts PTS interface
66: * @param evidence returns component evidence measurement
67: * @param measurements additional file measurements (NULL if not present)
68: * @return status return code
69: */
70: status_t (*measure)(pts_component_t *this, uint8_t qualifier, pts_t *pts,
71: pts_comp_evidence_t** evidence);
72:
73: /**
74: * Verify the evidence measurements of the PTS Functional Component
75: *
76: * @param qualifier PTS Component Functional Name Qualifier
77: * @param pts PTS interface
78: * @param evidence component evidence measurement to be verified
79: * @return status return code
80: */
81: status_t (*verify)(pts_component_t *this, uint8_t qualifier, pts_t *pts,
82: pts_comp_evidence_t *evidence);
83:
84: /**
85: * Tell the PTS Functional Component to finalize pending registrations
86: * and check for missing measurements
87: *
88: * @param qualifier PTS Component Functional Name Qualifier
89: * @param result writer appending concise measurement result
90: * @return TRUE if finalization successful
91: */
92: bool (*finalize)(pts_component_t *this, uint8_t qualifier,
93: bio_writer_t *result);
94:
95: /**
96: * Get a new reference to the PTS Functional Component
97: *
98: * @return this, with an increased refcount
99: */
100: pts_component_t* (*get_ref)(pts_component_t *this);
101:
102: /**
103: * Destroys a pts_component_t object.
104: */
105: void (*destroy)(pts_component_t *this);
106:
107: };
108:
109: #endif /** PTS_COMPONENT_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>