|
Open SCAP Library
|
00001 00010 /* 00011 * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina. 00012 * Copyright (C) 2010 Tresys Technology, LLC 00013 * All Rights Reserved. 00014 * 00015 * This library is free software; you can redistribute it and/or 00016 * modify it under the terms of the GNU Lesser General Public 00017 * License as published by the Free Software Foundation; either 00018 * version 2.1 of the License, or (at your option) any later version. 00019 * 00020 * This library is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00023 * Lesser General Public License for more details. 00024 * 00025 * You should have received a copy of the GNU Lesser General Public 00026 * License along with this library; if not, write to the Free Software 00027 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00028 * 00029 * Authors: 00030 * Lukas Kuklinek <lkuklinek@redhat.com> 00031 * Josh Adams <jadams@tresys.com> 00032 */ 00033 00034 #ifndef XCCDF_H_ 00035 #define XCCDF_H_ 00036 00037 #include <stdbool.h> 00038 #include <time.h> 00039 #include <oscap_reference.h> 00040 #include <oscap_source.h> 00041 #include <oscap.h> 00042 #include "cpe_dict.h" 00043 00044 /*--------------------*\ 00045 | Enumerations | 00046 \*--------------------*/ 00047 00056 typedef enum { 00057 XCCDF_BENCHMARK = 0x0100, 00058 XCCDF_PROFILE = 0x0200, 00059 XCCDF_RESULT = 0x0400, 00060 XCCDF_RULE = 0x1000, 00061 XCCDF_GROUP = 0x2000, 00062 XCCDF_VALUE = 0x4000, 00063 00065 XCCDF_CONTENT = XCCDF_RULE | XCCDF_GROUP, 00067 XCCDF_ITEM = XCCDF_RULE | XCCDF_GROUP | XCCDF_VALUE, 00069 XCCDF_OBJECT = XCCDF_ITEM | XCCDF_PROFILE | XCCDF_BENCHMARK | XCCDF_RESULT, 00070 } xccdf_type_t; 00071 00073 typedef enum { 00074 XCCDF_IFACE_HINT_NONE, 00075 XCCDF_IFACE_HINT_CHOICE, 00076 XCCDF_IFACE_HINT_TEXTLINE, 00077 XCCDF_IFACE_HINT_TEXT, 00078 XCCDF_IFACE_HINT_DATE, 00079 XCCDF_IFACE_HINT_DATETIME, 00080 } xccdf_interface_hint_t; 00081 00083 typedef enum { 00084 XCCDF_STATUS_NOT_SPECIFIED, 00085 XCCDF_STATUS_ACCEPTED, 00086 XCCDF_STATUS_DEPRECATED, 00087 XCCDF_STATUS_DRAFT, 00088 XCCDF_STATUS_INCOMPLETE, 00089 XCCDF_STATUS_INTERIM 00090 } xccdf_status_type_t; 00091 00093 typedef enum { 00094 XCCDF_TYPE_NUMBER = 1, 00095 XCCDF_TYPE_STRING, 00096 XCCDF_TYPE_BOOLEAN, 00097 } xccdf_value_type_t; 00098 00100 typedef enum { 00101 XCCDF_OPERATOR_EQUALS = 1, 00102 XCCDF_OPERATOR_NOT_EQUAL, 00103 XCCDF_OPERATOR_GREATER, 00104 XCCDF_OPERATOR_GREATER_EQUAL, 00105 XCCDF_OPERATOR_LESS, 00106 XCCDF_OPERATOR_LESS_EQUAL, 00107 XCCDF_OPERATOR_PATTERN_MATCH 00108 } xccdf_operator_t; 00109 00111 typedef enum { 00112 XCCDF_OPERATOR_AND = 0x0002, 00113 XCCDF_OPERATOR_OR = 0x0003, 00114 } xccdf_bool_operator_t; 00115 00117 typedef enum { 00118 XCCDF_LEVEL_NOT_DEFINED = 0, 00119 XCCDF_UNKNOWN = 1, 00120 XCCDF_INFO, 00121 XCCDF_LOW, 00122 XCCDF_MEDIUM, 00123 XCCDF_HIGH 00124 } xccdf_level_t; 00125 00127 typedef enum { 00128 XCCDF_MSG_INFO = XCCDF_INFO, 00129 XCCDF_MSG_WARNING = XCCDF_LOW, 00130 XCCDF_MSG_ERROR = XCCDF_HIGH, 00131 } xccdf_message_severity_t; 00132 00134 typedef enum { 00135 XCCDF_ROLE_FULL = 1, 00136 XCCDF_ROLE_UNSCORED, 00137 XCCDF_ROLE_UNCHECKED 00138 } xccdf_role_t; 00139 00141 typedef enum { 00142 XCCDF_WARNING_NOT_SPECIFIED, 00143 XCCDF_WARNING_GENERAL = 1, 00144 XCCDF_WARNING_FUNCTIONALITY, 00145 XCCDF_WARNING_PERFORMANCE, 00146 XCCDF_WARNING_HARDWARE, 00147 XCCDF_WARNING_LEGAL, 00148 XCCDF_WARNING_REGULATORY, 00149 XCCDF_WARNING_MANAGEMENT, 00150 XCCDF_WARNING_AUDIT, 00151 XCCDF_WARNING_DEPENDENCY 00152 } xccdf_warning_category_t; 00153 00155 typedef enum { 00156 XCCDF_STRATEGY_UNKNOWN = 0, 00157 XCCDF_STRATEGY_CONFIGURE, 00158 XCCDF_STRATEGY_DISABLE, 00159 XCCDF_STRATEGY_ENABLE, 00160 XCCDF_STRATEGY_PATCH, 00161 XCCDF_STRATEGY_POLICY, 00162 XCCDF_STRATEGY_RESTRICT, 00163 XCCDF_STRATEGY_UPDATE, 00164 XCCDF_STRATEGY_COMBINATION 00165 } xccdf_strategy_t; 00166 00168 typedef enum { 00169 XCCDF_RESULT_PASS = 1, 00170 XCCDF_RESULT_FAIL, 00171 XCCDF_RESULT_ERROR, 00172 XCCDF_RESULT_UNKNOWN, 00173 XCCDF_RESULT_NOT_APPLICABLE, 00174 XCCDF_RESULT_NOT_CHECKED, 00175 XCCDF_RESULT_NOT_SELECTED, 00176 XCCDF_RESULT_INFORMATIONAL, 00177 XCCDF_RESULT_FIXED 00178 } xccdf_test_result_type_t; 00179 00180 /*--------------------*\ 00181 | Typedefs | 00182 \*--------------------*/ 00183 00187 typedef float xccdf_numeric; 00188 00193 struct xccdf_benchmark; 00194 00199 struct xccdf_profile; 00200 00205 struct xccdf_item; 00206 00211 struct xccdf_rule; 00212 00217 struct xccdf_group; 00218 00223 struct xccdf_value; 00224 00229 struct xccdf_result; 00230 00236 struct xccdf_tailoring; 00237 00238 /*--------------------*\ 00239 | Support structures | 00240 \*--------------------*/ 00241 00246 struct xccdf_notice; 00247 00252 struct xccdf_status; 00253 00258 struct xccdf_model; 00259 00264 struct xccdf_warning; 00265 00270 struct xccdf_select; 00271 00276 struct xccdf_setvalue; 00277 00282 struct xccdf_refine_value; 00283 00288 struct xccdf_refine_rule; 00289 00294 struct xccdf_ident; 00295 00300 struct xccdf_check; 00305 struct xccdf_check_content_ref; 00306 00311 struct xccdf_profile_note; 00312 00318 struct xccdf_check_import; 00319 00325 struct xccdf_check_export; 00326 00332 struct xccdf_fix; 00333 00339 struct xccdf_fixtext; 00340 00348 struct xccdf_value_instance; 00349 00355 struct xccdf_identity; 00356 00362 struct xccdf_instance; 00363 00369 struct xccdf_message; 00370 00376 struct xccdf_override; 00377 00383 struct xccdf_rule_result; 00384 00390 struct xccdf_score; 00391 00397 struct xccdf_target_fact; 00398 00405 struct xccdf_target_identifier; 00406 00412 struct xccdf_plain_text; 00413 00419 struct xccdf_item_iterator; 00420 00426 struct xccdf_notice_iterator; 00427 00433 struct xccdf_status_iterator; 00434 00440 struct xccdf_identity_iterator; 00441 00447 struct xccdf_model_iterator; 00448 00454 struct xccdf_result_iterator; 00455 00461 struct xccdf_profile_iterator; 00462 00468 struct xccdf_select_iterator; 00469 00475 struct xccdf_value_iterator; 00476 00482 struct xccdf_setvalue_iterator; 00483 00488 struct xccdf_refine_value_iterator; 00489 00495 struct xccdf_refine_rule_iterator; 00496 00502 struct xccdf_ident_iterator; 00503 00509 struct xccdf_check_iterator; 00510 00516 struct xccdf_profile_note_iterator; 00517 00523 struct xccdf_fixtext_iterator; 00524 00530 struct xccdf_check_content_ref_iterator; 00531 00537 struct xccdf_check_import_iterator; 00538 00544 struct xccdf_fix_iterator; 00545 00551 struct xccdf_check_export_iterator; 00552 00558 struct xccdf_warning_iterator; 00559 00565 struct xccdf_instance_iterator; 00566 00572 struct xccdf_message_iterator; 00573 00579 struct xccdf_override_iterator; 00580 00586 struct xccdf_rule_result_iterator; 00587 00593 struct xccdf_value_instance_iterator; 00594 00600 struct xccdf_score_iterator; 00601 00607 struct xccdf_target_fact_iterator; 00608 00614 struct xccdf_target_identifier_iterator; 00615 00621 struct xccdf_plain_text_iterator; 00622 00626 struct xccdf_version_info; 00627 00629 const char* xccdf_version_info_get_version(const struct xccdf_version_info* v); 00631 const char* xccdf_version_info_get_namespace_uri(const struct xccdf_version_info* v); 00633 const char* xccdf_version_info_get_cpe_version(const struct xccdf_version_info* v); 00634 00643 OSCAP_DEPRECATED(char * xccdf_detect_version(const char* file)); 00644 00645 /************************************************************/ 00646 00648 void xccdf_item_free(struct xccdf_item *item); 00649 00651 struct xccdf_item * xccdf_item_clone(const struct xccdf_item * old_item); 00652 00659 struct xccdf_benchmark* xccdf_item_to_benchmark(struct xccdf_item* item); 00660 00667 struct xccdf_profile* xccdf_item_to_profile(struct xccdf_item* item); 00668 00675 struct xccdf_rule* xccdf_item_to_rule(struct xccdf_item* item); 00676 00683 struct xccdf_group* xccdf_item_to_group(struct xccdf_item* item); 00684 00691 struct xccdf_value* xccdf_item_to_value(struct xccdf_item* item); 00692 00699 struct xccdf_result* xccdf_item_to_result(struct xccdf_item* item); 00700 00710 OSCAP_DEPRECATED(struct xccdf_benchmark* xccdf_benchmark_import(const char *file)); 00711 00718 struct xccdf_benchmark* xccdf_benchmark_import_source(struct oscap_source *source); 00719 00726 int xccdf_benchmark_export(struct xccdf_benchmark *benchmark, const char *file); 00727 00733 struct oscap_source *xccdf_benchmark_export_source(struct xccdf_benchmark *benchmark, const char *filename); 00734 00741 struct xccdf_result *xccdf_result_import_source(struct oscap_source *source); 00742 00747 void xccdf_result_fill_sysinfo(struct xccdf_result *result); 00748 00757 OSCAP_DEPRECATED(int xccdf_result_export(struct xccdf_result *result, const char *file)); 00758 00764 struct oscap_source *xccdf_result_export_source(struct xccdf_result *result, const char *filepath); 00765 00772 bool xccdf_benchmark_resolve(struct xccdf_benchmark *benchmark); 00773 00775 struct xccdf_benchmark *xccdf_benchmark_new(void); 00777 void xccdf_benchmark_free(struct xccdf_benchmark *benchmark); 00779 struct xccdf_item *xccdf_benchmark_to_item(struct xccdf_benchmark *item); 00781 struct xccdf_benchmark * xccdf_benchmark_clone( const struct xccdf_benchmark * benchmark ); 00782 00788 const char * xccdf_benchmark_supported(void); 00789 00791 const struct xccdf_version_info *xccdf_benchmark_supported_schema_version(void); 00792 00794 struct xccdf_profile *xccdf_profile_new(void); 00796 void xccdf_profile_free(struct xccdf_item *prof); 00798 struct xccdf_item *xccdf_profile_to_item(struct xccdf_profile *item); 00800 struct xccdf_profile * xccdf_profile_clone( const struct xccdf_profile * profile); 00801 00803 struct xccdf_rule *xccdf_rule_new(void); 00805 void xccdf_rule_free(struct xccdf_item *rule); 00807 struct xccdf_item *xccdf_rule_to_item(struct xccdf_rule *item); 00809 struct xccdf_rule * xccdf_rule_clone(const struct xccdf_rule * rule); 00810 00812 struct xccdf_group *xccdf_group_new(void); 00814 void xccdf_group_free(struct xccdf_item *group); 00816 struct xccdf_item *xccdf_group_to_item(struct xccdf_group *item); 00818 struct xccdf_group * xccdf_group_clone(const struct xccdf_group * group); 00819 00821 struct xccdf_value *xccdf_value_new(xccdf_value_type_t type); 00823 void xccdf_value_free(struct xccdf_item *val); 00825 struct xccdf_item *xccdf_value_to_item(struct xccdf_value *item); 00827 struct xccdf_value * xccdf_value_clone(const struct xccdf_value * value); 00828 00830 struct xccdf_status *xccdf_status_new(void); 00832 struct xccdf_status * xccdf_status_clone(const struct xccdf_status * old_status); 00834 struct xccdf_status *xccdf_status_new_fill(const char *status, const char *date); 00836 void xccdf_status_free(struct xccdf_status *status); 00838 struct xccdf_notice *xccdf_notice_new(void); 00840 void xccdf_notice_free(struct xccdf_notice *notice); 00842 struct xccdf_notice * xccdf_notice_clone(const struct xccdf_notice * notice); 00843 00845 struct xccdf_model *xccdf_model_new(void); 00847 struct xccdf_model * xccdf_model_clone(const struct xccdf_model * old_model); 00849 void xccdf_model_free(struct xccdf_model *model); 00850 00852 struct xccdf_ident *xccdf_ident_new(void); 00854 struct xccdf_ident *xccdf_ident_new_fill(const char *id, const char *sys); 00856 struct xccdf_ident *xccdf_ident_clone(const struct xccdf_ident * ident); 00858 void xccdf_ident_free(struct xccdf_ident *ident); 00859 00860 00862 struct xccdf_check *xccdf_check_new(void); 00864 void xccdf_check_free(struct xccdf_check *check); 00865 00867 struct xccdf_check *xccdf_check_clone(const struct xccdf_check *old_check); 00869 struct xccdf_check_import *xccdf_check_import_clone(const struct xccdf_check_import *old_import); 00871 struct xccdf_check_export *xccdf_check_export_clone(const struct xccdf_check_export *old_export); 00873 struct xccdf_check_content_ref *xccdf_check_content_ref_clone(const struct xccdf_check_content_ref *old_ref); 00874 00876 struct xccdf_check_content_ref *xccdf_check_content_ref_new(void); 00878 void xccdf_check_content_ref_free(struct xccdf_check_content_ref *ref); 00879 00881 struct xccdf_profile_note *xccdf_profile_note_new(void); 00883 void xccdf_profile_note_free(struct xccdf_profile_note *note); 00884 00886 struct xccdf_check_import *xccdf_check_import_new(void); 00888 void xccdf_check_import_free(struct xccdf_check_import *item); 00889 00891 struct xccdf_check_export *xccdf_check_export_new(void); 00893 void xccdf_check_export_free(struct xccdf_check_export *item); 00894 00896 struct xccdf_fix *xccdf_fix_new(void); 00898 struct xccdf_fix *xccdf_fix_clone(const struct xccdf_fix *old_fix); 00900 void xccdf_fix_free(struct xccdf_fix *item); 00901 00903 struct xccdf_fixtext *xccdf_fixtext_new(void); 00905 struct xccdf_fixtext * xccdf_fixtext_clone(const struct xccdf_fixtext * fixtext); 00907 void xccdf_fixtext_free(struct xccdf_fixtext *item); 00908 00910 void xccdf_select_free(struct xccdf_select *sel); 00912 struct xccdf_select *xccdf_select_clone(const struct xccdf_select * select); 00914 struct xccdf_select *xccdf_select_new(void); 00915 00917 struct xccdf_warning *xccdf_warning_new(void); 00919 struct xccdf_warning *xccdf_warning_clone(const struct xccdf_warning *old_warning); 00921 void xccdf_warning_free(struct xccdf_warning * warn); 00922 00924 void xccdf_refine_rule_free(struct xccdf_refine_rule *obj); 00925 00927 void xccdf_refine_value_free(struct xccdf_refine_value *rv); 00928 00929 void xccdf_setvalue_free(struct xccdf_setvalue *sv); 00930 00932 struct xccdf_tailoring *xccdf_tailoring_new(void); 00934 void xccdf_tailoring_free(struct xccdf_tailoring *tailoring); 00936 int xccdf_tailoring_export(struct xccdf_tailoring *tailoring, const char *file, const struct xccdf_version_info *version_info); 00937 00942 OSCAP_DEPRECATED(void xccdf_cleanup(void)); 00943 00949 struct xccdf_group *xccdf_benchmark_append_new_group(struct xccdf_benchmark *, const char *id); 00950 00956 struct xccdf_value *xccdf_benchmark_append_new_value(struct xccdf_benchmark *, const char *id, xccdf_value_type_t type); 00957 00963 struct xccdf_rule *xccdf_benchmark_append_new_rule(struct xccdf_benchmark *, const char *id); 00964 00966 struct xccdf_plain_text *xccdf_plain_text_new(void); 00968 struct xccdf_plain_text *xccdf_plain_text_new_fill(const char *id, const char *text); 00970 void xccdf_plain_text_free(struct xccdf_plain_text *plain); 00972 struct xccdf_plain_text *xccdf_plain_text_clone(const struct xccdf_plain_text * pt); 00973 00975 struct xccdf_result *xccdf_result_new(void); 00977 void xccdf_result_free(struct xccdf_result *item); 00979 struct xccdf_item *xccdf_result_to_item(struct xccdf_result *item); 00981 struct xccdf_result * xccdf_result_clone(const struct xccdf_result * result); 00982 00984 struct xccdf_rule_result *xccdf_rule_result_new(void); 00986 struct xccdf_rule_result * xccdf_rule_result_clone(const struct xccdf_rule_result * result); 00988 void xccdf_rule_result_free(struct xccdf_rule_result *rr); 00989 00991 struct xccdf_identity *xccdf_identity_new(void); 00993 struct xccdf_identity * xccdf_identity_clone(const struct xccdf_identity * identity); 00995 void xccdf_identity_free(struct xccdf_identity *identity); 00996 00998 struct xccdf_score *xccdf_score_new(void); 01000 struct xccdf_score * xccdf_score_clone(const struct xccdf_score * score); 01002 void xccdf_score_free(struct xccdf_score *score); 01003 01005 struct xccdf_override *xccdf_override_new(void); 01007 struct xccdf_override * xccdf_override_clone(const struct xccdf_override * override); 01009 void xccdf_override_free(struct xccdf_override *oride); 01010 01012 struct xccdf_message *xccdf_message_new(void); 01014 struct xccdf_message * xccdf_message_clone(const struct xccdf_message * message); 01016 void xccdf_message_free(struct xccdf_message *msg); 01017 01019 struct xccdf_target_fact *xccdf_target_fact_new(void); 01021 struct xccdf_target_fact * xccdf_target_fact_clone(const struct xccdf_target_fact * tf); 01023 void xccdf_target_fact_free(struct xccdf_target_fact *fact); 01024 01026 struct xccdf_target_identifier *xccdf_target_identifier_new(void); 01028 struct xccdf_target_identifier * xccdf_target_identifier_clone(const struct xccdf_target_identifier * ti); 01030 void xccdf_target_identifier_free(struct xccdf_target_identifier *ti); 01031 01033 struct xccdf_instance *xccdf_instance_new(void); 01035 struct xccdf_instance * xccdf_instance_clone(const struct xccdf_instance * instance); 01037 void xccdf_instance_free(struct xccdf_instance *inst); 01038 01040 struct oscap_string_iterator *xccdf_value_instance_get_choices(const struct xccdf_value_instance *item); 01041 01042 /************************************************************/ 01052 struct xccdf_item *xccdf_item_iterator_next(struct xccdf_item_iterator *it); 01057 bool xccdf_item_iterator_has_more(struct xccdf_item_iterator *it); 01062 void xccdf_item_iterator_free(struct xccdf_item_iterator *it); 01067 void xccdf_item_iterator_reset(struct xccdf_item_iterator *it); 01068 01069 01074 struct xccdf_notice *xccdf_notice_iterator_next(struct xccdf_notice_iterator *it); 01079 bool xccdf_notice_iterator_has_more(struct xccdf_notice_iterator *it); 01084 void xccdf_notice_iterator_free(struct xccdf_notice_iterator *it); 01089 void xccdf_notice_iterator_reset(struct xccdf_notice_iterator *it); 01090 01091 01096 struct xccdf_status *xccdf_status_iterator_next(struct xccdf_status_iterator *it); 01101 bool xccdf_status_iterator_has_more(struct xccdf_status_iterator *it); 01106 void xccdf_status_iterator_free(struct xccdf_status_iterator *it); 01111 void xccdf_status_iterator_reset(struct xccdf_status_iterator *it); 01112 01113 01118 struct xccdf_model *xccdf_model_iterator_next(struct xccdf_model_iterator *it); 01123 bool xccdf_model_iterator_has_more(struct xccdf_model_iterator *it); 01128 void xccdf_model_iterator_free(struct xccdf_model_iterator *it); 01133 void xccdf_model_iterator_reset(struct xccdf_model_iterator *it); 01134 01135 01140 struct xccdf_result *xccdf_result_iterator_next(struct xccdf_result_iterator *it); 01145 bool xccdf_result_iterator_has_more(struct xccdf_result_iterator *it); 01150 void xccdf_result_iterator_free(struct xccdf_result_iterator *it); 01155 void xccdf_result_iterator_reset(struct xccdf_result_iterator *it); 01156 01157 01162 struct xccdf_profile *xccdf_profile_iterator_next(struct xccdf_profile_iterator *it); 01167 bool xccdf_profile_iterator_has_more(struct xccdf_profile_iterator *it); 01172 void xccdf_profile_iterator_free(struct xccdf_profile_iterator *it); 01177 void xccdf_profile_iterator_reset(struct xccdf_profile_iterator *it); 01178 01179 01184 struct xccdf_select *xccdf_select_iterator_next(struct xccdf_select_iterator *it); 01189 bool xccdf_select_iterator_has_more(struct xccdf_select_iterator *it); 01194 void xccdf_select_iterator_free(struct xccdf_select_iterator *it); 01199 void xccdf_select_iterator_reset(struct xccdf_select_iterator *it); 01200 01201 01206 struct xccdf_setvalue *xccdf_setvalue_iterator_next(struct xccdf_setvalue_iterator *it); 01211 bool xccdf_setvalue_iterator_has_more(struct xccdf_setvalue_iterator *it); 01216 void xccdf_setvalue_iterator_free(struct xccdf_setvalue_iterator *it); 01221 void xccdf_setvalue_iterator_reset(struct xccdf_setvalue_iterator *it); 01222 01223 01228 struct xccdf_refine_value *xccdf_refine_value_iterator_next(struct xccdf_refine_value_iterator *it); 01233 bool xccdf_refine_value_iterator_has_more(struct xccdf_refine_value_iterator *it); 01238 void xccdf_refine_value_iterator_free(struct xccdf_refine_value_iterator *it); 01243 void xccdf_refine_value_iterator_reset(struct xccdf_refine_value_iterator *it); 01244 01245 01250 struct xccdf_refine_rule *xccdf_refine_rule_iterator_next(struct xccdf_refine_rule_iterator *it); 01255 bool xccdf_refine_rule_iterator_has_more(struct xccdf_refine_rule_iterator *it); 01260 void xccdf_refine_rule_iterator_free(struct xccdf_refine_rule_iterator *it); 01265 void xccdf_refine_rule_iterator_reset(struct xccdf_refine_rule_iterator *it); 01266 01267 01272 struct xccdf_ident *xccdf_ident_iterator_next(struct xccdf_ident_iterator *it); 01277 bool xccdf_ident_iterator_has_more(struct xccdf_ident_iterator *it); 01282 void xccdf_ident_iterator_free(struct xccdf_ident_iterator *it); 01287 void xccdf_ident_iterator_reset(struct xccdf_ident_iterator *it); 01288 01289 01294 struct xccdf_check *xccdf_check_iterator_next(struct xccdf_check_iterator *it); 01299 bool xccdf_check_iterator_has_more(struct xccdf_check_iterator *it); 01304 void xccdf_check_iterator_free(struct xccdf_check_iterator *it); 01309 void xccdf_check_iterator_reset(struct xccdf_check_iterator *it); 01310 01311 01316 struct xccdf_check_content_ref *xccdf_check_content_ref_iterator_next(struct xccdf_check_content_ref_iterator *it); 01321 bool xccdf_check_content_ref_iterator_has_more(struct xccdf_check_content_ref_iterator *it); 01326 void xccdf_check_content_ref_iterator_free(struct xccdf_check_content_ref_iterator *it); 01331 void xccdf_check_content_ref_iterator_reset(struct xccdf_check_content_ref_iterator *it); 01332 01333 01338 struct xccdf_profile_note *xccdf_profile_note_iterator_next(struct xccdf_profile_note_iterator *it); 01343 bool xccdf_profile_note_iterator_has_more(struct xccdf_profile_note_iterator *it); 01348 void xccdf_profile_note_iterator_free(struct xccdf_profile_note_iterator *it); 01353 void xccdf_profile_note_iterator_reset(struct xccdf_profile_note_iterator *it); 01354 01355 01360 struct xccdf_check_import *xccdf_check_import_iterator_next(struct xccdf_check_import_iterator *it); 01365 bool xccdf_check_import_iterator_has_more(struct xccdf_check_import_iterator *it); 01370 void xccdf_check_import_iterator_free(struct xccdf_check_import_iterator *it); 01375 void xccdf_check_import_iterator_reset(struct xccdf_check_import_iterator *it); 01376 01377 01382 struct xccdf_check_export *xccdf_check_export_iterator_next(struct xccdf_check_export_iterator *it); 01387 bool xccdf_check_export_iterator_has_more(struct xccdf_check_export_iterator *it); 01392 void xccdf_check_export_iterator_free(struct xccdf_check_export_iterator *it); 01397 void xccdf_check_export_iterator_reset(struct xccdf_check_export_iterator *it); 01398 01399 01404 struct xccdf_fix *xccdf_fix_iterator_next(struct xccdf_fix_iterator *it); 01409 bool xccdf_fix_iterator_has_more(struct xccdf_fix_iterator *it); 01414 void xccdf_fix_iterator_free(struct xccdf_fix_iterator *it); 01419 void xccdf_fix_iterator_reset(struct xccdf_fix_iterator *it); 01420 01421 01426 struct xccdf_fixtext *xccdf_fixtext_iterator_next(struct xccdf_fixtext_iterator *it); 01431 bool xccdf_fixtext_iterator_has_more(struct xccdf_fixtext_iterator *it); 01436 void xccdf_fixtext_iterator_free(struct xccdf_fixtext_iterator *it); 01441 void xccdf_fixtext_iterator_reset(struct xccdf_fixtext_iterator *it); 01442 01443 01448 struct xccdf_warning *xccdf_warning_iterator_next(struct xccdf_warning_iterator *it); 01453 bool xccdf_warning_iterator_has_more(struct xccdf_warning_iterator *it); 01458 void xccdf_warning_iterator_free(struct xccdf_warning_iterator *it); 01463 void xccdf_warning_iterator_reset(struct xccdf_warning_iterator *it); 01464 01465 01470 struct xccdf_instance *xccdf_instance_iterator_next(struct xccdf_instance_iterator *it); 01475 bool xccdf_instance_iterator_has_more(struct xccdf_instance_iterator *it); 01480 void xccdf_instance_iterator_free(struct xccdf_instance_iterator *it); 01485 void xccdf_instance_iterator_reset(struct xccdf_instance_iterator *it); 01486 01487 01492 struct xccdf_message *xccdf_message_iterator_next(struct xccdf_message_iterator *it); 01497 bool xccdf_message_iterator_has_more(struct xccdf_message_iterator *it); 01502 void xccdf_message_iterator_free(struct xccdf_message_iterator *it); 01507 void xccdf_message_iterator_reset(struct xccdf_message_iterator *it); 01508 01509 01514 struct xccdf_override *xccdf_override_iterator_next(struct xccdf_override_iterator *it); 01519 bool xccdf_override_iterator_has_more(struct xccdf_override_iterator *it); 01524 void xccdf_override_iterator_free(struct xccdf_override_iterator *it); 01529 void xccdf_override_iterator_reset(struct xccdf_override_iterator *it); 01530 01531 01536 struct xccdf_identity *xccdf_identity_iterator_next(struct xccdf_identity_iterator *it); 01541 bool xccdf_identity_iterator_has_more(struct xccdf_identity_iterator *it); 01546 void xccdf_identity_iterator_free(struct xccdf_identity_iterator *it); 01551 void xccdf_identity_iterator_reset(struct xccdf_identity_iterator *it); 01552 01553 01558 struct xccdf_rule_result *xccdf_rule_result_iterator_next(struct xccdf_rule_result_iterator *it); 01563 bool xccdf_rule_result_iterator_has_more(struct xccdf_rule_result_iterator *it); 01568 void xccdf_rule_result_iterator_free(struct xccdf_rule_result_iterator *it); 01573 void xccdf_rule_result_iterator_reset(struct xccdf_rule_result_iterator *it); 01574 01575 01580 struct xccdf_value_instance *xccdf_value_instance_iterator_next(struct xccdf_value_instance_iterator *it); 01585 bool xccdf_value_instance_iterator_has_more(struct xccdf_value_instance_iterator *it); 01590 void xccdf_value_instance_iterator_free(struct xccdf_value_instance_iterator *it); 01595 void xccdf_value_instance_iterator_reset(struct xccdf_value_instance_iterator *it); 01596 01597 01602 struct xccdf_score *xccdf_score_iterator_next(struct xccdf_score_iterator *it); 01607 bool xccdf_score_iterator_has_more(struct xccdf_score_iterator *it); 01612 void xccdf_score_iterator_free(struct xccdf_score_iterator *it); 01617 void xccdf_score_iterator_reset(struct xccdf_score_iterator *it); 01618 01619 01624 struct xccdf_target_fact *xccdf_target_fact_iterator_next(struct xccdf_target_fact_iterator *it); 01629 bool xccdf_target_fact_iterator_has_more(struct xccdf_target_fact_iterator *it); 01634 void xccdf_target_fact_iterator_free(struct xccdf_target_fact_iterator *it); 01639 void xccdf_target_fact_iterator_reset(struct xccdf_target_fact_iterator *it); 01640 01645 struct xccdf_target_identifier *xccdf_target_identifier_iterator_next(struct xccdf_target_identifier_iterator *it); 01650 bool xccdf_target_identifier_iterator_has_more(struct xccdf_target_identifier_iterator *it); 01655 void xccdf_target_identifier_iterator_free(struct xccdf_target_identifier_iterator *it); 01660 void xccdf_target_identifier_iterator_reset(struct xccdf_target_identifier_iterator *it); 01661 01662 01667 struct xccdf_plain_text *xccdf_plain_text_iterator_next(struct xccdf_plain_text_iterator *it); 01672 bool xccdf_plain_text_iterator_has_more(struct xccdf_plain_text_iterator *it); 01677 void xccdf_plain_text_iterator_free(struct xccdf_plain_text_iterator *it); 01682 void xccdf_plain_text_iterator_reset(struct xccdf_plain_text_iterator *it); 01683 01684 01689 struct xccdf_value *xccdf_value_iterator_next(struct xccdf_value_iterator *it); 01694 bool xccdf_value_iterator_has_more(struct xccdf_value_iterator *it); 01699 void xccdf_value_iterator_free(struct xccdf_value_iterator *it); 01704 void xccdf_value_iterator_reset(struct xccdf_value_iterator *it); 01705 01706 /************************************************************ 01707 ** @} End of Iterators group */ 01708 01709 /************************************************************/ 01720 xccdf_type_t xccdf_item_get_type(const struct xccdf_item *item); 01724 const char *xccdf_item_get_id(const struct xccdf_item *item); 01728 struct oscap_text_iterator *xccdf_item_get_title(const struct xccdf_item *item); 01732 struct oscap_text_iterator *xccdf_item_get_description(const struct xccdf_item *item); 01736 const char *xccdf_item_get_version(const struct xccdf_item *item); 01740 const char *xccdf_item_get_extends(const struct xccdf_item *item); 01744 struct xccdf_status_iterator *xccdf_item_get_statuses(const struct xccdf_item *item); 01748 struct oscap_reference_iterator *xccdf_item_get_dc_statuses(const struct xccdf_item *item); 01752 struct oscap_reference_iterator *xccdf_item_get_references(const struct xccdf_item *item); 01756 struct oscap_string_iterator *xccdf_item_get_conflicts(const struct xccdf_item* item); 01760 struct oscap_stringlist_iterator *xccdf_item_get_requires(const struct xccdf_item* item); 01764 struct xccdf_status * xccdf_item_get_current_status(const struct xccdf_item *item); 01768 bool xccdf_item_get_hidden(const struct xccdf_item *item); 01772 bool xccdf_item_get_selected(const struct xccdf_item *item); 01776 bool xccdf_item_get_prohibit_changes(const struct xccdf_item *item); 01780 bool xccdf_item_get_abstract(const struct xccdf_item *item); 01784 struct xccdf_item_iterator *xccdf_item_get_content(const struct xccdf_item *item); 01788 const char * xccdf_test_result_type_get_text(xccdf_test_result_type_t id); 01792 struct xccdf_rule_result * xccdf_result_get_rule_result_by_id(struct xccdf_result * result, const char * id); 01793 01799 struct xccdf_item *xccdf_item_get_parent(const struct xccdf_item *item); 01800 01810 const struct xccdf_version_info* xccdf_item_get_schema_version(struct xccdf_item* item); 01811 01815 struct oscap_string_iterator *xccdf_item_get_metadata(const struct xccdf_item *item); 01816 01820 const char *xccdf_benchmark_get_id(const struct xccdf_benchmark *benchmark); 01824 bool xccdf_benchmark_get_resolved(const struct xccdf_benchmark *benchmark); 01828 struct oscap_text_iterator *xccdf_benchmark_get_title(const struct xccdf_benchmark *benchmark); 01832 struct oscap_text_iterator *xccdf_benchmark_get_description(const struct xccdf_benchmark *benchmark); 01836 const char *xccdf_benchmark_get_version(const struct xccdf_benchmark *benchmark); 01840 const struct xccdf_version_info* xccdf_benchmark_get_schema_version(const struct xccdf_benchmark* item); 01844 const char *xccdf_benchmark_get_style(const struct xccdf_benchmark *benchmark); 01848 const char *xccdf_benchmark_get_style_href(const struct xccdf_benchmark *benchmark); 01852 struct oscap_text_iterator *xccdf_benchmark_get_front_matter(const struct xccdf_benchmark *benchmark); 01856 struct oscap_text_iterator *xccdf_benchmark_get_rear_matter(const struct xccdf_benchmark *benchmark); 01860 struct xccdf_status_iterator *xccdf_benchmark_get_statuses(const struct xccdf_benchmark *benchmark); 01864 struct oscap_reference_iterator *xccdf_benchmark_get_dc_statuses(const struct xccdf_benchmark *benchmark); 01868 struct oscap_reference_iterator *xccdf_benchmark_get_references(const struct xccdf_benchmark *benchmark); 01872 struct oscap_string_iterator *xccdf_benchmark_get_platforms(const struct xccdf_benchmark *benchmark); 01876 struct xccdf_status * xccdf_benchmark_get_status_current(const struct xccdf_benchmark *benchmark); 01880 struct xccdf_plain_text_iterator *xccdf_benchmark_get_plain_texts(const struct xccdf_benchmark *item); 01884 struct xccdf_result_iterator* xccdf_benchmark_get_results(const struct xccdf_benchmark *bench); 01888 struct xccdf_value_iterator *xccdf_benchmark_get_values(const struct xccdf_benchmark *item); 01890 bool xccdf_benchmark_set_lang(struct xccdf_benchmark *item, const char *newval); 01892 const char *xccdf_benchmark_get_lang(const struct xccdf_benchmark *item); 01893 01901 const char *xccdf_benchmark_get_plain_text(const struct xccdf_benchmark *benchmark, const char *id); 01902 01910 struct xccdf_item *xccdf_benchmark_get_item(const struct xccdf_benchmark *benchmark, const char *id); 01911 01919 struct xccdf_item *xccdf_benchmark_get_member(const struct xccdf_benchmark *benchmark, xccdf_type_t type, const char *key); 01920 01926 struct xccdf_notice_iterator *xccdf_benchmark_get_notices(const struct xccdf_benchmark *benchmark); 01927 01933 struct xccdf_model_iterator *xccdf_benchmark_get_models(const struct xccdf_benchmark *benchmark); 01934 01940 struct xccdf_profile_iterator *xccdf_benchmark_get_profiles(const struct xccdf_benchmark *benchmark); 01941 01949 struct xccdf_item_iterator *xccdf_benchmark_get_content(const struct xccdf_benchmark *benchmark); 01950 01954 struct oscap_string_iterator *xccdf_benchmark_get_metadata(const struct xccdf_benchmark *benchmark); 01955 01959 struct cpe_dict_model *xccdf_benchmark_get_cpe_list(const struct xccdf_benchmark *benchmark); 01960 01964 struct cpe_lang_model *xccdf_benchmark_get_cpe_lang_model(const struct xccdf_benchmark *benchmark); 01965 01969 const char *xccdf_profile_get_id(const struct xccdf_profile *profile); 01973 struct oscap_text_iterator *xccdf_profile_get_title(const struct xccdf_profile *profile); 01977 struct oscap_text_iterator *xccdf_profile_get_description(const struct xccdf_profile *profile); 01981 const char *xccdf_profile_get_version(const struct xccdf_profile *profile); 01985 const char *xccdf_profile_get_extends(const struct xccdf_profile *profile); 01989 struct xccdf_benchmark *xccdf_profile_get_benchmark(const struct xccdf_profile *profile); 01993 bool xccdf_profile_get_abstract(const struct xccdf_profile *profile); 01997 bool xccdf_profile_get_prohibit_changes(const struct xccdf_profile *profile); 02001 struct oscap_string_iterator *xccdf_profile_get_platforms(const struct xccdf_profile *profile); 02005 struct xccdf_status_iterator *xccdf_profile_get_statuses(const struct xccdf_profile *profile); 02009 struct oscap_reference_iterator *xccdf_profile_get_dc_statuses(const struct xccdf_profile *profile); 02013 struct oscap_reference_iterator *xccdf_profile_get_references(const struct xccdf_profile *profile); 02017 struct xccdf_status * xccdf_profile_get_status_current(const struct xccdf_profile *profile); 02021 struct xccdf_select_iterator *xccdf_profile_get_selects(const struct xccdf_profile *profile); 02025 struct xccdf_setvalue_iterator *xccdf_profile_get_setvalues(const struct xccdf_profile *profile); 02029 struct xccdf_refine_value_iterator *xccdf_profile_get_refine_values(const struct xccdf_profile *profile); 02033 struct xccdf_refine_rule_iterator *xccdf_profile_get_refine_rules(const struct xccdf_profile *profile); 02037 struct oscap_string_iterator *xccdf_profile_get_metadata(const struct xccdf_profile *profile); 02038 02044 struct xccdf_item *xccdf_rule_get_parent(const struct xccdf_rule *rule); 02045 02049 const char *xccdf_rule_get_id(const struct xccdf_rule *rule); 02053 struct oscap_text_iterator *xccdf_rule_get_title(const struct xccdf_rule *rule); 02057 struct oscap_text_iterator *xccdf_rule_get_description(const struct xccdf_rule *rule); 02061 const char *xccdf_rule_get_version(const struct xccdf_rule *rule); 02065 struct oscap_text_iterator *xccdf_rule_get_question(const struct xccdf_rule *rule); 02069 struct xccdf_warning_iterator *xccdf_rule_get_warnings(const struct xccdf_rule *rule); 02073 struct oscap_text_iterator *xccdf_rule_get_rationale(const struct xccdf_rule *rule); 02077 const char *xccdf_rule_get_cluster_id(const struct xccdf_rule *rule); 02081 float xccdf_rule_get_weight(const struct xccdf_rule *rule); 02085 bool xccdf_rule_set_weight(struct xccdf_rule *item, xccdf_numeric newval); 02089 const char *xccdf_rule_get_extends(const struct xccdf_rule *rule); 02093 bool xccdf_rule_get_abstract(const struct xccdf_rule *rule); 02097 bool xccdf_rule_get_prohibit_changes(const struct xccdf_rule *rule); 02101 bool xccdf_rule_get_hidden(const struct xccdf_rule *rule); 02105 bool xccdf_rule_get_selected(const struct xccdf_rule *rule); 02109 bool xccdf_rule_get_multiple(const struct xccdf_rule *rule); 02113 struct oscap_string_iterator *xccdf_rule_get_platforms(const struct xccdf_rule *rule); 02117 struct xccdf_status_iterator *xccdf_rule_get_statuses(const struct xccdf_rule *rule); 02121 struct oscap_reference_iterator *xccdf_rule_get_dc_statuses(const struct xccdf_rule *rule); 02125 struct oscap_reference_iterator *xccdf_rule_get_references(const struct xccdf_rule *rule); 02129 struct xccdf_status * xccdf_rule_get_status_current(const struct xccdf_rule *rule); 02133 const char *xccdf_rule_get_impact_metric(const struct xccdf_rule *rule); 02137 xccdf_role_t xccdf_rule_get_role(const struct xccdf_rule *rule); 02141 xccdf_level_t xccdf_rule_get_severity(const struct xccdf_rule *rule); 02145 struct xccdf_ident_iterator *xccdf_rule_get_idents(const struct xccdf_rule *rule); 02149 struct xccdf_check_iterator *xccdf_rule_get_checks(const struct xccdf_rule *rule); 02153 struct xccdf_profile_note_iterator *xccdf_rule_get_profile_notes(const struct xccdf_rule *rule); 02157 struct xccdf_fix_iterator *xccdf_rule_get_fixes(const struct xccdf_rule *rule); 02161 struct xccdf_fixtext_iterator *xccdf_rule_get_fixtexts(const struct xccdf_rule *rule); 02165 struct oscap_string_iterator *xccdf_rule_get_conflicts(const struct xccdf_rule* rule); 02169 struct oscap_stringlist_iterator *xccdf_rule_get_requires(const struct xccdf_rule* rule); 02173 struct oscap_string_iterator *xccdf_rule_get_metadata(const struct xccdf_rule *rule); 02174 02175 /* 02176 * Return group's parent in the grouping hierarchy. 02177 * Returned item will be either a group or a benchmark. 02178 * @memberof xccdf_group 02179 */ 02180 struct xccdf_item *xccdf_group_get_parent(const struct xccdf_group *group); 02181 02189 struct xccdf_item_iterator *xccdf_group_get_content(const struct xccdf_group *group); 02190 02192 struct xccdf_value_iterator *xccdf_group_get_values(const struct xccdf_group *group); 02193 02195 const char *xccdf_group_get_id(const struct xccdf_group *group); 02197 struct oscap_text_iterator *xccdf_group_get_title(const struct xccdf_group *group); 02199 struct oscap_text_iterator *xccdf_group_get_description(const struct xccdf_group *group); 02201 const char *xccdf_group_get_version(const struct xccdf_group *group); 02203 struct oscap_text_iterator *xccdf_group_get_question(const struct xccdf_group *group); 02205 struct xccdf_warning_iterator *xccdf_group_get_warnings(const struct xccdf_group *group); 02207 struct oscap_text_iterator *xccdf_group_get_rationale(const struct xccdf_group *group); 02209 const char *xccdf_group_get_cluster_id(const struct xccdf_group *group); 02211 float xccdf_group_get_weight(const struct xccdf_group *group); 02213 bool xccdf_group_set_weight(struct xccdf_group *item, xccdf_numeric newval); 02215 const char *xccdf_group_get_extends(const struct xccdf_group *group); 02217 bool xccdf_group_get_abstract(const struct xccdf_group *group); 02219 bool xccdf_group_get_prohibit_changes(const struct xccdf_group *group); 02221 bool xccdf_group_get_hidden(const struct xccdf_group *group); 02223 bool xccdf_group_get_selected(const struct xccdf_group *group); 02225 struct oscap_string_iterator *xccdf_group_get_platforms(const struct xccdf_group *group); 02227 struct xccdf_status_iterator *xccdf_group_get_statuses(const struct xccdf_group *group); 02229 struct oscap_reference_iterator *xccdf_group_get_dc_statuses(const struct xccdf_group *group); 02231 struct oscap_reference_iterator *xccdf_group_get_references(const struct xccdf_group *group); 02233 struct xccdf_status * xccdf_group_get_status_current(const struct xccdf_group *group); 02235 struct oscap_string_iterator *xccdf_group_get_conflicts(const struct xccdf_group* group); 02237 struct oscap_stringlist_iterator *xccdf_group_get_requires(const struct xccdf_group* group); 02239 struct oscap_string_iterator *xccdf_group_get_metadata(const struct xccdf_group *group); 02240 02242 struct oscap_text_iterator *xccdf_value_get_title(const struct xccdf_value *value); 02244 const char *xccdf_value_get_id(const struct xccdf_value *value); 02246 struct oscap_text_iterator *xccdf_value_get_description(const struct xccdf_value *value); 02248 const char *xccdf_value_get_extends(const struct xccdf_value *value); 02250 bool xccdf_value_get_abstract(const struct xccdf_value *value); 02252 bool xccdf_value_get_prohibit_changes(const struct xccdf_value *value); 02254 bool xccdf_value_get_hidden(const struct xccdf_value *value); 02256 bool xccdf_value_get_interactive(const struct xccdf_value *value); 02258 struct xccdf_status_iterator *xccdf_value_get_statuses(const struct xccdf_value *value); 02260 struct oscap_reference_iterator *xccdf_value_get_dc_statuses(const struct xccdf_value *value); 02262 struct oscap_reference_iterator *xccdf_value_get_references(const struct xccdf_value *value); 02264 struct xccdf_status * xccdf_value_get_status_current(const struct xccdf_value *value); 02266 xccdf_value_type_t xccdf_value_get_type(const struct xccdf_value *value); 02268 xccdf_interface_hint_t xccdf_value_get_interface_hint(const struct xccdf_value *value); 02270 xccdf_operator_t xccdf_value_get_oper(const struct xccdf_value *value); 02272 struct xccdf_value_instance *xccdf_value_get_instance_by_selector(const struct xccdf_value *value, const char *selector); 02274 bool xccdf_value_add_instance(struct xccdf_value *value, struct xccdf_value_instance *instance); 02276 struct xccdf_value_instance_iterator *xccdf_value_get_instances(const struct xccdf_value *item); 02278 struct oscap_string_iterator *xccdf_value_get_metadata(const struct xccdf_value *value); 02279 02281 void xccdf_value_instance_free(struct xccdf_value_instance *inst); 02283 struct xccdf_value_instance *xccdf_value_new_instance(struct xccdf_value *val); 02285 const char *xccdf_value_instance_get_selector(const struct xccdf_value_instance *item); 02287 bool xccdf_value_instance_set_selector(struct xccdf_value_instance *obj, const char *newval); 02289 xccdf_value_type_t xccdf_value_instance_get_type(const struct xccdf_value_instance *item); 02291 bool xccdf_value_instance_get_must_match(const struct xccdf_value_instance *item); 02293 bool xccdf_value_instance_set_must_match(struct xccdf_value_instance *obj, bool newval); 02295 bool xccdf_value_instance_get_value_boolean(const struct xccdf_value_instance *inst); 02297 bool xccdf_value_instance_set_value_boolean(struct xccdf_value_instance *inst, bool newval); 02299 xccdf_numeric xccdf_value_instance_get_value_number(const struct xccdf_value_instance *inst); 02301 bool xccdf_value_instance_set_value_number(struct xccdf_value_instance *inst, xccdf_numeric newval); 02303 const char *xccdf_value_instance_get_value_string(const struct xccdf_value_instance *inst); 02305 bool xccdf_value_instance_set_value_string(struct xccdf_value_instance *inst, const char *newval); 02307 bool xccdf_value_instance_get_defval_boolean(const struct xccdf_value_instance *inst); 02309 bool xccdf_value_instance_set_defval_boolean(struct xccdf_value_instance *inst, bool newval); 02311 xccdf_numeric xccdf_value_instance_get_defval_number(const struct xccdf_value_instance *inst); 02313 bool xccdf_value_instance_set_defval_number(struct xccdf_value_instance *inst, xccdf_numeric newval); 02315 const char *xccdf_value_instance_get_defval_string(const struct xccdf_value_instance *inst); 02317 bool xccdf_value_instance_set_defval_string(struct xccdf_value_instance *inst, const char *newval); 02319 xccdf_numeric xccdf_value_instance_get_lower_bound(const struct xccdf_value_instance *inst); 02321 bool xccdf_value_instance_set_lower_bound(struct xccdf_value_instance *inst, xccdf_numeric newval); 02323 xccdf_numeric xccdf_value_instance_get_upper_bound(const struct xccdf_value_instance *inst); 02325 bool xccdf_value_instance_set_upper_bound(struct xccdf_value_instance *inst, xccdf_numeric newval); 02327 const char *xccdf_value_instance_get_match(const struct xccdf_value_instance *inst); 02329 bool xccdf_value_instance_set_match(struct xccdf_value_instance *inst, const char *newval); 02331 const char * xccdf_value_instance_get_value(const struct xccdf_value_instance * val); 02332 02338 struct xccdf_item *xccdf_value_get_parent(const struct xccdf_value *value); 02339 02340 02342 time_t xccdf_status_get_date(const struct xccdf_status *status); 02344 xccdf_status_type_t xccdf_status_get_status(const struct xccdf_status *status); 02346 const char *xccdf_status_type_to_text(xccdf_status_type_t id); 02347 02349 const char *xccdf_notice_get_id(const struct xccdf_notice *notice); 02351 struct oscap_text *xccdf_notice_get_text(const struct xccdf_notice *notice); 02353 const char *xccdf_model_get_system(const struct xccdf_model *model); 02355 const char *xccdf_ident_get_id(const struct xccdf_ident *ident); 02357 const char *xccdf_ident_get_system(const struct xccdf_ident *ident); 02359 const char *xccdf_check_get_id(const struct xccdf_check *check); 02360 02366 bool xccdf_check_get_complex(const struct xccdf_check *check); 02367 02373 xccdf_bool_operator_t xccdf_check_get_oper(const struct xccdf_check *check); 02375 const char *xccdf_check_get_system(const struct xccdf_check *check); 02377 const char *xccdf_check_get_selector(const struct xccdf_check *check); 02379 const char *xccdf_check_get_content(const struct xccdf_check *check); 02381 bool xccdf_check_get_multicheck(const struct xccdf_check *check); 02383 bool xccdf_check_get_negate(const struct xccdf_check *check); 02385 //struct xccdf_rule *xccdf_check_get_parent(const struct xccdf_check *check); 02391 struct xccdf_check_iterator *xccdf_check_get_children(const struct xccdf_check *check); 02392 02394 const char *xccdf_check_content_ref_get_href(const struct xccdf_check_content_ref *ref); 02396 const char *xccdf_check_content_ref_get_name(const struct xccdf_check_content_ref *ref); 02398 const char *xccdf_profile_note_get_reftag(const struct xccdf_profile_note *note); 02400 struct oscap_text *xccdf_profile_note_get_text(const struct xccdf_profile_note *note); 02402 const char *xccdf_check_import_get_name(const struct xccdf_check_import *item); 02404 const char *xccdf_check_import_get_xpath(const struct xccdf_check_import *item); 02406 const char *xccdf_check_import_get_content(const struct xccdf_check_import *item); 02408 const char *xccdf_check_export_get_value(const struct xccdf_check_export *item); 02410 const char *xccdf_check_export_get_name(const struct xccdf_check_export *item); 02411 02413 const char *xccdf_fix_get_content(const struct xccdf_fix *fix); 02415 bool xccdf_fix_get_reboot(const struct xccdf_fix *fix); 02417 xccdf_strategy_t xccdf_fix_get_strategy(const struct xccdf_fix *fix); 02419 xccdf_level_t xccdf_fix_get_complexity(const struct xccdf_fix *fix); 02421 xccdf_level_t xccdf_fix_get_disruption(const struct xccdf_fix *fix); 02423 const char *xccdf_fix_get_id(const struct xccdf_fix *fix); 02425 const char *xccdf_fix_get_system(const struct xccdf_fix *fix); 02427 const char *xccdf_fix_get_platform(const struct xccdf_fix *fix); 02429 bool xccdf_fixtext_get_reboot(const struct xccdf_fixtext *fixtext); 02431 xccdf_strategy_t xccdf_fixtext_get_strategy(const struct xccdf_fixtext *fixtext); 02433 xccdf_level_t xccdf_fixtext_get_complexity(const struct xccdf_fixtext *fixtext); 02435 xccdf_level_t xccdf_fixtext_get_disruption(const struct xccdf_fixtext *fixtext); 02437 const char *xccdf_fixtext_get_fixref(const struct xccdf_fixtext *fixtext); 02439 struct oscap_text *xccdf_fixtext_get_text(const struct xccdf_fixtext *fixtext); 02441 const char *xccdf_value_get_version(const struct xccdf_value *value); 02443 struct oscap_text_iterator *xccdf_value_get_question(const struct xccdf_value *value); 02445 struct xccdf_warning_iterator *xccdf_value_get_warnings(const struct xccdf_value *value); 02447 const char *xccdf_value_get_version_update(const struct xccdf_value *value); 02449 const char *xccdf_value_get_version_time(const struct xccdf_value *value); 02451 struct xccdf_benchmark *xccdf_value_get_benchmark(const struct xccdf_value *value); 02453 struct oscap_string_iterator *xccdf_value_get_sources(const struct xccdf_value *value); 02455 const char *xccdf_value_get_cluster_id(const struct xccdf_value *value); 02456 02458 struct oscap_text_iterator *xccdf_item_get_question(const struct xccdf_item *item); 02460 struct xccdf_warning_iterator *xccdf_item_get_warnings(const struct xccdf_item *item); 02462 struct oscap_text_iterator *xccdf_item_get_rationale(const struct xccdf_item *item); 02464 const char *xccdf_item_get_cluster_id(const struct xccdf_item *item); 02466 const char *xccdf_item_get_version_update(const struct xccdf_item *item); 02468 const char *xccdf_item_get_version_time(const struct xccdf_item *item); 02470 float xccdf_item_get_weight(const struct xccdf_item *item); 02472 struct xccdf_benchmark *xccdf_item_get_benchmark(const struct xccdf_item *item); 02474 struct oscap_string_iterator *xccdf_item_get_platforms(const struct xccdf_item *item); 02475 02477 struct xccdf_warning_iterator *xccdf_benchmark_get_warnings(const struct xccdf_benchmark *benchmark); 02479 const char *xccdf_benchmark_get_version_update(const struct xccdf_benchmark *benchmark); 02481 const char *xccdf_benchmark_get_version_time(const struct xccdf_benchmark *benchmark); 02482 02484 const char *xccdf_profile_get_version_update(const struct xccdf_profile *profile); 02486 const char *xccdf_profile_get_version_time(const struct xccdf_profile *profile); 02488 bool xccdf_profile_get_tailoring(const struct xccdf_profile *profile); 02490 const char *xccdf_profile_get_note_tag(const struct xccdf_profile *profile); 02491 02493 const char *xccdf_rule_get_version_update(const struct xccdf_rule *rule); 02495 const char *xccdf_rule_get_version_time(const struct xccdf_rule *rule); 02497 struct xccdf_benchmark *xccdf_rule_get_benchmark(const struct xccdf_rule *rule); 02498 02500 const char *xccdf_group_get_version_time(const struct xccdf_group *group); 02502 const char *xccdf_group_get_version_update(const struct xccdf_group *group); 02504 struct xccdf_benchmark *xccdf_group_get_benchmark(const struct xccdf_group *group); 02505 02507 struct xccdf_check_import_iterator *xccdf_check_get_imports(const struct xccdf_check *check); 02509 struct xccdf_check_export_iterator *xccdf_check_get_exports(const struct xccdf_check *check); 02511 struct xccdf_check_content_ref_iterator *xccdf_check_get_content_refs(const struct xccdf_check *check); 02512 02514 bool xccdf_select_get_selected(const struct xccdf_select *select); 02516 const char *xccdf_select_get_item(const struct xccdf_select *select); 02518 struct oscap_text_iterator *xccdf_select_get_remarks(const struct xccdf_select *select); 02519 02521 xccdf_warning_category_t xccdf_warning_get_category(const struct xccdf_warning *warning); 02523 struct oscap_text *xccdf_warning_get_text(const struct xccdf_warning *warning); 02525 const char * xccdf_refine_rule_get_item(const struct xccdf_refine_rule* rr); 02527 const char * xccdf_refine_rule_get_selector(const struct xccdf_refine_rule* rr); 02529 xccdf_role_t xccdf_refine_rule_get_role(const struct xccdf_refine_rule* rr); 02531 xccdf_level_t xccdf_refine_rule_get_severity(const struct xccdf_refine_rule* rr); 02533 struct oscap_text_iterator* xccdf_refine_rule_get_remarks(const struct xccdf_refine_rule *rr); 02535 xccdf_numeric xccdf_refine_rule_get_weight(const struct xccdf_refine_rule *item); 02537 bool xccdf_refine_rule_weight_defined(const struct xccdf_refine_rule *item); 02539 const char * xccdf_refine_value_get_item(const struct xccdf_refine_value* rv); 02541 const char * xccdf_refine_value_get_selector(const struct xccdf_refine_value* rv); 02543 xccdf_operator_t xccdf_refine_value_get_oper(const struct xccdf_refine_value* rv); 02545 struct oscap_text_iterator* xccdf_refine_value_get_remarks(const struct xccdf_refine_value *rv); 02547 const char *xccdf_setvalue_get_item(const struct xccdf_setvalue* sv); 02549 const char *xccdf_setvalue_get_value(const struct xccdf_setvalue* sv); 02550 02552 const char *xccdf_plain_text_get_id(const struct xccdf_plain_text *item); 02554 const char *xccdf_plain_text_get_text(const struct xccdf_plain_text *item); 02555 02557 struct xccdf_benchmark *xccdf_result_get_benchmark(const struct xccdf_result *item); 02559 const char *xccdf_result_get_id(const struct xccdf_result *item); 02561 struct oscap_text_iterator *xccdf_result_get_title(const struct xccdf_result *item); 02563 const char *xccdf_result_get_version(const struct xccdf_result *item); 02565 struct oscap_string_iterator *xccdf_result_get_platforms(const struct xccdf_result *item); 02567 struct xccdf_status_iterator *xccdf_result_get_statuses(const struct xccdf_result *item); 02569 const char *xccdf_result_get_test_system(const struct xccdf_result *item); 02571 const char *xccdf_result_get_benchmark_uri(const struct xccdf_result *item); 02573 const char *xccdf_result_get_profile(const struct xccdf_result *item); 02575 struct xccdf_identity_iterator *xccdf_result_get_identities(const struct xccdf_result *item); 02577 struct oscap_string_iterator *xccdf_result_get_targets(const struct xccdf_result *item); 02579 struct oscap_string_iterator *xccdf_result_get_target_addresses(const struct xccdf_result *item); 02581 struct oscap_string_iterator *xccdf_result_get_applicable_platforms(const struct xccdf_result *item); 02583 struct oscap_string_iterator *xccdf_result_get_organizations(const struct xccdf_result *item); 02585 struct oscap_text_iterator *xccdf_result_get_remarks(const struct xccdf_result *item); 02587 struct xccdf_target_fact_iterator *xccdf_result_get_target_facts(const struct xccdf_result *item); 02589 struct xccdf_target_identifier_iterator *xccdf_result_get_target_id_refs(const struct xccdf_result *item); 02591 struct xccdf_setvalue_iterator *xccdf_result_get_setvalues(const struct xccdf_result *item); 02593 struct xccdf_rule_result_iterator *xccdf_result_get_rule_results(const struct xccdf_result *item); 02595 struct xccdf_score_iterator *xccdf_result_get_scores(const struct xccdf_result *item); 02597 const char * xccdf_result_get_start_time(const struct xccdf_result *item); 02599 const char * xccdf_result_get_end_time(const struct xccdf_result *item); 02601 struct oscap_string_iterator *xccdf_result_get_metadata(const struct xccdf_result *result); 02602 02613 bool xccdf_rule_result_override(struct xccdf_rule_result *rule_result, xccdf_test_result_type_t new_result, const char *time, const char *authority, struct oscap_text *remark); 02614 02616 const char * xccdf_rule_result_get_time(const struct xccdf_rule_result *item); 02618 xccdf_role_t xccdf_rule_result_get_role(const struct xccdf_rule_result *item); 02620 float xccdf_rule_result_get_weight(const struct xccdf_rule_result *item); 02622 xccdf_level_t xccdf_rule_result_get_severity(const struct xccdf_rule_result *item); 02624 xccdf_test_result_type_t xccdf_rule_result_get_result(const struct xccdf_rule_result *item); 02626 const char *xccdf_rule_result_get_version(const struct xccdf_rule_result *item); 02628 const char *xccdf_rule_result_get_idref(const struct xccdf_rule_result *item); 02630 struct xccdf_ident_iterator *xccdf_rule_result_get_idents(const struct xccdf_rule_result *item); 02632 struct xccdf_fix_iterator *xccdf_rule_result_get_fixes(const struct xccdf_rule_result *item); 02634 struct xccdf_check_iterator *xccdf_rule_result_get_checks(const struct xccdf_rule_result *item); 02636 struct xccdf_override_iterator *xccdf_rule_result_get_overrides(const struct xccdf_rule_result *item); 02638 struct xccdf_message_iterator *xccdf_rule_result_get_messages(const struct xccdf_rule_result *item); 02640 struct xccdf_instance_iterator *xccdf_rule_result_get_instances(const struct xccdf_rule_result *item); 02642 bool xccdf_identity_get_authenticated(const struct xccdf_identity *item); 02644 bool xccdf_identity_get_privileged(const struct xccdf_identity *item); 02646 const char *xccdf_identity_get_name(const struct xccdf_identity *item); 02648 xccdf_numeric xccdf_score_get_maximum(const struct xccdf_score *item); 02650 xccdf_numeric xccdf_score_get_score(const struct xccdf_score *item); 02652 const char *xccdf_score_get_system(const struct xccdf_score *item); 02654 const char *xccdf_override_get_time(const struct xccdf_override *item); 02656 xccdf_test_result_type_t xccdf_override_get_new_result(const struct xccdf_override *item); 02658 xccdf_test_result_type_t xccdf_override_get_old_result(const struct xccdf_override *item); 02660 const char *xccdf_override_get_authority(const struct xccdf_override *item); 02662 struct oscap_text *xccdf_override_get_remark(const struct xccdf_override *item); 02664 xccdf_message_severity_t xccdf_message_get_severity(const struct xccdf_message *item); 02666 const char *xccdf_message_get_content(const struct xccdf_message *item); 02668 xccdf_value_type_t xccdf_target_fact_get_type(const struct xccdf_target_fact *item); 02670 const char *xccdf_target_fact_get_value(const struct xccdf_target_fact *item); 02672 const char *xccdf_target_fact_get_name(const struct xccdf_target_fact *item); 02674 void* xccdf_target_identifier_get_xml_node(const struct xccdf_target_identifier *item); 02676 const char *xccdf_target_identifier_get_system(const struct xccdf_target_identifier *item); 02678 const char *xccdf_target_identifier_get_href(const struct xccdf_target_identifier *item); 02680 const char *xccdf_target_identifier_get_name(const struct xccdf_target_identifier *item); 02682 const char *xccdf_instance_get_context(const struct xccdf_instance *item); 02684 const char *xccdf_instance_get_parent_context(const struct xccdf_instance *item); 02686 const char *xccdf_instance_get_content(const struct xccdf_instance *item); 02688 struct xccdf_tailoring *xccdf_tailoring_import_source(struct oscap_source *source, struct xccdf_benchmark *benchmark); 02689 /* 02690 * @memberof xccdf_tailoring 02691 * @deprecated This function has been deprecated by @ref xccdf_tailoring_import_source. 02692 * This function may be dropped from later versions of the library. 02693 */ 02694 OSCAP_DEPRECATED(struct xccdf_tailoring *xccdf_tailoring_import(const char *file, struct xccdf_benchmark *benchmark)); 02695 02697 const char *xccdf_tailoring_get_id(const struct xccdf_tailoring *tailoring); 02699 const char *xccdf_tailoring_get_version(const struct xccdf_tailoring *tailoring); 02701 const char *xccdf_tailoring_get_version_update(const struct xccdf_tailoring *tailoring); 02703 const char *xccdf_tailoring_get_version_time(const struct xccdf_tailoring *tailoring); 02705 const char *xccdf_tailoring_get_benchmark_ref(const struct xccdf_tailoring *tailoring); 02707 const char *xccdf_tailoring_get_benchmark_ref_version(const struct xccdf_tailoring *tailoring); 02709 struct oscap_string_iterator *xccdf_tailoring_get_metadata(const struct xccdf_tailoring *tailoring); 02711 struct xccdf_profile_iterator *xccdf_tailoring_get_profiles(const struct xccdf_tailoring *tailoring); 02713 struct xccdf_status_iterator *xccdf_tailoring_get_statuses(const struct xccdf_tailoring *tailoring); 02715 struct oscap_reference_iterator *xccdf_tailoring_get_dc_statuses(const struct xccdf_tailoring *tailoring); 02723 struct xccdf_profile *xccdf_tailoring_get_profile_by_id(const struct xccdf_tailoring *tailoring, const char *profile_id); 02724 02725 /************************************************************ 02726 ** @} End of Getters group */ 02727 02728 /************************************************************/ 02736 02737 bool xccdf_item_set_weight(struct xccdf_item *item, xccdf_numeric newval); 02739 bool xccdf_item_set_id(struct xccdf_item *item, const char *newval); 02741 bool xccdf_item_set_cluster_id(struct xccdf_item *item, const char *newval); 02743 bool xccdf_item_set_extends(struct xccdf_item *item, const char *newval); 02745 bool xccdf_item_set_version(struct xccdf_item *item, const char *newval); 02747 bool xccdf_item_set_version_time(struct xccdf_item *item, const char *newval); 02749 bool xccdf_item_set_version_update(struct xccdf_item *item, const char *newval); 02751 bool xccdf_item_set_abstract(struct xccdf_item *item, bool newval); 02753 bool xccdf_item_set_hidden(struct xccdf_item *item, bool newval); 02755 bool xccdf_item_set_prohibit_changes(struct xccdf_item *item, bool newval); 02757 bool xccdf_item_set_selected(struct xccdf_item *item, bool newval); 02758 02760 bool xccdf_item_add_metadata(struct xccdf_item *item, const char* metadata); 02761 02763 bool xccdf_benchmark_set_resolved(struct xccdf_benchmark *item, bool newval); 02764 02766 bool xccdf_benchmark_set_style_href(struct xccdf_benchmark *item, const char *newval); 02768 bool xccdf_benchmark_set_style(struct xccdf_benchmark *item, const char *newval); 02770 bool xccdf_benchmark_set_id(struct xccdf_benchmark *item, const char *newval); 02772 bool xccdf_benchmark_set_version(struct xccdf_benchmark *item, const char *newval); 02774 bool xccdf_benchmark_set_version_time(struct xccdf_benchmark *item, const char *newval); 02776 bool xccdf_benchmark_set_version_update(struct xccdf_benchmark *item, const char *newval); 02778 bool xccdf_benchmark_set_schema_version(struct xccdf_benchmark* item, const struct xccdf_version_info* newval); 02780 bool xccdf_benchmark_add_metadata(struct xccdf_benchmark* item, const char* metadata); 02782 bool xccdf_benchmark_set_cpe_list(struct xccdf_benchmark* item, struct cpe_dict_model* cpe_list); 02784 bool xccdf_benchmark_set_cpe_lang_model(struct xccdf_benchmark* item, struct cpe_lang_model* cpe_lang_model); 02786 bool xccdf_profile_set_note_tag(struct xccdf_profile *item, const char *newval); 02788 bool xccdf_profile_set_id(struct xccdf_profile *item, const char *newval); 02790 bool xccdf_profile_set_abstract(struct xccdf_profile *item, bool newval); 02792 bool xccdf_profile_set_prohibit_changes(struct xccdf_profile *item, bool newval); 02794 bool xccdf_profile_set_extends(struct xccdf_profile *item, const char *newval); 02796 bool xccdf_profile_set_version(struct xccdf_profile *item, const char *newval); 02798 bool xccdf_profile_set_version_time(struct xccdf_profile *item, const char *newval); 02800 bool xccdf_profile_set_version_update(struct xccdf_profile *item, const char *newval); 02802 bool xccdf_profile_set_tailoring(struct xccdf_profile *item, bool tailoring); 02804 bool xccdf_profile_add_metadata(struct xccdf_profile* item, const char* metadata); 02805 02807 bool xccdf_rule_set_id(struct xccdf_rule *item, const char *newval); 02809 bool xccdf_rule_set_cluster_id(struct xccdf_rule *item, const char *newval); 02811 bool xccdf_rule_set_extends(struct xccdf_rule *item, const char *newval); 02813 bool xccdf_rule_set_version(struct xccdf_rule *item, const char *newval); 02815 bool xccdf_rule_set_version_time(struct xccdf_rule *item, const char *newval); 02817 bool xccdf_rule_set_version_update(struct xccdf_rule *item, const char *newval); 02819 bool xccdf_rule_set_abstract(struct xccdf_rule *item, bool newval); 02821 bool xccdf_rule_set_hidden(struct xccdf_rule *item, bool newval); 02823 bool xccdf_rule_set_prohibit_changes(struct xccdf_rule *item, bool newval); 02825 bool xccdf_rule_set_selected(struct xccdf_rule *item, bool newval); 02827 bool xccdf_rule_set_multiple(struct xccdf_rule *item, bool newval); 02829 //bool xccdf_rule_set_selector(struct xccdf_rule *item, const char * selector); 02831 bool xccdf_rule_set_impact_metric(struct xccdf_rule *item, const char *newval); 02833 bool xccdf_rule_set_role(struct xccdf_rule *item, xccdf_role_t newval); 02835 bool xccdf_rule_set_severity(struct xccdf_rule *item, xccdf_level_t newval); 02837 bool xccdf_rule_add_metadata(struct xccdf_rule* item, const char* metadata); 02838 02840 bool xccdf_group_set_id(struct xccdf_group *item, const char *newval); 02842 bool xccdf_group_set_cluster_id(struct xccdf_group *item, const char *newval); 02844 bool xccdf_group_set_extends(struct xccdf_group *item, const char *newval); 02846 bool xccdf_group_set_version(struct xccdf_group *item, const char *newval); 02848 bool xccdf_group_set_version_time(struct xccdf_group *item, const char *newval); 02850 bool xccdf_group_set_version_update(struct xccdf_group *item, const char *newval); 02852 bool xccdf_group_set_abstract(struct xccdf_group *item, bool newval); 02854 bool xccdf_group_set_hidden(struct xccdf_group *item, bool newval); 02856 bool xccdf_group_set_prohibit_changes(struct xccdf_group *item, bool newval); 02858 bool xccdf_group_set_selected(struct xccdf_group *item, bool newval); 02860 bool xccdf_group_add_metadata(struct xccdf_group* item, const char* metadata); 02861 02863 bool xccdf_value_set_id(struct xccdf_value *item, const char *newval); 02865 bool xccdf_value_set_cluster_id(struct xccdf_value *item, const char *newval); 02867 bool xccdf_value_set_extends(struct xccdf_value *item, const char *newval); 02869 bool xccdf_value_set_version(struct xccdf_value *item, const char *newval); 02871 bool xccdf_value_set_version_time(struct xccdf_value *item, const char *newval); 02873 bool xccdf_value_set_version_update(struct xccdf_value *item, const char *newval); 02875 bool xccdf_value_set_abstract(struct xccdf_value *item, bool newval); 02877 bool xccdf_value_set_hidden(struct xccdf_value *item, bool newval); 02879 bool xccdf_value_set_multiple(struct xccdf_value *item, bool newval); 02881 bool xccdf_value_set_prohibit_changes(struct xccdf_value *item, bool newval); 02883 bool xccdf_value_set_oper(struct xccdf_value * item, xccdf_operator_t oper); 02885 bool xccdf_value_set_interactive(struct xccdf_value *item, bool newval); 02887 bool xccdf_value_add_metadata(struct xccdf_value* item, const char* metadata); 02888 02890 bool xccdf_status_set_date(struct xccdf_status *obj, time_t newval); 02892 bool xccdf_status_set_status(struct xccdf_status *obj, xccdf_status_type_t newval); 02893 02895 bool xccdf_notice_set_id(struct xccdf_notice *obj, const char *newval); 02897 bool xccdf_notice_set_text(struct xccdf_notice *obj, struct oscap_text *newval); 02898 02900 bool xccdf_model_set_system(struct xccdf_model *obj, const char *newval); 02901 02903 bool xccdf_check_set_id(struct xccdf_check *obj, const char *newval); 02905 bool xccdf_check_set_system(struct xccdf_check *obj, const char *newval); 02907 bool xccdf_check_set_selector(struct xccdf_check *obj, const char *newval); 02909 bool xccdf_check_set_content(struct xccdf_check *obj, const char *newval); 02911 bool xccdf_check_set_oper(struct xccdf_check *obj, xccdf_bool_operator_t newval); 02913 bool xccdf_check_set_multicheck(struct xccdf_check *obj, bool newval); 02915 bool xccdf_check_set_negate(struct xccdf_check *obj, bool newval); 02916 02918 bool xccdf_check_content_ref_set_name(struct xccdf_check_content_ref *obj, const char *newval); 02920 bool xccdf_check_content_ref_set_href(struct xccdf_check_content_ref *obj, const char *newval); 02921 02923 bool xccdf_profile_note_set_reftag(struct xccdf_profile_note *obj, const char *newval); 02925 bool xccdf_profile_note_set_text(struct xccdf_profile_note *obj, struct oscap_text *newval); 02926 02928 bool xccdf_check_import_set_name(struct xccdf_check_import *obj, const char *newval); 02930 bool xccdf_check_import_set_xpath(struct xccdf_check_import *obj, const char *newval); 02932 bool xccdf_check_import_set_content(struct xccdf_check_import *obj, const char *newval); 02933 02935 bool xccdf_check_export_set_name(struct xccdf_check_export *obj, const char *newval); 02937 bool xccdf_check_export_set_value(struct xccdf_check_export *obj, const char *newval); 02938 02940 bool xccdf_fix_set_strategy(struct xccdf_fix *obj, xccdf_strategy_t newval); 02942 bool xccdf_fix_set_disruption(struct xccdf_fix *obj, xccdf_level_t newval); 02944 bool xccdf_fix_set_complexity(struct xccdf_fix *obj, xccdf_level_t newval); 02946 bool xccdf_fix_set_reboot(struct xccdf_fix *obj, bool newval); 02948 bool xccdf_fix_set_content(struct xccdf_fix *obj, const char *newval); 02950 bool xccdf_fix_set_system(struct xccdf_fix *obj, const char *newval); 02952 bool xccdf_fix_set_platform(struct xccdf_fix *obj, const char *newval); 02954 bool xccdf_fix_set_id(struct xccdf_fix *obj, const char *newval); 02955 02957 bool xccdf_fixtext_set_strategy(struct xccdf_fixtext *obj, xccdf_strategy_t newval); 02959 bool xccdf_fixtext_set_disruption(struct xccdf_fixtext *obj, xccdf_level_t newval); 02961 bool xccdf_fixtext_set_complexity(struct xccdf_fixtext *obj, xccdf_level_t newval); 02963 bool xccdf_fixtext_set_reboot(struct xccdf_fixtext *obj, bool newval); 02965 bool xccdf_fixtext_set_text(struct xccdf_fixtext *obj, struct oscap_text *newval); 02967 bool xccdf_fixtext_set_fixref(struct xccdf_fixtext *obj, const char *newval); 02968 02970 bool xccdf_select_set_item(struct xccdf_select *obj, const char *newval); 02972 bool xccdf_select_set_selected(struct xccdf_select *obj, bool newval); 02973 02975 bool xccdf_warning_set_category(struct xccdf_warning *obj, xccdf_warning_category_t newval); 02977 bool xccdf_warning_set_text(struct xccdf_warning *obj, struct oscap_text *newval); 02979 struct xccdf_refine_rule *xccdf_refine_rule_new(void); 02980 02982 struct xccdf_refine_rule * xccdf_refine_rule_clone(const struct xccdf_refine_rule * old_rule); 02984 bool xccdf_refine_rule_set_item(struct xccdf_refine_rule *obj, const char *newval); 02986 bool xccdf_refine_rule_set_selector(struct xccdf_refine_rule *obj, const char *newval); 02988 bool xccdf_refine_rule_set_role(struct xccdf_refine_rule *obj, xccdf_role_t newval); 02990 bool xccdf_refine_rule_set_severity(struct xccdf_refine_rule *obj, xccdf_level_t newval); 02992 bool xccdf_refine_rule_set_weight(struct xccdf_refine_rule *obj, xccdf_numeric newval); 02993 02995 struct xccdf_refine_value *xccdf_refine_value_new(void); 02997 struct xccdf_refine_value * xccdf_refine_value_clone(const struct xccdf_refine_value * old_value); 02999 bool xccdf_refine_value_set_item(struct xccdf_refine_value *obj, const char *newval); 03001 bool xccdf_refine_value_set_selector(struct xccdf_refine_value *obj, const char *newval); 03003 bool xccdf_refine_value_set_oper(struct xccdf_refine_value *obj, xccdf_operator_t newval); 03004 03006 struct xccdf_setvalue *xccdf_setvalue_new(void); 03008 struct xccdf_setvalue * xccdf_setvalue_clone(const struct xccdf_setvalue * old_value); 03010 bool xccdf_setvalue_set_item(struct xccdf_setvalue *obj, const char *newval); 03012 bool xccdf_setvalue_set_value(struct xccdf_setvalue *obj, const char *newval); 03014 bool xccdf_plain_text_set_id(struct xccdf_plain_text *obj, const char *newval); 03016 bool xccdf_plain_text_set_text(struct xccdf_plain_text *obj, const char *newval); 03017 03019 bool xccdf_result_set_id(struct xccdf_result *item, const char *newval); 03021 bool xccdf_result_set_test_system(struct xccdf_result *item, const char *newval); 03023 bool xccdf_result_set_benchmark_uri(struct xccdf_result *item, const char *newval); 03025 bool xccdf_result_set_profile(struct xccdf_result *item, const char *newval); 03027 bool xccdf_result_set_start_time(struct xccdf_result *item, const char *newval); 03029 bool xccdf_result_set_end_time(struct xccdf_result *item, const char *newval); 03031 bool xccdf_result_set_version(struct xccdf_result *item, const char *newval); 03033 bool xccdf_result_add_metadata(struct xccdf_result *item, const char *metadata); 03034 03036 bool xccdf_rule_result_set_time(struct xccdf_rule_result *obj, const char *newval); 03038 bool xccdf_rule_result_set_role(struct xccdf_rule_result *obj, xccdf_role_t newval); 03040 bool xccdf_rule_result_set_weight(struct xccdf_rule_result *obj, float newval); 03042 bool xccdf_rule_result_set_severity(struct xccdf_rule_result *obj, xccdf_level_t newval); 03044 bool xccdf_rule_result_set_result(struct xccdf_rule_result *obj, xccdf_test_result_type_t newval); 03046 bool xccdf_rule_result_set_version(struct xccdf_rule_result *obj, const char *newval); 03048 bool xccdf_rule_result_set_idref(struct xccdf_rule_result *obj, const char *newval); 03049 03051 bool xccdf_identity_set_authenticated(struct xccdf_identity *obj, bool newval); 03053 bool xccdf_identity_set_privileged(struct xccdf_identity *obj, bool newval); 03055 bool xccdf_identity_set_name(struct xccdf_identity *obj, const char *newval); 03056 03058 bool xccdf_score_set_maximum(struct xccdf_score *obj, xccdf_numeric newval); 03060 bool xccdf_score_set_score(struct xccdf_score *obj, xccdf_numeric newval); 03062 bool xccdf_score_set_system(struct xccdf_score *obj, const char *newval); 03063 03065 bool xccdf_override_set_time(struct xccdf_override *obj, const char *newval); 03067 bool xccdf_override_set_new_result(struct xccdf_override *obj, xccdf_test_result_type_t newval); 03069 bool xccdf_override_set_old_result(struct xccdf_override *obj, xccdf_test_result_type_t newval); 03071 bool xccdf_override_set_authority(struct xccdf_override *obj, const char *newval); 03073 bool xccdf_override_set_remark(struct xccdf_override *obj, struct oscap_text *newval); 03074 03076 bool xccdf_message_set_severity(struct xccdf_message *obj, xccdf_message_severity_t newval); 03078 bool xccdf_message_set_content(struct xccdf_message *obj, const char *newval); 03079 03081 bool xccdf_target_fact_set_string(struct xccdf_target_fact *fact, const char *str); 03083 bool xccdf_target_fact_set_number(struct xccdf_target_fact *fact, xccdf_numeric val); 03085 bool xccdf_target_fact_set_boolean(struct xccdf_target_fact *fact, bool val); 03087 bool xccdf_target_fact_set_name(struct xccdf_target_fact *obj, const char *newval); 03088 03090 bool xccdf_target_identifier_set_xml_node(struct xccdf_target_identifier *ti, void* node); 03092 bool xccdf_target_identifier_set_system(struct xccdf_target_identifier *ti, const char *newval); 03094 bool xccdf_target_identifier_set_href(struct xccdf_target_identifier *ti, const char *newval); 03096 bool xccdf_target_identifier_set_name(struct xccdf_target_identifier *ti, const char *newval); 03097 03099 bool xccdf_instance_set_context(struct xccdf_instance *obj, const char *newval); 03101 bool xccdf_instance_set_parent_context(struct xccdf_instance *obj, const char *newval); 03103 bool xccdf_instance_set_content(struct xccdf_instance *obj, const char *newval); 03104 03106 bool xccdf_tailoring_set_id(struct xccdf_tailoring *tailoring, const char* newval); 03108 bool xccdf_tailoring_set_version(struct xccdf_tailoring *tailoring, const char* newval); 03110 bool xccdf_tailoring_set_version_update(struct xccdf_tailoring *tailoring, const char *newval); 03112 bool xccdf_tailoring_set_version_time(struct xccdf_tailoring *tailoring, const char *newval); 03114 bool xccdf_tailoring_set_benchmark_ref(struct xccdf_tailoring *tailoring, const char *newval); 03116 bool xccdf_tailoring_set_benchmark_ref_version(struct xccdf_tailoring *tailoring, const char *newval); 03117 03119 bool xccdf_tailoring_add_profile(struct xccdf_tailoring *tailoring, struct xccdf_profile *profile); 03132 bool xccdf_tailoring_remove_profile(struct xccdf_tailoring *tailoring, struct xccdf_profile *profile); 03134 bool xccdf_tailoring_resolve(struct xccdf_tailoring *tailoring, struct xccdf_benchmark *benchmark); 03135 03136 // @memberof xccdf_ident 03137 void xccdf_ident_set_id(struct xccdf_ident * ident, const char *id); 03138 // @memberof xccdf_ident 03139 void xccdf_ident_set_system(struct xccdf_ident * ident, const char *sys); 03140 03142 bool xccdf_benchmark_add_result(struct xccdf_benchmark *bench, struct xccdf_result *result); 03143 03145 bool xccdf_benchmark_add_description(struct xccdf_benchmark *item, struct oscap_text *newval); 03147 bool xccdf_benchmark_add_platform(struct xccdf_benchmark *item, const char *newval); 03149 bool xccdf_benchmark_add_reference(struct xccdf_benchmark *item, struct oscap_reference *newval); 03151 bool xccdf_benchmark_add_status(struct xccdf_benchmark *item, struct xccdf_status *newval); 03153 bool xccdf_benchmark_add_dc_status(struct xccdf_benchmark *item, struct oscap_reference *newval); 03155 bool xccdf_benchmark_add_title(struct xccdf_benchmark *item, struct oscap_text *newval); 03157 bool xccdf_benchmark_add_front_matter(struct xccdf_benchmark *item, struct oscap_text *newval); 03159 //bool xccdf_benchmark_add_item(struct xccdf_benchmark *item, struct xccdf_item *newval); 03161 bool xccdf_benchmark_add_model(struct xccdf_benchmark *item, struct xccdf_model *newval); 03163 bool xccdf_benchmark_add_notice(struct xccdf_benchmark *item, struct xccdf_notice *newval); 03165 bool xccdf_benchmark_add_plain_text(struct xccdf_benchmark *item, struct xccdf_plain_text *newval); 03167 bool xccdf_benchmark_add_profile(struct xccdf_benchmark *item, struct xccdf_profile *newval); 03169 bool xccdf_benchmark_add_rear_matter(struct xccdf_benchmark *item, struct oscap_text *newval); 03171 bool xccdf_benchmark_add_rule(struct xccdf_benchmark *benchmark, struct xccdf_rule *rule); 03173 bool xccdf_benchmark_add_group(struct xccdf_benchmark *benchmark, struct xccdf_group *group); 03175 bool xccdf_benchmark_add_value(struct xccdf_benchmark *benchmark, struct xccdf_value *value); 03177 bool xccdf_benchmark_add_content(struct xccdf_benchmark *bench, struct xccdf_item *item); 03178 03180 bool xccdf_profile_add_select(struct xccdf_profile *item, struct xccdf_select *newval); 03182 bool xccdf_profile_add_setvalue(struct xccdf_profile *item, struct xccdf_setvalue *newval); 03184 bool xccdf_profile_add_refine_value(struct xccdf_profile *item, struct xccdf_refine_value *newval); 03186 bool xccdf_profile_add_refine_rule(struct xccdf_profile *item, struct xccdf_refine_rule *newval); 03187 03189 bool xccdf_profile_add_description(struct xccdf_profile *item, struct oscap_text *newval); 03191 bool xccdf_profile_add_platform(struct xccdf_profile *item, const char *newval); 03193 bool xccdf_profile_add_reference(struct xccdf_profile *item, struct oscap_reference *newval); 03195 bool xccdf_profile_add_status(struct xccdf_profile *item, struct xccdf_status *newval); 03197 bool xccdf_profile_add_dc_status(struct xccdf_profile *item, struct oscap_reference *newval); 03199 bool xccdf_profile_add_title(struct xccdf_profile *item, struct oscap_text *newval); 03200 03202 bool xccdf_rule_add_description(struct xccdf_rule *item, struct oscap_text *newval); 03204 bool xccdf_rule_add_platform(struct xccdf_rule *item, const char *newval); 03206 bool xccdf_rule_add_question(struct xccdf_rule *item, struct oscap_text *newval); 03208 bool xccdf_rule_add_rationale(struct xccdf_rule *item, struct oscap_text *newval); 03210 bool xccdf_rule_add_reference(struct xccdf_rule *item, struct oscap_reference *newval); 03212 bool xccdf_rule_add_status(struct xccdf_rule *item, struct xccdf_status *newval); 03214 bool xccdf_rule_add_dc_status(struct xccdf_rule *item, struct oscap_reference *newval); 03216 bool xccdf_rule_add_title(struct xccdf_rule *item, struct oscap_text *newval); 03218 bool xccdf_rule_add_warning(struct xccdf_rule *item, struct xccdf_warning *newval); 03220 bool xccdf_rule_add_ident(struct xccdf_rule *item, struct xccdf_ident *newval); 03222 bool xccdf_rule_add_check(struct xccdf_rule *item, struct xccdf_check *newval); 03224 bool xccdf_rule_add_profile_note(struct xccdf_rule *item, struct xccdf_profile_note *newval); 03226 bool xccdf_rule_add_fix(struct xccdf_rule *item, struct xccdf_fix *newval); 03228 bool xccdf_rule_add_fixtext(struct xccdf_rule *item, struct xccdf_fixtext *newval); 03229 03231 bool xccdf_group_add_description(struct xccdf_group *item, struct oscap_text *newval); 03233 bool xccdf_group_add_platform(struct xccdf_group *item, const char *newval); 03235 bool xccdf_group_add_question(struct xccdf_group *item, struct oscap_text *newval); 03237 bool xccdf_group_add_rationale(struct xccdf_group *item, struct oscap_text *newval); 03239 bool xccdf_group_add_reference(struct xccdf_group *item, struct oscap_reference *newval); 03241 bool xccdf_group_add_status(struct xccdf_group *item, struct xccdf_status *newval); 03243 bool xccdf_group_add_dc_status(struct xccdf_group *item, struct oscap_reference *newval); 03245 bool xccdf_group_add_title(struct xccdf_group *item, struct oscap_text *newval); 03247 bool xccdf_group_add_warning(struct xccdf_group *item, struct xccdf_warning *newval); 03249 bool xccdf_group_add_rule(struct xccdf_group *group, struct xccdf_rule *item); 03251 bool xccdf_group_add_group(struct xccdf_group *group, struct xccdf_group *item); 03253 bool xccdf_group_add_value(struct xccdf_group *group, struct xccdf_value *item); 03255 bool xccdf_group_add_content(struct xccdf_group *rule, struct xccdf_item *item); 03256 03258 bool xccdf_value_add_description(struct xccdf_value *item, struct oscap_text *newval); 03260 bool xccdf_value_add_question(struct xccdf_value *item, struct oscap_text *newval); 03262 bool xccdf_value_add_reference(struct xccdf_value *item, struct oscap_reference *newval); 03264 bool xccdf_value_add_status(struct xccdf_value *item, struct xccdf_status *newval); 03266 bool xccdf_value_add_dc_status(struct xccdf_value *item, struct oscap_reference *newval); 03268 bool xccdf_value_add_title(struct xccdf_value *item, struct oscap_text *newval); 03270 bool xccdf_value_add_warning(struct xccdf_value *item, struct xccdf_warning *newval); 03271 03273 bool xccdf_check_add_import(struct xccdf_check *obj, struct xccdf_check_import *item); 03275 bool xccdf_check_add_export(struct xccdf_check *obj, struct xccdf_check_export *item); 03277 bool xccdf_check_add_content_ref(struct xccdf_check *obj, struct xccdf_check_content_ref *item); 03279 bool xccdf_check_add_child(struct xccdf_check *obj, struct xccdf_check *item); 03281 bool xccdf_select_add_remark(struct xccdf_select *obj, struct oscap_text *item); 03283 bool xccdf_refine_value_add_remark(struct xccdf_refine_value *obj, struct oscap_text *item); 03285 bool xccdf_result_add_rule_result(struct xccdf_result *item, struct xccdf_rule_result *newval); 03287 bool xccdf_result_add_setvalue(struct xccdf_result *item, struct xccdf_setvalue *newval); 03289 bool xccdf_result_add_target_fact(struct xccdf_result *item, struct xccdf_target_fact *newval); 03291 bool xccdf_result_add_target_identifier(struct xccdf_result *item, struct xccdf_target_identifier *newval); 03293 bool xccdf_result_add_applicable_platform(struct xccdf_result *item, const char *newval); 03295 bool xccdf_result_add_remark(struct xccdf_result *item, struct oscap_text *newval); 03297 bool xccdf_result_add_organization(struct xccdf_result *item, const char *newval); 03299 bool xccdf_result_add_target(struct xccdf_result *item, const char *newval); 03301 bool xccdf_result_add_identity(struct xccdf_result *item, struct xccdf_identity *newval); 03303 bool xccdf_result_add_score(struct xccdf_result *item, struct xccdf_score *newval); 03305 bool xccdf_result_add_title(struct xccdf_result *item, struct oscap_text *newval); 03307 bool xccdf_result_add_target_address(struct xccdf_result *item, const char *newval); 03309 bool xccdf_result_add_applicable_platform(struct xccdf_result *item, const char *newval); 03311 int xccdf_result_recalculate_scores(struct xccdf_result *result, struct xccdf_item *benchmark); 03313 bool xccdf_rule_result_add_ident(struct xccdf_rule_result *obj, struct xccdf_ident *item); 03315 bool xccdf_rule_result_add_fix(struct xccdf_rule_result *obj, struct xccdf_fix *item); 03317 bool xccdf_rule_result_add_check(struct xccdf_rule_result *obj, struct xccdf_check *item); 03319 bool xccdf_rule_result_add_override(struct xccdf_rule_result *obj, struct xccdf_override *item); 03321 bool xccdf_rule_result_add_message(struct xccdf_rule_result *obj, struct xccdf_message *item); 03323 bool xccdf_rule_result_add_instance(struct xccdf_rule_result *obj, struct xccdf_instance *item); 03325 bool xccdf_item_add_description(struct xccdf_item *item, struct oscap_text *newval); 03327 bool xccdf_item_add_platform(struct xccdf_item *item, const char *newval); 03329 bool xccdf_item_add_question(struct xccdf_item *item, struct oscap_text *newval); 03331 bool xccdf_item_add_rationale(struct xccdf_item *item, struct oscap_text *newval); 03333 bool xccdf_item_add_reference(struct xccdf_item *item, struct oscap_reference *newval); 03335 bool xccdf_item_add_dc_status(struct xccdf_item *item, struct oscap_reference *newval); 03337 bool xccdf_item_add_status(struct xccdf_item *item, struct xccdf_status *newval); 03339 bool xccdf_item_add_title(struct xccdf_item *item, struct oscap_text *newval); 03341 bool xccdf_item_add_warning(struct xccdf_item *item, struct xccdf_warning *newval); 03343 bool xccdf_refine_rule_add_remark(struct xccdf_refine_rule *obj, struct oscap_text *item); 03344 03346 bool xccdf_rule_add_requires(struct xccdf_rule *rule, struct oscap_stringlist *requires); 03348 bool xccdf_group_add_requires(struct xccdf_group *group, struct oscap_stringlist *requires); 03350 bool xccdf_item_add_requires(struct xccdf_item *item, struct oscap_stringlist *requires); 03352 bool xccdf_rule_add_conflicts(struct xccdf_rule *rule, const char *conflicts); 03354 bool xccdf_group_add_conflicts(struct xccdf_group *group, const char *conflicts); 03356 bool xccdf_item_add_conflicts(struct xccdf_item *item, const char *conflicts); 03357 03358 /************************************************************ 03359 ** @} End of Setters group */ 03360 03361 // remove operations 03362 03364 void xccdf_notice_iterator_remove(struct xccdf_notice_iterator *it); 03366 void xccdf_model_iterator_remove(struct xccdf_model_iterator *it); 03368 void xccdf_profile_iterator_remove(struct xccdf_profile_iterator *it); 03370 void xccdf_item_iterator_remove(struct xccdf_item_iterator *it); 03372 void xccdf_status_iterator_remove(struct xccdf_status_iterator *it); 03374 void xccdf_profile_note_iterator_remove(struct xccdf_profile_note_iterator *it); 03376 void xccdf_refine_value_iterator_remove(struct xccdf_refine_value_iterator *it); 03378 void xccdf_refine_rule_iterator_remove(struct xccdf_refine_rule_iterator *it); 03380 void xccdf_setvalue_iterator_remove(struct xccdf_setvalue_iterator *it); 03382 void xccdf_select_iterator_remove(struct xccdf_select_iterator *it); 03384 void xccdf_ident_iterator_remove(struct xccdf_ident_iterator *it); 03386 void xccdf_check_content_ref_iterator_remove(struct xccdf_check_content_ref_iterator *it); 03388 void xccdf_check_export_iterator_remove(struct xccdf_check_export_iterator *it); 03390 void xccdf_check_import_iterator_remove(struct xccdf_check_import_iterator *it); 03392 void xccdf_check_iterator_remove(struct xccdf_check_iterator *it); 03394 void xccdf_fixtext_iterator_remove(struct xccdf_fixtext_iterator *it); 03396 void xccdf_fix_iterator_remove(struct xccdf_fix_iterator *it); 03398 void xccdf_value_iterator_remove(struct xccdf_value_iterator *it); 03400 void xccdf_plain_text_iterator_remove(struct xccdf_plain_text_iterator *it); 03402 void xccdf_warning_iterator_remove(struct xccdf_warning_iterator *it); 03404 void xccdf_result_iterator_remove(struct xccdf_result_iterator *it); 03406 void xccdf_override_iterator_remove(struct xccdf_override_iterator *it); 03408 void xccdf_message_iterator_remove(struct xccdf_message_iterator *it); 03410 void xccdf_instance_iterator_remove(struct xccdf_instance_iterator *it); 03412 void xccdf_rule_result_iterator_remove(struct xccdf_rule_result_iterator *it); 03414 void xccdf_identity_iterator_remove(struct xccdf_identity_iterator *it); 03416 void xccdf_score_iterator_remove(struct xccdf_score_iterator *it); 03418 void xccdf_target_fact_iterator_remove(struct xccdf_target_fact_iterator *it); 03420 void xccdf_target_identifier_iterator_remove(struct xccdf_target_identifier_iterator *it); 03422 void xccdf_value_instance_iterator_remove(struct xccdf_value_instance_iterator *it); 03423 03424 03425 // textual substitution interface 03426 03432 typedef enum xccdf_subst_type { 03433 XCCDF_SUBST_NONE, 03434 XCCDF_SUBST_SUB, 03435 XCCDF_SUBST_LINK, 03436 XCCDF_SUBST_INSTANCE 03437 } xccdf_subst_type_t; 03438 03449 typedef char*(*xccdf_substitution_func)(xccdf_subst_type_t type, const char *id, void *arg); 03450 03451 03462 OSCAP_DEPRECATED(char* oscap_text_xccdf_substitute(const char *text, xccdf_substitution_func cb, void *arg)); 03463 03464 /************************************************************/ 03466 03467 03468 #endif
1.7.3