Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Enumerations | Functions
xccdf_benchmark.h File Reference

Open-scap XCCDF library interface. More...

#include <stdbool.h>
#include <time.h>
#include <oscap_reference.h>
#include <oscap_source.h>
#include <oscap.h>
#include "cpe_dict.h"
#include "oscap_export.h"

Go to the source code of this file.

Typedefs

typedef float xccdf_numeric
 Type of a numerical content for a XCCDF value.
 

Enumerations

enum  xccdf_type_t {
  XCCDF_BENCHMARK = 0x0100, XCCDF_PROFILE = 0x0200, XCCDF_RESULT = 0x0400, XCCDF_RULE = 0x1000,
  XCCDF_GROUP = 0x2000, XCCDF_VALUE = 0x4000, XCCDF_CONTENT = XCCDF_RULE | XCCDF_GROUP, XCCDF_ITEM = XCCDF_RULE | XCCDF_GROUP | XCCDF_VALUE,
  XCCDF_OBJECT = XCCDF_ITEM | XCCDF_PROFILE | XCCDF_BENCHMARK | XCCDF_RESULT
}
 Type of an XCCDF object. More...
 
enum  xccdf_interface_hint_t {
  XCCDF_IFACE_HINT_NONE, XCCDF_IFACE_HINT_CHOICE, XCCDF_IFACE_HINT_TEXTLINE, XCCDF_IFACE_HINT_TEXT,
  XCCDF_IFACE_HINT_DATE, XCCDF_IFACE_HINT_DATETIME
}
 Interface hint. More...
 
enum  xccdf_status_type_t {
  XCCDF_STATUS_NOT_SPECIFIED, XCCDF_STATUS_ACCEPTED, XCCDF_STATUS_DEPRECATED, XCCDF_STATUS_DRAFT,
  XCCDF_STATUS_INCOMPLETE, XCCDF_STATUS_INTERIM
}
 Status of an XCCDF item. More...
 
enum  xccdf_value_type_t { XCCDF_TYPE_NUMBER = 1, XCCDF_TYPE_STRING, XCCDF_TYPE_BOOLEAN }
 Type of an xccdf_value. More...
 
enum  xccdf_operator_t {
  XCCDF_OPERATOR_EQUALS = 1, XCCDF_OPERATOR_NOT_EQUAL, XCCDF_OPERATOR_GREATER, XCCDF_OPERATOR_GREATER_EQUAL,
  XCCDF_OPERATOR_LESS, XCCDF_OPERATOR_LESS_EQUAL, XCCDF_OPERATOR_PATTERN_MATCH
}
 Operator to be applied on an xccdf_value. More...
 
enum  xccdf_bool_operator_t { XCCDF_OPERATOR_AND = 0x0002, XCCDF_OPERATOR_OR = 0x0003 }
 Boolean operators for logical expressions. More...
 
enum  xccdf_level_t {
  XCCDF_LEVEL_NOT_DEFINED = 0, XCCDF_UNKNOWN = 1, XCCDF_INFO, XCCDF_LOW,
  XCCDF_MEDIUM, XCCDF_HIGH
}
 XCCDF error, complexity, disruption, or severity level. More...
 
enum  xccdf_message_severity_t { XCCDF_MSG_INFO = XCCDF_INFO, XCCDF_MSG_WARNING = XCCDF_LOW, XCCDF_MSG_ERROR = XCCDF_HIGH }
 Severity of an xccdf_message. More...
 
enum  xccdf_role_t { XCCDF_ROLE_FULL = 1, XCCDF_ROLE_UNSCORED, XCCDF_ROLE_UNCHECKED }
 XCCDF role. More...
 
enum  xccdf_warning_category_t {
  XCCDF_WARNING_NOT_SPECIFIED, XCCDF_WARNING_GENERAL = 1, XCCDF_WARNING_FUNCTIONALITY, XCCDF_WARNING_PERFORMANCE,
  XCCDF_WARNING_HARDWARE, XCCDF_WARNING_LEGAL, XCCDF_WARNING_REGULATORY, XCCDF_WARNING_MANAGEMENT,
  XCCDF_WARNING_AUDIT, XCCDF_WARNING_DEPENDENCY
}
 Category of xccdf_warning. More...
 
enum  xccdf_strategy_t {
  XCCDF_STRATEGY_UNKNOWN = 0, XCCDF_STRATEGY_CONFIGURE, XCCDF_STRATEGY_DISABLE, XCCDF_STRATEGY_ENABLE,
  XCCDF_STRATEGY_PATCH, XCCDF_STRATEGY_POLICY, XCCDF_STRATEGY_RESTRICT, XCCDF_STRATEGY_UPDATE,
  XCCDF_STRATEGY_COMBINATION
}
 Fix strategy type. More...
 
enum  xccdf_test_result_type_t {
  XCCDF_RESULT_PASS = 1, XCCDF_RESULT_FAIL, XCCDF_RESULT_ERROR, XCCDF_RESULT_UNKNOWN,
  XCCDF_RESULT_NOT_APPLICABLE, XCCDF_RESULT_NOT_CHECKED, XCCDF_RESULT_NOT_SELECTED, XCCDF_RESULT_INFORMATIONAL,
  XCCDF_RESULT_FIXED
}
 Test result. More...
 
enum  { OSCAP_PROFILE_MATCH_OK = 0, OSCAP_PROFILE_NO_MATCH = 1, OSCAP_PROFILE_MULTIPLE_MATCHES = 2 }
 Results of matching profile suffixes against set of profile IDs.
 

Functions

OSCAP_API bool xccdf_benchmark_resolve (struct xccdf_benchmark *benchmark)
 Resolve an benchmark. More...
 
OSCAP_API void xccdf_setvalue_free (struct xccdf_setvalue *sv)
 
OSCAP_API struct xccdf_groupxccdf_benchmark_append_new_group (struct xccdf_benchmark *, const char *id)
 Create a group and append it to the benchmark. More...
 
OSCAP_API struct xccdf_valuexccdf_benchmark_append_new_value (struct xccdf_benchmark *, const char *id, xccdf_value_type_t type)
 Create a value and append it to the benchmark. More...
 
OSCAP_API struct xccdf_rulexccdf_benchmark_append_new_rule (struct xccdf_benchmark *, const char *id)
 Create a rule and append it to the benchmark. 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.

OSCAP_API struct xccdf_itemxccdf_group_get_parent (const struct xccdf_group *group)
 

Setters

For lists use add functions.

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

enum  xccdf_subst_type { XCCDF_SUBST_NONE, XCCDF_SUBST_SUB, XCCDF_SUBST_LINK, XCCDF_SUBST_INSTANCE }
 Type of textual substitution. More...
 
typedef enum xccdf_subst_type xccdf_subst_type_t
 Type of textual substitution. More...
 
OSCAP_API void xccdf_ident_set_id (struct xccdf_ident *ident, const char *id)
 
OSCAP_API void xccdf_ident_set_system (struct xccdf_ident *ident, const char *sys)
 

Detailed Description

Open-scap XCCDF library interface.

Author
Lukas Kuklinek lkukl.nosp@m.inek.nosp@m.@redh.nosp@m.at.c.nosp@m.om