OpenVAS Libraries  9.0.3
openvas_wmi_interface.h File Reference

API protos describing the interface of a wmi interface implementation. More...

#include <stdint.h>
Include dependency graph for openvas_wmi_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void * WMI_HANDLE
 

Functions

char * wmi_versioninfo (void)
 Return version info for WMI implementation. More...
 
WMI_HANDLE wmi_connect (int argc, char **argv)
 Establish connection to a WMI service. More...
 
int wmi_close (WMI_HANDLE)
 Close the connection handle for a WMI service. More...
 
int wmi_query (WMI_HANDLE, const char *, char **)
 Query WMI service using a WQL query. More...
 
WMI_HANDLE wmi_connect_rsop (int argc, char **argv)
 Establish connection to a WMI RSOP service. More...
 
int wmi_query_rsop (WMI_HANDLE, const char *, char **)
 WMI RSOP query. More...
 
WMI_HANDLE wmi_connect_reg (int argc, char **argv)
 Establish connection to a WMI Registry service. More...
 
int wmi_reg_get_sz (WMI_HANDLE, unsigned int, const char *, const char *, char **)
 Get Registry string value. More...
 
int wmi_reg_enum_value (WMI_HANDLE, unsigned int, const char *, char **)
 Enumerate Registry values. More...
 
int wmi_reg_enum_key (WMI_HANDLE, unsigned int, const char *, char **)
 Enumerate Registry keys. More...
 
int wmi_reg_get_bin_val (WMI_HANDLE, unsigned int, const char *, const char *, char **)
 Get Registry binary value. More...
 
int wmi_reg_get_dword_val (WMI_HANDLE, unsigned int, const char *, const char *, char **)
 Get Registry DWORD value. More...
 
int wmi_reg_get_ex_string_val (WMI_HANDLE, unsigned int, const char *, const char *, char **)
 Get Registry Expanded string value. More...
 
int wmi_reg_get_mul_string_val (WMI_HANDLE, unsigned int, const char *, const char *, char **)
 Get Registry multi-valued strings. More...
 
int wmi_reg_get_qword_val (WMI_HANDLE, unsigned int, const char *, const char *, char **)
 Get Registry QWORD value. More...
 
int wmi_reg_set_dword_val (WMI_HANDLE, const char *, const char *, uint32_t)
 Set Registry DWORD value. More...
 
int wmi_reg_set_qword_val (WMI_HANDLE, const char *, const char *, uint64_t)
 Set Registry QWORD value. More...
 
int wmi_reg_set_ex_string_val (WMI_HANDLE, const char *, const char *, const char *)
 Set Registry Expanded string value. More...
 
int wmi_reg_set_string_val (WMI_HANDLE, const char *, const char *, const char *)
 Set Registry string value. More...
 
int wmi_reg_create_key (WMI_HANDLE, const char *)
 Create Registry Key. More...
 
int wmi_reg_delete_key (WMI_HANDLE, const char *)
 Delete Registry Key. More...
 

Detailed Description

API protos describing the interface of a wmi interface implementation.

This file contains API protos describing the interface of a wmi interface implementation.

Definition in file openvas_wmi_interface.h.

Typedef Documentation

◆ WMI_HANDLE

typedef void* WMI_HANDLE

Definition at line 41 of file openvas_wmi_interface.h.

Function Documentation

◆ wmi_close()

int wmi_close ( WMI_HANDLE  handle)

Close the connection handle for a WMI service.

Parameters
[in]handle- WMI service connection handle
Returns
, 0 on success, -1 on failure

Definition at line 78 of file wmi_interface_stub.c.

Referenced by nasl_wmi_close().

79 {
80  (void) handle;
81  return -1;
82 }
Here is the caller graph for this function:

◆ wmi_connect()

WMI_HANDLE wmi_connect ( int  argc,
char **  argv 
)

Establish connection to a WMI service.

Parameters
[in]argcNumber of arguments.
[in]argvArray of arguments.
Returns
, WMI_HANDLE on success, NULL on failure.

