OpenVAS Scanner  22.7.9
wmi_interface_stub.c
Go to the documentation of this file.
1 /* SPDX-FileCopyrightText: 2023 Greenbone AG
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  */
5 
14 /* for NULL */
15 #include "openvas_wmi_interface.h"
16 
17 #include <string.h>
18 
26 char *
28 {
29  return NULL;
30 }
31 
42 wmi_connect (int argc, char **argv)
43 {
44  (void) argc;
45  (void) argv;
46  return NULL;
47 }
48 
56 int
58 {
59  (void) handle;
60  return -1;
61 }
62 
74 int
75 wmi_query (WMI_HANDLE handle, const char *query, char **result)
76 {
77  (void) handle;
78  (void) query;
79  (void) result;
80  return -1;
81 }
82 
93 wmi_connect_rsop (int argc, char **argv)
94 {
95  (void) argc;
96  (void) argv;
97  return NULL;
98 }
99 
111 int
112 wmi_query_rsop (WMI_HANDLE handle, const char *query, char **res)
113 {
114  (void) handle;
115  (void) query;
116  (void) res;
117  return -1;
118 }
119 
130 wmi_connect_reg (int argc, char **argv)
131 {
132  (void) argc;
133  (void) argv;
134  return NULL;
135 }
136 
152 int
153 wmi_reg_get_sz (WMI_HANDLE handle, unsigned int hive, const char *key,
154  const char *key_name, char **res)
155 {
156  (void) handle;
157  (void) hive;
158  (void) key;
159  (void) key_name;
160  (void) res;
161  return -1;
162 }
163 
178 int
179 wmi_reg_enum_value (WMI_HANDLE handle, unsigned int hive, const char *key,
180  char **res)
181 {
182  (void) handle;
183  (void) hive;
184  (void) key;
185  (void) res;
186  return -1;
187 }
188 
203 int
204 wmi_reg_enum_key (WMI_HANDLE handle, unsigned int hive, const char *key,
205  char **res)
206 {
207  (void) handle;
208  (void) hive;
209  (void) key;
210  (void) res;
211  return -1;
212 }
213 
229 int
230 wmi_reg_get_bin_val (WMI_HANDLE handle, unsigned int hive, const char *key,
231  const char *val_name, char **res)
232 {
233  (void) handle;
234  (void) hive;
235  (void) key;
236  (void) val_name;
237  (void) res;
238  return -1;
239 }
240 
256 int
257 wmi_reg_get_dword_val (WMI_HANDLE handle, unsigned int hive, const char *key,
258  const char *val_name, char **res)
259 {
260  (void) handle;
261  (void) hive;
262  (void) key;
263  (void) val_name;
264  (void) res;
265  return -1;
266 }
267 
283 int
284 wmi_reg_get_ex_string_val (WMI_HANDLE handle, unsigned int hive,
285  const char *key, const char *val_name, char **res)
286 {
287  (void) handle;
288  (void) hive;
289  (void) key;
290  (void) val_name;
291  (void) res;
292  return -1;
293 }
294 
310 int
311 wmi_reg_get_mul_string_val (WMI_HANDLE handle, unsigned int hive,
312  const char *key, const char *val_name, char **res)
313 {
314  (void) handle;
315  (void) hive;
316  (void) key;
317  (void) val_name;
318  (void) res;
319  return -1;
320 }
321 
337 int
338 wmi_reg_get_qword_val (WMI_HANDLE handle, unsigned int hive, const char *key,
339  const char *val_name, char **res)
340 {
341  (void) handle;
342  (void) hive;
343  (void) key;
344  (void) val_name;
345  (void) res;
346  return -1;
347 }
348 
361 int
362 wmi_reg_set_dword_val (WMI_HANDLE handle, const char *key, const char *val_name,
363  uint32_t val)
364 {
365  (void) handle;
366  (void) key;
367  (void) val_name;
368  (void) val;
369  return -1;
370 }
371 
383 int
384 wmi_reg_set_qword_val (WMI_HANDLE handle, const char *key, const char *val_name,
385  uint64_t val)
386 {
387  (void) handle;
388  (void) key;
389  (void) val_name;
390  (void) val;
391  return -1;
392 }
393 
405 int
406 wmi_reg_set_ex_string_val (WMI_HANDLE handle, const char *key,
407  const char *val_name, const char *val)
408 {
409  (void) handle;
410  (void) key;
411  (void) val_name;
412  (void) val;
413  return -1;
414 }
415 
427 int
428 wmi_reg_set_string_val (WMI_HANDLE handle, const char *key,
429  const char *val_name, const char *val)
430 {
431  (void) handle;
432  (void) key;
433  (void) val_name;
434  (void) val;
435  return -1;
436 }
437 
447 int
448 wmi_reg_create_key (WMI_HANDLE handle, const char *key)
449 {
450  (void) handle;
451  (void) key;
452  return -1;
453 }
454 
464 int
465 wmi_reg_delete_key (WMI_HANDLE handle, const char *key)
466 {
467  (void) handle;
468  (void) key;
469  return -1;
470 }
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:311
wmi_query_rsop
int wmi_query_rsop(WMI_HANDLE handle, const char *query, char **res)
WMI RSOP query.
Definition: wmi_interface_stub.c:112
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:448
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:406
wmi_reg_delete_key
int wmi_reg_delete_key(WMI_HANDLE handle, const char *key)
Delete Registry Key.
Definition: wmi_interface_stub.c:465
wmi_connect_rsop
WMI_HANDLE wmi_connect_rsop(int argc, char **argv)
Establish connection to a WMI RSOP service.
Definition: wmi_interface_stub.c:93
wmi_versioninfo
char * wmi_versioninfo()
Return version info for WMI implementation.
Definition: wmi_interface_stub.c:27
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:428
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:204
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:338
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:230
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:75
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:284
wmi_connect
WMI_HANDLE wmi_connect(int argc, char **argv)
Establish connection to a WMI service.
Definition: wmi_interface_stub.c:42
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:362
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:153
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:179
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:384
WMI_HANDLE
void * WMI_HANDLE
Definition: openvas_wmi_interface.h:19
val
const char * val
Definition: nasl_init.c:412
wmi_connect_reg
WMI_HANDLE wmi_connect_reg(int argc, char **argv)
Establish connection to a WMI Registry service.
Definition: wmi_interface_stub.c:130
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:257
wmi_close
int wmi_close(WMI_HANDLE handle)
Close the connection handle for a WMI service.
Definition: wmi_interface_stub.c:57