Open SCAP Library
Toggle main menu visibility
Loading...
Searching...
No Matches
src
XCCDF_POLICY
public
check_engine_plugin.h
Go to the documentation of this file.
1
10
11
/*
12
* Copyright 2013 Red Hat Inc., Durham, North Carolina.
13
* All Rights Reserved.
14
*
15
* This library is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU Lesser General Public
17
* License as published by the Free Software Foundation; either
18
* version 2.1 of the License, or (at your option) any later version.
19
*
20
* This library is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
* Lesser General Public License for more details.
24
*
25
* You should have received a copy of the GNU Lesser General Public
26
* License along with this library; if not, write to the Free Software
27
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28
*
29
*/
30
31
#ifndef OPENSCAP_CHECK_ENGINE_PLUGIN_H_
32
#define OPENSCAP_CHECK_ENGINE_PLUGIN_H_
33
34
#include "
xccdf_policy.h
"
35
#include "oscap_export.h"
36
37
struct
check_engine_plugin_def
38
{
39
int
_reserved;
// FIXME: version checking?
40
41
void
*module_handle;
42
void
*user_data;
43
44
// NB: path hint is the input file path, can be used for relative path resolution
45
46
// first arg: policy model to register with, second arg: path hint, third arg: user data
47
int (*register_fn)(
struct
xccdf_policy_model
*,
const
char
*,
void
**);
48
// first arg: policy model, second arg: user data
49
int (*cleanup_fn)(
struct
xccdf_policy_model
*,
void
**);
50
// first arg: policy model, second arg: validate, third arg: path hint, fourth arg: user data
51
int (*export_results_fn)(
struct
xccdf_policy_model
*, bool,
const
char
*,
void
**);
52
// first arg: user data
53
const
char
*(*get_capabilities_fn)(
void
**);
54
};
55
56
OSCAP_API
struct
check_engine_plugin_def
*check_engine_plugin_load2(
const
char
* path,
bool
quiet);
57
OSCAP_API
struct
check_engine_plugin_def
*check_engine_plugin_load(
const
char
* path);
58
OSCAP_API
void
check_engine_plugin_unload(
struct
check_engine_plugin_def
*plugin);
59
60
OSCAP_API
int
check_engine_plugin_register(
struct
check_engine_plugin_def
*plugin,
struct
xccdf_policy_model
*model,
const
char
*path_hint);
61
OSCAP_API
int
check_engine_plugin_cleanup(
struct
check_engine_plugin_def
*plugin,
struct
xccdf_policy_model
*model);
62
OSCAP_API
int
check_engine_plugin_export_results(
struct
check_engine_plugin_def
*plugin,
struct
xccdf_policy_model
*model,
bool
validate,
const
char
*path_hint);
63
OSCAP_API
const
char
*check_engine_plugin_get_capabilities(
struct
check_engine_plugin_def
*plugin);
64
68
typedef
int (*
check_engine_plugin_entry_fn
) (
struct
check_engine_plugin_def
*);
69
70
#define OPENSCAP_CHECK_ENGINE_PLUGIN_ENTRY OPENSCAP_CHECK_ENGINE_PLUGIN_ENTRY
71
77
OSCAP_API
const
char
*
const
*
check_engine_plugin_get_known_plugins
(
void
);
78
81
#endif
check_engine_plugin_entry_fn
int(* check_engine_plugin_entry_fn)(struct check_engine_plugin_def *)
This is the entry point of shared objects implementing extra check engines.
Definition
check_engine_plugin.h:68
check_engine_plugin_get_known_plugins
OSCAP_API const char *const * check_engine_plugin_get_known_plugins(void)
Retrieves list of plugin names that are known to OpenSCAP.
Definition
check_engine_plugin.c:212
check_engine_plugin_def
Definition
check_engine_plugin.h:38
xccdf_policy_model
XCCDF policy model structure contains xccdf_benchmark as reference to Benchmark element in XML file a...
Definition
xccdf_policy_priv.h:38
xccdf_policy.h
Open-scap XCCDF Policy library interface.
Generated by
1.17.0