2 * Copyright (C) 2011 Sansar Choinyambuu
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
17 * @defgroup tcg_pts_attr_req_funct_comp_evid tcg_pts_attr_req_funct_comp_evid
18 * @{ @ingroup tcg_pts_attr_req_funct_comp_evid
21 #ifndef TCG_PTS_ATTR_REQ_FUNCT_COMP_EVID_H_
22 #define TCG_PTS_ATTR_REQ_FUNCT_COMP_EVID_H_
24 typedef struct tcg_pts_attr_req_funct_comp_evid_t tcg_pts_attr_req_funct_comp_evid_t
;
25 typedef enum pts_attr_req_funct_comp_evid_flag_t pts_attr_req_funct_comp_evid_flag_t
;
28 #include "tcg_pts_funct_comp_name.h"
29 #include "pa_tnc/pa_tnc_attr.h"
32 * PTS Request Functional Component Evidence Flags
34 enum pts_attr_req_funct_comp_evid_flag_t
{
35 /** Transitive Trust Chain flag */
36 PTS_REQ_FUNC_COMP_FLAG_TTC
= (1<<0),
37 /** Verify Component flag */
38 PTS_REQ_FUNC_COMP_FLAG_VER
= (1<<1),
39 /** Current Evidence flag */
40 PTS_REQ_FUNC_COMP_FLAG_CURR
= (1<<2),
41 /** PCR Information flag */
42 PTS_REQ_FUNC_COMP_FLAG_PCR
= (1<<3),
46 * Class implementing the TCG PTS Request Functional Component Evidence attribute
49 struct tcg_pts_attr_req_funct_comp_evid_t
{
52 * Public PA-TNC attribute interface
54 pa_tnc_attr_t pa_tnc_attribute
;
57 * Get flags for PTS Request Functional Component Evidence
59 * @return Set of flags
61 pts_attr_req_funct_comp_evid_flag_t (*get_flags
)(tcg_pts_attr_req_funct_comp_evid_t
*this);
64 * Set flags for PTS Request Functional Component Evidence
66 * @param flags Set of flags
68 void (*set_flags
)(tcg_pts_attr_req_funct_comp_evid_t
*this,
69 pts_attr_req_funct_comp_evid_flag_t flags
);
72 * Get Sub-component Depth
74 * @return Sub-component Depth
76 u_int32_t (*get_sub_component_depth
)(tcg_pts_attr_req_funct_comp_evid_t
*this);
79 * Get Component Functional Name Vendor ID
81 * @return Component Functional Name Vendor ID
83 u_int32_t (*get_comp_funct_name_vendor_id
)(tcg_pts_attr_req_funct_comp_evid_t
*this);
88 * @return Functional Name Family
90 u_int8_t (*get_family
)(tcg_pts_attr_req_funct_comp_evid_t
*this);
95 * @return Functional Name Category Qualifier
97 pts_qualifier_t (*get_qualifier
)(tcg_pts_attr_req_funct_comp_evid_t
*this);
100 * Set qualifier for Component Functional Name
102 * @param qualifier Functional Name Category Qualifier
104 void (*set_qualifier
)(tcg_pts_attr_req_funct_comp_evid_t
*this,
105 pts_qualifier_t qualifier
);
108 * Get Component Functional Name
110 * @return Component Functional Name
112 pts_funct_comp_name_t (*get_comp_funct_name
)(tcg_pts_attr_req_funct_comp_evid_t
*this);
116 * Set Component Functional Name
118 * @param name Component Functional Name
120 void (*set_comp_funct_name
)(tcg_pts_attr_req_funct_comp_evid_t
*this,
121 pts_funct_comp_name_t name
);
127 * Creates an tcg_pts_attr_req_funct_comp_evid_t object
129 * @param flags Set of flags
130 * @param depth Sub-component Depth
131 * @param vendor_id Component Functional Name Vendor ID
132 * @param qualifier Functional Name Category Qualifier
133 * @param name Component Functional Name
135 pa_tnc_attr_t
* tcg_pts_attr_req_funct_comp_evid_create(pts_attr_req_funct_comp_evid_flag_t flags
,
136 u_int32_t depth
, u_int32_t vendor_id
,
137 pts_qualifier_t qualifier
,
138 pts_funct_comp_name_t name
);
141 * Creates an tcg_pts_attr_req_funct_comp_evid_t object from received data
143 * @param value Unparsed attribute value
145 pa_tnc_attr_t
* tcg_pts_attr_req_funct_comp_evid_create_from_data(chunk_t value
);
147 #endif /** TCG_PTS_ATTR_REQ_FUNCT_COMP_EVID_H_ @}*/