Open SCAP Library
Loading...
Searching...
No Matches
xccdf_benchmark Struct Reference

Top level XCCDF structure containing profiles, rules, values and results. More...

#include <xccdf_benchmark.h>

Public Member Functions

OSCAP_API struct xccdf_benchmark * xccdf_benchmark_import_source (struct oscap_source *source)
 Import the content from oscap_source into a benchmark.
OSCAP_API int xccdf_benchmark_export (struct xccdf_benchmark *benchmark, const char *file)
 Export a benchmark to an XML stream.
OSCAP_API struct oscap_source * xccdf_benchmark_export_source (struct xccdf_benchmark *benchmark, const char *filename)
 Export a benchmark to a source object.
OSCAP_API struct xccdf_benchmark * xccdf_benchmark_new (void)
OSCAP_API void xccdf_benchmark_free (struct xccdf_benchmark *benchmark)
OSCAP_API struct xccdf_item * xccdf_benchmark_to_item (struct xccdf_benchmark *item)
OSCAP_API struct xccdf_benchmark * xccdf_benchmark_clone (const struct xccdf_benchmark *benchmark)
OSCAP_API const char * xccdf_benchmark_supported (void)
 Get supported version of XCCDF XML.
OSCAP_API const struct xccdf_version_info * xccdf_benchmark_supported_schema_version (void)
OSCAP_API const char * xccdf_benchmark_match_profile_id (struct xccdf_benchmark *bench, const char *profile_suffix, int *match_status)
 Match a profile suffix agains profiles present in the given benchmark.
OSCAP_API const char * xccdf_tailoring_match_profile_id (struct xccdf_tailoring *tailoring, const char *profile_suffix, int *match_status)
 Match a profile suffix agains profiles present in the given benchmark.
Getters

Return value is pointer to structure's member.

Do not free unless you null the pointer in the structure. Use remove function otherwise.

