Open SCAP Library
Loading...
Searching...
No Matches
xccdf_policy_resolve.h
1/*
2 * Copyright 2015 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 */
20
21#ifndef XCCDF_POLICY_RESOLVE_H_
22#define XCCDF_POLICY_RESOLVE_H_
23
24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
28#include <xccdf_benchmark.h>
29#include <xccdf_policy_priv.h>
30#include <math.h>
31
32
33/*
34 * Struct contains final values defined in several xccdf_refine_rule structures.
35 * There is no "item" member. Hash-table key is used instead of this member.
36 * This structure is used only for internal rule processing.
37 */
39
40char* xccdf_refine_rule_internal_get_selector(const struct xccdf_refine_rule_internal*);
41xccdf_role_t xccdf_refine_rule_internal_get_role(const struct xccdf_refine_rule_internal*);
42xccdf_level_t xccdf_refine_rule_internal_get_severity(const struct xccdf_refine_rule_internal*);
43xccdf_numeric xccdf_refine_rule_internal_get_weight(const struct xccdf_refine_rule_internal*);
44
49struct xccdf_refine_rule_internal* xccdf_policy_get_refine_rule_by_item(struct xccdf_policy* policy, struct xccdf_item* item);
50
54bool xccdf_weight_defined(xccdf_numeric weight);
55
59xccdf_role_t xccdf_get_final_role(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule);
60
64float xccdf_get_final_weight(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule);
65
69xccdf_level_t xccdf_get_final_severity(const struct xccdf_rule* rule, const struct xccdf_refine_rule_internal* r_rule);
70
74void xccdf_policy_add_profile_refine_rules(struct xccdf_policy* policy, struct xccdf_benchmark* benchmark, struct xccdf_profile* profile);
75
79void xccdf_refine_rule_internal_free(struct xccdf_refine_rule_internal* item);
80
81#endif
xccdf_level_t
XCCDF error, complexity, disruption, or severity level.
Definition xccdf_benchmark.h:118
xccdf_role_t
XCCDF role.
Definition xccdf_benchmark.h:136
float xccdf_numeric
Type of a numerical content for a XCCDF value.
Definition xccdf_benchmark.h:198
Top level XCCDF structure containing profiles, rules, values and results.
A base class for XCCDF items.
Definition item.h:220
XCCDF policy structure is abstract (class) structure of Profile element from benchmark.
Definition xccdf_policy_priv.h:57
XCCDF profile is a set of tests and their settings in a compact package.
Definition xccdf_policy_resolve.c:29
XCCDF rule defines a test execution.
Open-scap XCCDF library interface.