Open SCAP Library: xccdf_benchmark Struct Reference

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions
xccdf_benchmark Struct Reference
XCCDF

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

`#include <xccdf_benchmark.h>`

## Public Member Functions
char * | xccdf_detect_version (const char *file)
| Starts parsing given XCCDF benchmark file to detect its version, stops as soon as the version is found. More...
struct xccdf_benchmark * | xccdf_benchmark_import (const char *file)
| Import the content from a specified XML stream into a benchmark. More...
struct xccdf_benchmark * | xccdf_benchmark_import_source (struct oscap_source *source)
| Import the content from oscap_source into a benchmark. More...
int | xccdf_benchmark_export (struct xccdf_benchmark *benchmark, const char *file)
| Export a benchmark to an XML stream. More...
struct xccdf_benchmark * | xccdf_benchmark_new (void)
void | xccdf_benchmark_free (struct xccdf_benchmark *benchmark)
struct xccdf_item * | xccdf_benchmark_to_item (struct xccdf_benchmark *item)
struct xccdf_benchmark * | xccdf_benchmark_clone (const struct xccdf_benchmark *benchmark)
const char * | xccdf_benchmark_supported (void)
| Get supported version of XCCDF XML. More...
Getters
Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.
const char * | xccdf_benchmark_get_id (const struct xccdf_benchmark *benchmark)
bool | xccdf_benchmark_get_resolved (const struct xccdf_benchmark *benchmark)
struct oscap_text_iterator * | xccdf_benchmark_get_title (const struct xccdf_benchmark *benchmark)
struct oscap_text_iterator * | xccdf_benchmark_get_description (const struct xccdf_benchmark *benchmark)
const char * | xccdf_benchmark_get_version (const struct xccdf_benchmark *benchmark)
const struct xccdf_version_info * | xccdf_benchmark_get_schema_version (const struct xccdf_benchmark *item)
const char * | xccdf_benchmark_get_style (const struct xccdf_benchmark *benchmark)
const char * | xccdf_benchmark_get_style_href (const struct xccdf_benchmark *benchmark)
struct oscap_text_iterator * | xccdf_benchmark_get_front_matter (const struct xccdf_benchmark *benchmark)
struct oscap_text_iterator * | xccdf_benchmark_get_rear_matter (const struct xccdf_benchmark *benchmark)
struct xccdf_status_iterator * | xccdf_benchmark_get_statuses (const struct xccdf_benchmark *benchmark)
struct oscap_reference_iterator * | xccdf_benchmark_get_dc_statuses (const struct xccdf_benchmark *benchmark)
struct oscap_reference_iterator * | xccdf_benchmark_get_references (const struct xccdf_benchmark *benchmark)
struct oscap_string_iterator * | xccdf_benchmark_get_platforms (const struct xccdf_benchmark *benchmark)
struct xccdf_status * | xccdf_benchmark_get_status_current (const struct xccdf_benchmark *benchmark)
struct xccdf_plain_text_iterator * | xccdf_benchmark_get_plain_texts (const struct xccdf_benchmark *item)
struct xccdf_result_iterator * | xccdf_benchmark_get_results (const struct xccdf_benchmark *bench)
struct xccdf_value_iterator * | xccdf_benchmark_get_values (const struct xccdf_benchmark *item)
bool | xccdf_benchmark_set_lang (struct xccdf_benchmark *item, const char *newval)
const char * | xccdf_benchmark_get_lang (const struct xccdf_benchmark *item)
const char * | xccdf_benchmark_get_plain_text (const struct xccdf_benchmark *benchmark, const char *id)
| Get a plain text by ID. More...
struct xccdf_item * | xccdf_benchmark_get_item (const struct xccdf_benchmark *benchmark, const char *id)
| Get benchmark xccdf:Item by ID. More...
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. More...
struct xccdf_notice_iterator * | xccdf_benchmark_get_notices (const struct xccdf_benchmark *benchmark)
| Get an iterator to the benchmark legal notices. More...
struct xccdf_model_iterator * | xccdf_benchmark_get_models (const struct xccdf_benchmark *benchmark)
| Get an iterator to the benchmark scoring models. More...
struct xccdf_profile_iterator * | xccdf_benchmark_get_profiles (const struct xccdf_benchmark *benchmark)
| Get an iterator to the benchmark XCCDF profiles. More...
struct xccdf_item_iterator * | xccdf_benchmark_get_content (const struct xccdf_benchmark *benchmark)
| Get an iterator to the bencmark content. More...
struct oscap_string_iterator * | xccdf_benchmark_get_metadata (const struct xccdf_benchmark *benchmark)
struct cpe_dict_model * | xccdf_benchmark_get_cpe_list (const struct xccdf_benchmark *benchmark)
struct cpe_lang_model * | xccdf_benchmark_get_cpe_lang_model (const struct xccdf_benchmark *benchmark)
struct xccdf_warning_iterator * | xccdf_benchmark_get_warnings (const struct xccdf_benchmark *benchmark)
const char * | xccdf_benchmark_get_version_update (const struct xccdf_benchmark *benchmark)
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.
bool | xccdf_benchmark_set_resolved (struct xccdf_benchmark *item, bool newval)
bool | xccdf_benchmark_set_style_href (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_set_style (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_set_id (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_set_version (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_set_version_time (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_set_version_update (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_set_schema_version (struct xccdf_benchmark *item, const struct xccdf_version_info *newval)
bool | xccdf_benchmark_add_metadata (struct xccdf_benchmark *item, const char *metadata)
bool | xccdf_benchmark_set_cpe_list (struct xccdf_benchmark *item, struct cpe_dict_model *cpe_list)
bool | xccdf_benchmark_set_cpe_lang_model (struct xccdf_benchmark *item, struct cpe_lang_model *cpe_lang_model)
bool | xccdf_benchmark_add_result (struct xccdf_benchmark *bench, struct xccdf_result *result)
bool | xccdf_benchmark_add_description (struct xccdf_benchmark *item, struct oscap_text *newval)
bool | xccdf_benchmark_add_platform (struct xccdf_benchmark *item, const char *newval)
bool | xccdf_benchmark_add_reference (struct xccdf_benchmark *item, struct oscap_reference *newval)
bool | xccdf_benchmark_add_status (struct xccdf_benchmark *item, struct xccdf_status *newval)
bool | xccdf_benchmark_add_dc_status (struct xccdf_benchmark *item, struct oscap_reference *newval)
bool | xccdf_benchmark_add_title (struct xccdf_benchmark *item, struct oscap_text *newval)
bool | xccdf_benchmark_add_front_matter (struct xccdf_benchmark *item, struct oscap_text *newval)
bool | xccdf_benchmark_add_model (struct xccdf_benchmark *item, struct xccdf_model *newval)
bool | xccdf_benchmark_add_notice (struct xccdf_benchmark *item, struct xccdf_notice *newval)
bool | xccdf_benchmark_add_plain_text (struct xccdf_benchmark *item, struct xccdf_plain_text *newval)
bool | xccdf_benchmark_add_profile (struct xccdf_benchmark *item, struct xccdf_profile *newval)
bool | xccdf_benchmark_add_rear_matter (struct xccdf_benchmark *item, struct oscap_text *newval)
bool | xccdf_benchmark_add_rule (struct xccdf_benchmark *benchmark, struct xccdf_rule *rule)
bool | xccdf_benchmark_add_group (struct xccdf_benchmark *benchmark, struct xccdf_group *group)
bool | xccdf_benchmark_add_value (struct xccdf_benchmark *benchmark, struct xccdf_value *value)
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:

- xccdf_benchmark.h