Greenbone Vulnerability Management Libraries 22.41.0
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>

Collaboration diagram for kb_operations:
Collaboration graph

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.

Definition at line 106 of file kb.h.

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.

Definition at line 187 of file kb.h.

Referenced by kb_item_add_int().

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

Definition at line 192 of file kb.h.

Referenced by kb_item_add_int_unique().

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

Definition at line 197 of file kb.h.

Referenced by kb_add_int_unique_volatile().

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

Definition at line 207 of file kb.h.

Referenced by kb_nvt_add().

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

Definition at line 166 of file kb.h.

Referenced by kb_item_add_str().

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

Definition at line 171 of file kb.h.

Referenced by kb_item_add_str_unique().

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

Definition at line 176 of file kb.h.

Referenced by kb_add_str_unique_volatile().

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

Definition at line 161 of file kb.h.

Referenced by kb_item_count().

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

Definition at line 212 of file kb.h.

Referenced by kb_del_items().

◆ kb_delete

int(*) kb_operations::kb_delete(kb_t)

Delete KB.

Definition at line 110 of file kb.h.

Referenced by kb_delete().

◆ kb_direct_conn

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

Connect to a KB.

Definition at line 112 of file kb.h.

Referenced by kb_direct_conn().

◆ kb_find

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

Find KB.

Definition at line 111 of file kb.h.

Referenced by kb_find().

◆ kb_flush

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

Flush redis DB.

Definition at line 217 of file kb.h.

Referenced by kb_flush().

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

Definition at line 146 of file kb.h.

Referenced by kb_item_get_all().

◆ kb_get_int

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

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

Definition at line 126 of file kb.h.

Referenced by kb_item_get_int().

◆ kb_get_kb_index

int(*) kb_operations::kb_get_kb_index(kb_t)

Get kb index.

Definition at line 218 of file kb.h.

Referenced by kb_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.

Definition at line 130 of file kb.h.

Referenced by kb_nvt_get().

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

Definition at line 134 of file kb.h.

Referenced by kb_nvt_get_all().

◆ kb_get_nvt_oids

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

Function provided by an implementation to get list of OIDs.

Definition at line 138 of file kb.h.

Referenced by kb_nvt_get_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.

Definition at line 146 of file kb.h.

Referenced by kb_item_get_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.

Definition at line 112 of file kb.h.

Referenced by kb_item_get_single().

◆ kb_get_str

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

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

Definition at line 122 of file kb.h.

Referenced by kb_item_get_str().

◆ kb_lnk_reset

int(*) kb_operations::kb_lnk_reset(kb_t)

Reset connection to KB.

Definition at line 216 of file kb.h.

Referenced by kb_lnk_reset().

◆ kb_new

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

New KB.

Definition at line 109 of file kb.h.

Referenced by kb_new().

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

Definition at line 146 of file kb.h.

Referenced by kb_item_pop_str().

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

Definition at line 142 of file kb.h.

Referenced by kb_item_push_str().

◆ kb_save

int(*) kb_operations::kb_save(kb_t)

Save all kb content.

Definition at line 215 of file kb.h.

Referenced by kb_save().

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

Definition at line 202 of file kb.h.

Referenced by kb_item_set_int().

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

Definition at line 182 of file kb.h.

Referenced by kb_item_set_str().


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