Open SCAP Library
src
XCCDF_POLICY
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
*/
38
struct
xccdf_refine_rule_internal
;
39
40
char
* xccdf_refine_rule_internal_get_selector(
const
struct
xccdf_refine_rule_internal
*);
41
xccdf_role_t
xccdf_refine_rule_internal_get_role(
const
struct
xccdf_refine_rule_internal
*);
42
xccdf_level_t
xccdf_refine_rule_internal_get_severity(
const
struct
xccdf_refine_rule_internal
*);
43
xccdf_numeric
xccdf_refine_rule_internal_get_weight(
const
struct
xccdf_refine_rule_internal
*);
44
49
struct
xccdf_refine_rule_internal
* xccdf_policy_get_refine_rule_by_item(
struct
xccdf_policy
* policy,
struct
xccdf_item
* item);
50
54
bool
xccdf_weight_defined(
xccdf_numeric
weight);
55
59
xccdf_role_t
xccdf_get_final_role(
const
struct
xccdf_rule
* rule,
const
struct
xccdf_refine_rule_internal
* r_rule);
60
64
float
xccdf_get_final_weight(
const
struct
xccdf_rule
* rule,
const
struct
xccdf_refine_rule_internal
* r_rule);
65
69
xccdf_level_t
xccdf_get_final_severity(
const
struct
xccdf_rule
* rule,
const
struct
xccdf_refine_rule_internal
* r_rule);
70
74
void
xccdf_policy_add_profile_refine_rules(
struct
xccdf_policy
* policy,
struct
xccdf_benchmark
* benchmark,
struct
xccdf_profile
* profile);
75
79
void
xccdf_refine_rule_internal_free(
struct
xccdf_refine_rule_internal
* item);
80
81
#endif
xccdf_role_t
xccdf_role_t
XCCDF role.
Definition:
xccdf_benchmark.h:135
xccdf_profile
Definition:
xccdf_benchmark.h:203
xccdf_level_t
xccdf_level_t
XCCDF error, complexity, disruption, or severity level.
Definition:
xccdf_benchmark.h:118
xccdf_benchmark
xccdf_benchmark.h
xccdf_refine_rule_internal
Definition:
xccdf_policy_resolve.c:29
xccdf_policy
XCCDF policy structure is abstract (class) structure of Profile element from benchmark.
Definition:
xccdf_policy_priv.h:57
xccdf_item
Definition:
item.h:220
xccdf_rule
Definition:
xccdf_benchmark.h:215
xccdf_numeric
float xccdf_numeric
Type of a numerical content for a XCCDF value.
Definition:
xccdf_benchmark.h:197
Generated by
1.8.17