Open SCAP Library: oval_results_impl.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

oval_results_impl.h
Go to the documentation of this file.
1
8 /*
9 * Copyright 2009--2013 Red Hat Inc., Durham, North Carolina.
10 * All Rights Reserved.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Authors:
27 * "David Niemoller" <David.Niemoller@g2-inc.com>
28 * Šimon Lukašík
29 */
30
31 #ifndef OVAL_RESULTS_IMPL_H_
32 #define OVAL_RESULTS_IMPL_H_
33
34 #include "oval_results.h"
35
36 #include "OVAL/oval_definitions_impl.h"
37 #include "OVAL/oval_system_characteristics_impl.h"
38 #include "OVAL/adt/oval_smc_impl.h"
39
40 #include "common/util.h"
41 #include "source/oscap_source_priv.h"
42
43 OSCAP_HIDDEN_START;
44
45 int oval_result_system_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
46 xmlNode *oval_result_system_to_dom(struct oval_result_system *, struct oval_results_model *, struct oval_directives_model *, xmlDocPtr, xmlNode *);
47
48 struct oval_result_test *oval_result_system_get_new_test(struct oval_result_system *, struct oval_test *, int variable_instance);
49
50 int oval_result_definition_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
51 struct oval_result_definition *make_result_definition_from_oval_definition(struct oval_result_system *,
52 struct oval_definition *,
53 int variable_instance);
54 xmlNode *oval_result_definition_to_dom(struct oval_result_definition *, oval_result_directive_content_t, xmlDocPtr, xmlNode *);
55 int oval_result_definition_get_variable_instance_hint(const struct oval_result_definition *definition);
56 void oval_result_definition_set_variable_instance_hint(struct oval_result_definition *definition, int new_hint_value);
57
58 struct oval_result_test *make_result_test_from_oval_test(struct oval_result_system *system, struct oval_test *oval_test, int variable_instance);
59
60 int oval_result_test_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
61 xmlNode *oval_result_test_to_dom(struct oval_result_test *, xmlDocPtr, xmlNode *);
62
63
64 int oval_result_item_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
65 xmlNode *oval_result_item_to_dom(struct oval_result_item *, xmlDocPtr, xmlNode *);
66
67 struct oval_result_criteria_node *make_result_criteria_node_from_oval_criteria_node(struct oval_result_system *, struct oval_criteria_node *, int variable_instance);
68
69 int oval_result_criteria_node_parse(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
70 xmlNode *oval_result_criteria_node_to_dom(struct oval_result_criteria_node *, xmlDocPtr, xmlNode *);
71
72 oval_result_t oval_result_parse(xmlTextReaderPtr, char *, oval_result_t);
73
74 struct oval_result_definition *oval_result_system_get_new_definition(struct oval_result_system *,
75 struct oval_definition *,
76 int variable_instance);
77 struct oval_result_test *oval_result_system_get_test(struct oval_result_system *, char *);
78
79 struct oresults {
80 int true_cnt;
81 int false_cnt;
82 int unknown_cnt;
83 int error_cnt;
84 int noteval_cnt;
85 int notappl_cnt;
86 };
87
88 int ores_add_res(struct oresults *ores, oval_result_t res);
89 void ores_clear(struct oresults *ores);
90 oval_result_t ores_get_result_bychk(struct oresults *ores, oval_check_t check);
91 oval_result_t ores_get_result_byopr(struct oresults *ores, oval_operator_t op);
92
93 void oval_results_model_add_system(struct oval_results_model *, struct oval_result_system *);
94
95 struct oval_result_definition_iterator *oval_result_definition_iterator_new(struct oval_smc *mapping);
96 struct oval_result_test_iterator *oval_result_test_iterator_new(struct oval_smc *mapping);
97
98 const char *oval_result_test_get_id(const struct oval_result_test *test);
99
100 OSCAP_HIDDEN_END;
101
102 #endif /* OVAL_RESULTS_IMPL_H_ */
oval_operator_t
oval_operator_t
Boolean operators.
Definition: oval_definitions.h:75
oval_result_definition_iterator
Definition: oval_results.h:75
oval_result_system
Definition: oval_resultSystem.c:54
oval_results_model
OVAL Results Model holds OVAL results structure instances.
Definition: oval_resModel.c:54
oval_definition
Oval definition specification.
Definition: oval_definition.c:54
oval_directives_model
This structure holds instance of OVAL Directives.
oval_criteria_node
Specify oval_definition dependencies.
Definition: oval_criteriaNode.c:50
oresults
Definition: oval_results_impl.h:79
oval_result_directive_content_t
oval_result_directive_content_t
Values for the directives controlling the expected content of the results file.
Definition: oval_directives.h:48
oval_result_definition::oval_result_definition_get_variable_instance_hint
int oval_result_definition_get_variable_instance_hint(const struct oval_result_definition *definition)
Get the value of the variable_instance hint.
Definition: oval_resultDefinition.c:331
oval_check_t
oval_check_t
Check enumeration.
Definition: oval_definitions.h:113
oval_system_characteristics_impl.h
Open Vulnerability and Assessment Language.
oval_result_definition::oval_result_definition_set_variable_instance_hint
void oval_result_definition_set_variable_instance_hint(struct oval_result_definition *definition, int new_hint_value)
This sets counter on next possible variable instance.
Definition: oval_resultDefinition.c:342
oval_result_test_iterator
Definition: oval_results.h:85
oval_result_t
oval_result_t
Result values for the evaluation of an OVAL Definition or an OVAL Test.
Definition: oval_types.h:327
oval_result_definition
Definition: oval_resultDefinition.c:46
oval_result_criteria_node
Definition: oval_resultCriteriaNode.c:46
oval_result_item
Definition: oval_resultItem.c:44
oval_test
An Oval_test specifies a technical control by identifying an oval_object that is evaluated on an inst...
Definition: oval_test.c:47
oval_definitions_impl.h
Open Vulnerability and Assessment Language.
oval_result_test
Definition: oval_resultTest.c:50
oval_results.h
oval_parser_context
Definition: oval_parser_impl.h:45