00001
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef OVAL_DEFINITIONS
00040 #define OVAL_DEFINITIONS
00041
00042 #include "oscap.h"
00043 #include "oscap_source.h"
00044 #include "oval_adt.h"
00045 #include "oval_types.h"
00046 #include "oval_version.h"
00047 #include "oval_schema_version.h"
00048 #include <stdbool.h>
00049
00055 typedef enum {
00056 OVAL_AFCFML_UNKNOWN = 0,
00057 OVAL_AFCFML_CATOS = 1,
00058 OVAL_AFCFML_IOS = 2,
00059 OVAL_AFCFML_MACOS = 3,
00060 OVAL_AFCFML_PIXOS = 4,
00061 OVAL_AFCFML_UNDEFINED = 5,
00062 OVAL_AFCFML_UNIX = 6,
00063 OVAL_AFCFML_WINDOWS = 7
00064 } oval_affected_family_t;
00065
00067 typedef enum {
00068 OVAL_NODETYPE_UNKNOWN = 0,
00069 OVAL_NODETYPE_CRITERIA = 1,
00070 OVAL_NODETYPE_CRITERION = 2,
00071 OVAL_NODETYPE_EXTENDDEF = 3
00072 } oval_criteria_node_type_t;
00073
00075 typedef enum {
00076 OVAL_OPERATOR_UNKNOWN = 0,
00077 OVAL_OPERATOR_AND = 1,
00078 OVAL_OPERATOR_ONE = 2,
00079 OVAL_OPERATOR_OR = 3,
00080 OVAL_OPERATOR_XOR = 4
00081 } oval_operator_t;
00082
00084 typedef enum {
00085 OVAL_OPERATION_UNKNOWN = 0,
00086 OVAL_OPERATION_BITWISE_AND,
00087 OVAL_OPERATION_BITWISE_OR,
00088 OVAL_OPERATION_CASE_INSENSITIVE_EQUALS,
00089 OVAL_OPERATION_CASE_INSENSITIVE_NOT_EQUAL,
00090 OVAL_OPERATION_EQUALS,
00091 OVAL_OPERATION_GREATER_THAN,
00092 OVAL_OPERATION_GREATER_THAN_OR_EQUAL,
00093 OVAL_OPERATION_LESS_THAN,
00094 OVAL_OPERATION_LESS_THAN_OR_EQUAL,
00095 OVAL_OPERATION_NOT_EQUAL,
00096 OVAL_OPERATION_PATTERN_MATCH,
00097 OVAL_OPERATION_SUBSET_OF,
00098 OVAL_OPERATION_SUPERSET_OF,
00099 } oval_operation_t;
00100
00101
00103 typedef enum {
00104 OVAL_EXISTENCE_UNKNOWN = 0,
00105 OVAL_ALL_EXIST = 1,
00106 OVAL_ANY_EXIST = 2,
00107 OVAL_AT_LEAST_ONE_EXISTS = 3,
00108 OVAL_ONLY_ONE_EXISTS = 4,
00109 OVAL_NONE_EXIST = 5
00110 } oval_existence_t;
00111
00113 typedef enum {
00114 OVAL_CHECK_UNKNOWN = 0,
00115 OVAL_CHECK_ALL = 1,
00116 OVAL_CHECK_AT_LEAST_ONE = 2,
00117 OVAL_CHECK_NONE_EXIST = 3,
00118 OVAL_CHECK_NONE_SATISFY = 4,
00119 OVAL_CHECK_ONLY_ONE = 5
00120 } oval_check_t;
00121
00123 typedef enum {
00124 OVAL_OBJECTCONTENT_UNKNOWN = 0,
00125 OVAL_OBJECTCONTENT_ENTITY = 1,
00126 OVAL_OBJECTCONTENT_SET = 2,
00127 OVAL_OBJECTCONTENT_FILTER = 3
00128 } oval_object_content_type_t;
00129
00131 typedef enum {
00132 OVAL_ENTITY_TYPE_UNKNOWN,
00133 OVAL_ENTITY_TYPE_ANY,
00134 OVAL_ENTITY_TYPE_BINARY,
00135 OVAL_ENTITY_TYPE_BOOLEAN,
00136 OVAL_ENTITY_TYPE_FLOAT,
00137 OVAL_ENTITY_TYPE_INTEGER,
00138 OVAL_ENTITY_TYPE_STRING,
00139 } oval_entity_type_t;
00140
00142 typedef enum {
00143 OVAL_FILTER_ACTION_UNKNOWN = 0,
00144 OVAL_FILTER_ACTION_EXCLUDE,
00145 OVAL_FILTER_ACTION_INCLUDE
00146 } oval_filter_action_t;
00147
00149 typedef enum {
00150 OVAL_DATATYPE_UNKNOWN = 0,
00151 OVAL_DATATYPE_BINARY,
00152 OVAL_DATATYPE_BOOLEAN,
00153 OVAL_DATATYPE_EVR_STRING,
00154 OVAL_DATATYPE_FILESET_REVISION,
00155 OVAL_DATATYPE_FLOAT,
00156 OVAL_DATATYPE_INTEGER,
00157 OVAL_DATATYPE_IOS_VERSION,
00158 OVAL_DATATYPE_IPV4ADDR,
00159 OVAL_DATATYPE_IPV6ADDR,
00160 OVAL_DATATYPE_RECORD,
00161 OVAL_DATATYPE_SEXP,
00162 OVAL_DATATYPE_STRING,
00163 OVAL_DATATYPE_STRING_M,
00164 OVAL_DATATYPE_VERSION,
00165 OVAL_DATATYPE_DEBIAN_EVR_STRING
00166 } oval_datatype_t;
00167
00169 typedef enum {
00170 OVAL_ENTITY_VARREF_UNKNOWN,
00171 OVAL_ENTITY_VARREF_NONE,
00172 OVAL_ENTITY_VARREF_ATTRIBUTE,
00173 OVAL_ENTITY_VARREF_ELEMENT
00174 } oval_entity_varref_type_t;
00175
00177 typedef enum {
00178 OVAL_SET_UNKNOWN,
00179 OVAL_SET_AGGREGATE,
00180 OVAL_SET_COLLECTIVE
00181 } oval_setobject_type_t;
00182
00184 typedef enum {
00185 OVAL_SET_OPERATION_UNKNOWN,
00186 OVAL_SET_OPERATION_COMPLEMENT = 1,
00187 OVAL_SET_OPERATION_INTERSECTION = 2,
00188 OVAL_SET_OPERATION_UNION = 3
00189 } oval_setobject_operation_t;
00190
00192 typedef enum {
00193 OVAL_VARIABLE_UNKNOWN,
00194 OVAL_VARIABLE_EXTERNAL,
00195 OVAL_VARIABLE_CONSTANT,
00196 OVAL_VARIABLE_LOCAL
00197 } oval_variable_type_t;
00198
00199 #define OVAL_FUNCTION 4
00201 typedef enum {
00202 OVAL_COMPONENT_UNKNOWN = 0,
00203 OVAL_COMPONENT_LITERAL = 1,
00204 OVAL_COMPONENT_OBJECTREF = 2,
00205 OVAL_COMPONENT_VARREF = 3,
00206 OVAL_COMPONENT_FUNCTION = 4,
00207 OVAL_FUNCTION_BEGIN = OVAL_FUNCTION + 1,
00208 OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2,
00209 OVAL_FUNCTION_END = OVAL_FUNCTION + 3,
00210 OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4,
00211 OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5,
00212 OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6,
00213 OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7,
00214 OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8,
00215 OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9,
00216 OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10,
00217 OVAL_FUNCTION_UNIQUE = OVAL_FUNCTION + 11,
00218 OVAL_FUNCTION_GLOB_TO_REGEX = OVAL_FUNCTION + 12,
00219 OVAL_FUNCTION_LAST = OVAL_FUNCTION + 13
00220 } oval_component_type_t;
00221
00223 typedef enum {
00224 OVAL_ARITHMETIC_UNKNOWN = 0,
00225 OVAL_ARITHMETIC_ADD = 1,
00226 OVAL_ARITHMETIC_MULTIPLY = 2,
00227 OVAL_ARITHMETIC_SUBTRACT = 3,
00228 OVAL_ARITHMETIC_DIVIDE = 4
00229 } oval_arithmetic_operation_t;
00230
00232 typedef enum {
00233 OVAL_DATETIME_UNKNOWN = 0,
00234 OVAL_DATETIME_YEAR_MONTH_DAY = 1,
00235 OVAL_DATETIME_MONTH_DAY_YEAR = 2,
00236 OVAL_DATETIME_DAY_MONTH_YEAR = 3,
00237 OVAL_DATETIME_WIN_FILETIME = 4,
00238 OVAL_DATETIME_SECONDS_SINCE_EPOCH = 5,
00239 OVAL_DATETIME_CIM_DATETIME = 6
00240 } oval_datetime_format_t;
00241
00242 typedef enum {
00243 OVAL_RECORD_FIELD_UNKNOWN = 0,
00244 OVAL_RECORD_FIELD_STATE = 1,
00245 OVAL_RECORD_FIELD_ITEM = 2,
00246 } oval_record_field_type_t;
00247
00251 oval_family_t oval_subtype_get_family(oval_subtype_t);
00252 const char *oval_operator_get_text(oval_operator_t);
00253 const char *oval_subtype_get_text(oval_subtype_t);
00254 const char *oval_family_get_text(oval_family_t);
00255 const char *oval_check_get_text(oval_check_t);
00256 const char *oval_existence_get_text(oval_existence_t);
00257 const char *oval_affected_family_get_text(oval_affected_family_t);
00258 const char *oval_datatype_get_text(oval_datatype_t);
00259 oval_datatype_t oval_datatype_from_text(const char *);
00260 const char *oval_operation_get_text(oval_operation_t);
00261 const char *oval_set_operation_get_text(oval_setobject_operation_t);
00262 const char *oval_datetime_format_get_text(oval_datetime_format_t);
00263 const char *oval_arithmetic_operation_get_text(oval_arithmetic_operation_t);
00264 const char *oval_filter_action_get_text(oval_filter_action_t);
00265
00266
00271 struct oval_definition_model;
00272
00279 struct oval_definition;
00284 struct oval_definition_iterator;
00290 struct oval_test;
00295 struct oval_test_iterator;
00304 struct oval_object;
00309 struct oval_object_iterator;
00316 struct oval_state;
00321 struct oval_state_iterator;
00336 struct oval_variable;
00340 struct oval_variable_possible_value;
00344 struct oval_variable_possible_restriction;
00348 struct oval_variable_restriction;
00353 struct oval_variable_iterator;
00374 struct oval_affected;
00379 struct oval_affected_iterator;
00387 struct oval_reference;
00392 struct oval_reference_iterator;
00401 struct oval_criteria_node;
00406 struct oval_criteria_node_iterator;
00411 struct oval_object_content;
00416 struct oval_object_content_iterator;
00421 struct oval_behavior;
00426 struct oval_behavior_iterator;
00431 struct oval_state_content;
00436 struct oval_state_content_iterator;
00441 struct oval_value;
00446 struct oval_value_iterator;
00451 struct oval_entity;
00455 struct oval_entity_iterator;
00459 struct oval_record_field;
00463 struct oval_record_field_iterator;
00468 struct oval_setobject;
00473 struct oval_setobject_iterator;
00478 struct oval_filter;
00482 struct oval_filter_iterator;
00583 struct oval_component;
00588 struct oval_component_iterator;
00589
00593 struct oval_generator;
00594
00595 struct oval_generator *oval_generator_new(void);
00596 void oval_generator_free(struct oval_generator *generator);
00597 struct oval_generator *oval_generator_clone(struct oval_generator *old_generator);
00598 char *oval_generator_get_product_name(struct oval_generator *generator);
00599 char *oval_generator_get_product_version(struct oval_generator *generator);
00600 OSCAP_DEPRECATED(char *oval_generator_get_schema_version(struct oval_generator *generator));
00601 const char *oval_generator_get_core_schema_version(struct oval_generator *generator);
00602 char *oval_generator_get_timestamp(struct oval_generator *generator);
00603 const char *oval_generator_get_platform_schema_version (struct oval_generator *generator, const char *platform);
00604 void oval_generator_set_product_name(struct oval_generator *generator, const char *product_name);
00605 void oval_generator_set_product_version(struct oval_generator *generator, const char *product_version);
00606 OSCAP_DEPRECATED(void oval_generator_set_schema_version(struct oval_generator *generator, const char *schema_version));
00607 void oval_generator_set_core_schema_version(struct oval_generator *generator, const char *schema_version);
00608 void oval_generator_add_platform_schema_version(struct oval_generator *generator, const char *platform, const char *schema_version);
00609 void oval_generator_set_timestamp(struct oval_generator *generator, const char *timestamp);
00610 void oval_generator_update_timestamp(struct oval_generator *generator);
00611
00616 struct oval_definition_model *oval_definition_model_new(void);
00617
00624 struct oval_definition_model *oval_definition_model_import_source(struct oscap_source *source);
00625
00634 OSCAP_DEPRECATED(struct oval_definition_model *oval_definition_model_import(const char *file));
00635
00646 OSCAP_DEPRECATED(int oval_definition_model_merge(struct oval_definition_model *model, const char *file));
00647
00653 struct oval_definition_model *oval_definition_model_clone(struct oval_definition_model *);
00659 int oval_definition_model_export(struct oval_definition_model *, const char *file);
00664 void oval_definition_model_free(struct oval_definition_model *model);
00665
00670 void oval_definition_model_set_generator(struct oval_definition_model *model, struct oval_generator *generator);
00676 int oval_definition_model_bind_variable_model(struct oval_definition_model *, struct oval_variable_model *);
00677
00678 void oval_definition_model_clear_external_variables(struct oval_definition_model *);
00685 struct oval_generator *oval_definition_model_get_generator(struct oval_definition_model *model);
00693 struct oval_definition *oval_definition_model_get_definition(struct oval_definition_model *, const char *id);
00702 struct oval_test *oval_definition_model_get_test(struct oval_definition_model *model, const char *id);
00711 struct oval_object *oval_definition_model_get_object(struct oval_definition_model *model, const char *id);
00720 struct oval_state *oval_definition_model_get_state(struct oval_definition_model *model, const char *id);
00729 struct oval_variable *oval_definition_model_get_variable(struct oval_definition_model *model, const char *id);
00734 struct oval_definition_iterator *oval_definition_model_get_definitions(struct oval_definition_model *model);
00741 struct oval_test_iterator *oval_definition_model_get_tests(struct oval_definition_model *model);
00748 struct oval_object_iterator *oval_definition_model_get_objects(struct oval_definition_model *model);
00755 struct oval_state_iterator *oval_definition_model_get_states(struct oval_definition_model *model);
00762 struct oval_variable_iterator *oval_definition_model_get_variables(struct oval_definition_model *model);
00763
00769 const char * oval_definition_model_supported(void);
00775 struct oval_variable_model_iterator *oval_definition_model_get_variable_models(struct oval_definition_model *);
00801 struct oval_definition *oval_definition_new(struct oval_definition_model *, const char *id);
00802
00808 struct oval_definition *oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition);
00809
00819 void oval_definition_free(struct oval_definition *);
00820
00832 void oval_definition_set_version(struct oval_definition *, int version);
00840 void oval_definition_set_class(struct oval_definition *, oval_definition_class_t);
00846 void oval_definition_set_deprecated(struct oval_definition *, bool deprecated);
00854 void oval_definition_set_title(struct oval_definition *, char *title);
00862 void oval_definition_set_description(struct oval_definition *, char *description);
00873 void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected);
00884 void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference);
00890 void oval_definition_add_note(struct oval_definition *, char *note);
00904 void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria);
00915 char *oval_definition_get_id(struct oval_definition *);
00921 int oval_definition_get_version(struct oval_definition *);
00926 oval_definition_class_t oval_definition_get_class(struct oval_definition *);
00931 bool oval_definition_get_deprecated(struct oval_definition *);
00937 char *oval_definition_get_title(struct oval_definition *);
00943 char *oval_definition_get_description(struct oval_definition *);
00950 struct oval_affected_iterator *oval_definition_get_affected(struct oval_definition *);
00957 struct oval_reference_iterator *oval_definition_get_references(struct oval_definition *);
00964 struct oval_string_iterator *oval_definition_get_notes(struct oval_definition *);
00970 struct oval_criteria_node *oval_definition_get_criteria(struct oval_definition *);
00987 bool oval_definition_iterator_has_more(struct oval_definition_iterator *);
00993 struct oval_definition *oval_definition_iterator_next(struct oval_definition_iterator *);
00998 void oval_definition_iterator_free(struct oval_definition_iterator *);
01021 struct oval_test *oval_test_new(struct oval_definition_model *, const char *id);
01027 struct oval_test *oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test);
01032 void oval_test_free(struct oval_test *);
01033
01047 void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype);
01053 void oval_test_add_note(struct oval_test *, char *note);
01059 void oval_test_set_comment(struct oval_test *, char *comment);
01064 void oval_test_set_deprecated(struct oval_test *, bool deprecated);
01073 void oval_test_set_version(struct oval_test *, int version);
01078 void oval_test_set_state_operator(struct oval_test *, oval_operator_t);
01087 void oval_test_set_existence(struct oval_test *, oval_existence_t);
01097 void oval_test_set_check(struct oval_test *, oval_check_t);
01106 void oval_test_set_object(struct oval_test *, struct oval_object *);
01112 void oval_test_add_state(struct oval_test *, struct oval_state *);
01123 oval_family_t oval_test_get_family(struct oval_test *);
01128 oval_subtype_t oval_test_get_subtype(struct oval_test *);
01135 struct oval_string_iterator *oval_test_get_notes(struct oval_test *);
01141 char *oval_test_get_comment(struct oval_test *);
01147 char *oval_test_get_id(struct oval_test *);
01152 bool oval_test_get_deprecated(struct oval_test *);
01157 int oval_test_get_version(struct oval_test *);
01162 oval_operator_t oval_test_get_state_operator(struct oval_test *);
01167 oval_existence_t oval_test_get_existence(struct oval_test *);
01172 oval_check_t oval_test_get_check(struct oval_test *);
01178 struct oval_object *oval_test_get_object(struct oval_test *);
01185 struct oval_state_iterator *oval_test_get_states(struct oval_test *);
01186
01203 bool oval_test_iterator_has_more(struct oval_test_iterator *);
01208 struct oval_test *oval_test_iterator_next(struct oval_test_iterator *);
01213 void oval_test_iterator_free(struct oval_test_iterator *);
01234 struct oval_object *oval_object_new(struct oval_definition_model *, const char *id);
01240 struct oval_object *oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object);
01245 void oval_object_free(struct oval_object *);
01246
01260 void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype);
01266 void oval_object_add_note(struct oval_object *, char *note);
01267
01273 void oval_object_set_comment(struct oval_object *, char *comment);
01274
01279 void oval_object_set_deprecated(struct oval_object *, bool deprecated);
01288 void oval_object_set_version(struct oval_object *, int version);
01301 void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content);
01314 void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior);
01325 oval_family_t oval_object_get_family(struct oval_object *);
01331 const char *oval_object_get_name(struct oval_object *);
01336 oval_subtype_t oval_object_get_subtype(struct oval_object *);
01343 struct oval_string_iterator *oval_object_get_notes(struct oval_object *);
01349 char *oval_object_get_comment(struct oval_object *);
01355 char *oval_object_get_id(struct oval_object *);
01356
01361 bool oval_object_get_deprecated(struct oval_object *);
01366 int oval_object_get_version(struct oval_object *);
01367
01371 OSCAP_DEPRECATED(oval_version_t oval_object_get_schema_version(struct oval_object *object));
01372
01377 oval_schema_version_t oval_object_get_platform_schema_version(struct oval_object *object);
01378
01385 struct oval_object_content_iterator *oval_object_get_object_contents(struct oval_object *);
01392 struct oval_behavior_iterator *oval_object_get_behaviors(struct oval_object *);
01409 bool oval_object_iterator_has_more(struct oval_object_iterator *);
01414 struct oval_object *oval_object_iterator_next(struct oval_object_iterator *);
01419 void oval_object_iterator_free(struct oval_object_iterator *);
01440 struct oval_state *oval_state_new(struct oval_definition_model *, const char *id);
01446 struct oval_state *oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state);
01451 void oval_state_free(struct oval_state *);
01452
01466 void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype);
01472 void oval_state_add_note(struct oval_state *, char *note);
01478 void oval_state_set_comment(struct oval_state *, char *comment);
01483 void oval_state_set_deprecated(struct oval_state *, bool deprecated);
01492 void oval_state_set_version(struct oval_state *, int version);
01497 void oval_state_set_operator(struct oval_state *, oval_operator_t);
01510 void oval_state_add_content(struct oval_state *, struct oval_state_content *content);
01521 oval_family_t oval_state_get_family(struct oval_state *);
01527 const char *oval_state_get_name(struct oval_state *);
01532 oval_subtype_t oval_state_get_subtype(struct oval_state *);
01539 struct oval_string_iterator *oval_state_get_notes(struct oval_state *);
01545 char *oval_state_get_comment(struct oval_state *);
01551 char *oval_state_get_id(struct oval_state *);
01556 bool oval_state_get_deprecated(struct oval_state *);
01561 int oval_state_get_version(struct oval_state *);
01566 int oval_state_get_operator(struct oval_state *);
01573 struct oval_state_content_iterator *oval_state_get_contents(struct oval_state *);
01584 bool oval_state_iterator_has_more(struct oval_state_iterator *);
01589 struct oval_state *oval_state_iterator_next(struct oval_state_iterator *);
01594 void oval_state_iterator_free(struct oval_state_iterator *);
01627 struct oval_variable *oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type);
01633 struct oval_variable *oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable);
01638 void oval_variable_free(struct oval_variable *);
01639
01646 struct oval_variable_possible_value *oval_variable_possible_value_new(const char *hint, const char *value);
01647
01652 void oval_variable_possible_value_free(struct oval_variable_possible_value *pv);
01653
01660 struct oval_variable_possible_restriction *oval_variable_possible_restriction_new(oval_operator_t operator, const char *hint);
01661
01662
01667 void oval_variable_possible_restriction_free(struct oval_variable_possible_restriction *pr);
01668
01675 struct oval_variable_restriction *oval_variable_restriction_new(oval_operation_t operation, const char *value);
01676
01681 void oval_variable_restriction_free(struct oval_variable_restriction *r);
01682
01694 void oval_variable_set_comment(struct oval_variable *, char *comment);
01702 void oval_variable_set_version(struct oval_variable *, int version);
01708 void oval_variable_set_deprecated(struct oval_variable *, bool deprecated);
01716 void oval_variable_set_datatype(struct oval_variable *, oval_datatype_t);
01730 void oval_variable_add_value(struct oval_variable *, struct oval_value *);
01731
01732 void oval_variable_clear_values(struct oval_variable *);
01733
01740 void oval_variable_add_possible_value(struct oval_variable *variable, struct oval_variable_possible_value *pv);
01741
01748 void oval_variable_add_possible_restriction(struct oval_variable *variable, struct oval_variable_possible_restriction *pr);
01749
01756 void oval_variable_possible_restriction_add_restriction(struct oval_variable_possible_restriction *pr, struct oval_variable_restriction *r);
01757
01770 void oval_variable_set_component(struct oval_variable *, struct oval_component *component);
01782 char *oval_variable_get_id(struct oval_variable *);
01788 char *oval_variable_get_comment(struct oval_variable *);
01793 int oval_variable_get_version(struct oval_variable *);
01798 bool oval_variable_get_deprecated(struct oval_variable *);
01803 oval_variable_type_t oval_variable_get_type(struct oval_variable *);
01808 oval_datatype_t oval_variable_get_datatype(struct oval_variable *);
01816 struct oval_value_iterator *oval_variable_get_values(struct oval_variable *);
01823 struct oval_component *oval_variable_get_component(struct oval_variable *);
01824
01831 struct oval_iterator *oval_variable_get_possible_values(struct oval_variable *variable);
01832
01839 struct oval_iterator *oval_variable_get_possible_restrictions(struct oval_variable *variable);
01840
01841
01848 struct oval_iterator *oval_variable_possible_restriction_get_restrictions(struct oval_variable_possible_restriction *possible_restriction);
01849
01855 oval_operator_t oval_variable_possible_restriction_get_operator(struct oval_variable_possible_restriction *possible_restriction);
01856
01861 const char *oval_component_type_get_text(oval_component_type_t type);
01872 bool oval_variable_iterator_has_more(struct oval_variable_iterator *);
01877 struct oval_variable *oval_variable_iterator_next(struct oval_variable_iterator *);
01882 void oval_variable_iterator_free(struct oval_variable_iterator *);
01895 struct oval_affected *oval_affected_new(struct oval_definition_model *);
01901 struct oval_affected *oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected);
01906 void oval_affected_free(struct oval_affected *);
01907
01916 void oval_affected_set_family(struct oval_affected *, oval_affected_family_t family);
01921 void oval_affected_add_platform(struct oval_affected *, char *platform_name);
01926 void oval_affected_add_product(struct oval_affected *, char *product_name);
01939 oval_affected_family_t oval_affected_get_family(struct oval_affected *);
01947 struct oval_string_iterator *oval_affected_get_platforms(struct oval_affected *);
01955 struct oval_string_iterator *oval_affected_get_products(struct oval_affected *);
01972 bool oval_affected_iterator_has_more(struct oval_affected_iterator *);
01977 struct oval_affected *oval_affected_iterator_next(struct oval_affected_iterator *);
01982 void oval_affected_iterator_free(struct oval_affected_iterator *);
01988 struct oval_reference *oval_reference_new(struct oval_definition_model *);
01993 struct oval_reference *oval_reference_clone
01994 (struct oval_definition_model *new_model, struct oval_reference *old_reference);
01998 void oval_reference_free(struct oval_reference *);
01999
02009 void oval_reference_set_source(struct oval_reference *, char *);
02013 void oval_reference_set_id(struct oval_reference *, char *);
02017 void oval_reference_set_url(struct oval_reference *, char *);
02029 char *oval_reference_get_source(struct oval_reference *);
02035 char *oval_reference_get_id(struct oval_reference *);
02041 char *oval_reference_get_url(struct oval_reference *);
02051 bool oval_reference_iterator_has_more(struct oval_reference_iterator *);
02055 struct oval_reference *oval_reference_iterator_next(struct oval_reference_iterator *);
02059 void oval_reference_iterator_free(struct oval_reference_iterator *);
02088 struct oval_criteria_node *oval_criteria_node_new(struct oval_definition_model *, oval_criteria_node_type_t type);
02094 struct oval_criteria_node *oval_criteria_node_clone
02095 (struct oval_definition_model *new_model, struct oval_criteria_node *old_node);
02100 void oval_criteria_node_free(struct oval_criteria_node *);
02101
02111 void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate);
02117 void oval_criteria_node_set_applicability_check(struct oval_criteria_node *, bool applicability_check);
02123 void oval_criteria_set_node_type(struct oval_criteria_node *node, oval_criteria_node_type_t type);
02129 void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment);
02137 void oval_criteria_node_set_operator(struct oval_criteria_node *, oval_operator_t op);
02148 void oval_criteria_node_add_subnode(struct oval_criteria_node *, struct oval_criteria_node *node);
02156 void oval_criteria_node_set_test(struct oval_criteria_node *, struct oval_test *);
02164 void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *);
02175 oval_criteria_node_type_t oval_criteria_node_get_type(struct oval_criteria_node *);
02180 bool oval_criteria_node_get_negate(struct oval_criteria_node *);
02185 bool oval_criteria_node_get_applicability_check(struct oval_criteria_node *);
02186
02192 char *oval_criteria_node_get_comment(struct oval_criteria_node *);
02198 oval_operator_t oval_criteria_node_get_operator(struct oval_criteria_node *);
02206 struct oval_criteria_node_iterator *oval_criteria_node_get_subnodes(struct oval_criteria_node *);
02213 struct oval_test *oval_criteria_node_get_test(struct oval_criteria_node *);
02220 struct oval_definition *oval_criteria_node_get_definition(struct oval_criteria_node *);
02231 bool oval_criteria_node_iterator_has_more(struct oval_criteria_node_iterator *);
02237 struct oval_criteria_node *oval_criteria_node_iterator_next(struct oval_criteria_node_iterator *);
02242 void oval_criteria_node_iterator_free(struct oval_criteria_node_iterator *);
02254 struct oval_object_content *oval_object_content_new(struct oval_definition_model *model, oval_object_content_type_t type);
02255
02260 struct oval_object_content *oval_object_content_clone
02261 (struct oval_definition_model *new_model, struct oval_object_content *old_content);
02262
02266 void oval_object_content_free(struct oval_object_content *);
02267
02276 void oval_object_content_set_type(struct oval_object_content *, oval_object_content_type_t);
02280 void oval_object_content_set_field_name(struct oval_object_content *, char *);
02284 void oval_object_content_set_entity(struct oval_object_content *, struct oval_entity *);
02288 void oval_object_content_set_varCheck(struct oval_object_content *, oval_check_t);
02292 void oval_object_content_set_setobject(struct oval_object_content *, struct oval_setobject *);
02304 char *oval_object_content_get_field_name(struct oval_object_content *);
02309 oval_object_content_type_t oval_object_content_get_type(struct oval_object_content *);
02315 struct oval_entity *oval_object_content_get_entity(struct oval_object_content *);
02320 oval_check_t oval_object_content_get_varCheck(struct oval_object_content *);
02326 struct oval_setobject *oval_object_content_get_setobject(struct oval_object_content *);
02336 bool oval_object_content_iterator_has_more(struct oval_object_content_iterator *);
02340 struct oval_object_content *oval_object_content_iterator_next(struct oval_object_content_iterator *);
02344 void oval_object_content_iterator_free(struct oval_object_content_iterator *);
02356 struct oval_behavior *oval_behavior_new(struct oval_definition_model *);
02357
02362 struct oval_behavior *oval_behavior_clone(struct oval_definition_model *new_model, struct oval_behavior *old_behavior);
02366 void oval_behavior_free(struct oval_behavior *);
02367
02375 void oval_behavior_set_keyval(struct oval_behavior *behavior, const char *key, const char *value);
02387 char *oval_behavior_get_key(struct oval_behavior *);
02393 char *oval_behavior_get_value(struct oval_behavior *);
02403 bool oval_behavior_iterator_has_more(struct oval_behavior_iterator *);
02407 struct oval_behavior *oval_behavior_iterator_next(struct oval_behavior_iterator *);
02411 void oval_behavior_iterator_free(struct oval_behavior_iterator *);
02423 struct oval_state_content *oval_state_content_new(struct oval_definition_model *);
02428 struct oval_state_content *oval_state_content_clone (struct oval_definition_model *new_model, struct oval_state_content *old_content);
02432 void oval_state_content_free(struct oval_state_content *);
02433
02441 void oval_state_content_set_entity(struct oval_state_content *, struct oval_entity *);
02445 void oval_state_content_add_record_field(struct oval_state_content *, struct oval_record_field *);
02449 void oval_state_content_set_varcheck(struct oval_state_content *, oval_check_t);
02453 void oval_state_content_set_entcheck(struct oval_state_content *, oval_check_t);
02460 void oval_state_content_set_check_existence(struct oval_state_content *content, oval_existence_t existence);
02472 struct oval_entity *oval_state_content_get_entity(struct oval_state_content *);
02476 struct oval_record_field_iterator *oval_state_content_get_record_fields(struct oval_state_content *);
02481 oval_check_t oval_state_content_get_var_check(struct oval_state_content *);
02486 oval_check_t oval_state_content_get_ent_check(struct oval_state_content *);
02493 oval_existence_t oval_state_content_get_check_existence(struct oval_state_content *content);
02504 bool oval_state_content_iterator_has_more(struct oval_state_content_iterator *);
02508 struct oval_state_content *oval_state_content_iterator_next(struct oval_state_content_iterator *);
02512 void oval_state_content_iterator_free(struct oval_state_content_iterator *);
02518 struct oval_value *oval_value_new(oval_datatype_t datatype, char *text_value);
02523 struct oval_value *oval_value_clone(struct oval_value *old_value);
02527 void oval_value_free(struct oval_value *);
02528
02536 void oval_value_set_datatype(struct oval_value *, oval_datatype_t);
02537
02546 oval_datatype_t oval_value_get_datatype(struct oval_value *);
02552 char *oval_value_get_text(struct oval_value *);
02557 unsigned char *oval_value_get_binary(struct oval_value *);
02562 bool oval_value_get_boolean(struct oval_value *);
02567 float oval_value_get_float(struct oval_value *);
02572 long long oval_value_get_integer(struct oval_value *);
02582 bool oval_value_iterator_has_more(struct oval_value_iterator *);
02586 struct oval_value *oval_value_iterator_next(struct oval_value_iterator *);
02590 int oval_value_iterator_remaining(struct oval_value_iterator *iterator);
02594 void oval_value_iterator_free(struct oval_value_iterator *);
02606 struct oval_entity *oval_entity_new(struct oval_definition_model *);
02611 struct oval_entity *oval_entity_clone(struct oval_definition_model *model, struct oval_entity *old_entity);
02615 void oval_entity_free(struct oval_entity *);
02616
02624 void oval_entity_set_type(struct oval_entity *, oval_entity_type_t);
02628 void oval_entity_set_datatype(struct oval_entity *, oval_datatype_t);
02632 void oval_entity_set_mask(struct oval_entity *, int);
02636 void oval_entity_set_varref_type(struct oval_entity *, oval_entity_varref_type_t);
02640 void oval_entity_set_variable(struct oval_entity *, struct oval_variable *);
02644 void oval_entity_set_value(struct oval_entity *, struct oval_value *);
02648 void oval_entity_set_name(struct oval_entity *, char *);
02652 void oval_entity_set_operation(struct oval_entity *, oval_operation_t);
02664 char *oval_entity_get_name(struct oval_entity *);
02669 oval_entity_type_t oval_entity_get_type(struct oval_entity *);
02674 oval_datatype_t oval_entity_get_datatype(struct oval_entity *);
02679 oval_operation_t oval_entity_get_operation(struct oval_entity *);
02685 struct oval_variable *oval_entity_get_variable(struct oval_entity *);
02691 struct oval_value *oval_entity_get_value(struct oval_entity *);
02696 int oval_entity_get_mask(struct oval_entity *);
02701 oval_entity_varref_type_t oval_entity_get_varref_type(struct oval_entity *);
02711 bool oval_entity_iterator_has_more(struct oval_entity_iterator *);
02715 struct oval_entity *oval_entity_iterator_next(struct oval_entity_iterator *);
02719 void oval_entity_iterator_free(struct oval_entity_iterator *);
02731 struct oval_record_field *oval_record_field_new(oval_record_field_type_t);
02735 struct oval_record_field *oval_record_field_clone(struct oval_record_field *);
02739 void oval_record_field_free(struct oval_record_field *);
02740
02748 void oval_record_field_set_name(struct oval_record_field *, char *);
02752 void oval_record_field_set_value(struct oval_record_field *, char *);
02756 void oval_record_field_set_datatype(struct oval_record_field *, oval_datatype_t);
02760 void oval_record_field_set_mask(struct oval_record_field *, int);
02764 void oval_record_field_set_operation(struct oval_record_field *, oval_operation_t);
02768 void oval_record_field_set_variable(struct oval_record_field *, struct oval_variable *);
02772 void oval_record_field_set_var_check(struct oval_record_field *, oval_check_t);
02776 void oval_record_field_set_ent_check(struct oval_record_field *, oval_check_t);
02786 oval_record_field_type_t oval_record_field_get_type(struct oval_record_field *);
02790 char *oval_record_field_get_name(struct oval_record_field *);
02794 char *oval_record_field_get_value(struct oval_record_field *);
02798 oval_datatype_t oval_record_field_get_datatype(struct oval_record_field *);
02802 int oval_record_field_get_mask(struct oval_record_field *);
02806 oval_operation_t oval_record_field_get_operation(struct oval_record_field *);
02810 struct oval_variable *oval_record_field_get_variable(struct oval_record_field *);
02814 oval_check_t oval_record_field_get_var_check(struct oval_record_field *);
02818 oval_check_t oval_record_field_get_ent_check(struct oval_record_field *);
02828 bool oval_record_field_iterator_has_more(struct oval_record_field_iterator *);
02832 struct oval_record_field *oval_record_field_iterator_next(struct oval_record_field_iterator *);
02836 void oval_record_field_iterator_free(struct oval_record_field_iterator *);
02848 struct oval_filter *oval_filter_new(struct oval_definition_model *);
02852 void oval_filter_free(struct oval_filter *);
02856 struct oval_filter *oval_filter_clone(struct oval_definition_model *, struct oval_filter *);
02857
02865 void oval_filter_set_state(struct oval_filter *, struct oval_state *);
02869 void oval_filter_set_filter_action(struct oval_filter *, oval_filter_action_t );
02879 struct oval_state *oval_filter_get_state(struct oval_filter *);
02883 oval_filter_action_t oval_filter_get_filter_action(struct oval_filter *);
02893 bool oval_filter_iterator_has_more(struct oval_filter_iterator *);
02897 struct oval_filter *oval_filter_iterator_next(struct oval_filter_iterator *);
02901 void oval_filter_iterator_free(struct oval_filter_iterator *);
02913 struct oval_setobject *oval_setobject_new(struct oval_definition_model *);
02918 struct oval_setobject *oval_setobject_clone(struct oval_definition_model *new_model, struct oval_setobject *old_setobject);
02922 void oval_setobject_free(struct oval_setobject *);
02923
02930 void oval_setobject_set_type(struct oval_setobject *, oval_setobject_type_t);
02934 void oval_setobject_set_operation(struct oval_setobject *, oval_setobject_operation_t);
02938 void oval_setobject_add_subset(struct oval_setobject *, struct oval_setobject *);
02942 void oval_setobject_add_object(struct oval_setobject *, struct oval_object *);
02946 void oval_setobject_add_filter(struct oval_setobject *, struct oval_filter *);
02957 oval_setobject_type_t oval_setobject_get_type(struct oval_setobject *);
02962 oval_setobject_operation_t oval_setobject_get_operation(struct oval_setobject *);
02970 struct oval_setobject_iterator *oval_setobject_get_subsets(struct oval_setobject *);
02978 struct oval_object_iterator *oval_setobject_get_objects(struct oval_setobject *);
02986 struct oval_filter_iterator *oval_setobject_get_filters(struct oval_setobject *);
02996 bool oval_setobject_iterator_has_more(struct oval_setobject_iterator *);
03000 struct oval_setobject *oval_setobject_iterator_next(struct oval_setobject_iterator *);
03004 void oval_setobject_iterator_free(struct oval_setobject_iterator *);
03056 struct oval_component *oval_component_new(struct oval_definition_model *, oval_component_type_t type);
03062 struct oval_component *oval_component_clone(struct oval_definition_model *new_model,
03063 struct oval_component *old_component);
03068 void oval_component_free(struct oval_component *);
03069
03078 void oval_component_set_type(struct oval_component *component, oval_component_type_t type);
03084 void oval_component_set_object(struct oval_component *, struct oval_object *object);
03089 void oval_component_set_item_field(struct oval_component *, char *);
03094 void oval_component_set_record_field(struct oval_component *, char *);
03100 void oval_component_set_variable(struct oval_component *, struct oval_variable *variable);
03104 void oval_component_add_function_component(struct oval_component *, struct oval_component *);
03108 void oval_component_set_arithmetic_operation(struct oval_component *, oval_arithmetic_operation_t);
03112 void oval_component_set_prefix(struct oval_component *, char *);
03116 void oval_component_set_suffix(struct oval_component *, char *);
03120 void oval_component_set_split_delimiter(struct oval_component *, char *);
03124 void oval_component_set_glob_to_regex_glob_noescape(struct oval_component *, bool);
03128 void oval_component_set_substring_start(struct oval_component *, int);
03132 void oval_component_set_substring_length(struct oval_component *, int);
03136 void oval_component_set_timedif_format_1(struct oval_component *, oval_datetime_format_t);
03140 void oval_component_set_timedif_format_2(struct oval_component *, oval_datetime_format_t);
03144 void oval_component_set_regex_pattern(struct oval_component *, char *);
03148 void oval_component_set_literal_value(struct oval_component *, struct oval_value *);
03159 oval_component_type_t oval_component_get_type(struct oval_component *);
03167 struct oval_object *oval_component_get_object(struct oval_component *);
03174 char *oval_component_get_item_field(struct oval_component *);
03181 char *oval_component_get_record_field(struct oval_component *);
03189 struct oval_variable *oval_component_get_variable(struct oval_component *);
03197 struct oval_component_iterator *oval_component_get_function_components(struct oval_component *);
03203 oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *);
03211 char *oval_component_get_prefix(struct oval_component *);
03219 char *oval_component_get_suffix(struct oval_component *);
03227 char *oval_component_get_split_delimiter(struct oval_component *);
03234 bool oval_component_get_glob_to_regex_glob_noescape(struct oval_component *);
03240 int oval_component_get_substring_start(struct oval_component *);
03246 int oval_component_get_substring_length(struct oval_component *);
03252 oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *);
03258 oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *);
03266 char *oval_component_get_regex_pattern(struct oval_component *);
03274 struct oval_value *oval_component_get_literal_value(struct oval_component *);
03285 bool oval_component_iterator_has_more(struct oval_component_iterator *);
03291 struct oval_component *oval_component_iterator_next(struct oval_component_iterator *);
03296 void oval_component_iterator_free(struct oval_component_iterator *);
03301 int oval_component_iterator_remaining(struct oval_component_iterator *);
03321 OSCAP_DEPRECATED(char *oval_determine_document_schema_version(const char *, oscap_document_type_t));
03322
03326 #endif