00001 #pragma once
00002 #ifndef OVAL_PROBE_IMPL_H
00003 #define OVAL_PROBE_IMPL_H
00004
00005 #include <seap-types.h>
00006 #include <config.h>
00007
00008 #include "oval_definitions_impl.h"
00009 #include "oval_agent_api_impl.h"
00010 #include "oval_parser_impl.h"
00011 #include "oval_string_map_impl.h"
00012 #include "public/oval_system_characteristics.h"
00013 #include "../common/util.h"
00014
00015 #include "public/oval_probe.h"
00016
00017 OSCAP_HIDDEN_START;
00018
00019 #define OVAL_PROBE_SCHEME "pipe"
00020 #ifndef OVAL_PROBE_DIR
00021 # define OVAL_PROBE_DIR "/usr/libexec/openscap"
00022 #endif
00023
00024 typedef struct {
00025 oval_subtype_t subtype;
00026 char *subtype_name;
00027 char *filename;
00028 } oval_pdsc_t;
00029
00030 typedef struct {
00031 oval_subtype_t subtype;
00032 int sd;
00033 char *uri;
00034 } oval_pd_t;
00035
00036 typedef struct {
00037 oval_pd_t *memb;
00038 size_t count;
00039 SEAP_CTX_t *ctx;
00040 } oval_pdtbl_t;
00041
00042 #define OVALP_SDTBL_CMDDONE 0x01
00043 #define OVALP_SDTBL_INITIALIZER { NULL, 0, NULL, 0 }
00044
00045 #define OVAL_PROBE_MAXRETRY 3
00046
00047 const oval_pdsc_t *oval_pdsc_lookup(oval_subtype_t subtype);
00048 oval_subtype_t oval_pdsc_lookup_type(const char *name);
00049
00050 struct oval_pctx {
00051 oval_pdsc_t *pdsc_table;
00052 oval_pdtbl_t *pd_table;
00053 char *p_dir;
00054 struct oval_syschar_model *model;
00055 uint32_t p_flags;
00056 };
00057
00058 #define OVAL_PCTX_SETFLAG(ctx, flg) ((ctx)->p_flags |= (flg))
00059 #define OVAL_PCTX_UNSETFLAG(ctx, flg) ((ctx)->p_flags &= ~(flg))
00060 #define OVAL_PCTX_ISSETFLAG(ctx, flg) ((ctx)->p_flags & (flg) == (flg))
00061
00062 OSCAP_HIDDEN_END;
00063
00064 #endif