OVALRES
[OVAL]

Interface for Results model. More...

Data Structures

struct  oval_results_model
 OVAL Results Model holds OVAL results structure instances. More...
struct  oval_result_system
struct  oval_result_system_iterator
struct  oval_result_definition
struct  oval_result_definition_iterator
struct  oval_result_test
struct  oval_result_test_iterator
struct  oval_result_item
struct  oval_result_item_iterator
struct  oval_result_criteria_node
struct  oval_result_criteria_node_iterator
struct  oval_result_directives
 This structure holds instance of OVAL Result Directives for particular oval_results_model. More...

Files

file  oval_results.h

Enumerations

enum  oval_result_t {
  OVAL_RESULT_TRUE = 1, OVAL_RESULT_FALSE = 2, OVAL_RESULT_UNKNOWN = 4, OVAL_RESULT_ERROR = 8,
  OVAL_RESULT_NOT_EVALUATED = 16, OVAL_RESULT_NOT_APPLICABLE = 32
}
 

Result values for the evaluation of an OVAL Definition or an OVAL Test.

More...
enum  oval_result_directive_content_t { OVAL_DIRECTIVE_CONTENT_UNKNOWN = 0, OVAL_DIRECTIVE_CONTENT_THIN = 1, OVAL_DIRECTIVE_CONTENT_FULL = 2 }
 

Values for the directives controlling the expected content of the results file.

More...

Functions

const char * oval_result_get_text (oval_result_t)
struct oval_results_modeloval_results_model::oval_results_model_new (struct oval_definition_model *definition_model, struct oval_syschar_model **)
 Create new oval_results_model.
struct oval_result_directivesoval_results_model::oval_results_model_import (struct oval_results_model *model, const char *file)
 Import the content from the file into an oval_result_model.
struct oval_results_modeloval_results_model::oval_results_model_clone (struct oval_results_model *)
 Copy an 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.
int oval_results_model::oval_results_model_export (struct oval_results_model *, struct oval_result_directives *, const char *file)
 Export oval results into file.
struct oval_result_systemoval_result_system::oval_result_system_new (struct oval_results_model *, struct oval_syschar_model *)
struct oval_result_systemoval_result_system::oval_result_system_clone (struct oval_results_model *new_model, struct oval_result_system *old_system)
void oval_result_system::oval_result_system_free (struct oval_result_system *)
struct oval_result_definitionoval_result_definition::oval_result_definition_new (struct oval_result_system *, char *)
struct oval_result_definitionoval_result_definition::oval_result_definition_clone (struct oval_result_system *new_system, struct oval_result_definition *old_definition)
void oval_result_definition::oval_result_definition_free (struct oval_result_definition *)
struct oval_result_testoval_result_test::oval_result_test_new (struct oval_result_system *, char *)
struct oval_result_testoval_result_test::oval_result_test_clone (struct oval_result_system *new_system, struct oval_result_test *old_test)
void oval_result_test::oval_result_test_free (struct oval_result_test *)
struct oval_result_itemoval_result_item::oval_result_item_new (struct oval_result_system *, char *)
struct oval_result_itemoval_result_item::oval_result_item_clone (struct oval_result_system *new_system, struct oval_result_item *old_item)
void oval_result_item::oval_result_item_free (struct oval_result_item *)
struct oval_result_criteria_nodeoval_result_criteria_node::oval_result_criteria_node_new (struct oval_result_system *, oval_criteria_node_type_t, int,...)
struct oval_result_criteria_nodeoval_result_criteria_node::oval_result_criteria_node_clone (struct oval_result_system *new_system, struct oval_result_criteria_node *old_node)
void oval_result_criteria_node::oval_result_criteria_node_free (struct oval_result_criteria_node *)
struct oval_result_directivesoval_result_directives::oval_result_directives_new (struct oval_results_model *)
 Create new OVAL Results Directives instance.
void oval_result_directives::oval_result_directives_free (struct oval_result_directives *)

Evaluators



int oval_results_model_eval (struct oval_results_model *)
 Evaluate all result_systems.
bool oval_results_model::oval_results_model_is_valid (struct oval_results_model *results_model)
 Return true if the results_model instance is valid An oval_results_model is valid if all the following are true


