| 1 | /** |
| 2 | * @addtogroup XCCDF_POLICY |
| 3 | * @{ |
| 4 | * @addtogroup Check Engine Plugin |
| 5 | * @{ |
| 6 | * |
| 7 | * @file check_engine_plugin.h |
| 8 | * @author Martin Preisler <[email protected]> |
| 9 | */ |
| 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_cxx . . $ `src/XCCDF_POLICY/public/check_engine_plugin.h:32:9`! |
| 33 | |
| 34 | #include "xccdf_policy.h"cxx . . $ `<file>/src/XCCDF_POLICY/public/xccdf_policy.h`/ |
| 35 | #include "oscap_export.h"cxx . . $ `<file>/src/common/public/oscap_export.h`/ |
| 36 | |
| 37 | struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# |
| 38 | { |
| 39 | int _reservedcxx . . $ check_engine_plugin_def#_reserved.; // FIXME: version checking? |
| 40 | |
| 41 | void *module_handlecxx . . $ check_engine_plugin_def#module_handle.; |
| 42 | void *user_datacxx . . $ check_engine_plugin_def#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_fncxx . . $ check_engine_plugin_def#register_fn.)(struct xccdf_policy_modelcxx . . $ xccdf_policy_model# *, const char*, void**); |
| 48 | // first arg: policy model, second arg: user data |
| 49 | int (*cleanup_fncxx . . $ check_engine_plugin_def#cleanup_fn.)(struct xccdf_policy_modelcxx . . $ xccdf_policy_model# *, void**); |
| 50 | // first arg: policy model, second arg: validate, third arg: path hint, fourth arg: user data |
| 51 | int (*export_results_fncxx . . $ check_engine_plugin_def#export_results_fn.)(struct xccdf_policy_modelcxx . . $ xccdf_policy_model# *, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!, const char*, void**); |
| 52 | // first arg: user data |
| 53 | const char *(*get_capabilities_fncxx . . $ check_engine_plugin_def#get_capabilities_fn.)(void**); |
| 54 | }; |
| 55 | |
| 56 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *check_engine_plugin_load2cxx . . $ check_engine_plugin_load2(9071ba705b7532d3).(const char* path, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! quiet); |
| 57 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *check_engine_plugin_loadcxx . . $ check_engine_plugin_load(6b0bd49d80dee2ea).(const char* path); |
| 58 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void check_engine_plugin_unloadcxx . . $ check_engine_plugin_unload(be78ae89c758d8d0).(struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *plugin); |
| 59 | |
| 60 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! int check_engine_plugin_registercxx . . $ check_engine_plugin_register(5f88fd8f7be40b51).(struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *plugin, struct xccdf_policy_modelcxx . . $ xccdf_policy_model# *model, const char *path_hint); |
| 61 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! int check_engine_plugin_cleanupcxx . . $ check_engine_plugin_cleanup(1e3e5a4311b15a9f).(struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *plugin, struct xccdf_policy_modelcxx . . $ xccdf_policy_model# *model); |
| 62 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! int check_engine_plugin_export_resultscxx . . $ check_engine_plugin_export_results(91b4e5814a106804).(struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *plugin, struct xccdf_policy_modelcxx . . $ xccdf_policy_model# *model, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! validate, const char *path_hint); |
| 63 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char *check_engine_plugin_get_capabilitiescxx . . $ check_engine_plugin_get_capabilities(8ffb468a72dc1f09).(struct check_engine_plugin_defcxx . . $ check_engine_plugin_def# *plugin); |
| 64 | |
| 65 | /** |
| 66 | * This is the entry point of shared objects implementing extra check engines |
| 67 | */ |
| 68 | typedef int (*check_engine_plugin_entry_fncxx . . $ check_engine_plugin_entry_fn#) (struct check_engine_plugin_defcxx . . $ check_engine_plugin_def#*); |
| 69 | |
| 70 | #define OPENSCAP_CHECK_ENGINE_PLUGIN_ENTRYcxx . . $ `src/XCCDF_POLICY/public/check_engine_plugin.h:70:9`! OPENSCAP_CHECK_ENGINE_PLUGIN_ENTRY |
| 71 | |
| 72 | /** |
| 73 | * @brief Retrieves list of plugin names that are known to OpenSCAP |
| 74 | * |
| 75 | * Loading of these will be attempted automatically |
| 76 | */ |
| 77 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char * const *check_engine_plugin_get_known_pluginscxx . . $ check_engine_plugin_get_known_plugins(93405d8a1d31001f).(void); |
| 78 | |
| 79 | /// @} |
| 80 | /// @} |
| 81 | #endif |