Defined functional components within ITA namespace
[strongswan.git] / src / libpts / pts / pts_funct_comp_name.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 * @defgroup pts_funct_comp_name pts_funct_comp_name
18 * @{ @ingroup pts
19 */
20
21 #ifndef PTS_FUNCT_COMP_NAME_H_
22 #define PTS_FUNCT_COMP_NAME_H_
23
24 typedef enum pts_funct_comp_type_t pts_funct_comp_type_t;
25 typedef enum pts_funct_comp_name_t pts_funct_comp_name_t;
26 typedef enum pts_ita_funct_comp_type_t pts_ita_funct_comp_type_t;
27 typedef enum pts_ita_funct_comp_name_t pts_ita_funct_comp_name_t;
28 typedef struct pts_qualifier_t pts_qualifier_t;
29
30 /**
31 * PTS Component Functional Type for Qualifier field
32 */
33 enum pts_funct_comp_type_t {
34 /** Unknown */
35 PTS_FUNC_COMP_TYPE_UNKNOWN = 0x0,
36 /** Trusted Platform */
37 PTS_FUNC_COMP_TYPE_TRUSTED = 0x1,
38 /** Operating System */
39 PTS_FUNC_COMP_TYPE_OS = 0x2,
40 /** Graphical User Interface */
41 PTS_FUNC_COMP_TYPE_GUI = 0x3,
42 /** Application */
43 PTS_FUNC_COMP_TYPE_APP = 0x4,
44 /** Networking */
45 PTS_FUNC_COMP_TYPE_NET = 0x5,
46 /** Library */
47 PTS_FUNC_COMP_TYPE_LIB = 0x6,
48 /** TNC Defined Component */
49 PTS_FUNC_COMP_TYPE_TNC = 0x7,
50 /** All matching Components */
51 PTS_FUNC_COMP_TYPE_ALL = 0xF,
52 };
53
54 /**
55 * PTS Component Functional Name Binary Enumeration
56 */
57 enum pts_funct_comp_name_t {
58 /** Ignore */
59 PTS_FUNC_COMP_NAME_IGNORE = 0x0000,
60 /** CRTM */
61 PTS_FUNC_COMP_NAME_CRTM = 0x0001,
62 /** BIOS */
63 PTS_FUNC_COMP_NAME_BIOS = 0x0002,
64 /** Platform Extensions */
65 PTS_FUNC_COMP_NAME_PLATFORM_EXT = 0x0003,
66 /** Motherboard firmware */
67 PTS_FUNC_COMP_NAME_BOARD = 0x0004,
68 /** Initial Program Loader */
69 PTS_FUNC_COMP_NAME_INIT_LOADER = 0x0005,
70 /** Option ROMs */
71 PTS_FUNC_COMP_NAME_OPT_ROMS = 0x0006,
72 };
73
74 /**
75 * PTS Component Functional Type for Qualifier field in ITA namespace
76 */
77 enum pts_ita_funct_comp_type_t {
78 /** Unknown */
79 PTS_ITA_FUNC_COMP_TYPE_UNKNOWN = 0x0,
80 /** Trusted Platform */
81 PTS_ITA_FUNC_COMP_TYPE_TRUSTED = 0x1,
82 /** All matching Components */
83 PTS_ITA_FUNC_COMP_TYPE_ALL = 0xF,
84 };
85
86 /**
87 * PTS Component Functional Name Binary Enumeration in ITA namespace
88 */
89 enum pts_ita_funct_comp_name_t {
90 /** Components measured into PCR17 during tboot */
91 PTS_ITA_FUNC_COMP_NAME_TBOOT_POLICY = 0x0000,
92 /** Components measured into PCR18 during tboot */
93 PTS_ITA_FUNC_COMP_NAME_TBOOT_MLE = 0x0001,
94 /** MBR information and stage1 during boot by trustedGRUB */
95 PTS_ITA_FUNC_COMP_NAME_TGRUB_MBR_STAGE1 = 0x0002,
96 /** bootloader information stage2 part1 during boot by trustedGRUB */
97 PTS_ITA_FUNC_COMP_NAME_TGRUB_STAGE2_PART1 = 0x0003,
98 /** bootloader information stage2 part2 during boot by trustedGRUB */
99 PTS_ITA_FUNC_COMP_NAME_TGRUB_STAGE2_PART2 = 0x0004,
100 /** all commandline arguments from menu.lst and those entered in the shell
101 * during boot by trustedGRUB */
102 PTS_ITA_FUNC_COMP_NAME_TGRUB_CMD_LINE_ARGS = 0x0005,
103 /** all files checked via the checkfile-routine during boot by trustedGRUB */
104 PTS_ITA_FUNC_COMP_NAME_TGRUB_CHECKFILE = 0x0006,
105 /** all files which are actually loaded during boot by trustedGRUB */
106 PTS_ITA_FUNC_COMP_NAME_TGRUB_LOADED_FILES = 0x0007,
107 };
108
109 /**
110 * Qualifier for Functional Component
111 */
112 struct pts_qualifier_t {
113 bool kernel;
114 bool sub_component;
115 pts_ita_funct_comp_type_t type;
116 };
117
118 #endif /** PTS_FUNCT_COMP_NAME_H_ @}*/