00001 #pragma once 00002 #ifndef OVAL_PROBE_H 00003 #define OVAL_PROBE_H 00004 00005 #include <stdarg.h> 00006 #include <stdint.h> 00007 #include "oval_definitions.h" 00008 #include "oval_system_characteristics.h" 00009 00010 typedef struct oval_pctx oval_pctx_t; 00011 00016 oval_pctx_t *oval_pctx_new(struct oval_syschar_model *model); 00017 00022 void oval_pctx_free(oval_pctx_t *pctx) __attribute__ ((nonnull(1))); 00023 00024 /* 00025 * probe context flags 00026 */ 00027 #define OVAL_PCTX_FLAG_NOREPLY 0x0001 /* don't send probe result to library - just an ack */ 00028 #define OVAL_PCTX_FLAG_NORECONN 0x0002 /* don't try to reconnect on fatal errors */ 00029 #define OVAL_PCTX_FLAG_RUNALL 0x0004 /* execute all probes when executing the first */ 00030 #define OVAL_PCTX_FLAG_RUNNOW 0x0008 /* execute all probes immediately */ 00031 00032 #define OVAL_PCTX_FLAG_MASK (0x0001|0x0002|0x0004|0x0008) 00033 00039 int oval_pctx_setflag(oval_pctx_t *pctx, uint32_t flags) __attribute__ ((nonnull(1))); 00040 00046 int oval_pctx_unsetflag(oval_pctx_t *pctx, uint32_t flags) __attribute__ ((nonnull(1))); 00047 00048 /* 00049 * probe context attributes 00050 */ 00051 #define OVAL_PCTX_ATTR_RETRY 0x0001 /* set maximum retry count (send, connect) */ 00052 #define OVAL_PCTX_ATTR_RECVTIMEOUT 0x0002 /* set receive timeout - in miliseconds */ 00053 #define OVAL_PCTX_ATTR_SENDTIMEOUT 0x0003 /* set send timeout - in miliseconds */ 00054 #define OVAL_PCTX_ATTR_SCHEME 0x0004 /* set communication scheme */ 00055 #define OVAL_PCTX_ATTR_DIR 0x0005 /* set directory where the probes are located */ 00056 #define OVAL_PCTX_ATTR_MODEL 0x0006 /* set definition model - update registered commands is necessary */ 00057 00064 int oval_pctx_setattr(oval_pctx_t *pctx, uint32_t attr, ...) __attribute__ ((nonnull(1))); 00065 00071 int oval_probe_reset(oval_pctx_t *pctx, oval_subtype_t subtype) __attribute__ ((nonnull(1))); 00072 00078 int oval_probe_close(oval_pctx_t *pctx, oval_subtype_t subtype) __attribute__ ((nonnull(1))); 00079 00084 struct oval_sysinfo *oval_probe_sysinf_eval(oval_pctx_t *pctx) __attribute__ ((nonnull(1))); 00085 00091 struct oval_syschar *oval_probe_object_eval(oval_pctx_t *pctx, struct oval_object *object) __attribute__ ((nonnull(1, 2))); 00092 00093 #endif /* OVAL_PROBE_H */