OVAL

OVAL model is represented by several basic structures in OpenSCAP. More...

Data Structures

struct  oval_xml_error
struct  oval_object_model
 OVAL object model. More...
struct  oval_syschar_model
 OVAL object model. More...

Modules

 Definitions
 

OVAL Definitions interface.


 System Characteristics

Files

file  oval_agent_api.h
 

OVAL agent API.


Typedefs

typedef int(* oval_xml_error_handler )(struct oval_xml_error *, void *user_arg)
 OVAL XML error handler function pointer type.

Enumerations

enum  oval_xml_severity_t {
  XML_VALIDITY_WARNING = 1, XML_VALIDITY_ERROR = 2, XML_WARNING = 3, XML_ERROR = 4,
  OVAL_LOG_INFO = 15, OVAL_LOG_DEBUG = 16, OVAL_LOG_WARN = 17
}
 

severity level


Functions

struct oval_import_sourceoval_import_source_new_file (char *filename)
 Create an import source from filename.
void oval_import_source_free (struct oval_import_source *source)
 free a specified import_source.
struct oval_export_targetoval_export_target_new_file (char *filename, char *encoding)
 create export_target object.
void oval_export_target_free (struct oval_export_target *target)
 free an export_target object.
struct oval_object_modeloval_object_model_new ()
 Create an empty oval_object_model.
void oval_object_model_free (struct oval_object_model *model)
int oval_object_model_export (struct oval_object_model *, struct oval_export_target *)
void oval_object_model_add_definition (struct oval_object_model *, struct oval_definition *)
void oval_object_model_add_test (struct oval_object_model *, struct oval_test *)
void oval_object_model_add_object (struct oval_object_model *, struct oval_object *)
void oval_object_model_add_state (struct oval_object_model *, struct oval_state *)
void oval_object_model_add_variable (struct oval_object_model *, struct oval_variable *)
void oval_object_model_add_sysinfo (struct oval_object_model *, struct oval_sysinfo *)
bool oval_syschar_model_add_variable_binding (struct oval_syschar_model *, struct oval_variable_binding *)
void oval_results_model_add_system (struct oval_results_model *, struct oval_result_system *)
int oval_results_model_export (struct oval_results_model *, struct oval_result_directives *, struct oval_export_target *)
 export oval results to XML file.
void oval_object_model::oval_object_model_load (struct oval_object_model *model, struct oval_import_source *source, oval_xml_error_handler error_handler, void *client)
 Load OVAL definitions from a XML stream.
struct oval_definitionoval_object_model::oval_object_model_get_definition (struct oval_object_model *model, char *id)
 Get OVAL definition by ID.
struct oval_testoval_object_model::oval_object_model_get_test (struct oval_object_model *model, char *id)
 Get oval test by ID.
struct oval_objectoval_object_model::oval_object_model_get_object (struct oval_object_model *model, char *id)
 Get OVAL object by ID.
struct oval_stateoval_object_model::oval_object_model_get_state (struct oval_object_model *model, char *id)
 Get OVAL state by ID.
struct oval_variableoval_object_model::oval_object_model_get_variable (struct oval_object_model *model, char *id)
 Get OVAL variable by ID.
struct oval_definition_iterator * oval_object_model::oval_object_model_get_definitions (struct oval_object_model *model)
 Get OVAL definitions.
struct oval_test_iterator * oval_object_model::oval_object_model_get_tests (struct oval_object_model *model)
 Get OVAL tests.
struct oval_object_iterator * oval_object_model::oval_object_model_get_objects (struct oval_object_model *model)
 Get OVAL objects.
struct oval_state_iterator * oval_object_model::oval_object_model_get_states (struct oval_object_model *model)
 Get OVAL states.
struct oval_variable_iterator * oval_object_model::oval_object_model_get_variables (struct oval_object_model *model)
 Get OVAL variables.
struct oval_syschar_modeloval_object_model::oval_syschar_model_new (struct oval_object_model *object_model, struct oval_variable_binding_iterator *bindings)
 Create new oval_syschar_model.
void oval_syschar_model::oval_syschar_model_free (struct oval_syschar_model *model)
 free memory allocated to a specified syschar model.
struct oval_object_modeloval_syschar_model::oval_syschar_model_get_object_model (struct oval_syschar_model *model)
 Return related oval_object_model from an oval_syschar_model.
struct oval_syschar_iterator * oval_syschar_model::oval_syschar_model_get_syschars (struct oval_syschar_model *model)
 Return an iterator over the oval_sychar objects persisted by this model.
