155 #define probe_item_getent(item, name, n) probe_obj_getent (item, name, n)
279 int probe_cobj_add_msg(
SEXP_t *cobj,
const SEXP_t *msg);
282 int probe_cobj_add_item(
SEXP_t *cobj,
const SEXP_t *item);
448 #define PROBE_EINVAL 1
449 #define PROBE_ENOELM 2
450 #define PROBE_ENOVAL 3
451 #define PROBE_ENOATTR 4
452 #define PROBE_EINIT 5
453 #define PROBE_ENOMEM 6
454 #define PROBE_EOPNOTSUPP 7
455 #define PROBE_ERANGE 8
457 #define PROBE_EFAULT 10
458 #define PROBE_EACCESS 11
459 #define PROBE_ESETEVAL 12
460 #define PROBE_ENOENT 13
461 #define PROBE_ENOOBJ 14
462 #define PROBE_ECONNABORTED 15
463 #define PROBE_ESYSTEM 253
464 #define PROBE_EFATAL 254
465 #define PROBE_EUNKNOWN 255
467 #define PROBECMD_STE_FETCH 1
468 #define PROBECMD_OBJ_EVAL 2
469 #define PROBECMD_RESET 3
471 void *probe_init(void) __attribute__ ((unused));
476 int probe_main(probe_ctx *,
void *)
__attribute__ ((nonnull(1)));
478 bool probe_item_filtered(const
SEXP_t *item, const
SEXP_t *filters);
513 #define PROBE_ENT_AREF(ent, dst, attr_name, invalid_exp) \
515 if (((dst) = probe_ent_getattrval(ent, attr_name)) == NULL) { \
516 dE("Attribute `%s' is missing!\n", attr_name); \
521 #define PROBE_ENT_STRVAL(ent, dst, dstlen, invalid_exp, zerolen_exp) \
525 if ((___r = probe_ent_getval(ent)) == NULL) { \
526 dW("Entity has no value!\n"); \
529 if (!SEXP_stringp(___r)) { \
530 dE("Invalid type\n"); \
534 else if (SEXP_string_length(___r) == 0) { \
538 SEXP_string_cstr_r(___r, dst, dstlen); \
544 #define PROBE_ENT_I32VAL(ent, dst, invalid_exp, nil_exp) \
548 if ((___r = probe_ent_getval(ent)) == NULL) { \
549 dW("Entity has no value!\n"); \
552 if (!SEXP_numberp(___r)) { \
553 dE("Invalid type\n"); \
557 dst = SEXP_number_geti_32(___r); \
570 SEXP_t *probe_ent_from_cstr(
const char *name,
oval_datatype_t type,
const char *value,
size_t vallen);
572 oval_version_t probe_obj_get_schema_version(
const SEXP_t *obj);
SEXP_t * probe_msg_creat(oval_message_level_t level, char *message)
Create a new message that can be added to a collected object.
Definition: probe-api.c:905
oval_datatype_t probe_ent_getdatatype(const SEXP_t *ent)
Get the OVAL data type of an entity.
Definition: probe-api.c:1141
SEXP_t * probe_item_attr_add(SEXP_t *item, const char *name, SEXP_t *val)
Add a new attribute to an item.
Definition: probe-api.c:128
oval_operation_t
Operations.
Definition: oval_definitions.h:81
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.
Definition: probe-api.c:459
oval_subtype_t
Unknown subtypes.
Definition: oval_types.h:120
SEXP_t * probe_obj_build(const char *fmt,...)
Build a new object according to the specified format.
oval_syschar_status_t probe_ent_getstatus(const SEXP_t *ent)
Get entity status.
Definition: probe-api.c:1189
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.
Definition: probe-api.c:200
SEXP_t * probe_ent_attr_add(SEXP_t *ent, const char *name, SEXP_t *val)
Add a new attribute to an entity.
Definition: probe-api.c:996
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 entit...
Definition: probe-api.c:59
oval_syschar_status_t
System characteristics status.
Definition: oval_system_characteristics.h:58
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 ent...
Definition: probe-api.c:337
bool probe_obj_attrexists(const SEXP_t *obj, const char *name)
Check whether the specified attribute exists.
Definition: probe-api.c:537
SEXP_t * probe_ent_creat1(const char *name, SEXP_t *attrs, SEXP_t *val)
Create a new entity.
Definition: probe-api.c:968
SEXP_t * probe_item_new(const char *name, SEXP_t *attrs)
Create a new item with just a name and optional attributes argument.
Definition: probe-api.c:103
int probe_ent_setstatus(SEXP_t *ent, oval_syschar_status_t status)
Set entity's status.
Definition: probe-api.c:1179
SEXP_t * probe_ctx_getobject(probe_ctx *ctx)
Return reference to the input object.
Definition: probe.c:31
Definition: _sexp-value.h:42
oval_datatype_t
Datatypes.
Definition: oval_definitions.h:146
SEXP_t * probe_obj_getent(const SEXP_t *obj, const char *name, uint32_t n)
Get an entity from an object.
Definition: probe-api.c:404
void probe_filebehaviors_canonicalize(SEXP_t **behaviors)
Set all of the missing attributes of the 'behaviors' entity to default values.
Definition: probe-api.c:1299
size_t probe_ent_getname_r(const SEXP_t *ent, char *buffer, size_t buflen)
Get the name of an entity.
Definition: probe-api.c:1250
void probe_fini(void *) __attribute__((unused))
Dummy probe_fini function.
Definition: filehash.c:204
size_t probe_obj_getname_r(const SEXP_t *obj, char *buffer, size_t buflen)
Get the name of an object.
Definition: probe-api.c:598
char * probe_obj_getname(const SEXP_t *obj)
Get the name of an object.
Definition: probe-api.c:593
SEXP_t * probe_obj_getmask(SEXP_t *obj)
Get object entity mask.
Definition: probe-api.c:1734
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.
void probe_item_resetidctr(struct id_desc_t *id_desc)
Reset the item id generator.
Definition: probe-api.c:216
void probe_tfc54behaviors_canonicalize(SEXP_t **behaviors)
Set all of the missing attributes of the 'behaviors' entity to default values.
Definition: probe-api.c:1335
int probe_ent_setdatatype(SEXP_t *ent, oval_datatype_t type)
Set the OVAL data type of an entity.
Definition: probe-api.c:1095
SEXP_t * probe_ent_getattrval(const SEXP_t *ent, const char *name)
Get the value of an entity's attribute.
Definition: probe-api.c:1045
int probe_item_setstatus(SEXP_t *obj, oval_syschar_status_t status)
Set item's status.
Definition: probe-api.c:188
SEXP_t * probe_msg_creatf(oval_message_level_t level, const char *fmt,...)
Create a new message that can be added to a collected object.
Definition: probe-api.c:918
SEXP_t * probe_attr_creat(const char *name, const SEXP_t *val,...)
Create a new list of attributes.
Definition: probe-api.c:304
SEXP_t * probe_ctx_getresult(probe_ctx *ctx)
Return reference to the output object (aka collected object).
Definition: probe.c:36
SEXP_t * probe_obj_new(const char *name, SEXP_t *attrs)
Create a new object with just a name and optional attributes argument.
Definition: probe-api.c:380
SEXP_t * probe_obj_getattrval(const SEXP_t *obj, const char *name)
Get the value of an object's attribute.
Definition: probe-api.c:492
int probe_item_collect(probe_ctx *ctx, SEXP_t *item)
Collect generated item (i.e.
Definition: icache.c:496
SEXP_t * probe_ent_getval(const SEXP_t *ent)
Get the value of an entity.
Definition: probe-api.c:1020
SEXP_t * probe_item_newid(struct id_desc_t *id_desc)
Get a new unique id (within a probe) for an item.
oval_setobject_operation_t
Set operations.
Definition: oval_definitions.h:180
SEXP_t * probe_obj_getentval(const SEXP_t *obj, const char *name, uint32_t n)
Get the value of an object's entity.
Definition: probe-api.c:447
SEXP_t * probe_item_build(const char *fmt,...)
Build a new item according to the specified format.
char * probe_ent_getname(const SEXP_t *ent)
Get the name of an entity.
Definition: probe-api.c:1206
bool probe_ent_attrexists(const SEXP_t *ent, const char *name)
Check whether the specified attribute exists.
Definition: probe-api.c:1090
bool probe_ent_getmask(const SEXP_t *ent)
Get entity's mask.
Definition: probe-api.c:1173
int probe_ent_getvals(const SEXP_t *ent, SEXP_t **res)
Get the list of values of an entity.
Definition: probe-api.c:1001
oval_syschar_collection_flag_t
System characteristics result flag.
Definition: oval_system_characteristics.h:47
Definition: sexp-types.h:82
oval_message_level_t
Message level.
Definition: oval_system_characteristics.h:67
Holds information for item ids generation.
Definition: _probe-api.h:44
Definition: probe-api.h:506
int probe_obj_setstatus(SEXP_t *obj, oval_syschar_status_t status)
Set objects's status.
Definition: probe-api.c:583
int probe_ent_setmask(SEXP_t *ent, bool mask)
Set entity's mask.
Definition: probe-api.c:1167
void probe_free(SEXP_t *obj)
Free the memory allocated by the probe_* functions.
Definition: probe-api.c:1294
SEXP_t * probe_ent_creat(const char *name, SEXP_t *attrs, SEXP_t *val,...)
Create a new list of entities.
Definition: probe-api.c:944
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.
Definition: probe-api.c:177