oval_variable.c File Reference

Open Vulnerability and Assessment Language. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "oval_definitions_impl.h"
#include "adt/oval_collection_impl.h"
#include "adt/oval_string_map_impl.h"
#include "oval_agent_api_impl.h"
#include "common/util.h"
#include "common/debug_priv.h"
#include "common/_error.h"
#include "common/oscap_string.h"
#include "results/oval_cmp_impl.h"
#include "results/oval_results_impl.h"

Data Structures

struct  oval_variable
 An oval variable resolves an oval_value stream which specifies constraints for oval_objects and oval_states. More...
struct  oval_variable_CONSTANT_t
struct  oval_variable_EXTERNAL_t
struct  oval_variable_LOCAL_t
struct  oval_variable_UNKNOWN_t
struct  oval_variable_possible_value
struct  oval_variable_possible_restriction
struct  oval_variable_restriction

Defines

#define VAR_BASE
#define DEFINITION_NAMESPACE   "http://oval.mitre.org/XMLSchema/oval-definitions-5"

Typedefs

typedef struct oval_variable oval_variable_t
typedef struct
oval_variable_possible_value 
oval_variable_possible_value_t
typedef struct
oval_variable_possible_restriction 
oval_variable_possible_restriction_t
typedef struct
oval_variable_restriction 
oval_variable_restriction_t

Functions

struct
oval_variable_possible_value * 
oval_variable_possible_value_new (const char *hint, const char *value)
 Construct new instance of possible_value element.
void oval_variable_possible_value_free (struct oval_variable_possible_value *pv)
 Free instance of possible_value oval_variable_possible_value.
char * oval_variable_possible_value_get_hint (struct oval_variable_possible_value *pv)
 Get the hint of the possible_value oval_variable_possible_value.
char * oval_variable_possible_value_get_value (struct oval_variable_possible_value *pv)
 Get the value of the possible value oval_variable_possible_value.
bool oval_variable_possible_value_iterator_has_more (struct oval_variable_possible_value_iterator *iter)
 oval_variable_possible_value_iterator
struct
oval_variable_possible_value * 
oval_variable_possible_value_iterator_next (struct oval_variable_possible_value_iterator *iter)
 oval_variable_possible_value_iterator
void oval_variable_possible_value_iterator_free (struct oval_variable_possible_value_iterator *iter)
 oval_variable_possible_value_iterator
int oval_variable_possible_value_iterator_remaining (struct oval_variable_possible_value_iterator *iter)
 oval_variable_possible_value_iterator
struct
oval_variable_possible_restriction * 
oval_variable_possible_restriction_new (oval_operator_t operator, const char *hint)
 Construct new instance of possible_restriction element.
void oval_variable_possible_restriction_free (struct oval_variable_possible_restriction *pr)
 Free instance of possible_restriction oval_variable_possible_restriction.
void oval_variable_possible_restriction_add_restriction (struct oval_variable_possible_restriction *pr, struct oval_variable_restriction *r)
 Add a restriction to the list of possible restrictions.
struct oval_iterator * oval_variable_possible_restriction_get_restrictions (struct oval_variable_possible_restriction *possible_restriction)
 Get restrictions from one possible_restriction element.
struct
oval_variable_restriction_iterator * 
oval_variable_possible_restriction_get_restrictions2 (struct oval_variable_possible_restriction *possible_restriction)
oval_operator_t oval_variable_possible_restriction_get_operator (struct oval_variable_possible_restriction *possible_restriction)
 Get operator of possible_restriction element.
char * oval_variable_possible_restriction_get_hint (struct oval_variable_possible_restriction *possible_restriction)
 Get hint of possible_restriction element.
bool oval_variable_possible_restriction_iterator_has_more (struct oval_variable_possible_restriction_iterator *iter)
 oval_variable_possible_restriction_iterator
struct
oval_variable_possible_restriction * 
oval_variable_possible_restriction_iterator_next (struct oval_variable_possible_restriction_iterator *iter)
 oval_variable_possible_restriction_iterator
void oval_variable_possible_restriction_iterator_free (struct oval_variable_possible_restriction_iterator *iter)
 oval_variable_possible_restriction_iterator
int oval_variable_possible_restriction_iterator_remaining (struct oval_variable_possible_restriction_iterator *iter)
 oval_variable_possible_restriction_iterator
struct oval_variable_restriction * oval_variable_restriction_new (oval_operation_t operation, const char *value)
 Construct new instance of restriction element.
void oval_variable_restriction_free (struct oval_variable_restriction *r)
 Free instance of restriction element.
oval_operation_t oval_variable_restriction_get_operation (struct oval_variable_restriction *restriction)
 Get the operation of a restriction element.
char * oval_variable_restriction_get_value (struct oval_variable_restriction *restriction)
 Get the value of a restriction element.
bool oval_variable_restriction_iterator_has_more (struct oval_variable_restriction_iterator *iter)
 oval_variable_restriction_iterator
struct oval_variable_restriction * oval_variable_restriction_iterator_next (struct oval_variable_restriction_iterator *iter)
 oval_variable_restriction_iterator