int oval_result_system::oval_result_system_eval (struct oval_result_system *sys)
 Function evaluates all OVAL definitions of specified result_system.
oval_result_t oval_result_system::oval_result_system_eval_definition (struct oval_result_system *sys, const char *id)
 Function evaluates specified OVAL definition in result_system.
bool oval_result_system::oval_result_system_is_valid (struct oval_result_system *result_system)
 Return true if the result_system instance is valid An oval_result_system is valid if all the following are true

  • The associated oval_syschar_model is valid
  • All included result definitions are valid
  • All included result tests are valid.

bool oval_result_definition::oval_result_definition_is_valid (struct oval_result_definition *result_definition)
 Return true if the result_definition instance is valid An oval_result_definition is valid if all the following are true

  • The system attribute is non-NULL
  • The associated oval_definition is valid
  • All included result criteria nodes are valid.

bool oval_result_test::oval_result_test_is_valid (struct oval_result_test *result_test)
 Return true if the result_test instance is valid An oval_result_test is valid if all the following are true

  • The associated oval_test is valid
  • All included result items are valid
  • All included variable bindings are valid.

bool oval_result_item::oval_result_item_is_valid (struct oval_result_item *result_item)
 Return true if the result_item instance is valid An oval_result_item is valid if all the following are true


bool oval_result_criteria_node::oval_result_criteria_node_is_valid (struct oval_result_criteria_node *result_criteria_node)
 Returns true if Oval_result_criteria_node is valid.
bool oval_result_directives::oval_result_directives_is_valid (struct oval_result_directives *result_directives)

Getters



bool oval_result_test_is_locked (struct oval_result_test *result_test)
 Return true if the result_test instance is locked.
oval_criteria_node_type_t oval_result_criteria_node_get_type (struct oval_result_criteria_node *)
struct oval_definition_modeloval_results_model::oval_results_model_get_definition_model (struct oval_results_model *model)
 Return bound definition 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.
bool oval_results_model::oval_results_model_is_locked (struct oval_results_model *result_model)
struct oval_results_modeloval_result_system::oval_result_system_get_results_model (struct oval_result_system *)
struct oval_result_definitionoval_result_system::oval_result_system_get_definition (struct oval_result_system *, const char *)
struct
oval_result_definition_iterator
oval_result_system::oval_result_system_get_definitions (struct oval_result_system *)
struct oval_result_test_iteratoroval_result_system::oval_result_system_get_tests (struct oval_result_system *)
struct oval_syschar_modeloval_result_system::oval_result_system_get_syschar_model (struct oval_result_system *)
struct oval_sysinfooval_result_system::oval_result_system_get_sysinfo (struct oval_result_system *)
bool oval_result_system::oval_result_system_is_locked (struct oval_result_system *result_system)
struct oval_definitionoval_result_definition::oval_result_definition_get_definition (struct oval_result_definition *)
struct oval_result_systemoval_result_definition::oval_result_definition_get_system (struct oval_result_definition *)
int oval_result_definition::oval_result_definition_get_instance (struct oval_result_definition *)
oval_result_t oval_result_definition::oval_result_definition_eval (struct oval_result_definition *)
oval_result_t oval_result_definition::oval_result_definition_get_result (struct oval_result_definition *)
struct oval_message_iteratoroval_result_definition::oval_result_definition_get_messages (struct oval_result_definition *)
struct oval_result_criteria_nodeoval_result_definition::oval_result_definition_get_criteria (struct oval_result_definition *)
bool oval_result_definition::oval_result_definition_is_locked (struct oval_result_definition *result_definition)
struct oval_testoval_result_test::oval_result_test_get_test (struct oval_result_test *)
struct oval_result_systemoval_result_test::oval_result_test_get_system (struct oval_result_test *)
oval_result_t oval_result_test::oval_result_test_eval (struct oval_result_test *)
oval_result_t oval_result_test::oval_result_test_get_result (struct oval_result_test *)
int oval_result_test::oval_result_test_get_instance (struct oval_result_test *)
struct oval_messageoval_result_test::oval_result_test_get_message (struct oval_result_test *)
struct oval_result_item_iteratoroval_result_test::oval_result_test_get_items (struct oval_result_test *)
struct
oval_variable_binding_iterator
oval_result_test::oval_result_test_get_bindings (struct oval_result_test *)
struct oval_sysdataoval_result_item::oval_result_item_get_sysdata (struct oval_result_item *)
oval_result_t oval_result_item::oval_result_item_get_result (struct oval_result_item *)
struct oval_message_iteratoroval_result_item::oval_result_item_get_messages (struct oval_result_item *)
bool oval_result_item::oval_result_item_is_locked (struct oval_result_item *result_item)
oval_result_t oval_result_criteria_node::oval_result_criteria_node_eval (struct oval_result_criteria_node *)
oval_result_t oval_result_criteria_node::oval_result_criteria_node_get_result (struct oval_result_criteria_node *)
bool oval_result_criteria_node::oval_result_criteria_node_get_negate (struct oval_result_criteria_node *)
oval_operator_t oval_result_criteria_node::oval_result_criteria_node_get_operator (struct oval_result_criteria_node *)
struct
oval_result_criteria_node_iterator
oval_result_criteria_node::oval_result_criteria_node_get_subnodes (struct oval_result_criteria_node *)
struct oval_result_testoval_result_criteria_node::oval_result_criteria_node_get_test (struct oval_result_criteria_node *)
struct oval_result_definitionoval_result_criteria_node::oval_result_criteria_node_get_extends (struct oval_result_criteria_node *)
bool oval_result_criteria_node::oval_result_criteria_node_is_locked (struct oval_result_criteria_node *result_criteria_node)
bool oval_result_directives::oval_result_directives_get_reported (struct oval_result_directives *, oval_result_t)
oval_result_directive_content_t oval_result_directives::oval_result_directives_get_content (struct oval_result_directives *, oval_result_t)
bool oval_result_directives::oval_result_directives_is_locked (struct oval_result_directives *result_directives)

