Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
oval_parser_impl.h
Go to the documentation of this file.
1 
8 /*
9  * Copyright 2009-2014 Red Hat Inc., Durham, North Carolina.
10  * All Rights Reserved.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Authors:
27  * "David Niemoller" <David.Niemoller@g2-inc.com>
28  */
29 
30 #ifndef OVAL_PARSER_H_
31 #define OVAL_PARSER_H_
32 
33 #include <libxml/xmlreader.h>
34 #include "public/oval_agent_api.h"
35 #include "common/util.h"
36 
37 OSCAP_HIDDEN_START;
38 
39 #define OVAL_ROOT_ELM_DEFINITIONS "oval_definitions"
40 #define OVAL_ROOT_ELM_DIRECTIVES "oval_directives"
41 #define OVAL_ROOT_ELM_RESULTS "oval_results"
42 #define OVAL_ROOT_ELM_SYSCHARS "oval_system_characteristics"
43 #define OVAL_ROOT_ELM_VARIABLES "oval_variables"
44 
46  struct oval_definition_model *definition_model;
47  struct oval_syschar_model *syschar_model;
48  struct oval_results_model *results_model;
49  struct oval_variable_model *variable_model;
50  struct oval_directives_model *directives_model;
51  xmlTextReader *reader;
52  void *user_data;
53 };
54 
55 int oval_definition_model_parse(xmlTextReaderPtr, struct oval_parser_context *);
56 int oval_syschar_model_parse(xmlTextReaderPtr, struct oval_parser_context *);
57 int oval_results_model_parse(xmlTextReaderPtr , struct oval_parser_context *);
58 
59 int oval_parser_boolean_attribute(xmlTextReaderPtr reader, char *attname, int defval);
60 int oval_parser_int_attribute(xmlTextReaderPtr reader, char *attname, int defval);
61 
62 typedef int (*oval_xml_tag_parser) (xmlTextReaderPtr, struct oval_parser_context *, void *);
63 int oval_parser_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_xml_tag_parser, void *);
64 int oval_parser_skip_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
65 
66 char *oval_determine_document_schema_version_priv(xmlTextReader *reader, oscap_document_type_t doc_type);
67 
68 OSCAP_HIDDEN_END;
69 
70 #endif /* OVAL_PARSER_H_ */
OVAL System Characteristics model.
Definition: oval_sysModel.c:54
OVAL Results Model holds OVAL results structure instances.
Definition: oval_resModel.c:54
This structure holds instance of OVAL Directives.
enum oscap_document_type oscap_document_type_t
SCAP document type identifiers.
int oval_parser_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *context, oval_xml_tag_parser tag_parser, void *user)
-1 error; 0 OK; 1 warning
Definition: oval_parser.c:53
Oval definition model.
Definition: oval_defModel.c:51
The OVAL variable model facilitates access to external variable value bindings used to to constrain t...
Definition: oval_varModel.c:56
Definition: oval_parser_impl.h:45