OpenVAS Libraries  9.0.3
wmi_interface_stub.c
Go to the documentation of this file.
1 /* OpenVAS
2  *
3  * $Id$
4  * Description: Stub implementation for a wmi interface.
5  *
6  * Authors:
7  * Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>
8  *
9  * Copyright:
10  * Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program 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
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25  */
26 
35 /* for NULL */
36 #include <string.h>
37 
38 #include "openvas_wmi_interface.h"
39 
47 char *
49 {
50  return NULL;
51 }
52 
63 wmi_connect (int argc, char **argv)
64 {
65  (void) argc;
66  (void) argv;
67  return NULL;
68 }
69 
77 int
79 {
80  (void) handle;
81  return -1;
82 }
83 
95 int
96 wmi_query (WMI_HANDLE handle, const char *query, char **result)
97 {
98  (void) handle;
99  (void) query;
100  (void) result;
101  return -1;
102 }
103 
114 wmi_connect_rsop (int argc, char **argv)
115 {
116  (void) argc;
117  (void) argv;
118  return NULL;
119 }
120 
132 int
133 wmi_query_rsop (WMI_HANDLE handle, const char *query, char **res)
134 {
135  (void) handle;
136  (void) query;
137  (void) res;
138  return -1;
139 }
140 
151 wmi_connect_reg (int argc, char **argv)
152 {
153  (void) argc;
154  (void) argv;
155  return NULL;
156 }
157 
173 int
174 wmi_reg_get_sz (WMI_HANDLE handle, unsigned int hive, const char *key,
175  const char *key_name, char **res)
176 {
177  (void) handle;
178  (void) hive;
179  (void) key;
180  (void) key_name;
181  (void) res;
182  return -1;
183 }
184 
199 int
200 wmi_reg_enum_value (WMI_HANDLE handle, unsigned int hive, const char *key,
201  char **res)
202 {
203  (void) handle;
204  (void) hive;
205  (void) key;
206  (void) res;
207  return -1;
208 }
209 
224 int
225 wmi_reg_enum_key (WMI_HANDLE handle, unsigned int hive, const char *key,
226  char **res)
227 {
228  (void) handle;
229  (void) hive;
230  (void) key;
231  (void) res;
232  return -1;
233 }
234 
250 int
251 wmi_reg_get_bin_val (WMI_HANDLE handle, unsigned int hive, const char *key,
252  const char *val_name, char **res)
253 {
254  (void) handle;
255  (void) hive;
256  (void) key;
257  (void) val_name;
258  (void) res;
259  return -1;
260 }
261 
277 int
278 wmi_reg_get_dword_val (WMI_HANDLE handle, unsigned int hive, const char *key,
279  const char *val_name, char **res)
280 {
281  (void) handle;
282  (void) hive;
283  (void) key;
284  (void) val_name;
285  (void) res;
286  return -1;
287 }
288 
304 int
305 wmi_reg_get_ex_string_val (WMI_HANDLE handle, unsigned int hive,
306  const char *key, const char *val_name, char **res)
307 {
308  (void) handle;
309  (void) hive;
310  (void) key;
311  (void) val_name;
312  (void) res;
313  return -1;
314 }
315 
331 int
332 wmi_reg_get_mul_string_val (WMI_HANDLE handle, unsigned int hive,
333  const char *key, const char *val_name, char **res)
334 {
335  (void) handle;
336  (void) hive;
337  (void) key;
338  (void) val_name;
339  (void) res;
340  return -1;
341 }
342 
358 int
359 wmi_reg_get_qword_val (WMI_HANDLE handle, unsigned int hive, const char *key,
360  const char *val_name, char **res)
361 {
362  (void) handle;
363  (void) hive;
364  (void) key;
365  (void) val_name;
366  (void) res;
367  return -1;
368 }
369 
382 int
383 wmi_reg_set_dword_val(WMI_HANDLE handle, const char *key, const char *val_name,
384  uint32_t val)
385 {
386  (void) handle;
387  (void) key;
388  (void) val_name;
389  (void) val;
390  return -1;
391 }
392 
404 int
405 wmi_reg_set_qword_val(WMI_HANDLE handle, const char *key, const char *val_name,
406  uint64_t val)
407 {
408  (void) handle;
409  (void) key;
410  (void) val_name;
411  (void) val;
412  return -1;
413 }
414 
426 int
427 wmi_reg_set_ex_string_val(WMI_HANDLE handle, const char *key,
428  const char *val_name, const char *val)
429 {
430  (void) handle;
431  (void) key;
432  (void) val_name;
433  (void) val;
434  return -1;
435 }
436 
448 int
449 wmi_reg_set_string_val(WMI_HANDLE handle, const char *key,
450  const char *val_name, const char *val)
451 {
452  (void) handle;
453  (void) key;
454  (void) val_name;
455  (void) val;
456  return -1;
457 }
458 
468 int
469 wmi_reg_create_key(WMI_HANDLE handle, const char *key)
470 {
471  (void) handle;
472  (void) key;
473  return -1;
474 }
475 
485 int
486 wmi_reg_delete_key(WMI_HANDLE handle, const char *key)
487 {
488  (void) handle;
489  (void) key;
490  return -1;
491 }
int wmi_reg_enum_key(WMI_HANDLE handle, unsigned int hive, const char *key, char **res)
Enumerate Registry keys.
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.
WMI_HANDLE wmi_connect_reg(int argc, char **argv)
Establish connection to a WMI Registry service.
const char * val
Definition: nasl_init.c:525
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.
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.
int wmi_reg_set_dword_val(WMI_HANDLE handle, const char *key, const char *val_name, uint32_t val)
Set Registry DWORD value.
int wmi_query_rsop(WMI_HANDLE handle, const char *query, char **res)
WMI RSOP query.
char * wmi_versioninfo()
Return version info for WMI implementation.
int wmi_reg_set_string_val(WMI_HANDLE handle, const char *key, const char *val_name, const char *val)
Set Registry string value.
int wmi_reg_enum_value(WMI_HANDLE handle, unsigned int hive, const char *key, char **res)
Enumerate Registry values.
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.
int wmi_query(WMI_HANDLE handle, const char *query, char **result)
Query WMI service using a WQL query.
void * WMI_HANDLE
WMI_HANDLE wmi_connect(int argc, char **argv)
Establish connection to a WMI service.
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.
int wmi_reg_get_sz(WMI_HANDLE handle, unsigned int hive, const char *key, const char *key_name, char **res)
Get Registry string value.
int wmi_close(WMI_HANDLE handle)
Close the connection handle for a WMI service.
int wmi_reg_set_qword_val(WMI_HANDLE handle, const char *key, const char *val_name, uint64_t val)
Set Registry QWORD value.
int wmi_reg_create_key(WMI_HANDLE handle, const char *key)
Create Registry Key.
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.
int wmi_reg_delete_key(WMI_HANDLE handle, const char *key)
Delete Registry Key.
API protos describing the interface of a wmi interface implementation.
WMI_HANDLE wmi_connect_rsop(int argc, char **argv)
Establish connection to a WMI RSOP service.