Definition at line 63 of file wmi_interface_stub.c.

Referenced by nasl_wmi_connect().

64 {
65  (void) argc;
66  (void) argv;
67  return NULL;
68 }
Here is the caller graph for this function:

◆ wmi_connect_reg()

WMI_HANDLE wmi_connect_reg ( int  argc,
char **  argv 
)

Establish connection to a WMI Registry service.

Parameters
[in]argcNumber of arguments.
[in]argvArray of arguments.
Returns
, WMI_HANDLE on success, NULL on failure.

Definition at line 151 of file wmi_interface_stub.c.

Referenced by nasl_wmi_connect_reg().

152 {
153  (void) argc;
154  (void) argv;
155  return NULL;
156 }
Here is the caller graph for this function:

◆ wmi_connect_rsop()

WMI_HANDLE wmi_connect_rsop ( int  argc,
char **  argv 
)

Establish connection to a WMI RSOP service.

Parameters
[in]argcNumber of arguments.
[in]argvArray of arguments.
Returns
, WMI_HANDLE on success, NULL on failure.

Definition at line 114 of file wmi_interface_stub.c.

Referenced by nasl_wmi_connect_rsop().

115 {
116  (void) argc;
117  (void) argv;
118  return NULL;
119 }
Here is the caller graph for this function:

◆ wmi_query()

int wmi_query ( WMI_HANDLE  handle,
const char *  query,
char **  result 
)

Query WMI service using a WQL query.

Parameters
[in]handle- WMI connection handle
[in]query- The WQL query string
[out]result- Result of query as string
Returns
, 0 on success, -1 on failure

Definition at line 96 of file wmi_interface_stub.c.

Referenced by nasl_wmi_query().

97 {
98  (void) handle;
99  (void) query;
100  (void) result;
101  return -1;
102 }
Here is the caller graph for this function:

◆ wmi_query_rsop()

int wmi_query_rsop ( WMI_HANDLE  handle,
const char *  query,
char **  res 
)

WMI RSOP query.

Parameters
[in]handle- WMI connection handle
[in]query- WQL RSOP query
[in]res- Registry value to be queried
Returns
, 0 on success, -1 on failure

Definition at line 133 of file wmi_interface_stub.c.

Referenced by nasl_wmi_query_rsop().

134 {
135  (void) handle;
136  (void) query;
137  (void) res;
138  return -1;
139 }
Here is the caller graph for this function:

◆ wmi_reg_create_key()

int wmi_reg_create_key ( WMI_HANDLE  handle,
const char *  key 
)

Create Registry Key.

Parameters
[in]handle- WMI connection handle
[in]key- Registry key need to be created
Returns
, 0 on success, -1 on failure

Definition at line 469 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_create_key().

470 {
471  (void) handle;
472  (void) key;
473  return -1;
474 }
Here is the caller graph for this function:

◆ wmi_reg_delete_key()

int wmi_reg_delete_key ( WMI_HANDLE  handle,
const char *  key 
)

Delete Registry Key.

Parameters
[in]handle- WMI connection handle
[in]key- Registry key need to be Deleted
Returns
, 0 on success, -1 on failure

Definition at line 486 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_delete_key().

487 {
488  (void) handle;
489  (void) key;
490  return -1;
491 }
Here is the caller graph for this function:

◆ wmi_reg_enum_key()

int wmi_reg_enum_key ( WMI_HANDLE  handle,
unsigned int  hive,
const char *  key,
char **  res 
)

Enumerate Registry keys.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 225 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_enum_key().

227 {
228  (void) handle;
229  (void) hive;
230  (void) key;
231  (void) res;
232  return -1;
233 }
Here is the caller graph for this function:

◆ wmi_reg_enum_value()

int wmi_reg_enum_value ( WMI_HANDLE  handle,
unsigned int  hive,
const char *  key,
char **  res 
)

Enumerate Registry values.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key name
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 200 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_enum_value().

