Open SCAP Library

Data Structures | Macros | Typedefs | Functions
probe-api.h File Reference

Probe API public header. More...

`#include <seap.h>`
`#include <stdarg.h>`
`#include <stdint.h>`
`#include <stdbool.h>`
`#include <pthread.h>`
`#include <oval_definitions.h>`
`#include <oval_system_characteristics.h>`
`#include <oval_results.h>`
`#include <oval_types.h>`

Go to the source code of this file.

## Data Structures
struct | probe_elmatr_t

## Macros
#define | PROBE_API_H
#define | probe_item_getent(item, name, n) probe_obj_getent (item, name, n)
#define | PROBE_EINVAL 1
| Invalid type/value/format.
#define | PROBE_ENOELM 2
| Missing element OBSOLETE: use ENOENT.
#define | PROBE_ENOVAL 3
| Missing value.
#define | PROBE_ENOATTR 4
| Missing attribute.
#define | PROBE_EINIT 5
| Initialization failed.
#define | PROBE_ENOMEM 6
| No memory.
#define | PROBE_EOPNOTSUPP 7
| Not supported.
#define | PROBE_ERANGE 8
| Out of range.
#define | PROBE_EDOM 9
| Out of domain.
#define | PROBE_EFAULT 10
| Memory fault/NULL value.
#define | PROBE_EACCESS 11
| Operation not permitted.
#define | PROBE_ESETEVAL 12
| Set evaluation failed.
#define | PROBE_ENOENT 13
| Missing entity.
#define | PROBE_ENOOBJ 14
| Missing object.
#define | PROBE_ECONNABORTED 15
| Evaluation aborted.
#define | PROBE_ESYSTEM 253
| System call failure.
#define | PROBE_EFATAL 254
| Unrecoverable error.
#define | PROBE_EUNKNOWN 255
| Unknown/Unexpected error.
#define | PROBECMD_STE_FETCH 1
| State fetch command code.
#define | PROBECMD_OBJ_EVAL 2
| Object eval command code.
#define | PROBECMD_RESET 3
| Reset command code.
#define | PROBE_ENT_AREF(ent, dst, attr_name, invalid_exp)
#define | PROBE_ENT_STRVAL(ent, dst, dstlen, invalid_exp, zerolen_exp)
#define | PROBE_ENT_I32VAL(ent, dst, invalid_exp, nil_exp)

## Typedefs
typedef struct probe_ctx | probe_ctx

