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