/home/brq/plautrba/devel/src/openscap.git/openscap-0.8.2/src/OVAL/probes/probe-api.c File Reference

Probe API implmentation. More...

#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include "debug_priv.h"
#include "_probe-api.h"
#include "assume.h"
#include "memusage.h"
#include "oscap_sysinfo.h"
#include "oval_probe_impl.h"
#include "probe/entcmp.h"

Defines

#define PROBE_RESULT_MEMCHECK_CTRESHOLD   32768
#define PROBE_RESULT_MEMCHECK_MINFREEMEM   128
#define PROBE_RESULT_MEMCHECK_MAXRATIO   0.80

Functions

probe_rcache_tOSCAP_GSYM (pcache)
probe_ncache_tOSCAP_GSYM (ncache)
struct id_desc_t OSCAP_GSYM (id_desc)
SEXP_tprobe_item_creat (const char *name, SEXP_t *attrs,...)
 Create a new item consisting of a name, optional attributes argument and an arbitrary number of entities.
SEXP_tprobe_item_new (const char *name, SEXP_t *attrs)
 Create a new item with just a name and optional attributes argument.
SEXP_tprobe_item_attr_add (SEXP_t *item, const char *name, SEXP_t *val)
 Add a new attribute to an item.
SEXP_tprobe_item_ent_add (SEXP_t *item, const char *name, SEXP_t *attrs, SEXP_t *val)
 Add a new entity to an item.
int probe_item_setstatus (SEXP_t *obj, oval_syschar_status_t status)
 Set item's status.
int probe_itement_setstatus (SEXP_t *obj, const char *name, uint32_t n, oval_syschar_status_t status)
 Set status of an item's entity.
void probe_item_resetidctr (struct id_desc_t *id_desc)
 Reset the item id generator.
bool probe_item_filtered (const SEXP_t *item, const SEXP_t *filters)
SEXP_tprobe_attr_creat (const char *name, const SEXP_t *val,...)
 Create a new list of attributes.
SEXP_tprobe_obj_creat (const char *name, SEXP_t *attrs,...)
 Create a new object consisting of a name, optional attributes argument and an arbitrary number of entities.
SEXP_tprobe_obj_new (const char *name, SEXP_t *attrs)
 Create a new object with just a name and optional attributes argument.
SEXP_tprobe_obj_getent (const SEXP_t *obj, const char *name, uint32_t n)
 Get an entity from an object.
SEXP_tprobe_obj_getentval (const SEXP_t *obj, const char *name, uint32_t n)
 Get the value of an object's entity.
int probe_obj_getentvals (const SEXP_t *obj, const char *name, uint32_t n, SEXP_t **res)
 Get the list of values of an object's entity.
SEXP_tprobe_obj_getattrval (const SEXP_t *obj, const char *name)
 Get the value of an object's attribute.
bool probe_obj_attrexists (const SEXP_t *obj, const char *name)
 Check whether the specified attribute exists.
int probe_obj_setstatus (SEXP_t *obj, oval_syschar_status_t status)
 Set objects's status.
char * probe_obj_getname (const SEXP_t *obj)
 Get the name of an object.
size_t probe_obj_getname_r (const SEXP_t *obj, char *buffer, size_t buflen)
 Get the name of an object.
SEXP_tprobe_cobj_new (oval_syschar_collection_flag_t flag, SEXP_t *msg_list, SEXP_t *item_list)
int probe_cobj_add_msg (SEXP_t *cobj, const SEXP_t *msg)
SEXP_tprobe_cobj_get_msgs (const SEXP_t *cobj)
int probe_cobj_add_item (SEXP_t *cobj, const SEXP_t *item)
SEXP_tprobe_cobj_get_items (const SEXP_t *cobj)
void probe_cobj_set_flag (SEXP_t *cobj, oval_syschar_collection_flag_t flag)
oval_syschar_collection_flag_t probe_cobj_get_flag (const SEXP_t *cobj)
oval_syschar_collection_flag_t probe_cobj_combine_flags (oval_syschar_collection_flag_t f1, oval_syschar_collection_flag_t f2, oval_setobject_operation_t op)
oval_syschar_collection_flag_t probe_cobj_compute_flag (SEXP_t *cobj)
SEXP_tprobe_msg_creat (oval_message_level_t level, char *message)
 Create a new message that can be added to a collected object.
SEXP_tprobe_msg_creatf (oval_message_level_t level, const char *fmt,...) __attribute__((format(printf
 Create a new message that can be added to a collected object.
SEXP_tprobe_ent_creat (const char *name, SEXP_t *attrs, SEXP_t *val,...)
 Create a new list of entities.
SEXP_tprobe_ent_creat1 (const char *name, SEXP_t *attrs, SEXP_t *val)
 Create a new entity.
SEXP_tprobe_ent_attr_add (SEXP_t *ent, const char *name, SEXP_t *val)
 Add a new attribute to an entity.
int probe_ent_getvals (const SEXP_t *ent, SEXP_t **res)
 Get the list of values of an entity.
SEXP_tprobe_ent_getval (const SEXP_t *ent)
 Get the value of an entity.
SEXP_tprobe_ent_getattrval (const SEXP_t *ent, const char *name)
 Get the value of an entity's attribute.
bool probe_ent_attrexists (const SEXP_t *ent, const char *name)
 Check whether the specified attribute exists.
int probe_ent_setdatatype (SEXP_t *ent, oval_datatype_t type)
 Set the OVAL data type of an entity.
oval_datatype_t probe_ent_getdatatype (const SEXP_t *ent)
 Get the OVAL data type of an entity.
int probe_ent_setmask (SEXP_t *ent, bool mask)
 Set entity's mask.
bool probe_ent_getmask (const SEXP_t *ent)
 Get entity's mask.
int probe_ent_setstatus (SEXP_t *ent, oval_syschar_status_t status)
 Set entity's status.
oval_syschar_status_t probe_ent_getstatus (const SEXP_t *ent)
 Get entity status.
char * probe_ent_getname (const SEXP_t *ent)
 Get the name of an entity.
size_t probe_ent_getname_r (const SEXP_t *ent, char *buffer, size_t buflen)
 Get the name of an entity.
void probe_free (SEXP_t *obj)
 Free the memory allocated by the probe_* functions.
void probe_filebehaviors_canonicalize (SEXP_t **behaviors)
 Set all of the missing attributes of the 'behaviors' entity to default values.
void probe_tfc54behaviors_canonicalize (SEXP_t **behaviors)
 Set all of the missing attributes of the 'behaviors' entity to default values.
SEXP_tprobe_item_create (oval_subtype_t item_subtype, probe_elmatr_t *item_attributes[],...)
oval_operation_t probe_ent_getoperation (SEXP_t *entity, oval_operation_t default_op)
int probe_item_add_msg (SEXP_t *item, oval_message_level_t msglvl, char *msgfmt,...)

Detailed Description

Probe API implmentation.

Author:
"Daniel Kopecek" <dkopecek@redhat.com>
"Tomas Heinrich" <theinric@redhat.com>

Generated on 30 Mar 2012 for Open SCAP Library by  doxygen 1.6.1