struct oval_sysinfooval_syschar_model::oval_syschar_model_get_sysinfo (struct oval_syschar_model *model)
 Return default sysinfo bound to syschar model.
struct oval_syscharoval_syschar_model::oval_syschar_model_get_syschar (struct oval_syschar_model *model, char *object_id)
 Return the oval_syschar bound to a specified object_id.
int oval_syschar_model::oval_syschar_model_export (struct oval_syschar_model *, struct oval_export_target *)
 Export system characteristics as a XML file.
void oval_syschar_model::oval_syschar_model_load (struct oval_syschar_model *, struct oval_import_source *, oval_xml_error_handler, void *)
 Load OVAL system characteristics from a file.
struct oval_results_modeloval_results_model::oval_results_model_new (struct oval_object_model *object_model, struct oval_syschar_model **)
 Create new oval_results_model.
void oval_results_model::oval_results_model_free (struct oval_results_model *model)
 free memory allocated to a specified oval results model.
struct oval_object_modeloval_results_model::oval_results_model_get_object_model (struct oval_results_model *model)
 oval_results_model_object_model Return bound object model from an oval_results_model.
struct
oval_result_system_iterator * 
oval_results_model::oval_results_model_get_systems (struct oval_results_model *)
 Return iterator over reporting systems.
struct oval_result_directivesoval_results_model::oval_results_model_load (struct oval_results_model *, struct oval_import_source *, oval_xml_error_handler, void *)
 load oval results from XML file.
struct oval_result_directivesoval_result_directives::oval_result_directives_new ()
 Create new OVAL results directives.
void oval_result_directives::oval_result_directives_free (struct oval_result_directives *)
 Destroy OVAL results directives.
struct oval_syscharoval_object::oval_object_probe (struct oval_object *, struct oval_object_model *model)
 Probe single OVAL object.

Variables

char * oval_xml_error::message
oval_xml_severity_t oval_xml_error::severity
int oval_xml_error::line_number
char * oval_xml_error::system_id

Detailed Description

OVAL model is represented by several basic structures in OpenSCAP.

See more details at http://oval.mitre.org/


Function Documentation

void oval_export_target_free ( struct oval_export_target target  ) 

free an export_target object.

Parameters:
target the target to be freed.
struct oval_export_target* oval_export_target_new_file ( char *  filename,
char *  encoding 
) [read]

create export_target object.

Return the created export_target object.

Parameters:
filename the name of the target output file
encoding the target XML encoding.
void oval_import_source_free ( struct oval_import_source source  ) 

free a specified import_source.

Parameters:
source the specified import_source
struct oval_import_source* oval_import_source_new_file ( char *  filename  )  [read]

Create an import source from filename.

Return an import_source that streams from a designated file.

Parameters:
filename the name of the designated file
struct oval_definition * oval_object_model_get_definition ( struct oval_object_model model,
char *  id 
) [related, inherited]

Get OVAL definition by ID.

Return a designated oval_definition from the specified oval_object_model. If the specified id does not resolve to an oval_definition the function returns NULL.

Parameters:
model the queried model.
id the definition id.
struct oval_definition_iterator * oval_object_model_get_definitions ( struct oval_object_model model  )  [related, inherited]

Get OVAL definitions.

Return all oval_definitions from the specified oval_object_model.

Parameters:
model the queried model.
struct oval_object * oval_object_model_get_object ( struct oval_object_model model,
char *  id 
) [related, inherited]

Get OVAL object by ID.

Return a designated oval_object from the specified oval_object_model. If the specified id does not resolve to an oval_object the function returns NULL.

Parameters:
model the queried model.
id the object id.
struct oval_object_iterator * oval_object_model_get_objects ( struct oval_object_model model  )  [related, inherited]

Get OVAL objects.

Return all oval_objects from the specified oval_object_model.

Parameters:
model the queried model.
struct oval_state * oval_object_model_get_state ( struct oval_object_model model,
char *  id 
) [related, inherited]

Get OVAL state by ID.

Return a designated oval_state from the specified oval_object_model. If the specified id does not resolve to an oval_state the function returns NULL.

Parameters:
model the queried model.
id the state id.
struct oval_state_iterator * oval_object_model_get_states ( struct oval_object_model model  )  [related, inherited]

Get OVAL states.

Return all oval_states from the specified oval_object_model.

Parameters:
model the queried model.
struct oval_test * oval_object_model_get_test ( struct oval_object_model model,
char *  id 
) [related, inherited]

Get oval test by ID.

Return a designated oval_test from the specified oval_object_model. If the specified id does not resolve to an oval_test the function returns NULL.