Setters



void oval_results_model::oval_results_model_add_system (struct oval_results_model *, struct oval_result_system *)
void oval_results_model::oval_results_model_lock (struct oval_results_model *result_model)
 Lock the result_model instance.
void oval_result_system::oval_result_system_add_definition (struct oval_result_system *, struct oval_result_definition *)
void oval_result_system::oval_result_system_add_test (struct oval_result_system *, struct oval_result_test *)
void oval_result_definition::oval_result_definition_set_result (struct oval_result_definition *, oval_result_t)
void oval_result_definition::oval_result_definition_set_instance (struct oval_result_definition *, int)
void oval_result_definition::oval_result_definition_set_criteria (struct oval_result_definition *, struct oval_result_criteria_node *)
void oval_result_definition::oval_result_definition_add_message (struct oval_result_definition *, struct oval_message *)
void oval_result_test::oval_result_test_set_result (struct oval_result_test *, oval_result_t)
void oval_result_test::oval_result_test_set_instance (struct oval_result_test *test, int instance)
void oval_result_test::oval_result_test_set_message (struct oval_result_test *, struct oval_message *)
void oval_result_test::oval_result_test_add_item (struct oval_result_test *, struct oval_result_item *)
void oval_result_test::oval_result_test_add_binding (struct oval_result_test *, struct oval_variable_binding *)
void oval_result_item::oval_result_item_set_result (struct oval_result_item *, oval_result_t)
void oval_result_item::oval_result_item_add_message (struct oval_result_item *, struct oval_message *)
void oval_result_criteria_node::oval_result_criteria_node_set_result (struct oval_result_criteria_node *, oval_result_t)
void oval_result_criteria_node::oval_result_criteria_node_set_negate (struct oval_result_criteria_node *, bool)
void oval_result_criteria_node::oval_result_criteria_node_set_operator (struct oval_result_criteria_node *, oval_operator_t)
void oval_result_criteria_node::oval_result_criteria_node_add_subnode (struct oval_result_criteria_node *, struct oval_result_criteria_node *)
void oval_result_criteria_node::oval_result_criteria_node_set_test (struct oval_result_criteria_node *, struct oval_result_test *)
void oval_result_criteria_node::oval_result_criteria_node_set_extends (struct oval_result_criteria_node *, struct oval_result_definition *)
void oval_result_directives::oval_result_directives_set_reported (struct oval_result_directives *, int flag, bool val)
 Set (or unset) result types that are intended to be reported.
void oval_result_directives::oval_result_directives_set_content (struct oval_result_directives *, int flag, oval_result_directive_content_t)
 Configure the depth of infomation.

Iterators



bool oval_result_system_iterator::oval_result_system_iterator_has_more (struct oval_result_system_iterator *)
struct oval_result_systemoval_result_system_iterator::oval_result_system_iterator_next (struct oval_result_system_iterator *)
void oval_result_system_iterator::oval_result_system_iterator_free (struct oval_result_system_iterator *)
bool oval_result_definition_iterator::oval_result_definition_iterator_has_more (struct oval_result_definition_iterator *)
struct oval_result_definitionoval_result_definition_iterator::oval_result_definition_iterator_next (struct oval_result_definition_iterator *)
void oval_result_definition_iterator::oval_result_definition_iterator_free (struct oval_result_definition_iterator *)
bool oval_result_test_iterator::oval_result_test_iterator_has_more (struct oval_result_test_iterator *)
struct oval_result_testoval_result_test_iterator::oval_result_test_iterator_next (struct oval_result_test_iterator *)
void oval_result_test_iterator::oval_result_test_iterator_free (struct oval_result_test_iterator *)
bool oval_result_item_iterator::oval_result_item_iterator_has_more (struct oval_result_item_iterator *)
struct oval_result_itemoval_result_item_iterator::oval_result_item_iterator_next (struct oval_result_item_iterator *)
void oval_result_item_iterator::oval_result_item_iterator_free (struct oval_result_item_iterator *)
bool oval_result_criteria_node_iterator::oval_result_criteria_node_iterator_has_more (struct oval_result_criteria_node_iterator *)
struct oval_result_criteria_nodeoval_result_criteria_node_iterator::oval_result_criteria_node_iterator_next (struct oval_result_criteria_node_iterator *)
void oval_result_criteria_node_iterator::oval_result_criteria_node_iterator_free (struct oval_result_criteria_node_iterator *)

Detailed Description

Interface for Results model.

Class diagram

result_model.png

Enumeration Type Documentation

Values for the directives controlling the expected content of the results file.

Enumerator:
OVAL_DIRECTIVE_CONTENT_UNKNOWN 

Undefined value.

OVAL_DIRECTIVE_CONTENT_THIN 

Only the minimal amount of information will be provided.

OVAL_DIRECTIVE_CONTENT_FULL 

Very detailed information will be provided allowing in-depth reports to be generated from the results.

Result values for the evaluation of an OVAL Definition or an OVAL Test.

Enumerator:
OVAL_RESULT_TRUE 

Characteristics being evaluated match the information represented in the system characteristic.

OVAL_RESULT_FALSE 

Characteristics being evaluated do not match the information represented in the system characteristic.

OVAL_RESULT_UNKNOWN 

Characteristics being evaluated can not be found in the system characteristic.

OVAL_RESULT_ERROR 

Characteristics being evaluated exist in the system characteristic file but there was an error either collecting information or in performing anaylsis.

OVAL_RESULT_NOT_EVALUATED 

Choice was made not to evaluate the given definition or test.

OVAL_RESULT_NOT_APPLICABLE 

Definition or test being evaluated is not valid on the given platform.


Function Documentation

struct oval_result_criteria_node * oval_result_criteria_node_clone ( struct oval_result_system new_system,
struct oval_result_criteria_node old_node 
) [read, inherited]
Returns:
A copy of the specified oval_result_criteria_node.
bool oval_result_criteria_node_is_valid ( struct oval_result_criteria_node result_criteria_node  )  [inherited]

Returns true if Oval_result_criteria_node is valid.

An Oval_result_criteria_node is valid if one of the following is true:

  • The type attribute is OVAL_NODETYPE_CRITERIA -- AND
    • The subnode attribute is not an empty iterator -- AND
    • Each iterated Oval_result_criteria_node is valid.
  • The type attribute is OVAL_NODETYPE_CRITERION -- AND
    • The referenced result test is valid.
  • The type attribute is OVAL_NODETYPE_EXTENDDEF -- AND
    • The referenced result definition is valid.
struct oval_result_definition * oval_result_definition_clone ( struct oval_result_system new_system,
struct oval_result_definition old_definition 
) [read, inherited]
Returns:
A copy of the specified oval_result_definition.
struct oval_result_directives * oval_result_directives_new ( struct oval_results_model  )  [read, inherited]

Create new OVAL Results Directives instance.

Directives are setup NOT to report any type of result by default.

void oval_result_directives_set_reported ( struct oval_result_directives ,
int  flag,
bool  val 
) [inherited]

Set (or unset) result types that are intended to be reported.

Functions does not override previous settings.

struct oval_result_item * oval_result_item_clone ( struct oval_result_system new_system,
struct oval_result_item old_item 
) [read, inherited]
Returns:
A copy of the specified oval_result_item.
struct oval_result_system * oval_result_system_clone ( struct oval_results_model new_model,
struct oval_result_system old_system 
) [read, inherited]
Returns:
A copy of the specified oval_result_system.
int oval_result_system_eval ( struct oval_result_system sys  )  [inherited]

Function evaluates all OVAL definitions of specified result_system.

It assumes that all necessary system characteristics for evaluation were altready gathered.

Parameters:
sys is result_system from result_model
Returns:
0 on sucess and -1 on fail. Use ERRORS mechanism to examine the error.
oval_result_t oval_result_system_eval_definition ( struct oval_result_system sys,
const char *  id 
) [inherited]

Function evaluates specified OVAL definition in result_system.

It assumes that all necessary system characteristics for evaluation were altready gathered.

Parameters:
sys is result_system from result_model
id of the definition from definition_model from result_model
Returns:
OVAL_RESULT_ERROR if there was a problem in evaluation. Use ERRORS mechanism to examine the error. Otherwise one of valid values for the evaluation of an OVAL Definitions is returned.
struct oval_result_test * oval_result_test_clone ( struct oval_result_system new_system,
struct oval_result_test old_test 
) [read, inherited]
Returns:
A copy of the specified oval_result_test.
bool oval_result_test_is_locked ( struct oval_result_test result_test  ) 

Return true if the result_test instance is locked.

The state of a locked instance cannot be changed.

struct oval_results_model * oval_results_model_clone ( struct oval_results_model  )  [read, inherited]

Copy an oval_results_model.

Returns:
A copy of the specified oval_results_model.
int oval_results_model_eval ( struct oval_results_model  ) 

Evaluate all result_systems.

It's assumed that all necessary system characteristics for evaluation were altready gathered.

Returns:
0 on sucess and -1 on fail. Use ERRORS mechanism to examine the error.
int oval_results_model_export ( struct oval_results_model ,
struct oval_result_directives ,
const char *  file 
) [inherited]

Export oval results into file.

Parameters:
model the oval_results_model
file filename
void oval_results_model_free ( struct oval_results_model model  )  [inherited]

Free memory allocated to a specified oval results model.

Parameters:
the specified oval_results model
struct oval_definition_model * oval_results_model_get_definition_model ( struct oval_results_model model  )  [read, inherited]

Return bound definition 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  )  [read, inherited]

Return iterator over reporting systems.

Parameters:
model the specified results model
struct oval_result_directives * oval_results_model_import ( struct oval_results_model model,
const char *  file 
) [read, inherited]

Import the content from the file into an oval_result_model.

If imported content specifies a model entity that is already registered within the model its content is overwritten.

Parameters:
model the oval_results_model
file filename
Returns:
-1 if an error occurred
void oval_results_model_lock ( struct oval_results_model result_model  )  [inherited]

Lock the result_model instance.

The state of a locked instance cannot be changed. This operation has no effect if the model is already locked.

struct oval_results_model * oval_results_model_new ( struct oval_definition_model definition_model,
struct oval_syschar_model **   
) [read, inherited]

Create new oval_results_model.

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

Parameters:
definition_model the specified oval_definition_model.
syschar_model the array of specified oval_syschar_model(s) terminated by NULL.

Generated on 14 Jul 2010 for Open SCAP Library by  doxygen 1.6.1