## Functions
SEXP_t * | probe_item_build (const char *fmt,...)
| Build a new item according to the specified format. More...
SEXP_t * | probe_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. More...
SEXP_t * | probe_item_new (const char *name, SEXP_t *attrs)
| Create a new item with just a name and optional attributes argument. More...
SEXP_t * | probe_item_attr_add (SEXP_t *item, const char *name, SEXP_t *val)
| Add a new attribute to an item. More...
SEXP_t * | probe_item_ent_add (SEXP_t *item, const char *name, SEXP_t *attrs, SEXP_t *val)
| Add a new entity to an item. More...
int | probe_item_setstatus (SEXP_t *obj, oval_syschar_status_t status)
| Set item's status. More...
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. More...
SEXP_t * | probe_item_newid (struct id_desc_t *id_desc)
| Get a new unique id (within a probe) for an item. More...
void | probe_item_resetidctr (struct id_desc_t *id_desc)
| Reset the item id generator. More...
SEXP_t * | probe_attr_creat (const char *name, const SEXP_t *val,...)
| Create a new list of attributes. More...
SEXP_t * | probe_obj_build (const char *fmt,...)
| Build a new object according to the specified format. More...
SEXP_t * | probe_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. More...
SEXP_t * | probe_obj_new (const char *name, SEXP_t *attrs)
| Create a new object with just a name and optional attributes argument. More...
SEXP_t * | probe_obj_getent (const SEXP_t *obj, const char *name, uint32_t n)
| Get an entity from an object. More...
SEXP_t * | probe_obj_getentval (const SEXP_t *obj, const char *name, uint32_t n)
| Get the value of an object's entity. More...
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. More...
SEXP_t * | probe_obj_getattrval (const SEXP_t *obj, const char *name)
| Get the value of an object's attribute. More...
bool | probe_obj_attrexists (const SEXP_t *obj, const char *name)
| Check whether the specified attribute exists. More...
int | probe_obj_setstatus (SEXP_t *obj, oval_syschar_status_t status)
| Set objects's status. More...
int | probe_objent_setstatus (SEXP_t *obj, const char *name, uint32_t n, oval_syschar_status_t status)
| Set status of an object's entity. More...
char * | probe_obj_getname (const SEXP_t *obj)
| Get the name of an object. More...
size_t | probe_obj_getname_r (const SEXP_t *obj, char *buffer, size_t buflen)
| Get the name of an object. More...
SEXP_t * | probe_cobj_new (oval_syschar_collection_flag_t flag, SEXP_t *msg_list, SEXP_t *item_list, SEXP_t *mask_list)
int | probe_cobj_add_msg (SEXP_t *cobj, const SEXP_t *msg)
SEXP_t * | probe_cobj_get_msgs (const SEXP_t *cobj)
SEXP_t * | probe_cobj_get_mask (const SEXP_t *cobj)
int | probe_cobj_add_item (SEXP_t *cobj, const SEXP_t *item)
SEXP_t * | probe_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_t * | probe_msg_creat (oval_message_level_t level, char *message)
| Create a new message that can be added to a collected object. More...
SEXP_t * | probe_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. More...
SEXP_t | nonnull (2)))
SEXP_t * | probe_ent_creat (const char *name, SEXP_t *attrs, SEXP_t *val,...)
| Create a new list of entities. More...
SEXP_t * | probe_ent_creat1 (const char *name, SEXP_t *attrs, SEXP_t *val)
| Create a new entity. More...
SEXP_t * | probe_ent_attr_add (SEXP_t *ent, const char *name, SEXP_t *val)
| Add a new attribute to an entity. More...
SEXP_t * | probe_ent_getval (const SEXP_t *ent)
| Get the value of an entity. More...
int | probe_ent_getvals (const SEXP_t *ent, SEXP_t **res)
| Get the list of values of an entity. More...
SEXP_t * | probe_ent_getattrval (const SEXP_t *ent, const char *name)
| Get the value of an entity's attribute. More...
bool | probe_ent_attrexists (const SEXP_t *ent, const char *name)
| Check whether the specified attribute exists. More...
int | probe_ent_setdatatype (SEXP_t *ent, oval_datatype_t type)
| Set the OVAL data type of an entity. More...
oval_datatype_t | probe_ent_getdatatype (const SEXP_t *ent)
| Get the OVAL data type of an entity. More...
int | probe_ent_setmask (SEXP_t *ent, bool mask)
| Set entity's mask. More...
bool | probe_ent_getmask (const SEXP_t *ent)
| Get entity's mask. More...
int | probe_ent_setstatus (SEXP_t *ent, oval_syschar_status_t status)
| Set entity's status. More...
oval_syschar_status_t | probe_ent_getstatus (const SEXP_t *ent)
| Get entity status. More...
char * | probe_ent_getname (const SEXP_t *ent)
| Get the name of an entity. More...
size_t | probe_ent_getname_r (const SEXP_t *ent, char *buffer, size_t buflen)
| Get the name of an entity. More...
void | probe_free (SEXP_t *obj)
| Free the memory allocated by the probe_* functions. More...
void | probe_filebehaviors_canonicalize (SEXP_t **behaviors)
| Set all of the missing attributes of the 'behaviors' entity to default values. More...
void | probe_tfc54behaviors_canonicalize (SEXP_t **behaviors)
| Set all of the missing attributes of the 'behaviors' entity to default values. More...
int | probe_offline_mode_supported (void)
| In this function can be set supported type of offline mode.
void | probe_preload (void)
| Dummy probe_preload function. More...
void * | probe_init (void) __attribute__((unused))
| Dummy probe_fini function.
void | probe_fini (void *) __attribute__((unused))
| Dummy probe_fini function.
int | probe_main (probe_ctx *, void *) __attribute__((nonnull(1)))
bool | probe_item_filtered (const SEXP_t *item, const SEXP_t *filters)
int | probe_result_additem (SEXP_t *result, SEXP_t *item)
int | probe_item_collect (probe_ctx *ctx, SEXP_t *item)
| Collect generated item (i.e. More...
SEXP_t * | probe_ctx_getobject (probe_ctx *ctx)
| Return reference to the input object. More...
SEXP_t * | probe_ctx_getresult (probe_ctx *ctx)
| Return reference to the output object (aka collected object). More...
SEXP_t * | probe_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,...)
SEXP_t * | probe_entval_from_cstr (oval_datatype_t type, const char *value, size_t vallen)
SEXP_t * | probe_ent_from_cstr (const char *name, oval_datatype_t type, const char *value, size_t vallen)
oval_version_t | probe_obj_get_schema_version (const SEXP_t *obj)
oval_schema_version_t | probe_obj_get_platform_schema_version (const SEXP_t *obj)
SEXP_t * | probe_obj_getmask (SEXP_t *obj)
| Get object entity mask. More...

## Detailed Description

Probe API public header.

Author
  "Daniel Kopecek" dkope.nosp@m.cek@.nosp@m.redha.nosp@m.t.co.nosp@m.m
  "Tomas Heinrich" thein.nosp@m.ric@.nosp@m.redha.nosp@m.t.co.nosp@m.m