Open SCAP Library
Loading...
Searching...
No Matches
Public Member Functions
xccdf_result Struct Reference

Actual results of running a XCCDF test or profile. More...

#include <xccdf_benchmark.h>

Public Member Functions

OSCAP_API struct xccdf_resultxccdf_result_import_source (struct oscap_source *source)
 Import the content of oscap_source into a xccdf_result.
 
OSCAP_API void xccdf_result_fill_sysinfo (struct xccdf_result *result)
 Collect system info and store it in the TestResult.
 
OSCAP_API struct oscap_sourcexccdf_result_export_source (struct xccdf_result *result, const char *filepath)
 Export TestResult to oscap_source structure.
 
OSCAP_API struct oscap_sourcexccdf_result_stig_viewer_export_source (struct xccdf_result *result, const char *filepath)
 Export TestResult to oscap_source structure using STIG Rule IDs instead of the actual rule ids.
 
OSCAP_API struct xccdf_resultxccdf_result_new (void)
 
OSCAP_API void xccdf_result_free (struct xccdf_result *item)
 
OSCAP_API struct xccdf_itemxccdf_result_to_item (struct xccdf_result *item)
 
OSCAP_API struct xccdf_resultxccdf_result_clone (const struct xccdf_result *result)
 
struct xccdf_scorexccdf_result_calculate_score (struct xccdf_result *test_result, struct xccdf_item *benchmark, const char *score_system)
 Calculate new XCCDF Score for given xccdf:TestResult.
 
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_rule_resultxccdf_result_get_rule_result_by_id (struct xccdf_result *result, const char *id)
 
OSCAP_API struct xccdf_benchmarkxccdf_result_get_benchmark (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_id (const struct xccdf_result *item)
 
OSCAP_API struct oscap_text_iteratorxccdf_result_get_title (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_version (const struct xccdf_result *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_result_get_platforms (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_status_iteratorxccdf_result_get_statuses (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_test_system (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_benchmark_uri (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_profile (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_identity_iteratorxccdf_result_get_identities (const struct xccdf_result *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_result_get_targets (const struct xccdf_result *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_result_get_target_addresses (const struct xccdf_result *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_result_get_applicable_platforms (const struct xccdf_result *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_result_get_organizations (const struct xccdf_result *item)
 
OSCAP_API struct oscap_text_iteratorxccdf_result_get_remarks (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_target_fact_iteratorxccdf_result_get_target_facts (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_target_identifier_iteratorxccdf_result_get_target_id_refs (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_setvalue_iteratorxccdf_result_get_setvalues (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_rule_result_iteratorxccdf_result_get_rule_results (const struct xccdf_result *item)
 
OSCAP_API struct xccdf_score_iteratorxccdf_result_get_scores (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_start_time (const struct xccdf_result *item)
 
OSCAP_API const char * xccdf_result_get_end_time (const struct xccdf_result *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_result_get_metadata (const struct xccdf_result *result)
 
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_result_set_id (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_set_test_system (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_set_benchmark_uri (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_set_profile (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_set_start_time (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_set_end_time (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_set_version (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_add_metadata (struct xccdf_result *item, const char *metadata)
 
OSCAP_API bool xccdf_result_add_rule_result (struct xccdf_result *item, struct xccdf_rule_result *newval)
 
OSCAP_API bool xccdf_result_add_setvalue (struct xccdf_result *item, struct xccdf_setvalue *newval)
 
OSCAP_API bool xccdf_result_add_target_fact (struct xccdf_result *item, struct xccdf_target_fact *newval)
 
OSCAP_API bool xccdf_result_add_target_identifier (struct xccdf_result *item, struct xccdf_target_identifier *newval)
 
OSCAP_API bool xccdf_result_add_applicable_platform (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_add_remark (struct xccdf_result *item, struct oscap_text *newval)
 
OSCAP_API bool xccdf_result_add_organization (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_add_target (struct xccdf_result *item, const char *newval)
 
OSCAP_API bool xccdf_result_add_identity (struct xccdf_result *item, struct xccdf_identity *newval)
 
OSCAP_API bool xccdf_result_add_score (struct xccdf_result *item, struct xccdf_score *newval)
 
OSCAP_API bool xccdf_result_add_title (struct xccdf_result *item, struct oscap_text *newval)
 
OSCAP_API bool xccdf_result_add_target_address (struct xccdf_result *item, const char *newval)
 
OSCAP_API int xccdf_result_recalculate_scores (struct xccdf_result *result, struct xccdf_item *benchmark)
 

Detailed Description

Actual results of running a XCCDF test or profile.

Member Function Documentation

◆ xccdf_result_calculate_score()

struct xccdf_score * xccdf_result_calculate_score ( struct xccdf_result * test_result,
struct xccdf_item * benchmark,
const char * score_system )

Calculate new XCCDF Score for given xccdf:TestResult.

Parameters
test_resultXCCDF TestResult
benchmarkXCCDF Benchmark which is origin of given XCCDF TestResult
score_systemScoring Model URI as described in XCCDF standard.

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