00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "config.h"
00025
00026 #ifdef ENABLE_PROBES
00027
00028 #pragma once
00029 #ifndef OVAL_PROBE_IMPL_H
00030 #define OVAL_PROBE_IMPL_H
00031
00032 #include <seap-types.h>
00033 #include <config.h>
00034
00035
00036 #include "oval_definitions_impl.h"
00037 #include "oval_agent_api_impl.h"
00038 #include "oval_parser_impl.h"
00039 #include "oval_string_map_impl.h"
00040 #include "public/oval_system_characteristics.h"
00041 #include "../common/util.h"
00042 #include "public/oval_probe.h"
00043 #include "probes/_probe-api.h"
00044
00045 OSCAP_HIDDEN_START;
00046
00047 #define OVAL_PROBE_SCHEME "pipe"
00048 #ifndef OVAL_PROBE_DIR
00049 # define OVAL_PROBE_DIR "/usr/libexec/openscap"
00050 #endif
00051
00052 typedef struct {
00053 oval_subtype_t subtype;
00054 char *subtype_name;
00055 char *filename;
00056 } oval_pdsc_t;
00057
00058 typedef struct {
00059 oval_subtype_t subtype;
00060 int sd;
00061 char *uri;
00062 } oval_pd_t;
00063
00064 typedef struct {
00065 oval_pd_t *memb;
00066 size_t count;
00067 SEAP_CTX_t *ctx;
00068 } oval_pdtbl_t;
00069
00070 #define OVALP_SDTBL_CMDDONE 0x01
00071 #define OVALP_SDTBL_INITIALIZER { NULL, 0, NULL, 0 }
00072
00073 #define OVAL_PROBE_MAXRETRY 3
00074
00075 const oval_pdsc_t *oval_pdsc_lookup(oval_subtype_t subtype);
00076 oval_subtype_t oval_pdsc_lookup_type(const char *name);
00077
00078 struct oval_pctx {
00079 oval_pdsc_t *pdsc_table;
00080 oval_pdtbl_t *pd_table;
00081 char *p_dir;
00082 struct oval_syschar_model *model;
00083 uint32_t p_flags;
00084 };
00085
00086 #define OVAL_PCTX_SETFLAG(ctx, flg) ((ctx)->p_flags |= (flg))
00087 #define OVAL_PCTX_UNSETFLAG(ctx, flg) ((ctx)->p_flags &= ~(flg))
00088 #define OVAL_PCTX_ISSETFLAG(ctx, flg) ((ctx)->p_flags & (flg) == (flg))
00089
00090 OSCAP_HIDDEN_END;
00091
00092 extern encache_t *OSCAP_GSYM(encache);
00093
00094 #endif
00095
00096 #endif
00097