23#ifndef XCCDF_ELEMENTS_H_
24#define XCCDF_ELEMENTS_H_
29#include "common/util.h"
31#include "common/_error.h"
33#include <libxml/xmlreader.h>
48char *xccdf_detect_version_priv(xmlTextReader *reader);
53bool xccdf_is_supported_namespace(xmlNs *ns);
67 XCCDFE_RESULT_BENCHMARK,
72 XCCDFE_CHECK_CONTENT_REF,
102 XCCDFE_CPE2_PLATFORMSPEC,
103 XCCDFE_RESULT_PROFILE,
124 XCCDFE_TARGET_ADDRESS,
126 XCCDFE_TARGET_IDENTIFIER,
133 XCCDFE_BENCHMARK_REF = XCCDFE_RESULT_BENCHMARK,
138const char *xccdf_element_to_str(xccdf_element_t element);
139xccdf_element_t xccdf_element_get(xmlTextReaderPtr reader);
141#define XCCDF_ASSERT_ELEMENT(reader, element) \
143 if (xccdf_element_get(reader) != element) { \
144 const char *found, *expected; \
146 found = xccdf_element_to_str((xccdf_element_get(reader))); \
147 expected = xccdf_element_to_str(element); \
149 OSCAP_EFAMILY_XCCDF, \
150 "Find element '%s' while expecting element: '%s'", \
151 found != NULL ? found : "(null)", \
152 expected != NULL ? expected : "(null)"); \
160 XCCDFA_AUTHENTICATED,
180 XCCDFA_INTERFACEHINT,
190 XCCDFA_PARENTCONTEXT,
193 XCCDFA_PROHIBITCHANGES,
217bool xccdf_attribute_has(xmlTextReaderPtr reader, xccdf_attribute_t attr);
218const char *xccdf_attribute_get(xmlTextReaderPtr reader, xccdf_attribute_t attr);
219char *xccdf_attribute_copy(xmlTextReaderPtr reader, xccdf_attribute_t attr);
220bool xccdf_attribute_get_bool(xmlTextReaderPtr reader, xccdf_attribute_t attr);
221int xccdf_attribute_get_int(xmlTextReaderPtr reader, xccdf_attribute_t attr);
222float xccdf_attribute_get_float(xmlTextReaderPtr reader, xccdf_attribute_t attr);
226void xccdf_print_depth(
int depth);
227void xccdf_print_max(
const char *str,
int max,
const char *ellipsis);
228void xccdf_print_max_text(
const struct oscap_text *txt,
int max,
const char *ellipsis);
229void xccdf_print_textlist(
struct oscap_text_iterator *txt,
int depth,
int max,
const char *ellipsis);
231xmlNs *lookup_xccdf_ns(xmlDoc *doc, xmlNode *parent,
const struct xccdf_version_info *version_info);
Define mapping between symbolic constant and its string representation.
Definition util.h:296
Internationalized string iterator.
Representation of internationalizable character strings.
Definition text_priv.h:46
Definition XCCDF/elements.c:42
const char * version
MAJOR.MINOR, for example "1.1" or "1.2".
Definition XCCDF/elements.c:43