Parameters:
model the queried model.
id the test id.
struct oval_test_iterator * oval_object_model_get_tests ( struct oval_object_model model  )  [related, inherited]

Get OVAL tests.

Return all oval_tests from the specified oval_object_model.

Parameters:
model the queried model.
struct oval_variable * oval_object_model_get_variable ( struct oval_object_model model,
char *  id 
) [related, inherited]

Get OVAL variable by ID.

Return a designated oval_variable from the specified oval_object_model. If the specified id does not resolve to an oval_variable the function returns NULL.

Parameters:
model the queried model.
id the variable id.
struct oval_variable_iterator * oval_object_model_get_variables ( struct oval_object_model model  )  [related, inherited]

Get OVAL variables.

Return all oval_variables from the specified oval_object_model.

Parameters:
model the queried model.
void oval_object_model_load ( struct oval_object_model model,
struct oval_import_source source,
oval_xml_error_handler  error_handler,
void *  client 
) [related, inherited]

Load OVAL definitions from a XML stream.

Merge content from a specified XML stream into a specified oval_object_model. If the input_source specifies a model entity (id=A, version=V) and the model specifies no entity (id=A, ...) then (id=A, version=V) is merged into the model. If the input_source specifies a model entity (id=A, version=V) and the model specifies an entity (id=A, ...) then (id=A, version=V) then the source specification is skipped.

Parameters:
model the merge target model.
source an <oval_def:oval_definitions> XML stream
error_handler callback for detected error conditions (may be NULL)
client pointer to client data (may be NULL)
int oval_results_model_export ( struct oval_results_model ,
struct oval_result_directives ,
struct oval_export_target  
)

export oval results to XML file.

Parameters:
model the oval_results_model
target the export target stream (XML)
void oval_results_model_free ( struct oval_results_model model  )  [related, inherited]

free memory allocated to a specified oval results model.

Parameters:
the specified oval_results model
struct oval_object_model * oval_results_model_get_object_model ( struct oval_results_model model  )  [related, inherited]

oval_results_model_object_model Return bound object model from an oval_results_model.

Parameters:
model the specified oval_results_model.
struct oval_result_system_iterator * oval_results_model_get_systems ( struct oval_results_model  )  [related, inherited]

Return iterator over reporting systems.

Parameters:
model the specified results model
struct oval_result_directives * oval_results_model_load ( struct oval_results_model ,
struct oval_import_source ,
oval_xml_error_handler  ,
void *   
) [related, inherited]

load oval results from XML file.

Parameters:
model the oval_results_model
source the input source (XML)
error_handler the error handler
client_data client data;
struct oval_results_model * oval_results_model_new ( struct oval_object_model object_model,
struct oval_syschar_model **   
) [related, inherited]

Create new oval_results_model.

The new model is bound to a specified oval_object_model and variable bindings.

Parameters:
syschar_model the specified oval_syschar_model.
void oval_syschar_model_free ( struct oval_syschar_model model  )  [related, inherited]

free memory allocated to a specified syschar model.

Parameters:
model the specified syschar model
struct oval_object_model * oval_syschar_model_get_object_model ( struct oval_syschar_model model  )  [related, inherited]

Return related oval_object_model from an oval_syschar_model.

Parameters:
model the specified oval_syschar_model.
struct oval_syschar * oval_syschar_model_get_syschar ( struct oval_syschar_model model,
char *  object_id 
) [related, inherited]

Return the oval_syschar bound to a specified object_id.

Returns NULL if the object_id does not resolve to an oval_object in the bound oval_object_model.

Parameters:
model the queried oval_syschar_model.
object_id the specified object_id.
struct oval_syschar_iterator * oval_syschar_model_get_syschars ( struct oval_syschar_model model  )  [related, inherited]

Return an iterator over the oval_sychar objects persisted by this model.

Parameters:
model the specified oval_syschar_model.
struct oval_sysinfo * oval_syschar_model_get_sysinfo ( struct oval_syschar_model model  )  [related, inherited]

Return default sysinfo bound to syschar model.

Parameters:
model the specified oval_syschar_model.
struct oval_syschar_model * oval_syschar_model_new ( struct oval_object_model object_model,
struct oval_variable_binding_iterator *  bindings 
) [related, inherited]

Create new oval_syschar_model.

The new model is bound to a specified oval_object_model and variable bindings.

Parameters:
object_model the specified oval_object_model.
bindings the specified oval_variable_bindings.

Generated on 29 Sep 2009 for Open SCAP Library by  doxygen 1.6.1