OpenVAS Scanner  7.0.1~git
wmi_interface_stub.c
Go to the documentation of this file.
1 /* Copyright (C) 2009-2019 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
28 /* for NULL */
29 #include "openvas_wmi_interface.h"
30 
31 #include <string.h>
32 
40 char *
42 {
43  return NULL;
44 }
45 
56 wmi_connect (int argc, char **argv)
57 {
58  (void) argc;
59  (void) argv;
60  return NULL;
61 }
62 
70 int
72 {
73  (void) handle;
74  return -1;
75 }
76 
88 int
89 wmi_query (WMI_HANDLE handle, const char *query, char **result)
90 {
91  (void) handle;
92  (void) query;
93  (void) result;
94  return -1;
95 }
96 
107 wmi_connect_rsop (int argc, char **argv)
108 {
109  (void) argc;
110  (void) argv;
111  return NULL;
112 }
113 
125 int
126 wmi_query_rsop (WMI_HANDLE handle, const char *query, char **res)
127 {
128  (void) handle;
129  (void) query;
130  (void) res;
131  return -1;
132 }
133 
144 wmi_connect_reg (int argc, char **argv)
145 {
146  (void) argc;
147  (void) argv;
148  return NULL;
149 }
150 
166 int
167 wmi_reg_get_sz (WMI_HANDLE handle, unsigned int hive, const char *key,
168  const char *key_name, char **res)
169 {
170  (void) handle;
171  (void) hive;
172  (void) key;
173  (void) key_name;
174  (void) res;
175  return -1;
176 }
177 
192 int
193 wmi_reg_enum_value (WMI_HANDLE handle, unsigned int hive, const char *key,
194  char **res)
195 {
196  (void) handle;
197  (void) hive;
198  (void) key;
199  (void) res;
200  return -1;
201 }
202 
217 int
218 wmi_reg_enum_key (WMI_HANDLE handle, unsigned int hive, const char *key,
219  char **res)
220 {
221  (void) handle;
222  (void) hive;
223  (void) key;
224  (void) res;
225  return -1;
226 }
227 
243 int
244 wmi_reg_get_bin_val (WMI_HANDLE handle, unsigned int hive, const char *key,
245  const char *val_name, char **res)
246 {
247  (void) handle;
248  (void) hive;
249  (void) key;
250  (void) val_name;
251  (void) res;
252  return -1;
253 }
254 
270 int
271 wmi_reg_get_dword_val (WMI_HANDLE handle, unsigned int hive, const char *key,
272  const char *val_name, char **res)
273 {
274  (void) handle;
275  (void) hive;
276  (void) key;
277  (void) val_name;
278  (void) res;
279  return -1;
280 }
281 
297 int
298 wmi_reg_get_ex_string_val (WMI_HANDLE handle, unsigned int hive,
299  const char *key, const char *val_name, char **res)
300 {
301  (void) handle;
302  (void) hive;
303  (void) key;
304  (void) val_name;
305  (void) res;
306  return -1;
307 }
308 
324 int
325 wmi_reg_get_mul_string_val (WMI_HANDLE handle, unsigned int hive,
326  const char *key, const char *val_name, char **res)
327 {
328  (void) handle;
329  (void) hive;
330  (void) key;
331  (void) val_name;
332  (void) res;
333  return -1;
334 }
335 
351 int
352 wmi_reg_get_qword_val (WMI_HANDLE handle, unsigned int hive, const char *key,
353  const char *val_name, char **res)
354 {
355  (void) handle;
356  (void) hive;
357  (void) key;
358  (void) val_name;
359  (void) res;
360  return -1;
361 }
362 
375 int
376 wmi_reg_set_dword_val (WMI_HANDLE handle, const char *key, const char *val_name,
377  uint32_t val)
378 {
379  (void) handle;
380  (void) key;
381  (void) val_name;
382  (void) val;
383  return -1;
384 }
385 
397 int
398 wmi_reg_set_qword_val (WMI_HANDLE handle, const char *key, const char *val_name,
399  uint64_t val)
400 {
401  (void) handle;
402  (void) key;
403  (void) val_name;
404  (void) val;
405  return -1;
406 }
407 
419 int
420 wmi_reg_set_ex_string_val (WMI_HANDLE handle, const char *key,
421  const char *val_name, const char *val)
422 {
423  (void) handle;
424  (void) key;
425  (void) val_name;
426  (void) val;
427  return -1;
428 }
429 
441 int
442 wmi_reg_set_string_val (WMI_HANDLE handle, const char *key,
443  const char *val_name, const char *val)
444 {
445  (void) handle;
446  (void) key;
447  (void) val_name;
448  (void) val;
449  return -1;
450 }
451 
461 int
462 wmi_reg_create_key (WMI_HANDLE handle, const char *key)
463 {
464  (void) handle;
465  (void) key;
466  return -1;
467 }
468 
478 int
479 wmi_reg_delete_key (WMI_HANDLE handle, const char *key)
480 {
481  (void) handle;
482  (void) key;
483  return -1;
484 }
wmi_reg_get_mul_string_val
int wmi_reg_get_mul_string_val(WMI_HANDLE handle, unsigned int hive, const char *key, const char *val_name, char **res)
Get Registry multi-valued strings.
Definition: wmi_interface_stub.c:325
wmi_query_rsop
int wmi_query_rsop(WMI_HANDLE handle, const char *query, char **res)
WMI RSOP query.
Definition: wmi_interface_stub.c:126
openvas_wmi_interface.h
API protos describing the interface of a wmi interface implementation.
wmi_reg_create_key
int wmi_reg_create_key(WMI_HANDLE handle, const char *key)
Create Registry Key.
Definition: wmi_interface_stub.c:462
wmi_reg_set_ex_string_val
int wmi_reg_set_ex_string_val(WMI_HANDLE handle, const char *key, const char *val_name, const char *val)
Set Registry Expanded string value.
Definition: wmi_interface_stub.c:420
wmi_reg_delete_key
int wmi_reg_delete_key(WMI_HANDLE handle, const char *key)
Delete Registry Key.
Definition: wmi_interface_stub.c:479
wmi_connect_rsop
WMI_HANDLE wmi_connect_rsop(int argc, char **argv)
Establish connection to a WMI RSOP service.
Definition: wmi_interface_stub.c:107
wmi_versioninfo
char * wmi_versioninfo()
Return version info for WMI implementation.
Definition: wmi_interface_stub.c:41
wmi_reg_set_string_val
int wmi_reg_set_string_val(WMI_HANDLE handle, const char *key, const char *val_name, const char *val)
Set Registry string value.
Definition: wmi_interface_stub.c:442
wmi_reg_enum_key
int wmi_reg_enum_key(WMI_HANDLE handle, unsigned int hive, const char *key, char **res)
Enumerate Registry keys.
Definition: wmi_interface_stub.c:218
wmi_reg_get_qword_val
int wmi_reg_get_qword_val(WMI_HANDLE handle, unsigned int hive, const char *key, const char *val_name, char **res)
Get Registry QWORD value.
Definition: wmi_interface_stub.c:352
wmi_reg_get_bin_val
int wmi_reg_get_bin_val(WMI_HANDLE handle, unsigned int hive, const char *key, const char *val_name, char **res)
Get Registry binary value.
Definition: wmi_interface_stub.c:244
wmi_query
int wmi_query(WMI_HANDLE handle, const char *query, char **result)
Query WMI service using a WQL query.
Definition: wmi_interface_stub.c:89
wmi_reg_get_ex_string_val
int wmi_reg_get_ex_string_val(WMI_HANDLE handle, unsigned int hive, const char *key, const char *val_name, char **res)
Get Registry Expanded string value.
Definition: wmi_interface_stub.c:298
wmi_connect
WMI_HANDLE wmi_connect(int argc, char **argv)
Establish connection to a WMI service.
Definition: wmi_interface_stub.c:56
wmi_reg_set_dword_val
int wmi_reg_set_dword_val(WMI_HANDLE handle, const char *key, const char *val_name, uint32_t val)
Set Registry DWORD value.
Definition: wmi_interface_stub.c:376
wmi_reg_get_sz
int wmi_reg_get_sz(WMI_HANDLE handle, unsigned int hive, const char *key, const char *key_name, char **res)
Get Registry string value.
Definition: wmi_interface_stub.c:167
wmi_reg_enum_value
int wmi_reg_enum_value(WMI_HANDLE handle, unsigned int hive, const char *key, char **res)
Enumerate Registry values.
Definition: wmi_interface_stub.c:193
wmi_reg_set_qword_val
int wmi_reg_set_qword_val(WMI_HANDLE handle, const char *key, const char *val_name, uint64_t val)
Set Registry QWORD value.
Definition: wmi_interface_stub.c:398
WMI_HANDLE
void * WMI_HANDLE
Definition: openvas_wmi_interface.h:33
val
const char * val
Definition: nasl_init.c:378
wmi_connect_reg
WMI_HANDLE wmi_connect_reg(int argc, char **argv)
Establish connection to a WMI Registry service.
Definition: wmi_interface_stub.c:144
wmi_reg_get_dword_val
int wmi_reg_get_dword_val(WMI_HANDLE handle, unsigned int hive, const char *key, const char *val_name, char **res)
Get Registry DWORD value.
Definition: wmi_interface_stub.c:271
wmi_close
int wmi_close(WMI_HANDLE handle)
Close the connection handle for a WMI service.
Definition: wmi_interface_stub.c:71