|
Open SCAP Library
|
00001 /* 00002 * Copyright 2015 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 */ 00020 00021 #ifndef XCCDF_POLICY_RESOLVE_H_ 00022 #define XCCDF_POLICY_RESOLVE_H_ 00023 00024 #ifdef HAVE_CONFIG_H 00025 #include <config.h> 00026 #endif 00027 00028 #include <xccdf_benchmark.h> 00029 #include <xccdf_policy_priv.h> 00030 #include <math.h> 00031 00032 00033 /* 00034 * Struct contains final values defined in several xccdf_refine_rule structures. 00035 * There is no "item" member. Hash-table key is used instead of this member. 00036 * This structure is used only for internal rule processing. 00037 */ 00038 struct xccdf_refine_rule_internal; 00039 00040 char* xccdf_refine_rule_internal_get_selector(const struct xccdf_refine_rule_internal*); 00041 xccdf_role_t xccdf_refine_rule_internal_get_role(const struct xccdf_refine_rule_internal*); 00042 xccdf_level_t xccdf_refine_rule_internal_get_severity(const struct xccdf_refine_rule_internal*); 00043 xccdf_numeric xccdf_refine_rule_internal_get_weight(const struct xccdf_refine_rule_internal*); 00044 00049 struct xccdf_refine_rule_internal* xccdf_policy_get_refine_rule_by_item(struct xccdf_policy* policy, struct xccdf_item* item); 00050 00054 bool xccdf_weight_defined(xccdf_numeric weight); 00055 00059 xccdf_role_t xccdf_get_final_role(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule); 00060 00064 float xccdf_get_final_weight(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule); 00065 00069 xccdf_level_t xccdf_get_final_severity(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule); 00070 00074 void xccdf_policy_add_profile_refine_rules(struct xccdf_policy* policy, struct xccdf_benchmark* benchmark, struct xccdf_profile* profile); 00075 00079 void xccdf_refine_rule_internal_free(struct xccdf_refine_rule_internal* item); 00080 00081 #endif
1.7.3