Debian Codegraph @

src/OVAL/probes/probe/entcmp.h

raw symbols SCIP
1 /**
2 * @file entcmp.h
3 * @author "Tomas Heinrich" <[email protected]>
4 *
5 * @addtogroup PROBEAPI
6 * @{
7 */
8 /*
9 * Copyright 2009 Red Hat Inc., Durham, North Carolina.
10 * All Rights Reserved.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 *
26 * Authors:
27 * Tomas Heinrich <[email protected]>
28 */
29
30 #ifndef PROBE_ENTCMP_H
31 #define PROBE_ENTCMP_H
32
33 #include "_seap.h"
34 #include <stdarg.h>
35 #include "oval_definitions.h"
36 #include "oval_results.h"
37
38 /**
39 * Compute the overall result.
40 * Compute the overall result from a results vector and a check enumeration parameter.
41 * @param res_lst the results vector
42 * @param check the check enumeration value
43 */
44 oval_result_t probe_ent_result_bychk(SEXP_t * res_lst, oval_check_t check);
45
46 /**
47 * Compute the overall result.
48 * Compute the overall result from a results vector and a operator enumeration parameter.
49 * @param res_lst the results vector
50 * @param check the operator enumeration value
51 */
52 oval_result_t probe_ent_result_byopr(SEXP_t * res_lst, oval_operator_t operator);
53
54 /**
55 * Compare object entity's content with a value.
56 * The result depends on the operation attribute and
57 * a possible var_check attribute.
58 * @param ent_obj object entity
59 * @param val raw value
60 */
61 oval_result_t probe_entobj_cmp(SEXP_t * ent_obj, SEXP_t * val);
62
63 /**
64 * Compare state entity's content with a item entity's value.
65 * The result depends on the operation attribute,
66 * a possible var_check attribute and item entity's status.
67 * @param ent_ste state entity
68 * @param ent_itm item entity
69 */
70 oval_result_t probe_entste_cmp(SEXP_t * ent_ste, SEXP_t * ent_itm);
71
72 /**
73 * Compare two binary values.
74 * The operation to use is specified by the operation enumeration value.
75 * @param val1 the first value
76 * @param val2 the second value
77 * @param op the desired operation
78 */
79 oval_result_t probe_ent_cmp_binary(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
80
81 /**
82 * Compare two boolean values.
83 * The operation to use is specified by the operation enumeration value.
84 * @param val1 the first value
85 * @param val2 the second value
86 * @param op the desired operation
87 */
88 oval_result_t probe_ent_cmp_bool(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
89
90 /**
91 * Compare two epoch-version-release values.
92 * The operation to use is specified by the operation enumeration value.
93 * @param val1 the first value
94 * @param val2 the second value
95 * @param op the desired operation
96 */
97 oval_result_t probe_ent_cmp_evr(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
98
99 /**
100 * Compare two Debian epoch-version-release values.
101 * The operation to use is specified by the operation enumeration value.
102 * @param val1 the first value
103 * @param val2 the second value
104 * @param op the desired operation
105 */
106 oval_result_t probe_ent_cmp_debian_evr(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
107
108 /**
109 * Compare two values.
110 * The operation to use is specified by the operation enumeration value.
111 * @param val1 the first value
112 * @param val2 the second value
113 * @param op the desired operation
114 */
115 oval_result_t probe_ent_cmp_filesetrev(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
116
117 /**
118 * Compare two floating point values.
119 * The operation to use is specified by the operation enumeration value.
120 * @param val1 the first value
121 * @param val2 the second value
122 * @param op the desired operation
123 */
124 oval_result_t probe_ent_cmp_float(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
125
126 /**
127 * Compare two integer values.
128 * The operation to use is specified by the operation enumeration value.
129 * @param val1 the first value
130 * @param val2 the second value
131 * @param op the desired operation
132 */
133 oval_result_t probe_ent_cmp_int(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
134
135 /**
136 * Compare two ios values.
137 * The operation to use is specified by the operation enumeration value.
138 * @param val1 the first value
139 * @param val2 the second value
140 * @param op the desired operation
141 */
142 oval_result_t probe_ent_cmp_ios(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
143
144 /**
145 * Compare two version values.
146 * The operation to use is specified by the operation enumeration value.
147 * @param val1 the first value
148 * @param val2 the second value
149 * @param op the desired operation
150 */
151 oval_result_t probe_ent_cmp_version(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
152
153 /**
154 * Compare two string values.
155 * The operation to use is specified by the operation enumeration value.
156 * @param val1 the first value
157 * @param val2 the second value
158 * @param op the desired operation
159 */
160 oval_result_t probe_ent_cmp_string(SEXP_t * val1, SEXP_t * val2, oval_operation_t op);
161
162 #endif
163 /// @}