Loading...
Searching...
No Matches
xccdf_policy_resolve.h
/*
* Copyright 2015 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef XCCDF_POLICY_RESOLVE_H_
#define XCCDF_POLICY_RESOLVE_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xccdf_benchmark.h>
#include <xccdf_policy_priv.h>
#include <math.h>
/*
* Struct contains final values defined in several xccdf_refine_rule structures.
* There is no "item" member. Hash-table key is used instead of this member.
* This structure is used only for internal rule processing.
*/
struct xccdf_refine_rule_internal;
char* xccdf_refine_rule_internal_get_selector(const struct xccdf_refine_rule_internal*);
xccdf_role_t xccdf_refine_rule_internal_get_role(const struct xccdf_refine_rule_internal*);
xccdf_level_t xccdf_refine_rule_internal_get_severity(const struct xccdf_refine_rule_internal*);
xccdf_numeric xccdf_refine_rule_internal_get_weight(const struct xccdf_refine_rule_internal*);
struct xccdf_refine_rule_internal* xccdf_policy_get_refine_rule_by_item(struct xccdf_policy* policy, struct xccdf_item* item);
bool xccdf_weight_defined(xccdf_numeric weight);
xccdf_role_t xccdf_get_final_role(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule);
float xccdf_get_final_weight(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule);
xccdf_level_t xccdf_get_final_severity(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule);
void xccdf_policy_add_profile_refine_rules(struct xccdf_policy* policy, struct xccdf_benchmark* benchmark, struct xccdf_profile* profile);
void xccdf_refine_rule_internal_free(struct xccdf_refine_rule_internal* item);
#endif
xccdf_level_t
xccdf_level_t
XCCDF error, complexity, disruption, or severity level.
Definition xccdf_benchmark.h:118
xccdf_role_t
xccdf_role_t
XCCDF role.
Definition xccdf_benchmark.h:136
xccdf_numeric
float xccdf_numeric
Type of a numerical content for a XCCDF value.
Definition xccdf_benchmark.h:198
xccdf_benchmark
Top level XCCDF structure containing profiles, rules, values and results.
xccdf_item
A base class for XCCDF items.
Definition item.h:220
xccdf_policy
XCCDF policy structure is abstract (class) structure of Profile element from benchmark.
Definition xccdf_policy_priv.h:58
xccdf_profile
XCCDF profile is a set of tests and their settings in a compact package.
xccdf_refine_rule_internal
Definition xccdf_policy_resolve.c:29
xccdf_rule
XCCDF rule defines a test execution.
xccdf_benchmark.h
Open-scap XCCDF library interface.