/home/brq/plautrba/devel/src/openscap.git/openscap-0.8.2/src/XCCDF/public/xccdf.h File Reference

Open-scap XCCDF library interface. More...

#include <stdbool.h>
#include <time.h>
#include "oscap.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, XCCDF_OPERATOR_NOT = 0x0100, XCCDF_OPERATOR_NAND = XCCDF_OPERATOR_AND | XCCDF_OPERATOR_NOT,
  XCCDF_OPERATOR_NOR = XCCDF_OPERATOR_OR | XCCDF_OPERATOR_NOT, XCCDF_OPERATOR_MASK = 0x00ff
}
 

Boolean operators for logical expressions.

More...
enum  xccdf_level_t {
  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...

Functions

bool xccdf_benchmark_resolve (struct xccdf_benchmark *benchmark)
 Resolve an benchmark.
struct xccdf_statusxccdf_status_new_fill (const char *status, const char *date)
 xccdf_status
void xccdf_setvalue_free (struct xccdf_setvalue *sv)
void xccdf_cleanup (void)
 Release library internal caches.
struct xccdf_groupxccdf_benchmark_append_new_group (struct xccdf_benchmark *, const char *id)
 Create a group and append it to the benchmark.
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.
struct xccdf_rulexccdf_benchmark_append_new_rule (struct xccdf_benchmark *, const char *id)
 Create a rule and append it to the 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.



struct xccdf_itemxccdf_group_get_parent (const struct xccdf_group *group)
const char * xccdf_refine_rule_get_item (const struct xccdf_refine_rule *rr)
 xccdf_refine_rule
const char * xccdf_refine_rule_get_selector (const struct xccdf_refine_rule *rr)
 xccdf_refine_rule
xccdf_role_t xccdf_refine_rule_get_role (const struct xccdf_refine_rule *rr)
 xccdf_refine_rule
xccdf_level_t xccdf_refine_rule_get_severity (const struct xccdf_refine_rule *rr)
 xccdf_refine_rule
struct oscap_text_iteratorxccdf_refine_rule_get_remarks (const struct xccdf_refine_rule *rr)
 xccdf_refine_rule
const char * xccdf_refine_value_get_item (const struct xccdf_refine_value *rv)

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.
typedef char *(* xccdf_substitution_func )(xccdf_subst_type_t type, const char *id, void *arg)
 Textual substitution callback.
struct xccdf_setvaluexccdf_setvalue_clone (const struct xccdf_setvalue *old_value)
 xccdf_set_value
void xccdf_ident_set_id (struct xccdf_ident *ident, const char *id)
void xccdf_ident_set_system (struct xccdf_ident *ident, const char *sys)
char * oscap_text_xccdf_substitute (const char *text, xccdf_substitution_func cb, void *arg)
 Perform a textual substitution.

Detailed Description

Open-scap XCCDF library interface.

Author:
Lukas Kuklinek <lkuklinek@redhat.com>

Generated on 30 Mar 2012 for Open SCAP Library by  doxygen 1.6.1