Debian Codegraph @

src/OVAL/public/oval_probe.h

raw symbols SCIP
1 /**
2 * @file oval_probe.h
3 * @brief OVAL probe interface API public header
4 * @author "Daniel Kopecek" <[email protected]>
5 *
6 * @addtogroup PROBEINTERFACE
7 * @{
8 */
9 /*
10 * Copyright 2009-2010 Red Hat Inc., Durham, North Carolina.
11 * All Rights Reserved.
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 *
27 * Authors:
28 * "Daniel Kopecek" <[email protected]>
29 */
30 #pragma once
31 #ifndef OVAL_PROBE_H
32 #define OVAL_PROBE_H
33
34 #include <stdio.h>
35 #include <stdarg.h>
36 #include <stdint.h>
37 #include "oval_definitions.h"
38 #include "oval_system_characteristics.h"
39 #include "oval_probe_session.h"
40 #include "oscap_export.h"
41
42 /*
43 * probe session flags
44 */
45 #define OVAL_PDFLAG_NOREPLY 0x0001 /**< don't send probe result to library - just an ack */
46 #define OVAL_PDFLAG_NORECONN 0x0002 /**< don't try to reconnect on fatal errors */
47 #define OVAL_PDGLAG_RUNALL 0x0004 /**< execute all probes when executing the first */
48 #define OVAL_PDFLAG_RUNNOW 0x0008 /**< execute all probes immediately */
49 #define OVAL_PDFLAG_SLAVE 0x0010
50
51 #define OVAL_PDFLAG_MASK (0x0001|0x0002|0x0004|0x0008|0x0010)
52
53 /**
54 * Evaluate system info probe
55 * @param sess probe session
56 * @param out_sysinfo address of a pointer to hold the result
57 */
58 OSCAP_API int oval_probe_query_sysinfo(oval_probe_session_t *sess, struct oval_sysinfo **out_sysinfo) __attribute__ ((nonnull(1, 2)));
59
60 /**
61 * Evaluate an object
62 * @param sess probe session
63 * @param object the object to evaluate
64 */
65 OSCAP_API int oval_probe_query_object(oval_probe_session_t *psess, struct oval_object *object, int flags, struct oval_syschar **out_syschar) __attribute__ ((nonnull(1, 2)));
66
67 /**
68 * Query the specified variable and all its dependencies in order to compute the vector of its values
69 * @param sess probe session
70 * @param variable the variable to query
71 * @return 0 on success
72 */
73 OSCAP_API int oval_probe_query_variable(oval_probe_session_t *sess, struct oval_variable *variable);
74 #endif /* OVAL_PROBE_H */
75 /// @}