Greenbone Vulnerability Management Libraries: kb_operations Struct Reference

Greenbone Vulnerability Management Libraries 23.1.2

Data Fields
kb_operations Struct Reference

KB interface. Functions provided by an implementation. All functions have to be provided, there is no default/fallback. These functions should be called via the corresponding static inline wrappers below. See the wrappers for the documentation. More...

`#include <kb.h>`

## Data Fields
int(* | kb_new )(kb_t *, const char *)
int(* | kb_delete )(kb_t)
kb_t(* | kb_find )(const char *, const char *)
kb_t(* | kb_direct_conn )(const char *, const int)
struct kb_item *(* | kb_get_single )(kb_t, const char *, enum kb_item_type)
char *(* | kb_get_str )(kb_t, const char *)
int(* | kb_get_int )(kb_t, const char *)
char *(* | kb_get_nvt )(kb_t, const char *, enum kb_nvt_pos)
nvti_t *(* | kb_get_nvt_all )(kb_t, const char *)
GSList *(* | kb_get_nvt_oids )(kb_t)
int(* | kb_push_str )(kb_t, const char *, const char *)
char *(* | kb_pop_str )(kb_t, const char *)
struct kb_item *(* | kb_get_all )(kb_t, const char *)
struct kb_item *(* | kb_get_pattern )(kb_t, const char *)
size_t(* | kb_count )(kb_t, const char *)
int(* | kb_add_str )(kb_t, const char *, const char *, size_t)
int(* | kb_add_str_unique )(kb_t, const char *, const char *, size_t, int)
int(* | kb_add_str_unique_volatile )(kb_t, const char *, const char *, int, size_t, int)
int(* | kb_set_str )(kb_t, const char *, const char *, size_t)
int(* | kb_add_int )(kb_t, const char *, int)
int(* | kb_add_int_unique )(kb_t, const char *, int)
int(* | kb_add_int_unique_volatile )(kb_t, const char *, int, int)
int(* | kb_set_int )(kb_t, const char *, int)
int(* | kb_add_nvt )(kb_t, const nvti_t *, const char *)
int(* | kb_del_items )(kb_t, const char *)
int(* | kb_save )(kb_t)
int(* | kb_lnk_reset )(kb_t)
int(* | kb_flush )(kb_t, const char *)
int(* | kb_get_kb_index )(kb_t)

## Detailed Description

KB interface. Functions provided by an implementation. All functions have to be provided, there is no default/fallback. These functions should be called via the corresponding static inline wrappers below. See the wrappers for the documentation.

## Field Documentation

## ◆ kb_add_int

int(* kb_operations::kb_add_int) (kb_t, const char *, int)

Function provided by an implementation to insert (append) a new entry under a given name.

## ◆ kb_add_int_unique

int(* kb_operations::kb_add_int_unique) (kb_t, const char *, int)

Function provided by an implementation to insert (append) a new unique entry under a given name.

## ◆ kb_add_int_unique_volatile

int(* kb_operations::kb_add_int_unique_volatile) (kb_t, const char *, int, int)

Function provided by an implementation to insert (append) a new unique and volatile entry under a given name.

## ◆ kb_add_nvt

int(* kb_operations::kb_add_nvt) (kb_t, const nvti_t *, const char *)

Function provided by an implementation to insert a new nvt.

## ◆ kb_add_str

int(* kb_operations::kb_add_str) (kb_t, const char *, const char *, size_t)

Function provided by an implementation to insert (append) a new entry under a given name.

## ◆ kb_add_str_unique

int(* kb_operations::kb_add_str_unique) (kb_t, const char *, const char *, size_t, int)

Function provided by an implementation to insert (append) a new unique entry under a given name.

## ◆ kb_add_str_unique_volatile

int(* kb_operations::kb_add_str_unique_volatile) (kb_t, const char *, const char *, int, size_t, int)

Function provided by an implementation to insert (append) a new unique and volatile entry under a given name.

## ◆ kb_count

size_t(* kb_operations::kb_count) (kb_t, const char *)

Function provided by an implementation to count all items stored under a given pattern.

## ◆ kb_del_items

int(* kb_operations::kb_del_items) (kb_t, const char *)

Function provided by an implementation to delete all entries under a given name.

## ◆ kb_delete

int(* kb_operations::kb_delete) (kb_t)

Delete KB.

## ◆ kb_direct_conn

kb_t(* kb_operations::kb_direct_conn) (const char *, const int)

Connect to a KB.

## ◆ kb_find

kb_t(* kb_operations::kb_find) (const char *, const char *)

Find KB.

## ◆ kb_flush

int(* kb_operations::kb_flush) (kb_t, const char *)

Flush redis DB.

## ◆ kb_get_all

struct kb_item *(* kb_operations::kb_get_all) (kb_t, const char *)

Function provided by an implementation to get all items stored under a given name.

## ◆ kb_get_int

int(* kb_operations::kb_get_int) (kb_t, const char *)

Function provided by an implementation to get single kb int item.

## ◆ kb_get_kb_index

int(* kb_operations::kb_get_kb_index) (kb_t)

Get kb index.

## ◆ kb_get_nvt

char *(* kb_operations::kb_get_nvt) (kb_t, const char *, enum kb_nvt_pos)

Function provided by an implementation to get field of NVT.

## ◆ kb_get_nvt_all

nvti_t *(* kb_operations::kb_get_nvt_all) (kb_t, const char *)

Function provided by an implementation to get a full NVT.

## ◆ kb_get_nvt_oids

GSList *(* kb_operations::kb_get_nvt_oids) (kb_t)

Function provided by an implementation to get list of OIDs.

## ◆ kb_get_pattern

struct kb_item *(* kb_operations::kb_get_pattern) (kb_t, const char *)

Function provided by an implementation to get all items stored under a given pattern.

## ◆ kb_get_single

struct kb_item *(* kb_operations::kb_get_single) (kb_t, const char *, enum kb_item_type)

Function provided by an implementation to get a single kb element.

## ◆ kb_get_str

char *(* kb_operations::kb_get_str) (kb_t, const char *)

Function provided by an implementation to get single kb str item.

## ◆ kb_lnk_reset

int(* kb_operations::kb_lnk_reset) (kb_t)

Reset connection to KB.

## ◆ kb_new

int(* kb_operations::kb_new) (kb_t *, const char *)

New KB.

## ◆ kb_pop_str

char *(* kb_operations::kb_pop_str) (kb_t, const char *)

Function provided by an implementation to pop a str under a key.

## ◆ kb_push_str

int(* kb_operations::kb_push_str) (kb_t, const char *, const char *)

Function provided by an implementation to push a new value under a key.

## ◆ kb_save

int(* kb_operations::kb_save) (kb_t)

Save all kb content.

## ◆ kb_set_int

int(* kb_operations::kb_set_int) (kb_t, const char *, int)

Function provided by an implementation to get (replace) a new entry under a given name.

## ◆ kb_set_str

int(* kb_operations::kb_set_str) (kb_t, const char *, const char *, size_t)

Function provided by an implementation to get (replace) a new entry under a given name.

The documentation for this struct was generated from the following file:

- util/kb.h