00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef OVAL_PROBE_EXT_H
00023 #define OVAL_PROBE_EXT_H
00024
00025 #include <seap.h>
00026 #include <pthread.h>
00027 #include <stdbool.h>
00028 #include "oval_probe_impl.h"
00029 #include "oval_system_characteristics_impl.h"
00030 #include "common/util.h"
00031
00032 typedef struct {
00033 oval_subtype_t subtype;
00034 int sd;
00035 char *uri;
00036 } oval_pd_t;
00037
00038 typedef struct {
00039 oval_pd_t *memb;
00040 size_t count;
00041 SEAP_CTX_t *ctx;
00042 } oval_pdtbl_t;
00043
00044 struct oval_pdsc {
00045 oval_subtype_t type;
00046 const char *name;
00047 const char *file;
00048 };
00049
00050 typedef struct oval_pdsc oval_pdsc_t;
00051
00052 struct oval_pext {
00053 pthread_mutex_t lock;
00054 bool do_init;
00055
00056 SEAP_CTX_t *sctx;
00057 oval_pdsc_t *pdsc;
00058 size_t pdsc_cnt;
00059 oval_pdtbl_t *pdtbl;
00060 char *probe_dir;
00061
00062 void *sess_ptr;
00063 struct oval_syschar_model **model;
00064 };
00065
00066 typedef struct oval_pext oval_pext_t;
00067
00068 oval_pext_t *oval_pext_new(void);
00069 void oval_pext_free(oval_pext_t *pext);
00070 int oval_probe_ext_init(oval_pext_t *pext);
00071 struct oval_syschar *oval_probe_ext_eval(SEAP_CTX_t *ctx, oval_pd_t *pd, oval_pext_t *, struct oval_object *object, int flags);
00072 int oval_probe_ext_reset(SEAP_CTX_t *ctx, oval_pd_t *pd, oval_pext_t *pext);
00073
00074 int oval_probe_ext_handler(oval_subtype_t type, void *ptr, int act, ...);
00075 int oval_probe_sys_handler(oval_subtype_t type, void *ptr, int act, ...);
00076
00077 extern const oval_pdsc_t OSCAP_GSYM(default_pdsc)[];
00078
00079 #endif