Open SCAP Library
oval_definitions.h
Go to the documentation of this file.
1 
16 /*
17  * Copyright 2009-2013 Red Hat Inc., Durham, North Carolina.
18  * All Rights Reserved.
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This library is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33  *
34  * Authors:
35  * "David Niemoller" <David.Niemoller@g2-inc.com>
36  */
37 
38 
39 #ifndef OVAL_DEFINITIONS
40 #define OVAL_DEFINITIONS
41 
42 #include "oval_adt.h"
43 #include "oval_types.h"
44 #include "oval_version.h"
45 #include <stdbool.h>
46 
52 typedef enum {
53  OVAL_AFCFML_UNKNOWN = 0,
54  OVAL_AFCFML_CATOS = 1,
55  OVAL_AFCFML_IOS = 2,
56  OVAL_AFCFML_MACOS = 3,
57  OVAL_AFCFML_PIXOS = 4,
58  OVAL_AFCFML_UNDEFINED = 5,
59  OVAL_AFCFML_UNIX = 6,
60  OVAL_AFCFML_WINDOWS = 7
62 
64 typedef enum {
65  OVAL_NODETYPE_UNKNOWN = 0,
66  OVAL_NODETYPE_CRITERIA = 1,
67  OVAL_NODETYPE_CRITERION = 2,
68  OVAL_NODETYPE_EXTENDDEF = 3
70 
72 typedef enum {
73  OVAL_OPERATOR_UNKNOWN = 0,
74  OVAL_OPERATOR_AND = 1,
75  OVAL_OPERATOR_ONE = 2,
76  OVAL_OPERATOR_OR = 3,
77  OVAL_OPERATOR_XOR = 4
79 
81 typedef enum {
82  OVAL_OPERATION_UNKNOWN = 0,
83  OVAL_OPERATION_BITWISE_AND,
84  OVAL_OPERATION_BITWISE_OR,
85  OVAL_OPERATION_CASE_INSENSITIVE_EQUALS,
86  OVAL_OPERATION_CASE_INSENSITIVE_NOT_EQUAL,
87  OVAL_OPERATION_EQUALS,
88  OVAL_OPERATION_GREATER_THAN,
89  OVAL_OPERATION_GREATER_THAN_OR_EQUAL,
90  OVAL_OPERATION_LESS_THAN,
91  OVAL_OPERATION_LESS_THAN_OR_EQUAL,
92  OVAL_OPERATION_NOT_EQUAL,
93  OVAL_OPERATION_PATTERN_MATCH,
94  OVAL_OPERATION_SUBSET_OF,
95  OVAL_OPERATION_SUPERSET_OF,
97 
98 
100 typedef enum {
101  OVAL_EXISTENCE_UNKNOWN = 0,
102  OVAL_ALL_EXIST = 1,
103  OVAL_ANY_EXIST = 2,
104  OVAL_AT_LEAST_ONE_EXISTS = 3,
105  OVAL_ONLY_ONE_EXISTS = 4,
106  OVAL_NONE_EXIST = 5
108 
110 typedef enum {
111  OVAL_CHECK_UNKNOWN = 0,
112  OVAL_CHECK_ALL = 1,
113  OVAL_CHECK_AT_LEAST_ONE = 2,
114  OVAL_CHECK_NONE_EXIST = 3,
115  OVAL_CHECK_NONE_SATISFY = 4,
116  OVAL_CHECK_ONLY_ONE = 5
117 } oval_check_t;
118 
120 typedef enum {
121  OVAL_OBJECTCONTENT_UNKNOWN = 0,
122  OVAL_OBJECTCONTENT_ENTITY = 1,
123  OVAL_OBJECTCONTENT_SET = 2,
124  OVAL_OBJECTCONTENT_FILTER = 3
126 
128 typedef enum {
129  OVAL_ENTITY_TYPE_UNKNOWN,
130  OVAL_ENTITY_TYPE_ANY,
131  OVAL_ENTITY_TYPE_BINARY,
132  OVAL_ENTITY_TYPE_BOOLEAN,
133  OVAL_ENTITY_TYPE_FLOAT,
134  OVAL_ENTITY_TYPE_INTEGER,
135  OVAL_ENTITY_TYPE_STRING,
137 
139 typedef enum {
140  OVAL_FILTER_ACTION_UNKNOWN = 0,
141  OVAL_FILTER_ACTION_EXCLUDE,
142  OVAL_FILTER_ACTION_INCLUDE
144 
146 typedef enum {
147  OVAL_DATATYPE_UNKNOWN = 0,
148  OVAL_DATATYPE_BINARY,
149  OVAL_DATATYPE_BOOLEAN,
150  OVAL_DATATYPE_EVR_STRING,
151  OVAL_DATATYPE_FILESET_REVISION,
152  OVAL_DATATYPE_FLOAT,
153  OVAL_DATATYPE_INTEGER,
154  OVAL_DATATYPE_IOS_VERSION,
155  OVAL_DATATYPE_IPV4ADDR,
156  OVAL_DATATYPE_IPV6ADDR,
157  OVAL_DATATYPE_RECORD,
158  OVAL_DATATYPE_SEXP,
159  OVAL_DATATYPE_STRING,
160  OVAL_DATATYPE_STRING_M,
161  OVAL_DATATYPE_VERSION,
163 
165 typedef enum {
166  OVAL_ENTITY_VARREF_UNKNOWN,
167  OVAL_ENTITY_VARREF_NONE,
168  OVAL_ENTITY_VARREF_ATTRIBUTE,
169  OVAL_ENTITY_VARREF_ELEMENT
171 
173 typedef enum {
174  OVAL_SET_UNKNOWN,
175  OVAL_SET_AGGREGATE,
176  OVAL_SET_COLLECTIVE
178 
180 typedef enum {
181  OVAL_SET_OPERATION_UNKNOWN,
182  OVAL_SET_OPERATION_COMPLEMENT = 1,
183  OVAL_SET_OPERATION_INTERSECTION = 2,
184  OVAL_SET_OPERATION_UNION = 3
186 
188 typedef enum {
189  OVAL_VARIABLE_UNKNOWN,
190  OVAL_VARIABLE_EXTERNAL,
191  OVAL_VARIABLE_CONSTANT,
192  OVAL_VARIABLE_LOCAL
194 
195 #define OVAL_FUNCTION 4
196 typedef enum {
198  OVAL_COMPONENT_UNKNOWN = 0,
199  OVAL_COMPONENT_LITERAL = 1,
200  OVAL_COMPONENT_OBJECTREF = 2,
201  OVAL_COMPONENT_VARREF = 3,
202  OVAL_COMPONENT_FUNCTION = 4,
203  OVAL_FUNCTION_BEGIN = OVAL_FUNCTION + 1,
204  OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2,
205  OVAL_FUNCTION_END = OVAL_FUNCTION + 3,
206  OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4,
207  OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5,
208  OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6,
209  OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7,
210  OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8,
211  OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9,
212  OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10,
213  OVAL_FUNCTION_UNIQUE = OVAL_FUNCTION + 11,
214  OVAL_FUNCTION_LAST = OVAL_FUNCTION + 12
216 
218 typedef enum {
219  OVAL_ARITHMETIC_UNKNOWN = 0,
220  OVAL_ARITHMETIC_ADD = 1,
221  OVAL_ARITHMETIC_MULTIPLY = 2,
222  OVAL_ARITHMETIC_SUBTRACT = 3, //NOT YET SUPPORTED BY OVAL
223  OVAL_ARITHMETIC_DIVIDE = 4 //NOT YET SUPPORTED BY OVAL
225 
227 typedef enum {
228  OVAL_DATETIME_UNKNOWN = 0,
229  OVAL_DATETIME_YEAR_MONTH_DAY = 1,
230  OVAL_DATETIME_MONTH_DAY_YEAR = 2,
231  OVAL_DATETIME_DAY_MONTH_YEAR = 3,
232  OVAL_DATETIME_WIN_FILETIME = 4,
233  OVAL_DATETIME_SECONDS_SINCE_EPOCH = 5
235 
236 typedef enum {
237  OVAL_RECORD_FIELD_UNKNOWN = 0,
238  OVAL_RECORD_FIELD_STATE = 1,
239  OVAL_RECORD_FIELD_ITEM = 2,
240 } oval_record_field_type_t;
241 
246 const char *oval_operator_get_text(oval_operator_t);
247 const char *oval_subtype_get_text(oval_subtype_t);
248 const char *oval_family_get_text(oval_family_t);
249 const char *oval_check_get_text(oval_check_t);
250 const char *oval_existence_get_text(oval_existence_t);
251 const char *oval_affected_family_get_text(oval_affected_family_t);
252 const char *oval_datatype_get_text(oval_datatype_t);
253 oval_datatype_t oval_datatype_from_text(const char *);
254 const char *oval_operation_get_text(oval_operation_t);
255 const char *oval_set_operation_get_text(oval_setobject_operation_t);
256 const char *oval_datetime_format_get_text(oval_datetime_format_t);
257 const char *oval_arithmetic_operation_get_text(oval_arithmetic_operation_t);
258 const char *oval_filter_action_get_text(oval_filter_action_t);
259 
260 
265 struct oval_definition_model;
266 
284 struct oval_test;
289 struct oval_test_iterator;
298 struct oval_object;
303 struct oval_object_iterator;
310 struct oval_state;
315 struct oval_state_iterator;
423 struct oval_value;
428 struct oval_value_iterator;
433 struct oval_entity;
437 struct oval_entity_iterator;
455 struct oval_setobject_iterator;
460 struct oval_filter;
464 struct oval_filter_iterator;
571 
575 struct oval_generator;
576 
577 struct oval_generator *oval_generator_new(void);
578 void oval_generator_free(struct oval_generator *generator);
579 struct oval_generator *oval_generator_clone(struct oval_generator *old_generator);
580 char *oval_generator_get_product_name(struct oval_generator *generator);
581 char *oval_generator_get_product_version(struct oval_generator *generator);
582 char *oval_generator_get_schema_version(struct oval_generator *generator);
583 char *oval_generator_get_timestamp(struct oval_generator *generator);
584 void oval_generator_set_product_name(struct oval_generator *generator, char *product_name);
585 void oval_generator_set_product_version(struct oval_generator *generator, char *product_version);
586 void oval_generator_set_schema_version(struct oval_generator *generator, char *schema_version);
587 void oval_generator_set_timestamp(struct oval_generator *generator, char *timestamp);
588 
600 struct oval_definition_model * oval_definition_model_import(const char *file);
601 
610 int oval_definition_model_merge(struct oval_definition_model *model, const char *file);
611 
623 int oval_definition_model_export(struct oval_definition_model *, const char *file);
629 
634 void oval_definition_model_set_generator(struct oval_definition_model *model, struct oval_generator *generator);
641 
642 void oval_definition_model_clear_external_variables(struct oval_definition_model *);
649 struct oval_generator *oval_definition_model_get_generator(struct oval_definition_model *model);
666 struct oval_test *oval_definition_model_get_test(struct oval_definition_model *model, const char *id);
675 struct oval_object *oval_definition_model_get_object(struct oval_definition_model *model, const char *id);
684 struct oval_state *oval_definition_model_get_state(struct oval_definition_model *model, const char *id);
693 struct oval_variable *oval_definition_model_get_variable(struct oval_definition_model *model, const char *id);
727 
733 const char * oval_definition_model_supported(void);
765 struct oval_definition *oval_definition_new(struct oval_definition_model *, const char *id);
766 
772 struct oval_definition *oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition);
773 
784 
796 void oval_definition_set_version(struct oval_definition *, int version);
810 void oval_definition_set_deprecated(struct oval_definition *, bool deprecated);
818 void oval_definition_set_title(struct oval_definition *, char *title);
826 void oval_definition_set_description(struct oval_definition *, char *description);
837 void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected);
848 void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference);
854 void oval_definition_add_note(struct oval_definition *, char *note);
868 void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria);
985 struct oval_test *oval_test_new(struct oval_definition_model *, const char *id);
991 struct oval_test *oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test);
996 void oval_test_free(struct oval_test *);
997 
1011 void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype);
1017 void oval_test_add_note(struct oval_test *, char *note);
1023 void oval_test_set_comment(struct oval_test *, char *comment);
1028 void oval_test_set_deprecated(struct oval_test *, bool deprecated);
1037 void oval_test_set_version(struct oval_test *, int version);
1070 void oval_test_set_object(struct oval_test *, struct oval_object *);
1076 void oval_test_add_state(struct oval_test *, struct oval_state *);
1105 char *oval_test_get_comment(struct oval_test *);
1111 char *oval_test_get_id(struct oval_test *);
1116 bool oval_test_get_deprecated(struct oval_test *);
1121 int oval_test_get_version(struct oval_test *);
1142 struct oval_object *oval_test_get_object(struct oval_test *);
1150 
1198 struct oval_object *oval_object_new(struct oval_definition_model *, const char *id);
1204 struct oval_object *oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object);
1209 void oval_object_free(struct oval_object *);
1210 
1224 void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype);
1230 void oval_object_add_note(struct oval_object *, char *note);
1231 
1237 void oval_object_set_comment(struct oval_object *, char *comment);
1238 
1243 void oval_object_set_deprecated(struct oval_object *, bool deprecated);
1252 void oval_object_set_version(struct oval_object *, int version);
1265 void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content);
1278 void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior);
1295 const char *oval_object_get_name(struct oval_object *);
1313 char *oval_object_get_comment(struct oval_object *);
1319 char *oval_object_get_id(struct oval_object *);
1320 
1330 int oval_object_get_version(struct oval_object *);
1331 
1335 oval_version_t oval_object_get_schema_version(struct oval_object *object);
1336 
1398 struct oval_state *oval_state_new(struct oval_definition_model *, const char *id);
1404 struct oval_state *oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state);
1409 void oval_state_free(struct oval_state *);
1410 
1424 void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype);
1430 void oval_state_add_note(struct oval_state *, char *note);
1436 void oval_state_set_comment(struct oval_state *, char *comment);
1441 void oval_state_set_deprecated(struct oval_state *, bool deprecated);
1450 void oval_state_set_version(struct oval_state *, int version);
1468 void oval_state_add_content(struct oval_state *, struct oval_state_content *content);
1485 const char *oval_state_get_name(struct oval_state *);
1503 char *oval_state_get_comment(struct oval_state *);
1509 char *oval_state_get_id(struct oval_state *);
1514 bool oval_state_get_deprecated(struct oval_state *);
1519 int oval_state_get_version(struct oval_state *);
1524 int oval_state_get_operator(struct oval_state *);
1585 struct oval_variable *oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type);
1591 struct oval_variable *oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable);
1596 void oval_variable_free(struct oval_variable *);
1597 
1609 void oval_variable_set_comment(struct oval_variable *, char *comment);
1617 void oval_variable_set_version(struct oval_variable *, int version);
1623 void oval_variable_set_deprecated(struct oval_variable *, bool deprecated);
1645 void oval_variable_add_value(struct oval_variable *, struct oval_value *); //type==OVAL_VARIABLE_CONSTANT
1646 
1647 void oval_variable_clear_values(struct oval_variable *);
1660 void oval_variable_set_component(struct oval_variable *, struct oval_component *component); //type==OVAL_VARIABLE_LOCAL
1672 char *oval_variable_get_id(struct oval_variable *);
1706 struct oval_value_iterator *oval_variable_get_values(struct oval_variable *); //type==OVAL_VARIABLE_CONSTANT
1713 struct oval_component *oval_variable_get_component(struct oval_variable *); //type==OVAL_VARIABLE_LOCAL
1758 struct oval_affected *oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected);
1763 void oval_affected_free(struct oval_affected *);
1764 
1778 void oval_affected_add_platform(struct oval_affected *, char *platform_name);
1783 void oval_affected_add_product(struct oval_affected *, char *product_name);
1845 struct oval_reference *oval_reference_new(struct oval_definition_model *);
1851  (struct oval_definition_model *new_model, struct oval_reference *old_reference);
1855 void oval_reference_free(struct oval_reference *);
1856 
1866 void oval_reference_set_source(struct oval_reference *, char *);
1870 void oval_reference_set_id(struct oval_reference *, char *);
1874 void oval_reference_set_url(struct oval_reference *, char *);
1892 char *oval_reference_get_id(struct oval_reference *);
1898 char *oval_reference_get_url(struct oval_reference *);
1908 bool oval_reference_iterator_has_more(struct oval_reference_iterator *);
1912 struct oval_reference *oval_reference_iterator_next(struct oval_reference_iterator *);
1916 void oval_reference_iterator_free(struct oval_reference_iterator *);
1952  (struct oval_definition_model *new_model, struct oval_criteria_node *old_node);
1958 
1968 void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate);
1974 void oval_criteria_node_set_applicability_check(struct oval_criteria_node *, bool applicability_check);
1986 void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment);
2021 void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *); //type==NODETYPE_EXTENDDEF
2043 
2111 struct oval_object_content *oval_object_content_new(struct oval_definition_model *model, oval_object_content_type_t type);
2112 
2118  (struct oval_definition_model *new_model, struct oval_object_content *old_content);
2119 
2123 void oval_object_content_free(struct oval_object_content *);
2124 
2133 void oval_object_content_set_type(struct oval_object_content *, oval_object_content_type_t);
2137 void oval_object_content_set_field_name(struct oval_object_content *, char *);
2141 void oval_object_content_set_entity(struct oval_object_content *, struct oval_entity *); //type == OVAL_OBJECTCONTENT_ENTITY
2145 void oval_object_content_set_varCheck(struct oval_object_content *, oval_check_t); //type == OVAL_OBJECTCONTENT_ENTITY
2149 void oval_object_content_set_setobject(struct oval_object_content *, struct oval_setobject *); //type == OVAL_OBJECTCONTENT_SET
2172 struct oval_entity *oval_object_content_get_entity(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_ENTITY
2177 oval_check_t oval_object_content_get_varCheck(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_ENTITY
2183 struct oval_setobject *oval_object_content_get_setobject(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_SET
2193 bool oval_object_content_iterator_has_more(struct oval_object_content_iterator *);
2197 struct oval_object_content *oval_object_content_iterator_next(struct oval_object_content_iterator *);
2201 void oval_object_content_iterator_free(struct oval_object_content_iterator *);
2213 struct oval_behavior *oval_behavior_new(struct oval_definition_model *);
2214 
2219 struct oval_behavior *oval_behavior_clone(struct oval_definition_model *new_model, struct oval_behavior *old_behavior);
2223 void oval_behavior_free(struct oval_behavior *);
2224 
2232 void oval_behavior_set_keyval(struct oval_behavior *behavior, const char *key, const char *value);
2244 char *oval_behavior_get_key(struct oval_behavior *);
2250 char *oval_behavior_get_value(struct oval_behavior *);
2260 bool oval_behavior_iterator_has_more(struct oval_behavior_iterator *);
2264 struct oval_behavior *oval_behavior_iterator_next(struct oval_behavior_iterator *);
2268 void oval_behavior_iterator_free(struct oval_behavior_iterator *);
2280 struct oval_state_content *oval_state_content_new(struct oval_definition_model *);
2285 struct oval_state_content *oval_state_content_clone (struct oval_definition_model *new_model, struct oval_state_content *old_content);
2289 void oval_state_content_free(struct oval_state_content *);
2290 
2298 void oval_state_content_set_entity(struct oval_state_content *, struct oval_entity *);
2302 void oval_state_content_add_record_field(struct oval_state_content *, struct oval_record_field *);
2306 void oval_state_content_set_varcheck(struct oval_state_content *, oval_check_t);
2310 void oval_state_content_set_entcheck(struct oval_state_content *, oval_check_t);
2326 struct oval_record_field_iterator *oval_state_content_get_record_fields(struct oval_state_content *);
2347 bool oval_state_content_iterator_has_more(struct oval_state_content_iterator *);
2351 struct oval_state_content *oval_state_content_iterator_next(struct oval_state_content_iterator *);
2355 void oval_state_content_iterator_free(struct oval_state_content_iterator *);
2361 struct oval_value *oval_value_new(oval_datatype_t datatype, char *text_value);
2366 struct oval_value *oval_value_clone(struct oval_value *old_value);
2370 void oval_value_free(struct oval_value *);
2371 
2379 void oval_value_set_datatype(struct oval_value *, oval_datatype_t);
2380 
2395 char *oval_value_get_text(struct oval_value *);
2400 unsigned char *oval_value_get_binary(struct oval_value *); //datatype==OVAL_DATATYPE_BINARY
2405 bool oval_value_get_boolean(struct oval_value *); //datatype==OVAL_DATATYPE_BOOLEAN
2410 float oval_value_get_float(struct oval_value *); //datatype==OVAL_DATATYPE_FLOAT
2415 long long oval_value_get_integer(struct oval_value *); //datatype==OVAL_DATATYPE_INTEGER
2425 bool oval_value_iterator_has_more(struct oval_value_iterator *);
2429 struct oval_value *oval_value_iterator_next(struct oval_value_iterator *);
2433 int oval_value_iterator_remaining(struct oval_value_iterator *iterator);
2437 void oval_value_iterator_free(struct oval_value_iterator *);
2449 struct oval_entity *oval_entity_new(struct oval_definition_model *);
2454 struct oval_entity *oval_entity_clone(struct oval_definition_model *model, struct oval_entity *old_entity);
2458 void oval_entity_free(struct oval_entity *);
2459 
2467 void oval_entity_set_type(struct oval_entity *, oval_entity_type_t);
2471 void oval_entity_set_datatype(struct oval_entity *, oval_datatype_t);
2475 void oval_entity_set_mask(struct oval_entity *, int);
2479 void oval_entity_set_varref_type(struct oval_entity *, oval_entity_varref_type_t);
2483 void oval_entity_set_variable(struct oval_entity *, struct oval_variable *);
2487 void oval_entity_set_value(struct oval_entity *, struct oval_value *);
2491 void oval_entity_set_name(struct oval_entity *, char *);
2495 void oval_entity_set_operation(struct oval_entity *, oval_operation_t);
2507 char *oval_entity_get_name(struct oval_entity *);
2534 struct oval_value *oval_entity_get_value(struct oval_entity *);
2539 int oval_entity_get_mask(struct oval_entity *);
2554 bool oval_entity_iterator_has_more(struct oval_entity_iterator *);
2558 struct oval_entity *oval_entity_iterator_next(struct oval_entity_iterator *);
2562 void oval_entity_iterator_free(struct oval_entity_iterator *);
2574 struct oval_record_field *oval_record_field_new(oval_record_field_type_t);
2578 struct oval_record_field *oval_record_field_clone(struct oval_record_field *);
2582 void oval_record_field_free(struct oval_record_field *);
2583 
2591 void oval_record_field_set_name(struct oval_record_field *, char *);
2595 void oval_record_field_set_value(struct oval_record_field *, char *);
2599 void oval_record_field_set_datatype(struct oval_record_field *, oval_datatype_t);
2603 void oval_record_field_set_mask(struct oval_record_field *, int);
2607 void oval_record_field_set_operation(struct oval_record_field *, oval_operation_t);
2611 void oval_record_field_set_variable(struct oval_record_field *, struct oval_variable *);
2615 void oval_record_field_set_var_check(struct oval_record_field *, oval_check_t);
2619 void oval_record_field_set_ent_check(struct oval_record_field *, oval_check_t);
2629 oval_record_field_type_t oval_record_field_get_type(struct oval_record_field *);
2633 char *oval_record_field_get_name(struct oval_record_field *);
2637 char *oval_record_field_get_value(struct oval_record_field *);
2641 oval_datatype_t oval_record_field_get_datatype(struct oval_record_field *);
2645 int oval_record_field_get_mask(struct oval_record_field *);
2649 oval_operation_t oval_record_field_get_operation(struct oval_record_field *);
2653 struct oval_variable *oval_record_field_get_variable(struct oval_record_field *);
2657 oval_check_t oval_record_field_get_var_check(struct oval_record_field *);
2661 oval_check_t oval_record_field_get_ent_check(struct oval_record_field *);
2671 bool oval_record_field_iterator_has_more(struct oval_record_field_iterator *);
2675 struct oval_record_field *oval_record_field_iterator_next(struct oval_record_field_iterator *);
2679 void oval_record_field_iterator_free(struct oval_record_field_iterator *);
2691 struct oval_filter *oval_filter_new(struct oval_definition_model *);
2695 void oval_filter_free(struct oval_filter *);
2699 struct oval_filter *oval_filter_clone(struct oval_definition_model *, struct oval_filter *);
2700 
2708 void oval_filter_set_state(struct oval_filter *, struct oval_state *);
2712 void oval_filter_set_filter_action(struct oval_filter *, oval_filter_action_t );
2722 struct oval_state *oval_filter_get_state(struct oval_filter *);
2726 oval_filter_action_t oval_filter_get_filter_action(struct oval_filter *);
2736 bool oval_filter_iterator_has_more(struct oval_filter_iterator *);
2740 struct oval_filter *oval_filter_iterator_next(struct oval_filter_iterator *);
2744 void oval_filter_iterator_free(struct oval_filter_iterator *);
2756 struct oval_setobject *oval_setobject_new(struct oval_definition_model *);
2761 struct oval_setobject *oval_setobject_clone(struct oval_definition_model *new_model, struct oval_setobject *old_setobject);
2765 void oval_setobject_free(struct oval_setobject *);
2766 
2773 void oval_setobject_set_type(struct oval_setobject *, oval_setobject_type_t);
2777 void oval_setobject_set_operation(struct oval_setobject *, oval_setobject_operation_t);
2781 void oval_setobject_add_subset(struct oval_setobject *, struct oval_setobject *); //type==OVAL_SET_AGGREGATE;
2785 void oval_setobject_add_object(struct oval_setobject *, struct oval_object *); //type==OVAL_SET_COLLECTIVE;
2789 void oval_setobject_add_filter(struct oval_setobject *, struct oval_filter *); //type==OVAL_SET_COLLECTIVE;
2813 struct oval_setobject_iterator *oval_setobject_get_subsets(struct oval_setobject *); //type==OVAL_SET_AGGREGATE;
2821 struct oval_object_iterator *oval_setobject_get_objects(struct oval_setobject *); //type==OVAL_SET_COLLECTIVE;
2829 struct oval_filter_iterator *oval_setobject_get_filters(struct oval_setobject *); //type==OVAL_SET_COLLECTIVE;
2839 bool oval_setobject_iterator_has_more(struct oval_setobject_iterator *);
2843 struct oval_setobject *oval_setobject_iterator_next(struct oval_setobject_iterator *);
2847 void oval_setobject_iterator_free(struct oval_setobject_iterator *);
2906  struct oval_component *old_component);
2911 void oval_component_free(struct oval_component *);
2912 
2921 void oval_component_set_type(struct oval_component *component, oval_component_type_t type);
2927 void oval_component_set_object(struct oval_component *, struct oval_object *object);
2932 void oval_component_set_item_field(struct oval_component *, char *);
2937 void oval_component_set_record_field(struct oval_component *, char *);
2943 void oval_component_set_variable(struct oval_component *, struct oval_variable *variable);
2947 void oval_component_add_function_component(struct oval_component *, struct oval_component *); //type==OVAL_COMPONENT_FUNCTION
2951 void oval_component_set_arithmetic_operation(struct oval_component *, oval_arithmetic_operation_t); //type==OVAL_COMPONENT_ARITHMETIC
2955 void oval_component_set_prefix(struct oval_component *, char *); //type==OVAL_COMPONENT_BEGIN
2959 void oval_component_set_suffix(struct oval_component *, char *); //type==OVAL_COMPONENT_END
2963 void oval_component_set_split_delimiter(struct oval_component *, char *); //type==OVAL_COMPONENT_SPLIT
2967 void oval_component_set_substring_start(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
2971 void oval_component_set_substring_length(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
2975 void oval_component_set_timedif_format_1(struct oval_component *, oval_datetime_format_t); //type==OVAL_COMPONENT_TIMEDIF
2979 void oval_component_set_timedif_format_2(struct oval_component *, oval_datetime_format_t); //type==OVAL_COMPONENT_TIMEDIF
2983 void oval_component_set_regex_pattern(struct oval_component *, char *); //type==OVAL_COMPONENT_REGEX_CAPTURE
2987 void oval_component_set_literal_value(struct oval_component *, struct oval_value *); //type==OVAL_COMPONENT_LITERAL
3006 struct oval_object *oval_component_get_object(struct oval_component *); //type==OVAL_COMPONENT_OBJECTREF
3036 struct oval_component_iterator *oval_component_get_function_components(struct oval_component *); //type==OVAL_COMPONENT_FUNCTION
3042 oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *); //type==OVAL_COMPONENT_ARITHMETIC
3050 char *oval_component_get_prefix(struct oval_component *); //type==OVAL_COMPONENT_BEGIN
3058 char *oval_component_get_suffix(struct oval_component *); //type==OVAL_COMPONENT_END
3066 char *oval_component_get_split_delimiter(struct oval_component *); //type==OVAL_COMPONENT_SPLIT
3072 int oval_component_get_substring_start(struct oval_component *); //type==OVAL_COMPONENT_SUBSTRING
3078 int oval_component_get_substring_length(struct oval_component *); //type==OVAL_COMPONENT_SUBSTRING
3084 oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *); //type==OVAL_COMPONENT_TIMEDIF
3090 oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *); //type==OVAL_COMPONENT_TIMEDIF
3098 char *oval_component_get_regex_pattern(struct oval_component *); //type==OVAL_COMPONENT_REGEX_CAPTURE
3106 struct oval_value *oval_component_get_literal_value(struct oval_component *); //type==OVAL_COMPONENT_LITERAL
3152 
3156 #endif
oval_operator_t
Boolean operators.
Definition: oval_definitions.h:72
oval_entity_varref_type_t
Varref types.
Definition: oval_definitions.h:165
oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *)
Returns attribute Oval_function_ARITHMETIC->arithmetic_operation.
Definition: oval_component.c:356
oval_definition_class_t oval_definition_get_class(struct oval_definition *)
Returns attribute oval_definition->class.
Definition: oval_definition.c:87
struct oval_string_iterator * oval_affected_get_products(struct oval_affected *)
Get member values oval_affected product_names.
Definition: oval_affected.c:107
bool oval_variable_get_deprecated(struct oval_variable *)
Returns attribute oval_variable->deprecated.
Definition: oval_variable.c:130
struct oval_object * oval_test_get_object(struct oval_test *)
Returns attribute oval_test->object.
Definition: oval_test.c:148
void oval_test_set_state_operator(struct oval_test *, oval_operator_t)
Sets attribute oval_test->state_operator.
Definition: oval_test.c:281
struct oval_object * oval_object_iterator_next(struct oval_object_iterator *)
Returns the next instance of oval_object.
Definition: oval_object.c:63
void oval_test_set_existence(struct oval_test *, oval_existence_t)
Sets attribute oval_test->existence.
Definition: oval_test.c:275
void oval_criteria_node_set_operator(struct oval_criteria_node *, oval_operator_t op)
Set attribute Oval_criteria->operator.
Definition: oval_criteriaNode.c:325
oval_operation_t oval_entity_get_operation(struct oval_entity *)
Get OVAL entity operation type.
Definition: oval_entity.c:119
struct oval_criteria_node * oval_criteria_node_iterator_next(struct oval_criteria_node_iterator *)
Returns the next instance of Oval_criteria_node from the iterator.
Definition: oval_criteriaNode.c:97
struct oval_behavior * oval_behavior_clone(struct oval_definition_model *new_model, struct oval_behavior *old_behavior)
Definition: oval_behavior.c:105
char * oval_determine_document_schema_version(const char *, oscap_document_type_t)
END OVALDEF.
Definition: oval_parser.c:70
struct oval_test * oval_test_new(struct oval_definition_model *, const char *id)
Construct new instance of oval_test.
Definition: oval_test.c:162
struct oval_criteria_node_iterator * oval_criteria_node_get_subnodes(struct oval_criteria_node *)
Returns attribute Oval_criteria_node->subnodes.
Definition: oval_criteriaNode.c:151
oval_arithmetic_operation_t
Arithmetic format enumeration.
Definition: oval_definitions.h:218
struct oval_object_iterator * oval_definition_model_get_objects(struct oval_definition_model *model)
Get OVAL objects.
Definition: oval_defModel.c:373
oval_component_type_t
Component types.
Definition: oval_definitions.h:197
bool oval_criteria_node_iterator_has_more(struct oval_criteria_node_iterator *)
Returns true if the iterator is not exhausted.
Definition: oval_criteriaNode.c:90
struct oval_string_iterator * oval_object_get_notes(struct oval_object *)
Returns attribute oval_object->notes.
Definition: oval_object.c:98
void oval_variable_iterator_free(struct oval_variable_iterator *)
Free iterator.
Definition: oval_variable.c:102
bool oval_object_iterator_has_more(struct oval_object_iterator *)
Returns true if the iterator is not exhausted.
Definition: oval_object.c:57
void oval_test_set_object(struct oval_test *, struct oval_object *)
Sets attribute oval_test->object.
Definition: oval_test.c:293
void oval_test_add_state(struct oval_test *, struct oval_state *)
Add the specified state to the state list of the specified test.
Definition: oval_test.c:299
oval_operation_t
Operations.
Definition: oval_definitions.h:81
void oval_state_add_content(struct oval_state *, struct oval_state_content *content)
Append instance of oval_state_content to attribute oval_state->state_contents.
Definition: oval_state.c:250
struct oval_value * oval_component_get_literal_value(struct oval_component *)
Returns attribute Oval_literal->literal.
Definition: oval_component.c:258
struct oval_definition * oval_criteria_node_get_definition(struct oval_criteria_node *)
Returns attribute Oval_extends->definition.
Definition: oval_criteriaNode.c:175
struct oval_reference_iterator * oval_definition_get_references(struct oval_definition *)
Returns attribute oval_definition->references.
Definition: oval_definition.c:124
void oval_definition_set_class(struct oval_definition *, oval_definition_class_t)
Set attribute oval_definition->class.
Definition: oval_definition.c:275
const char * oval_definition_model_supported(void)
Get supported version of OVAL XML.
Definition: oval_definition.c:549
void oval_affected_add_product(struct oval_affected *, char *product_name)
Append name to oval_affected product names.
Definition: oval_affected.c:178
oval_subtype_t
Unknown subtypes.
Definition: oval_types.h:120
int oval_state_get_operator(struct oval_state *)
Returns attribute oval_state->operator.
Definition: oval_state.c:135
void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content)
Append instance of oval_object_content to attribute oval_object->object_contents. ...
Definition: oval_object.c:290
struct oval_variable * oval_definition_model_get_variable(struct oval_definition_model *model, const char *id)
Get OVAL variable by ID.
Definition: oval_defModel.c:279
oval_operator_t oval_criteria_node_get_operator(struct oval_criteria_node *)
Returns attribute Oval_criteria->operator HOWDI.
Definition: oval_criteriaNode.c:143
Oval definition specification.
Definition: oval_definition.c:53
char * oval_variable_get_comment(struct oval_variable *)
Returns attribute oval_variable->comment.
Definition: oval_variable.c:116
oval_criteria_node_type_t
Criteria node type.
Definition: oval_definitions.h:64
OVAL set object.
Definition: oval_set.c:44
struct oval_string_iterator * oval_test_get_notes(struct oval_test *)
Returns attribute oval_test->notes.
Definition: oval_test.c:92
Definition: oval_definitions.h:284
oval_subtype_t oval_object_get_subtype(struct oval_object *)
Returns attribute oval_object->subtype.
Definition: oval_object.c:83
void oval_definition_set_description(struct oval_definition *, char *description)
Set attribute oval_definition->description.
Definition: oval_definition.c:295
struct oval_state_content_iterator * oval_state_get_contents(struct oval_state *)
Returns attribute oval_state->contents.
Definition: oval_state.c:99
bool oval_state_get_deprecated(struct oval_state *)
Returns attribute oval_state->deprecated.
Definition: oval_state.c:121
struct oval_component_iterator * oval_component_get_function_components(struct oval_component *)
Returns attribute Oval_function->components.
Definition: oval_component.c:339
struct oval_component * oval_component_new(struct oval_definition_model *, oval_component_type_t type)
Construct new intance of Oval_component.
Definition: oval_component.c:577
long long oval_value_get_integer(struct oval_value *)
Get OVAL value as an integer.
Definition: oval_value.c:110
char * oval_test_get_comment(struct oval_test *)
Returns attribute Oval_test->comment.
Definition: oval_test.c:99
Definition: oval_definitions.h:383
int oval_state_get_version(struct oval_state *)
Returns attribute oval_state->version.
Definition: oval_state.c:128
void oval_state_free(struct oval_state *)
Free instance of oval_state.
Definition: oval_state.c:194
char * oval_component_get_prefix(struct oval_component *)
Returns attribute Oval_function_BEGIN->prefix.
Definition: oval_component.c:381
void oval_variable_add_value(struct oval_variable *, struct oval_value *)
Append an instance of Oval_value to the attribute Oval_constant->values.
Definition: oval_variable.c:573
void oval_object_set_deprecated(struct oval_object *, bool deprecated)
Sets attribute oval_object->deprecated.
Definition: oval_object.c:278
struct oval_affected * oval_affected_iterator_next(struct oval_affected_iterator *)
Return next instance of oval_affected from iterator.
Definition: oval_affected.c:79
int oval_component_get_substring_length(struct oval_component *)
Returns attribute Oval_function_SUBSTRING->length.
Definition: oval_component.c:479
char * oval_criteria_node_get_comment(struct oval_criteria_node *)
Returns attribute Oval_criteria_node->comment.
Definition: oval_criteriaNode.c:136
struct oval_object * oval_component_get_object(struct oval_component *)
Returns attribute Oval_component_object->object.
Definition: oval_component.c:281
void oval_definition_iterator_free(struct oval_definition_iterator *)
Free the iterator.
Definition: oval_definition.c:261
oval_criteria_node_type_t oval_criteria_node_get_type(struct oval_criteria_node *)
Returns attribute Oval_criteria_node->type.
Definition: oval_criteriaNode.c:114
char * oval_variable_get_id(struct oval_variable *)
Returns attribute oval_variable->id.
Definition: oval_variable.c:109
Definition: oval_definitions.h:369
void oval_variable_free(struct oval_variable *)
Free instance of oval_variable.
Definition: oval_variable.c:455
oval_variable_type_t oval_variable_get_type(struct oval_variable *)
Returns attribute oval_variable->type.
Definition: oval_variable.c:137
struct oval_criteria_node * oval_definition_get_criteria(struct oval_definition *)
Returns attribute oval_definition->criteria.
Definition: oval_definition.c:140
Definition: oval_definitions.h:423
struct oval_entity * oval_state_content_get_entity(struct oval_state_content *)
Get entity of a state content.
Definition: oval_stateContent.c:76
struct oval_object_iterator * oval_setobject_get_objects(struct oval_setobject *)
Get OVAL set object referenced objects.
Definition: oval_set.c:104
void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype)
Sets attributes oval_test->subtype and Oval_test->family.
Definition: oval_test.c:261
Specify oval_definition dependencies.
Definition: oval_criteriaNode.c:50
int oval_component_get_substring_start(struct oval_component *)
Returns attribute Oval_function_SUBSTRING->start.
Definition: oval_component.c:454
struct oval_object * oval_object_new(struct oval_definition_model *, const char *id)
Construct new intance of oval_object.
Definition: oval_object.c:167
Each OVAL Definition specifies certain type of affected system(s).
Definition: oval_affected.c:51
bool oval_test_iterator_has_more(struct oval_test_iterator *)
Returns true if the iterator is not exhausted.
Definition: oval_test.c:61
oval_family_t oval_object_get_family(struct oval_object *)
Returns attribute oval_object->family.
Definition: oval_object.c:76
Definition: oval_definitions.h:565
oval_family_t oval_state_get_family(struct oval_state *)
Returns attribute oval_state->family.
Definition: oval_state.c:75
oval_object_content_type_t
Type of object content.
Definition: oval_definitions.h:120
struct oval_setobject * oval_setobject_clone(struct oval_definition_model *new_model, struct oval_setobject *old_setobject)
Definition: oval_set.c:146
oval_subtype_t oval_test_get_subtype(struct oval_test *)
Returns attribute Oval_test->subtype.
Definition: oval_test.c:85
struct oval_variable * oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type)
Construct new instance of oval_variable.
Definition: oval_variable.c:318
oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *)
Returns attribute Oval_function_TIMEDIF->timedif_format_1.
Definition: oval_component.c:504
oval_setobject_operation_t oval_setobject_get_operation(struct oval_setobject *)
Get OVAL set object operation type.
Definition: oval_set.c:84
OVAL filter.
Definition: oval_filter.c:42
unsigned char * oval_value_get_binary(struct oval_value *)
Get OVAL value as a piece of raw binary data.
Definition: oval_value.c:87
char * oval_test_get_id(struct oval_test *)
Returns attribute oval_test->id.
Definition: oval_test.c:106
void oval_affected_iterator_free(struct oval_affected_iterator *)
Release instance of oval_affected_ iterator.
Definition: oval_affected.c:86
void oval_state_set_comment(struct oval_state *, char *comment)
Sets a copy of the comment parameter to attribute oval_state->comment.
Definition: oval_state.c:224
oval_datatype_t oval_entity_get_datatype(struct oval_entity *)
Get OVAL entity datatype.
Definition: oval_entity.c:112
bool oval_value_get_boolean(struct oval_value *)
Get OVAL value as a boolean.
Definition: oval_value.c:92
const char * oval_component_type_get_text(oval_component_type_t type)
Returns attribute Oval_component_type->text.
Definition: oval_enumerations.c:344
char * oval_entity_get_name(struct oval_entity *)
Get OVAL entity name.
Definition: oval_entity.c:98
bool oval_object_get_deprecated(struct oval_object *)
Returns attribute oval_object->deprecated.
Definition: oval_object.c:119
void oval_component_free(struct oval_component *)
Free instance of Oval_component.
Definition: oval_component.c:804
int oval_definition_model_merge(struct oval_definition_model *model, const char *file)
Merge the content from the file with specified oval_definition_model.
Definition: oval_defModel.c:224
oval_family_t oval_subtype_get_family(oval_subtype_t)
Get the family associated with a given subtype.
Definition: oval_enumerations.c:648
void oval_component_set_object(struct oval_component *, struct oval_object *object)
set attribute Oval_component_object->object.
Definition: oval_component.c:290
char * oval_component_get_record_field(struct oval_component *)
Returns attribute Oval_component_object->record_field.
Definition: oval_component.c:312
struct oval_object * oval_definition_model_get_object(struct oval_definition_model *model, const char *id)
Get OVAL object by ID.
Definition: oval_defModel.c:265
An Oval_state instance is a collection of one or more characteristics pertaining to a specific object...
Definition: oval_state.c:44
void oval_object_iterator_free(struct oval_object_iterator *)
Frees the iterator.
Definition: oval_object.c:70
Definition: oval_definitions.h:298
void oval_affected_set_family(struct oval_affected *, oval_affected_family_t family)
Set oval_affected family.
Definition: oval_affected.c:164
struct oval_variable * oval_entity_get_variable(struct oval_entity *)
Get OVAL entity varref variable.
Definition: oval_entity.c:146
void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment)
set attribute Oval_criteria_node->comment.
Definition: oval_criteriaNode.c:317
bool oval_test_get_deprecated(struct oval_test *)
Returns attribute oval_test->deprecated.
Definition: oval_test.c:113
oval_subtype_t oval_state_get_subtype(struct oval_state *)
Returns attribute oval_state->subtype.
Definition: oval_state.c:80
oval_entity_type_t oval_entity_get_type(struct oval_entity *)
Get OVAL entity type.
Definition: oval_entity.c:105
void oval_criteria_node_add_subnode(struct oval_criteria_node *, struct oval_criteria_node *node)
Append instance of Oval_criteria_node to attribute Oval_criteria->subnodes.
Definition: oval_criteriaNode.c:334
OVAL object or item entity value.
Definition: oval_value.c:44
void oval_test_set_check(struct oval_test *, oval_check_t)
Sets attribute oval_test->check.
Definition: oval_test.c:287
Definition: oval_definitions.h:273
struct oval_test * oval_definition_model_get_test(struct oval_definition_model *model, const char *id)
Get oval test by ID.
Definition: oval_defModel.c:258
void oval_object_set_comment(struct oval_object *, char *comment)
Sets a copy of the comment parameter to attribute oval_object->comment.
Definition: oval_object.c:270
void oval_component_set_item_field(struct oval_component *, char *)
set attribute Oval_component_object->item_field.
Definition: oval_component.c:305
char * oval_value_get_text(struct oval_value *)
Get OVAL value as a text.
Definition: oval_value.c:80
oval_datatype_t
Datatypes.
Definition: oval_definitions.h:146
An Oval_reference links an Oval_definition to a definitive external reference.
Definition: oval_reference.c:43
struct oval_test * oval_test_iterator_next(struct oval_test_iterator *)
Returns the next instance of oval_test.
Definition: oval_test.c:67
void oval_object_free(struct oval_object *)
Free instance of oval_object.
Definition: oval_object.c:237
oval_check_t oval_object_content_get_varCheck(struct oval_object_content *)
Get varCheck of a simple object content.
Definition: oval_objectContent.c:123
void oval_variable_set_component(struct oval_variable *, struct oval_component *component)
Bind an instance of Oval_component to the attribute Oval_local->component.
Definition: oval_variable.c:644
void oval_definition_add_note(struct oval_definition *, char *note)
Append a copy of the note parameter to attribute Oval_definition->notes.
Definition: oval_definition.c:321
struct oval_object * oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object)
Clone instance of oval_object and add it to the specified oval_definition_model.
Definition: oval_object.c:232
oval_entity_varref_type_t oval_entity_get_varref_type(struct oval_entity *)
Get OVAL entity varref type.
Definition: oval_entity.c:139
oval_family_t oval_test_get_family(struct oval_test *)
Returns attribute Oval_test->family.
Definition: oval_test.c:78
struct oval_value * oval_value_clone(struct oval_value *old_value)
Definition: oval_value.c:130
oval_check_t
Check enumeration.
Definition: oval_definitions.h:110
struct oval_setobject_iterator * oval_setobject_get_subsets(struct oval_setobject *)
Get OVAL set object subsets.
Definition: oval_set.c:91
struct oval_string_iterator * oval_affected_get_platforms(struct oval_affected *)
Get member values oval_affected platform_names.
Definition: oval_affected.c:99
void oval_reference_set_source(struct oval_reference *, char *)
Set OVAL reference source.
Definition: oval_reference.c:134
void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior)
Append instance of oval_behavior to attribute oval_object->behaviors.
Definition: oval_object.c:296
void oval_definition_set_version(struct oval_definition *, int version)
Set attribute oval_definition->version.
Definition: oval_definition.c:269
bool oval_criteria_node_get_applicability_check(struct oval_criteria_node *)
Returns attribute Oval_criteria_node->applicability_check.
Definition: oval_criteriaNode.c:129
void oval_state_iterator_free(struct oval_state_iterator *)
Frees the iterator.
Definition: oval_state.c:69
oval_entity_type_t
Type of OVAL entity.
Definition: oval_definitions.h:128
void oval_test_set_comment(struct oval_test *, char *comment)
Sets a copy of the comment parameter to attribute oval_test->comment.
Definition: oval_test.c:267
struct oval_object_content_iterator * oval_object_get_object_contents(struct oval_object *)
Returns attribute oval_object->contents.
Definition: oval_object.c:149
char * oval_reference_get_source(struct oval_reference *)
Get OVAL reference source.
Definition: oval_reference.c:72
void oval_test_set_version(struct oval_test *, int version)
Sets attribute oval_test->version.
Definition: oval_test.c:255
struct oval_entity * oval_object_content_get_entity(struct oval_object_content *)
Get entity of a simple object content.
Definition: oval_objectContent.c:110
Definition: oval_definitions.h:433
void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype)
Sets attributes oval_object->subtype and oval_object->family.
Definition: oval_object.c:258
bool oval_variable_iterator_has_more(struct oval_variable_iterator *)
Returns true if iterator not exhausted.
Definition: oval_variable.c:87
void oval_definition_set_title(struct oval_definition *, char *title)
Set attribute oval_definition->title.
Definition: oval_definition.c:287
oval_check_t oval_state_content_get_ent_check(struct oval_state_content *)
Get multipe entities processing of a state content.
Definition: oval_stateContent.c:100
oval_component_type_t oval_component_get_type(struct oval_component *)
Returns attribute Oval_component->type.
Definition: oval_component.c:251
An Oval_state_content instance specifies an oval_state field.
Definition: oval_stateContent.c:44
char * oval_component_get_regex_pattern(struct oval_component *)
Returns attribute Oval_function_REGEX_CAPTURE->pattern.
Definition: oval_component.c:554
void oval_state_set_deprecated(struct oval_state *, bool deprecated)
Sets attribute oval_state->deprecated.
Definition: oval_state.c:232
struct oval_criteria_node * oval_criteria_node_new(struct oval_definition_model *, oval_criteria_node_type_t type)
Construct an instance of oval_criteria_node.
Definition: oval_criteriaNode.c:182
Definition: oval_definitions.h:460
char * oval_component_get_suffix(struct oval_component *)
Returns attribute Oval_function_END->suffix.
Definition: oval_component.c:406
An oval variable resolves an oval_value stream which specifies constraints for oval_objects and oval_...
Definition: oval_variable.c:46
const char * oval_object_get_name(struct oval_object *)
Returns the name of an oval_object.
Definition: oval_object.c:90
struct oval_reference * oval_reference_clone(struct oval_definition_model *new_model, struct oval_reference *old_reference)
Definition: oval_reference.c:107
struct oval_affected * oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected)
Clone instance of oval_affected.
Definition: oval_affected.c:128
Definition: oval_definitions.h:403
OVAL variable component Oval_component instances specify evaluation constraints on local variables (s...
Definition: oval_component.c:113
struct oval_component * oval_component_clone(struct oval_definition_model *new_model, struct oval_component *old_component)
Clone instance of Oval_component.
Definition: oval_component.c:711
oval_check_t oval_state_content_get_var_check(struct oval_state_content *)
Get multipe variable values processing of a state content.
Definition: oval_stateContent.c:93
int oval_object_get_version(struct oval_object *)
Returns attribute oval_object->version.
Definition: oval_object.c:126
Definition: oval_definitions.h:330
enum oscap_document_type oscap_document_type_t
SCAP document type identifiers.
char * oval_object_get_id(struct oval_object *)
Returns attribute oval_object->id.
Definition: oval_object.c:112
oval_family_t
OVAL family.
Definition: oval_types.h:41
char * oval_state_get_comment(struct oval_state *)
Returns attribute oval_state->comment.
Definition: oval_state.c:107
struct oval_definition_model * oval_definition_model_new(void)
Create an empty oval_definition_model.
Definition: oval_defModel.c:64
struct oval_variable * oval_component_get_variable(struct oval_component *)
Returns attribute Oval_component_variable->variable.
Definition: oval_component.c:330
void oval_criteria_node_free(struct oval_criteria_node *)
Free an instance of oval_criteria_node.
Definition: oval_criteriaNode.c:269
oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *)
Returns attribute Oval_function_TIMEDIF->timedif_format_2.
Definition: oval_component.c:529
Definition: oval_recordField.c:38
char * oval_definition_get_id(struct oval_definition *)
Returns attribute oval_definition->id (identifier).
Definition: oval_definition.c:73
char * oval_definition_get_description(struct oval_definition *)
Returns attribute oval_definition->description.
Definition: oval_definition.c:108
char * oval_definition_get_title(struct oval_definition *)
Returns attribute oval_definition->title.
Definition: oval_definition.c:101
struct oval_variable * oval_variable_iterator_next(struct oval_variable_iterator *)
Returns next instance of oval_variable.
Definition: oval_variable.c:94
char * oval_component_get_item_field(struct oval_component *)
Returns attribute Oval_component_object->item_field.
Definition: oval_component.c:297
void oval_variable_set_datatype(struct oval_variable *, oval_datatype_t)
set attribute oval_variable->datatype.
Definition: oval_variable.c:502
void oval_state_set_version(struct oval_state *, int version)
Sets attribute oval_state->version.
Definition: oval_state.c:238
char * oval_reference_get_id(struct oval_reference *)
Get OVAL reference ID.
Definition: oval_reference.c:79
void oval_test_add_note(struct oval_test *, char *note)
Appends a copy of the note parameter to attribute oval_test->notes.
Definition: oval_test.c:305
struct oval_definition * oval_definition_new(struct oval_definition_model *, const char *id)
Construct an instance of oval_definition.
Definition: oval_definition.c:148
void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate)
Set attribute Oval_criteria_node->negate.
Definition: oval_criteriaNode.c:305
struct oval_definition_model * oval_definition_model_import(const char *file)
Import the content from the file into an oval_definition_model.
Definition: oval_defModel.c:211
struct oval_component * oval_component_iterator_next(struct oval_component_iterator *)
return the next instance of Oval_component.
Definition: oval_component.c:240
oval_existence_t
Existence check enumeration.
Definition: oval_definitions.h:100
struct oval_test_iterator * oval_definition_model_get_tests(struct oval_definition_model *model)
Get OVAL tests.
Definition: oval_defModel.c:364
struct oval_definition * oval_definition_iterator_next(struct oval_definition_iterator *)
Returns the next iterated instance of oval_definition.
Definition: oval_definition.c:252
char * oval_behavior_get_key(struct oval_behavior *)
Get OVAL behavior name.
Definition: oval_behavior.c:86
void oval_test_free(struct oval_test *)
Destruct instance of oval_test.
Definition: oval_test.c:229
oval_datatype_t oval_value_get_datatype(struct oval_value *)
Get OVAL value datatype.
Definition: oval_value.c:73
struct oval_state * oval_state_new(struct oval_definition_model *, const char *id)
Construct new intance of oval_state.
Definition: oval_state.c:142
struct oval_variable_iterator * oval_definition_model_get_variables(struct oval_definition_model *model)
Get OVAL variables.
Definition: oval_defModel.c:392
oval_setobject_operation_t
Set operations.
Definition: oval_definitions.h:180
int oval_definition_get_version(struct oval_definition *)
Returns attribute oval_definition->version.
Definition: oval_definition.c:80
struct oval_object_content * oval_object_content_clone(struct oval_definition_model *new_model, struct oval_object_content *old_content)
Definition: oval_objectContent.c:206
struct oval_criteria_node * oval_criteria_node_clone(struct oval_definition_model *new_model, struct oval_criteria_node *old_node)
Clone an instance of oval_criteria_node.
Definition: oval_criteriaNode.c:224
bool oval_criteria_node_get_negate(struct oval_criteria_node *)
Returns attribute Oval_criteria_node->negate.
Definition: oval_criteriaNode.c:122
struct oval_affected * oval_affected_new(struct oval_definition_model *)
Construct instance of oval_affected.
Definition: oval_affected.c:115
void oval_affected_add_platform(struct oval_affected *, char *platform_name)
Append name to oval_affected platform names.
Definition: oval_affected.c:171
bool oval_state_iterator_has_more(struct oval_state_iterator *)
Returns true if the iterator is not exhausted.
Definition: oval_state.c:56
oval_object_content_type_t oval_object_content_get_type(struct oval_object_content *)
Get type of a object content (entity or set).
Definition: oval_objectContent.c:101
void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected)
Append instance of oval_affected to attribute oval_definition->affected.
Definition: oval_definition.c:309
void oval_variable_set_comment(struct oval_variable *, char *comment)
set attribute oval_variable->comment.
Definition: oval_variable.c:551
OVAL entity.
Definition: oval_entity.c:53
oval_variable_type_t
OVAL variable types.
Definition: oval_definitions.h:188
int oval_entity_get_mask(struct oval_entity *)
Get OVAL entity mask.
Definition: oval_entity.c:126
Definition: oval_definitions.h:356
oval_affected_family_t oval_affected_get_family(struct oval_affected *)
Get member value oval_affected family.
Definition: oval_affected.c:92
struct oval_state * oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state)
Clone instance of oval_state and add it to the specified oval_definition_model.
Definition: oval_state.c:166
struct oval_value * oval_entity_get_value(struct oval_entity *)
Get OVAL entity value.
Definition: oval_entity.c:153
int oval_definition_model_bind_variable_model(struct oval_definition_model *, struct oval_variable_model *)
Bind an oval_variable_model to the specified oval_definition_model.
Definition: oval_defModel.c:286
Definition: oval_definitions.h:413
struct oval_definition * oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition)
Clone instance of oval_definition and add it to the specified oval_definition_model.
Definition: oval_definition.c:177
oval_datetime_format_t
Datetime format enumeration.
Definition: oval_definitions.h:227
An Oval_object_content instance specifies an oval_object field.
Definition: oval_objectContent.c:44
struct oval_definition_model * oval_definition_model_clone(struct oval_definition_model *)
Copy an oval_definition_model.
Definition: oval_defModel.c:101
oval_check_t oval_test_get_check(struct oval_test *)
Returns attribute oval_test->check.
Definition: oval_test.c:134
oval_definition_class_t
Definition: oval_types.h:350
void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference)
Append instance of oval_reference to attribute oval_definition->references.
Definition: oval_definition.c:315
Oval definition model.
Definition: oval_defModel.c:49
oval_setobject_type_t
OVAL set object types.
Definition: oval_definitions.h:173
char * oval_object_get_comment(struct oval_object *)
Returns attribute oval_object->comment.
Definition: oval_object.c:105
void oval_object_set_version(struct oval_object *, int version)
Sets attribute oval_object->version.
Definition: oval_object.c:284
struct oval_state * oval_definition_model_get_state(struct oval_definition_model *model, const char *id)
Get OVAL state by ID.
Definition: oval_defModel.c:272
bool oval_definition_iterator_has_more(struct oval_definition_iterator *)
Returns true if the iterator contains more instances of oval_definition.
Definition: oval_definition.c:245
struct oval_component * oval_variable_get_component(struct oval_variable *)
Returns attribute Oval_local->component.
Definition: oval_variable.c:302
void oval_component_iterator_free(struct oval_component_iterator *)
Free the iterator.
Definition: oval_component.c:246
struct oval_state_content * oval_state_content_clone(struct oval_definition_model *new_model, struct oval_state_content *old_content)
Definition: oval_stateContent.c:123
void oval_affected_free(struct oval_affected *)
Release instance of oval_affected.
Definition: oval_affected.c:153
int oval_test_get_version(struct oval_test *)
Returns attribute oval_test->version.
Definition: oval_test.c:120
struct oval_definition_iterator * oval_definition_model_get_definitions(struct oval_definition_model *model)
Returns all appended oval_definition instances.
Definition: oval_defModel.c:340
char * oval_component_get_split_delimiter(struct oval_component *)
Returns attribute Oval_function_SPLIT->delimiter.
Definition: oval_component.c:430
An Oval_test specifies a technical control by identifying an oval_object that is evaluated on an inst...
Definition: oval_test.c:46
void oval_object_add_note(struct oval_object *, char *note)
Appends a copy of the note parameter to attribute oval_object->notes.
Definition: oval_object.c:264
void oval_definition_set_deprecated(struct oval_definition *, bool deprecated)
Set attribute oval_definition->deprecated.
Definition: oval_definition.c:281
struct oval_string_iterator * oval_state_get_notes(struct oval_state *)
Returns attribute oval_state->notes.
Definition: oval_state.c:92
void oval_state_add_note(struct oval_state *, char *note)
Appends a copy of the note parameter to attribute oval_state->notes.
Definition: oval_state.c:218
void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria)
Set attribute oval_definition->criteria.
Definition: oval_definition.c:303
struct oval_test * oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test)
Clone instance of oval_test and add it to the specified oval_definition_model.
Definition: oval_test.c:189
oval_existence_t oval_test_get_existence(struct oval_test *)
Returns attribute oval_test->existence.
Definition: oval_test.c:127
struct oval_behavior_iterator * oval_object_get_behaviors(struct oval_object *)
Returns attribute oval_object->behaviors.
Definition: oval_object.c:159
struct oval_value_iterator * oval_variable_get_values(struct oval_variable *)
Returns attribute Oval_external/Oval_constant->values.
Definition: oval_variable.c:151
void oval_variable_set_version(struct oval_variable *, int version)
set attribute oval_variable->version.
Definition: oval_variable.c:567
void oval_test_iterator_free(struct oval_test_iterator *)
Frees the iterator.
Definition: oval_test.c:73
void oval_criteria_node_iterator_free(struct oval_criteria_node_iterator *)
Free the iterator.
Definition: oval_criteriaNode.c:106
float oval_value_get_float(struct oval_value *)
Get OVAL value as a floating point number.
Definition: oval_value.c:102
char * oval_state_get_id(struct oval_state *)
Returns attribute oval_state->id.
Definition: oval_state.c:114
oval_filter_action_t
Type of filter action.
Definition: oval_definitions.h:139
Definition: oval_definitions.h:393
bool oval_definition_get_deprecated(struct oval_definition *)
Returns attribute oval_definition->deprecated.
Definition: oval_definition.c:94
void oval_state_set_operator(struct oval_state *, oval_operator_t)
Sets attribute oval_state->operator.
Definition: oval_state.c:244
char * oval_object_content_get_field_name(struct oval_object_content *)
Get field name of a object content.
Definition: oval_objectContent.c:96
struct oval_variable_model_iterator * oval_definition_model_get_variable_models(struct oval_definition_model *)
Return the list of variable models bound to the specified oval_definition_model.
Definition: oval_defModel.c:315
The OVAL variable model facilitates access to external variable value bindings used to to constrain t...
Definition: oval_varModel.c:54
void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype)
Sets attributes oval_state->subtype and oval_state->family.
Definition: oval_state.c:212
int oval_component_iterator_remaining(struct oval_component_iterator *)
How many remains.
Definition: oval_component.c:235
oval_setobject_type_t oval_setobject_get_type(struct oval_setobject *)
Get OVAL set object type.
Definition: oval_set.c:77
void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *)
Sets attribute Oval_extends->definition.
Definition: oval_criteriaNode.c:352
void oval_variable_set_deprecated(struct oval_variable *, bool deprecated)
set attribute oval_variable->deprecated.
Definition: oval_variable.c:561
const char * oval_state_get_name(struct oval_state *)
Returns the name of an oval_state.
Definition: oval_state.c:87
int oval_variable_get_version(struct oval_variable *)
Returns attribute oval_variable->version.
Definition: oval_variable.c:123
struct oval_affected_iterator * oval_definition_get_affected(struct oval_definition *)
Returns attribute oval_definition->affected.
Definition: oval_definition.c:115
Definition: oval_generator.c:43
struct oval_state * oval_state_iterator_next(struct oval_state_iterator *)
Returns the next instance of oval_state.
Definition: oval_state.c:62
OVAL behavior.
Definition: oval_behavior.c:50
oval_affected_family_t
Affected family enumeration.
Definition: oval_definitions.h:52
Definition: oval_definitions.h:310
struct oval_test * oval_criteria_node_get_test(struct oval_criteria_node *)
Returns attribute Oval_criterion->test.
Definition: oval_criteriaNode.c:166
void oval_component_set_type(struct oval_component *component, oval_component_type_t type)
Set type of component Oval_component->type.
Definition: oval_component.c:275
void oval_definition_model_free(struct oval_definition_model *model)
Free OVAL object model and all binded variable models.
Definition: oval_defModel.c:122
struct oval_string_iterator * oval_definition_get_notes(struct oval_definition *)
Returns attribute oval_definition->notes.
Definition: oval_definition.c:133
struct oval_state_iterator * oval_test_get_states(struct oval_test *)
Returns attribute oval_test->states.
Definition: oval_test.c:155
struct oval_filter_iterator * oval_setobject_get_filters(struct oval_setobject *)
Get OVAL set object filters.
Definition: oval_set.c:118
void oval_criteria_set_node_type(struct oval_criteria_node *node, oval_criteria_node_type_t type)
Set attribute Oval_criteria_node->type.
Definition: oval_criteriaNode.c:298
bool oval_component_iterator_has_more(struct oval_component_iterator *)
Return true if the iterator is not exhausted.
Definition: oval_component.c:230
char * oval_reference_get_url(struct oval_reference *)
Get OVAL reference URL.
Definition: oval_reference.c:86
struct oval_entity * oval_entity_clone(struct oval_definition_model *model, struct oval_entity *old_entity)
Definition: oval_entity.c:178
bool oval_affected_iterator_has_more(struct oval_affected_iterator *)
Return true if iterator has more oval_affected.
Definition: oval_affected.c:73
struct oval_definition * oval_definition_model_get_definition(struct oval_definition_model *, const char *id)
Returns the appended oval_definition having the specified id.
Definition: oval_defModel.c:251
void oval_criteria_node_set_test(struct oval_criteria_node *, struct oval_test *)
Sets attribute Oval_criterion->test.
Definition: oval_criteriaNode.c:343
struct oval_setobject * oval_object_content_get_setobject(struct oval_object_content *)
Get setobject of a set object content.
Definition: oval_objectContent.c:135
void oval_component_set_variable(struct oval_component *, struct oval_variable *variable)
set attribute Oval_component_object->variable.
Definition: oval_component.c:877
void oval_test_set_deprecated(struct oval_test *, bool deprecated)
Sets attribute oval_test->deprecated.
Definition: oval_test.c:249
An Oval_object instance describes a set of items to look for on an instrumented host platform...
Definition: oval_object.c:44
char * oval_behavior_get_value(struct oval_behavior *)
Get OVAL behavior value.
Definition: oval_behavior.c:79
int oval_definition_model_export(struct oval_definition_model *, const char *file)
Export an oval_definition_model into file.
Definition: oval_defModel.c:544
oval_operator_t oval_test_get_state_operator(struct oval_test *)
Returns attribute oval_test->state_operator.
Definition: oval_test.c:141
struct oval_state_iterator * oval_definition_model_get_states(struct oval_definition_model *model)
Get OVAL states.
Definition: oval_defModel.c:383
oval_datatype_t oval_variable_get_datatype(struct oval_variable *)
Returns attribute oval_variable->datatype.
Definition: oval_variable.c:144
Definition: oval_definitions.h:441
oval_version_t oval_object_get_schema_version(struct oval_object *object)
Returns schema version of the associated definition model.
Definition: oval_object.c:133
void oval_component_set_record_field(struct oval_component *, char *)
set attribute Oval_component_object->record_field.
Definition: oval_component.c:319
void oval_definition_free(struct oval_definition *)
Release an instance of oval_definition.
Definition: oval_definition.c:216
struct oval_variable * oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable)
Clone instance of oval_variable and add it to the specified oval_definition_model.
Definition: oval_variable.c:384
void oval_criteria_node_set_applicability_check(struct oval_criteria_node *, bool applicability_check)
Set attribute Oval_criteria_node->applicability_check.
Definition: oval_criteriaNode.c:311