OSCAP_API struct xccdf_profile * xccdf_benchmark_get_profile_by_id (struct xccdf_benchmark *benchmark, const char *profile_id)
OSCAP_API const char * xccdf_benchmark_get_id (const struct xccdf_benchmark *benchmark)
OSCAP_API bool xccdf_benchmark_get_resolved (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_text_iterator * xccdf_benchmark_get_title (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_text_iterator * xccdf_benchmark_get_description (const struct xccdf_benchmark *benchmark)
OSCAP_API const char * xccdf_benchmark_get_version (const struct xccdf_benchmark *benchmark)
OSCAP_API const struct xccdf_version_info * xccdf_benchmark_get_schema_version (const struct xccdf_benchmark *item)
OSCAP_API const char * xccdf_benchmark_get_style (const struct xccdf_benchmark *benchmark)
OSCAP_API const char * xccdf_benchmark_get_style_href (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_text_iterator * xccdf_benchmark_get_front_matter (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_text_iterator * xccdf_benchmark_get_rear_matter (const struct xccdf_benchmark *benchmark)
OSCAP_API struct xccdf_status_iterator * xccdf_benchmark_get_statuses (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_reference_iterator * xccdf_benchmark_get_dc_statuses (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_reference_iterator * xccdf_benchmark_get_references (const struct xccdf_benchmark *benchmark)
OSCAP_API struct oscap_string_iterator * xccdf_benchmark_get_platforms (const struct xccdf_benchmark *benchmark)
OSCAP_API struct xccdf_status * xccdf_benchmark_get_status_current (const struct xccdf_benchmark *benchmark)
OSCAP_API struct xccdf_plain_text_iterator * xccdf_benchmark_get_plain_texts (const struct xccdf_benchmark *item)
OSCAP_API struct xccdf_result_iterator * xccdf_benchmark_get_results (const struct xccdf_benchmark *bench)
OSCAP_API struct xccdf_value_iterator * xccdf_benchmark_get_values (const struct xccdf_benchmark *item)
OSCAP_API bool xccdf_benchmark_set_lang (struct xccdf_benchmark *item, const char *newval)
OSCAP_API const char * xccdf_benchmark_get_lang (const struct xccdf_benchmark *item)
OSCAP_API const char * xccdf_benchmark_get_plain_text (const struct xccdf_benchmark *benchmark, const char *id)
 Get a plain text by ID.
OSCAP_API struct xccdf_item * xccdf_benchmark_get_item (const struct xccdf_benchmark *benchmark, const char *id)
 Get benchmark xccdf:Item by ID.
OSCAP_API struct xccdf_item * xccdf_benchmark_get_member (const struct xccdf_benchmark *benchmark, xccdf_type_t type, const char *key)
 Get a registered member of xccdf_benchmakr by ID.
OSCAP_API struct xccdf_notice_iterator * xccdf_benchmark_get_notices (const struct xccdf_benchmark *benchmark)
 Get an iterator to the benchmark legal notices.
OSCAP_API struct xccdf_model_iterator * xccdf_benchmark_get_models (const struct xccdf_benchmark *benchmark)
 Get an iterator to the benchmark scoring models.
OSCAP_API struct xccdf_profile_iterator * xccdf_benchmark_get_profiles (const struct xccdf_benchmark *benchmark)
 Get an iterator to the benchmark XCCDF profiles.
OSCAP_API struct xccdf_item_iterator * xccdf_benchmark_get_content (const struct xccdf_benchmark *benchmark)
 Get an iterator to the bencmark content.
OSCAP_API struct oscap_string_iterator * xccdf_benchmark_get_metadata (const struct xccdf_benchmark *benchmark)
OSCAP_API struct cpe_dict_model * xccdf_benchmark_get_cpe_list (const struct xccdf_benchmark *benchmark)
OSCAP_API struct cpe_lang_model * xccdf_benchmark_get_cpe_lang_model (const struct xccdf_benchmark *benchmark)
OSCAP_API struct xccdf_warning_iterator * xccdf_benchmark_get_warnings (const struct xccdf_benchmark *benchmark)
OSCAP_API const char * xccdf_benchmark_get_version_update (const struct xccdf_benchmark *benchmark)
OSCAP_API const char * xccdf_benchmark_get_version_time (const struct xccdf_benchmark *benchmark)
Setters

For lists use add functions.

Parameters of set functions are duplicated in memory and need to be freed by caller.

OSCAP_API bool xccdf_benchmark_set_resolved (struct xccdf_benchmark *item, bool newval)
OSCAP_API bool xccdf_benchmark_set_style_href (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_set_style (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_set_id (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_set_version (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_set_version_time (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_set_version_update (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_set_schema_version (struct xccdf_benchmark *item, const struct xccdf_version_info *newval)
OSCAP_API bool xccdf_benchmark_add_metadata (struct xccdf_benchmark *item, const char *metadata)
OSCAP_API bool xccdf_benchmark_set_cpe_list (struct xccdf_benchmark *item, struct cpe_dict_model *cpe_list)
OSCAP_API bool xccdf_benchmark_set_cpe_lang_model (struct xccdf_benchmark *item, struct cpe_lang_model *cpe_lang_model)
OSCAP_API bool xccdf_benchmark_add_result (struct xccdf_benchmark *bench, struct xccdf_result *result)
OSCAP_API bool xccdf_benchmark_add_description (struct xccdf_benchmark *item, struct oscap_text *newval)
OSCAP_API bool xccdf_benchmark_add_platform (struct xccdf_benchmark *item, const char *newval)
OSCAP_API bool xccdf_benchmark_add_reference (struct xccdf_benchmark *item, struct oscap_reference *newval)
OSCAP_API bool xccdf_benchmark_add_status (struct xccdf_benchmark *item, struct xccdf_status *newval)
OSCAP_API bool xccdf_benchmark_add_dc_status (struct xccdf_benchmark *item, struct oscap_reference *newval)
OSCAP_API bool xccdf_benchmark_add_title (struct xccdf_benchmark *item, struct oscap_text *newval)
OSCAP_API bool xccdf_benchmark_add_front_matter (struct xccdf_benchmark *item, struct oscap_text *newval)
OSCAP_API bool xccdf_benchmark_add_model (struct xccdf_benchmark *item, struct xccdf_model *newval)
OSCAP_API bool xccdf_benchmark_add_notice (struct xccdf_benchmark *item, struct xccdf_notice *newval)
OSCAP_API bool xccdf_benchmark_add_plain_text (struct xccdf_benchmark *item, struct xccdf_plain_text *newval)
OSCAP_API bool xccdf_benchmark_add_profile (struct xccdf_benchmark *item, struct xccdf_profile *newval)
OSCAP_API bool xccdf_benchmark_add_rear_matter (struct xccdf_benchmark *item, struct oscap_text *newval)
OSCAP_API bool xccdf_benchmark_add_rule (struct xccdf_benchmark *benchmark, struct xccdf_rule *rule)
OSCAP_API bool xccdf_benchmark_add_group (struct xccdf_benchmark *benchmark, struct xccdf_group *group)
OSCAP_API bool xccdf_benchmark_add_value (struct xccdf_benchmark *benchmark, struct xccdf_value *value)
OSCAP_API bool xccdf_benchmark_add_content (struct xccdf_benchmark *bench, struct xccdf_item *item)

Detailed Description

Top level XCCDF structure containing profiles, rules, values and results.


The documentation for this struct was generated from the following file: