Loading...
Searching...
No Matches
OVALSYS
OVAL

Interface for System Characteristics model. More...

Collaboration diagram for OVALSYS:

## Files

file | oval_system_characteristics.h

## Data Structures

struct | oval_syschar_model
| OVAL System Characteristics model. More...
struct | oval_sysinfo
| General instrumented host description. More...
struct | oval_sysinfo_iterator
struct | oval_syschar
| Characteristics bound to an Oval_object. More...
struct | oval_syschar_iterator
struct | oval_sysint
| Network interface description. More...
struct | oval_sysint_iterator
struct | oval_sysitem
| Each instance of Oval_sysitem represents one item. More...
struct | oval_sysitem_iterator
struct | oval_sysent
struct | oval_sysent_iterator
struct | oval_message
| OVAL message. More...
struct | oval_message_iterator
struct | oval_variable_binding
| Binding of an value to an OVAL variable. More...
struct | oval_variable_binding_iterator

## Enumerations

enum | oval_syschar_collection_flag_t { SYSCHAR_FLAG_UNKNOWN = 0 , SYSCHAR_FLAG_ERROR = 1 , SYSCHAR_FLAG_COMPLETE = 2 , SYSCHAR_FLAG_INCOMPLETE = 3 , SYSCHAR_FLAG_DOES_NOT_EXIST = 4 , SYSCHAR_FLAG_NOT_COLLECTED = 5 , SYSCHAR_FLAG_NOT_APPLICABLE = 6 }
| System characteristics result flag.
enum | oval_syschar_status_t { SYSCHAR_STATUS_UNKNOWN = 0 , SYSCHAR_STATUS_ERROR = 1 , SYSCHAR_STATUS_EXISTS = 2 , SYSCHAR_STATUS_DOES_NOT_EXIST = 3 , SYSCHAR_STATUS_NOT_COLLECTED = 4 }
| System characteristics status.
enum | oval_message_level_t { OVAL_MESSAGE_LEVEL_NONE = 0 , OVAL_MESSAGE_LEVEL_DEBUG = 1 , OVAL_MESSAGE_LEVEL_INFO = 2 , OVAL_MESSAGE_LEVEL_WARNING = 3 , OVAL_MESSAGE_LEVEL_ERROR = 4 , OVAL_MESSAGE_LEVEL_FATAL = 5 }
| Message level.

## Functions

OSCAP_API const char * | oval_syschar_collection_flag_get_text (oval_syschar_collection_flag_t flag)
OSCAP_API const char * | oval_syschar_status_get_text (oval_syschar_status_t status)
OSCAP_API const char * | oval_message_level_text (oval_message_level_t)
OSCAP_API struct oval_syschar_model * | oval_syschar_model::oval_syschar_model_new (struct oval_definition_model *definition_model)
| Create new oval_syschar_model.
OSCAP_API int | oval_syschar_model::oval_syschar_model_import_source (struct oval_syschar_model *model, struct oscap_source *source)
| Import the content from the oscap_source into an oval_syschar_model.
OSCAP_API struct oval_syschar_model * | oval_syschar_model::oval_syschar_model_clone (struct oval_syschar_model *)
| Copy an oval_syschar_model.
OSCAP_API int | oval_syschar_model::oval_syschar_model_export (struct oval_syschar_model *, const char *file)
| Export system characteristics into file.
OSCAP_API void | oval_syschar_model::oval_syschar_model_free (struct oval_syschar_model *model)
| Free memory allocated to a specified syschar model.
OSCAP_API struct oval_sysinfo * | oval_sysinfo::oval_sysinfo_new (struct oval_syschar_model *)
OSCAP_API struct oval_sysinfo * | oval_sysinfo::oval_sysinfo_clone (struct oval_syschar_model *new_model, struct oval_sysinfo *old_sysinfo)
OSCAP_API void | oval_sysinfo::oval_sysinfo_free (struct oval_sysinfo *)
OSCAP_API struct oval_syschar * | oval_syschar::oval_syschar_new (struct oval_syschar_model *, struct oval_object *)
OSCAP_API struct oval_syschar * | oval_syschar::oval_syschar_clone (struct oval_syschar_model *new_model, struct oval_syschar *old_syschar)
OSCAP_API void | oval_syschar::oval_syschar_free (struct oval_syschar *)
OSCAP_API struct oval_sysint * | oval_sysint::oval_sysint_new (struct oval_syschar_model *)
OSCAP_API struct oval_sysint * | oval_sysint::oval_sysint_clone (struct oval_syschar_model *new_model, struct oval_sysint *old_sysint)
OSCAP_API void | oval_sysint::oval_sysint_free (struct oval_sysint *)
OSCAP_API struct oval_sysitem * | oval_sysitem::oval_sysitem_new (struct oval_syschar_model *, const char *id)
OSCAP_API struct oval_sysitem * | oval_sysitem::oval_sysitem_clone (struct oval_syschar_model *new_model, struct oval_sysitem *old_data)
OSCAP_API void | oval_sysitem::oval_sysitem_free (struct oval_sysitem *)
OSCAP_API struct oval_sysent * | oval_sysent::oval_sysent_new (struct oval_syschar_model *)
OSCAP_API struct oval_sysent * | oval_sysent::oval_sysent_clone (struct oval_syschar_model *new_model, struct oval_sysent *old_item)
OSCAP_API void | oval_sysent::oval_sysent_free (struct oval_sysent *)
OSCAP_API struct oval_message * | oval_message::oval_message_new (void)
OSCAP_API struct oval_message * | oval_message::oval_message_clone (struct oval_message *old_message)
OSCAP_API void | oval_message::oval_message_free (struct oval_message *)
OSCAP_API struct oval_variable_binding * | oval_variable_binding::oval_variable_binding_new (struct oval_variable *, char *)
OSCAP_API struct oval_variable_binding * | oval_variable_binding::oval_variable_binding_clone (struct oval_variable_binding *, struct oval_definition_model *)
OSCAP_API void | oval_variable_binding::oval_variable_binding_free (struct oval_variable_binding *)

## Setters

OSCAP_API void | oval_syschar_model_set_generator (struct oval_syschar_model *model, struct oval_generator *generator)
OSCAP_API int | oval_syschar_model::oval_syschar_model_bind_variable_model (struct oval_syschar_model *, struct oval_variable_model *)
| Bind a variable model to the definitions bound to the syschar model.
OSCAP_API void | oval_syschar_model::oval_syschar_model_set_sysinfo (struct oval_syschar_model *model, struct oval_sysinfo *sysinfo)
OSCAP_API void | oval_sysinfo::oval_sysinfo_set_os_name (struct oval_sysinfo *, char *)
OSCAP_API void | oval_sysinfo::oval_sysinfo_set_os_version (struct oval_sysinfo *, char *)
OSCAP_API void | oval_sysinfo::oval_sysinfo_set_os_architecture (struct oval_sysinfo *, char *)
OSCAP_API void | oval_sysinfo::oval_sysinfo_set_primary_host_name (struct oval_sysinfo *, char *)
OSCAP_API void | oval_sysinfo::oval_sysinfo_add_interface (struct oval_sysinfo *, struct oval_sysint *)
OSCAP_API void | oval_syschar::oval_syschar_add_variable_binding (struct oval_syschar *, struct oval_variable_binding *)
OSCAP_API void | oval_syschar::oval_syschar_set_flag (struct oval_syschar *model, oval_syschar_collection_flag_t flag)
OSCAP_API void | oval_syschar::oval_syschar_set_object (struct oval_syschar *, struct oval_object *)
OSCAP_API int | oval_syschar::oval_syschar_get_variable_instance (const struct oval_syschar *syschar)
| Gets the variable_instance attribute of the syschar.
OSCAP_API void | oval_syschar::oval_syschar_set_variable_instance (struct oval_syschar *syschar, int variable_instance_in)
| Sets the variable_instance attribute of the syschar.
OSCAP_API void | oval_syschar::oval_syschar_add_sysitem (struct oval_syschar *, struct oval_sysitem *)
OSCAP_API void | oval_syschar::oval_syschar_add_message (struct oval_syschar *syschar, struct oval_message *message)
OSCAP_API void | oval_syschar::oval_syschar_add_new_message (struct oval_syschar *syschar, char *text, oval_message_level_t level)
OSCAP_API void | oval_sysint::oval_sysint_set_name (struct oval_sysint *, char *)
OSCAP_API void | oval_sysint::oval_sysint_set_ip_address (struct oval_sysint *, char *)
OSCAP_API void | oval_sysint::oval_sysint_set_mac_address (struct oval_sysint *, char *)
OSCAP_API void | oval_sysitem::oval_sysitem_set_status (struct oval_sysitem *, oval_syschar_status_t)
OSCAP_API void | oval_sysitem::oval_sysitem_set_subtype (struct oval_sysitem *sysitem, oval_subtype_t subtype)
OSCAP_API void | oval_sysitem::oval_sysitem_add_message (struct oval_sysitem *, struct oval_message *)
OSCAP_API void | oval_sysitem::oval_sysitem_add_sysent (struct oval_sysitem *, struct oval_sysent *)
OSCAP_API void | oval_sysent::oval_sysent_set_name (struct oval_sysent *sysent, char *name)
OSCAP_API void | oval_sysent::oval_sysent_set_value (struct oval_sysent *sysent, char *value)
OSCAP_API void | oval_sysent::oval_sysent_add_record_field (struct oval_sysent *, struct oval_record_field *)
OSCAP_API void | oval_sysent::oval_sysent_set_status (struct oval_sysent *sysent, oval_syschar_status_t status)
OSCAP_API void | oval_sysent::oval_sysent_set_datatype (struct oval_sysent *sysent, oval_datatype_t type)
OSCAP_API void | oval_sysent::oval_sysent_set_mask (struct oval_sysent *sysent, int mask)
OSCAP_API void | oval_record_field::oval_record_field_set_status (struct oval_record_field *, oval_syschar_status_t)
OSCAP_API void | oval_message::oval_message_set_text (struct oval_message *, char *)
OSCAP_API void | oval_message::oval_message_set_level (struct oval_message *, oval_message_level_t)
OSCAP_API void | oval_variable_binding::oval_variable_binding_set_variable (struct oval_variable_binding *, struct oval_variable *)
OSCAP_API void | oval_variable_binding::oval_variable_binding_add_value (struct oval_variable_binding *, char *)

## Getters

OSCAP_API struct oval_generator * | oval_syschar_model_get_generator (struct oval_syschar_model *model)
OSCAP_API oval_syschar_collection_flag_t | oval_variable_get_collection_flag (struct oval_variable *)
OSCAP_API struct oval_definition_model * | oval_syschar_model::oval_syschar_model_get_definition_model (struct oval_syschar_model *model)
| Return related oval_definition_model from an oval_syschar_model.
OSCAP_API 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.
OSCAP_API struct oval_sysinfo * | oval_syschar_model::oval_syschar_model_get_sysinfo (struct oval_syschar_model *model)
| Return default sysinfo bound to syschar model.
OSCAP_API struct oval_syschar * | oval_syschar_model::oval_syschar_model_get_syschar (struct oval_syschar_model *model, const char *object_id)
| Return the oval_syschar bound to a specified object_id.
OSCAP_API int | oval_syschar_model::oval_syschar_model_compute_variable (struct oval_syschar_model *, struct oval_variable *)
| Get the oval_values bound to a specified variable.
OSCAP_API struct oval_sysitem * | oval_syschar_model::oval_syschar_model_get_sysitem (struct oval_syschar_model *, const char *)
OSCAP_API char * | oval_sysinfo::oval_sysinfo_get_os_name (struct oval_sysinfo *)
| Get operating system name.
OSCAP_API char * | oval_sysinfo::oval_sysinfo_get_os_version (struct oval_sysinfo *)
| Get operating system version.
OSCAP_API char * | oval_sysinfo::oval_sysinfo_get_os_architecture (struct oval_sysinfo *)
| Get operating system architecture.
OSCAP_API char * | oval_sysinfo::oval_sysinfo_get_primary_host_name (struct oval_sysinfo *)
| Get primary host name of the tested machine.
OSCAP_API struct oval_sysint_iterator * | oval_sysinfo::oval_sysinfo_get_interfaces (struct oval_sysinfo *)
| Get an iterator to the list of network interfaces.
OSCAP_API oval_syschar_collection_flag_t | oval_syschar::oval_syschar_get_flag (struct oval_syschar *)
| Get system characteristic flag.
OSCAP_API struct oval_message_iterator * | oval_syschar::oval_syschar_get_messages (struct oval_syschar *)
| Get messages bound to this system characteristic.
OSCAP_API struct oval_object * | oval_syschar::oval_syschar_get_object (struct oval_syschar *)
| Get object associated with this system characteristic.
OSCAP_API struct oval_variable_binding_iterator * | oval_syschar::oval_syschar_get_variable_bindings (struct oval_syschar *)
| Get system characteristic variable bindings.
OSCAP_API struct oval_sysitem_iterator * | oval_syschar::oval_syschar_get_sysitem (struct oval_syschar *)
| Get system characteristic data.
OSCAP_API char * | oval_sysint::oval_sysint_get_name (struct oval_sysint *)
| Get interface name.
OSCAP_API char * | oval_sysint::oval_sysint_get_ip_address (struct oval_sysint *)
| Get interface IP address.
OSCAP_API char * | oval_sysint::oval_sysint_get_mac_address (struct oval_sysint *)
| Get interface MAC address.
OSCAP_API char * | oval_sysitem::oval_sysitem_get_id (struct oval_sysitem *)
| Get system data ID.
OSCAP_API oval_syschar_status_t | oval_sysitem::oval_sysitem_get_status (struct oval_sysitem *)
| Get system data status.
OSCAP_API struct oval_sysent_iterator * | oval_sysitem::oval_sysitem_get_sysents (struct oval_sysitem *)
| Get system data individual items.
OSCAP_API struct oval_message_iterator * | oval_sysitem::oval_sysitem_get_messages (struct oval_sysitem *)
| Get system data message.
OSCAP_API oval_subtype_t | oval_sysitem::oval_sysitem_get_subtype (struct oval_sysitem *)
| Get system data subtype.
OSCAP_API char * | oval_sysent::oval_sysent_get_name (struct oval_sysent *)
| Get system data item name.
OSCAP_API char * | oval_sysent::oval_sysent_get_value (struct oval_sysent *)
| Get system data item value.
OSCAP_API struct oval_record_field_iterator * | oval_sysent::oval_sysent_get_record_fields (struct oval_sysent *)
OSCAP_API oval_syschar_status_t | oval_sysent::oval_sysent_get_status (struct oval_sysent *)
| Get system data item status.
OSCAP_API oval_datatype_t | oval_sysent::oval_sysent_get_datatype (struct oval_sysent *)
| Get system data item data type.
OSCAP_API int | oval_sysent::oval_sysent_get_mask (struct oval_sysent *)
| Get system data item mask.
OSCAP_API oval_syschar_status_t | oval_record_field::oval_record_field_get_status (struct oval_record_field *)
OSCAP_API char * | oval_message::oval_message_get_text (struct oval_message *message)
| Get OVAL message text.
OSCAP_API oval_message_level_t | oval_message::oval_message_get_level (struct oval_message *message)
| Get OVAL message level.
OSCAP_API struct oval_variable * | oval_variable_binding::oval_variable_binding_get_variable (struct oval_variable_binding *)
| Get variable for this binding.
OSCAP_API struct oval_string_iterator * | oval_variable_binding::oval_variable_binding_get_values (struct oval_variable_binding *)
| Get value of this binding.

## Iterators

OSCAP_API bool | oval_sysinfo_iterator::oval_sysinfo_iterator_has_more (struct oval_sysinfo_iterator *)
OSCAP_API struct oval_sysinfo * | oval_sysinfo_iterator::oval_sysinfo_iterator_next (struct oval_sysinfo_iterator *)
OSCAP_API void | oval_sysinfo_iterator::oval_sysinfo_iterator_free (struct oval_sysinfo_iterator *)
OSCAP_API bool | oval_syschar_iterator::oval_syschar_iterator_has_more (struct oval_syschar_iterator *)
OSCAP_API struct oval_syschar * | oval_syschar_iterator::oval_syschar_iterator_next (struct oval_syschar_iterator *)
OSCAP_API void | oval_syschar_iterator::oval_syschar_iterator_free (struct oval_syschar_iterator *)
OSCAP_API bool | oval_sysint_iterator::oval_sysint_iterator_has_more (struct oval_sysint_iterator *)
OSCAP_API struct oval_sysint * | oval_sysint_iterator::oval_sysint_iterator_next (struct oval_sysint_iterator *)
OSCAP_API void | oval_sysint_iterator::oval_sysint_iterator_free (struct oval_sysint_iterator *)
OSCAP_API bool | oval_sysitem_iterator::oval_sysitem_iterator_has_more (struct oval_sysitem_iterator *)
OSCAP_API struct oval_sysitem * | oval_sysitem_iterator::oval_sysitem_iterator_next (struct oval_sysitem_iterator *)
OSCAP_API void | oval_sysitem_iterator::oval_sysitem_iterator_free (struct oval_sysitem_iterator *)
OSCAP_API bool | oval_sysent_iterator::oval_sysent_iterator_has_more (struct oval_sysent_iterator *)
OSCAP_API struct oval_sysent * | oval_sysent_iterator::oval_sysent_iterator_next (struct oval_sysent_iterator *)
OSCAP_API void | oval_sysent_iterator::oval_sysent_iterator_free (struct oval_sysent_iterator *)
OSCAP_API bool | oval_message_iterator::oval_message_iterator_has_more (struct oval_message_iterator *oc_message)
OSCAP_API struct oval_message * | oval_message_iterator::oval_message_iterator_next (struct oval_message_iterator *oc_message)
OSCAP_API void | oval_message_iterator::oval_message_iterator_free (struct oval_message_iterator *oc_message)
OSCAP_API bool | oval_variable_binding_iterator::oval_variable_binding_iterator_has_more (struct oval_variable_binding_iterator *)
OSCAP_API struct oval_variable_binding * | oval_variable_binding_iterator::oval_variable_binding_iterator_next (struct oval_variable_binding_iterator *)
OSCAP_API void | oval_variable_binding_iterator::oval_variable_binding_iterator_free (struct oval_variable_binding_iterator *)

## Detailed Description

Interface for System Characteristics model.

Class diagram

## Function Documentation

## oval_message_clone()

OSCAP_API struct oval_message * oval_message_clone | ( | struct oval_message * | old_message | ) |

Returns
  A copy of the specified oval_message.

## oval_syschar_clone()

OSCAP_API struct oval_syschar * oval_syschar_clone | ( | struct oval_syschar_model * | new_model,
|  | struct oval_syschar * | old_syschar )

Returns
  A copy of the specified oval_syschar.

## oval_syschar_get_variable_instance()

OSCAP_API int oval_syschar_get_variable_instance | ( | const struct oval_syschar * | syschar | ) |

Gets the variable_instance attribute of the syschar.

Returns
  currect variable_instance attribute assigned

## oval_syschar_model_bind_variable_model()

OSCAP_API int oval_syschar_model_bind_variable_model | ( | struct oval_syschar_model * | ,
|  | struct oval_variable_model * | )

Bind a variable model to the definitions bound to the syschar model.

Returns
  zero on success or non zero value if an error occurred

## oval_syschar_model_clone()

OSCAP_API struct oval_syschar_model * oval_syschar_model_clone | ( | struct oval_syschar_model * |  | ) |

Copy an oval_syschar_model.

Returns
  A copy of the specified oval_syschar_model.

## oval_syschar_model_free()

OSCAP_API void oval_syschar_model_free | ( | struct oval_syschar_model * | model | ) |

Free memory allocated to a specified syschar model.

Parameters

  model | the specified syschar model

## oval_syschar_model_get_definition_model()

OSCAP_API struct oval_definition_model * oval_syschar_model_get_definition_model | ( | struct oval_syschar_model * | model | ) |

Return related oval_definition_model from an oval_syschar_model.

Parameters

  model | the specified oval_syschar_model.

## oval_syschar_model_get_syschar()

OSCAP_API struct oval_syschar * oval_syschar_model_get_syschar | ( | struct oval_syschar_model * | model,
|  | const char * | object_id )

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_definition_model.

Parameters

  model | the queried oval_syschar_model.
  object_id | the specified object_id.

## oval_syschar_model_get_syschars()

OSCAP_API struct oval_syschar_iterator * oval_syschar_model_get_syschars | ( | struct oval_syschar_model * | model | ) |

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

Parameters

  model | the specified oval_syschar_model.

## oval_syschar_model_get_sysinfo()

OSCAP_API struct oval_sysinfo * oval_syschar_model_get_sysinfo | ( | struct oval_syschar_model * | model | ) |

Return default sysinfo bound to syschar model.

Parameters

  model | the specified oval_syschar_model.

## oval_syschar_model_import_source()

OSCAP_API int oval_syschar_model_import_source | ( | struct oval_syschar_model * | model,
|  | struct oscap_source * | source )

Import the content from the oscap_source into an oval_syschar_model.

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

Parameters

  model | the merge target model
  source | The oscap_source to import data from.

Returns
  zero on success or non zero value if an error occurred

## oval_syschar_model_new()

OSCAP_API struct oval_syschar_model * oval_syschar_model_new | ( | struct oval_definition_model * | definition_model | ) |

Create new oval_syschar_model.

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

Parameters

  definition_model | the specified oval_definition_model.

## oval_syschar_set_variable_instance()

OSCAP_API void oval_syschar_set_variable_instance | ( | struct oval_syschar * | syschar,
|  | int | variable_instance_in )

Sets the variable_instance attribute of the syschar.

Parameters

  syschar | collected object
  variable_instance_in | new settings of variable_instance attribute

## oval_sysent_clone()

OSCAP_API struct oval_sysent * oval_sysent_clone | ( | struct oval_syschar_model * | new_model,
|  | struct oval_sysent * | old_item )

Returns
  A copy of the specified oval_sysent.

## oval_sysinfo_clone()

OSCAP_API struct oval_sysinfo * oval_sysinfo_clone | ( | struct oval_syschar_model * | new_model,
|  | struct oval_sysinfo * | old_sysinfo )

Returns
  A copy of the specified oval_sysinfo.

## oval_sysint_clone()

OSCAP_API struct oval_sysint * oval_sysint_clone | ( | struct oval_syschar_model * | new_model,
|  | struct oval_sysint * | old_sysint )

Returns
  A copy of the specified oval_sysint.

## oval_sysitem_clone()

OSCAP_API struct oval_sysitem * oval_sysitem_clone | ( | struct oval_syschar_model * | new_model,
|  | struct oval_sysitem * | old_data )

Returns
  A copy of the specified oval_sysitem.

## oval_variable_binding_clone()

OSCAP_API struct oval_variable_binding * oval_variable_binding_clone | ( | struct oval_variable_binding * | ,
|  | struct oval_definition_model * | )

Returns
  A copy of the specified oval_variable_binding.