void oval_variable_restriction_iterator_free (struct oval_variable_restriction_iterator *iter)
 oval_variable_restriction_iterator
int oval_variable_restriction_iterator_remaining (struct oval_variable_restriction_iterator *iter)
 oval_variable_restriction_iterator
bool oval_variable_iterator_has_more (struct oval_variable_iterator *oc_variable)
 Returns true if iterator not exhausted.
struct oval_variableoval_variable_iterator_next (struct oval_variable_iterator *oc_variable)
 Returns next instance of oval_variable.
void oval_variable_iterator_free (struct oval_variable_iterator *oc_variable)
 Free iterator.
char * oval_variable_get_id (struct oval_variable *variable)
 Returns attribute oval_variable->id.
char * oval_variable_get_comment (struct oval_variable *variable)
 Returns attribute oval_variable->comment.
int oval_variable_get_version (struct oval_variable *variable)
 Returns attribute oval_variable->version.
bool oval_variable_get_deprecated (struct oval_variable *variable)
 Returns attribute oval_variable->deprecated.
oval_variable_type_t oval_variable_get_type (struct oval_variable *variable)
 Returns attribute oval_variable->type.
oval_datatype_t oval_variable_get_datatype (struct oval_variable *variable)
 Returns attribute oval_variable->datatype.
struct oval_value_iteratoroval_variable_get_values (struct oval_variable *variable)
 Returns attribute Oval_external/Oval_constant->values.
struct oval_iterator * oval_variable_get_possible_values (struct oval_variable *variable)
 Get list of allowed values for an external variable.
struct
oval_variable_possible_value_iterator * 
oval_variable_get_possible_values2 (struct oval_variable *variable)
struct oval_iterator * oval_variable_get_possible_restrictions (struct oval_variable *variable)
 Get list of constraints for an external variable.
struct
oval_variable_possible_restriction_iterator * 
oval_variable_get_possible_restrictions2 (struct oval_variable *variable)
bool oval_variable_contains_value (struct oval_variable *variable, const char *o_value_text)
oval_syschar_collection_flag_t oval_variable_get_collection_flag (struct oval_variable *variable)
int oval_syschar_model_compute_variable (struct oval_syschar_model *sysmod, struct oval_variable *variable)
 Get the oval_values bound to a specified variable.
int oval_probe_query_variable (oval_probe_session_t *sess, struct oval_variable *variable)
 Query the specified variable and all its dependencies in order to compute the vector of its values.
struct oval_componentoval_variable_get_component (struct oval_variable *variable)
 Returns attribute Oval_local->component.
struct oval_variableoval_variable_new (struct oval_definition_model *model, const char *id, oval_variable_type_t type)
 Construct new instance of oval_variable.
struct oval_variableoval_variable_clone (struct oval_definition_model *new_model, struct oval_variable *old_variable)
 Clone instance of oval_variable and add it to the specified oval_definition_model.
void oval_variable_free (struct oval_variable *variable)
 Free instance of oval_variable.
void oval_variable_set_datatype (struct oval_variable *variable, oval_datatype_t datatype)
 set attribute oval_variable->datatype.
void oval_variable_set_type (struct oval_variable *variable, oval_variable_type_t new_type)
void oval_variable_set_comment (struct oval_variable *variable, char *comm)
 set attribute oval_variable->comment.
void oval_variable_set_deprecated (struct oval_variable *variable, bool deprecated)
 set attribute oval_variable->deprecated.
void oval_variable_set_version (struct oval_variable *variable, int version)
 set attribute oval_variable->version.
void oval_variable_add_value (struct oval_variable *variable, struct oval_value *value)
 Append an instance of Oval_value to the attribute Oval_constant->values.
void oval_variable_add_possible_value (struct oval_variable *variable, struct oval_variable_possible_value *pv)
 Add a new possible value to an external variable.
void oval_variable_add_possible_restriction (struct oval_variable *variable, struct oval_variable_possible_restriction *pr)
 Add a new possible restriction to an external variable.
void oval_variable_clear_values (struct oval_variable *variable)
int oval_variable_bind_ext_var (struct oval_variable *var, struct oval_variable_model *varmod, char *extvar_id)
void oval_variable_set_component (struct oval_variable *variable, struct oval_component *component)
 Bind an instance of Oval_component to the attribute Oval_local->component.
int oval_variable_parse_tag (xmlTextReaderPtr reader, struct oval_parser_context *context, void *usr)
xmlNode * oval_variable_to_dom (struct oval_variable *variable, xmlDoc *doc, xmlNode *parent)


Detailed Description

Open Vulnerability and Assessment Language.

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


Define Documentation

#define VAR_BASE

Value:

struct oval_definition_model *model;    \
        oval_variable_type_t type;              \
        oval_syschar_collection_flag_t flag;    \
        char *id;                               \
        int version;                            \
        oval_datatype_t datatype;               \
        char *comment;                          \
        int deprecated


Generated on Tue Nov 14 12:18:55 2017 for Open SCAP Library by  doxygen 1.5.6