202 {
203  (void) handle;
204  (void) hive;
205  (void) key;
206  (void) res;
207  return -1;
208 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key containing the value to be queried
[in]val_name- Registry value to be queried
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 251 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_get_bin_val().

253 {
254  (void) handle;
255  (void) hive;
256  (void) key;
257  (void) val_name;
258  (void) res;
259  return -1;
260 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key containing the value to be queried
[in]val_name- Registry value to be queried
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 278 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_get_dword_val().

280 {
281  (void) handle;
282  (void) hive;
283  (void) key;
284  (void) val_name;
285  (void) res;
286  return -1;
287 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key containing the value to be queried
[in]val_name- Registry value to be queried
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 305 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_get_ex_string_val().

307 {
308  (void) handle;
309  (void) hive;
310  (void) key;
311  (void) val_name;
312  (void) res;
313  return -1;
314 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key containing the value to be queried
[in]val_name- Registry value to be queried
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 332 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_get_mul_string_val().

334 {
335  (void) handle;
336  (void) hive;
337  (void) key;
338  (void) val_name;
339  (void) res;
340  return -1;
341 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry hive
[in]key- Registry key containing the value to be queried
[in]val_name- Registry value to be queried
[out]res- Result string
Returns
, 0 on success, -1 on failure

Definition at line 359 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_get_qword_val().

361 {
362  (void) handle;
363  (void) hive;
364  (void) key;
365  (void) val_name;
366  (void) res;
367  return -1;
368 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]hive- Registry Hive
[in]key- Registry key name
[in]key_name- Registry value name.
[out]res- Result string.
Returns
, 0 on success, -1 on failure

Definition at line 174 of file wmi_interface_stub.c.

Referenced by nasl_wmi_reg_get_sz().

176 {
177  (void) handle;
178  (void) hive;
179  (void) key;
180  (void) key_name;
181  (void) res;
182  return -1;
183 }
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]key- Registry key containing the value to be set
[in]val_name- Registry value to set
Returns
, 0 on success, -1 on failure

Definition at line 383 of file wmi_interface_stub.c.

References val.

Referenced by nasl_wmi_reg_set_dword_val().

385 {
386  (void) handle;
387  (void) key;
388  (void) val_name;
389  (void) val;
390  return -1;
391 }
const char * val
Definition: nasl_init.c:525
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]key- Registry key containing the value to be set
[in]val_name- Registry value to set
Returns
, 0 on success, -1 on failure

Definition at line 427 of file wmi_interface_stub.c.

References val.

Referenced by nasl_wmi_reg_set_ex_string_val().

429 {
430  (void) handle;
431  (void) key;
432  (void) val_name;
433  (void) val;
434  return -1;
435 }
const char * val
Definition: nasl_init.c:525
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]key- Registry key containing the value to be set
[in]val_name- Registry value to set
Returns
, 0 on success, -1 on failure

Definition at line 405 of file wmi_interface_stub.c.

References val.

Referenced by nasl_wmi_reg_set_qword_val().

407 {
408  (void) handle;
409  (void) key;
410  (void) val_name;
411  (void) val;
412  return -1;
413 }
const char * val
Definition: nasl_init.c:525
Here is the caller graph for this function:

◆ 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.

Parameters
[in]handle- WMI connection handle
[in]key- Registry key containing the value to be set
[in]val_name- Registry value to set
Returns
, 0 on success, -1 on failure

Definition at line 449 of file wmi_interface_stub.c.

References val.

Referenced by nasl_wmi_reg_set_string_val().

451 {
452  (void) handle;
453  (void) key;
454  (void) val_name;
455  (void) val;
456  return -1;
457 }
const char * val
Definition: nasl_init.c:525
Here is the caller graph for this function:

◆ wmi_versioninfo()

char* wmi_versioninfo ( void  )

Return version info for WMI implementation.

Returns
NULL if this the impementation is a non-functional stub, else a arbitrary string that explains the version of the implementation.

Definition at line 48 of file wmi_interface_stub.c.

Referenced by nasl_wmi_versioninfo().

49 {
50  return NULL;
51 }
Here is the caller graph for this function: