OpenVAS Scanner 23.23.1
kb_cache.h File Reference

Header file to cache main_kb. More...

#include <gvm/util/kb.h>

Go to the source code of this file.

Functions

void set_main_kb (kb_t)
 sets the shared database between ospd and openvas as a main_kb for further usage. @description this sets the given kb as a main_kb global variable. It is NOT threadsafe and must be called after each reconnect or fork.
kb_t get_main_kb (void)
 gets the main_kb. @description returns the previously set main_kb; when asserts are enabled it will abort when main_kb is not set. However each usage must check if the return is NULL or not.

Detailed Description

Header file to cache main_kb.

Function Documentation

◆ get_main_kb()

kb_t get_main_kb ( void )

gets the main_kb. @description returns the previously set main_kb; when asserts are enabled it will abort when main_kb is not set. However each usage must check if the return is NULL or not.

Returns
the set main_kb

◆ set_main_kb()

void set_main_kb ( kb_t kb)

sets the shared database between ospd and openvas as a main_kb for further usage. @description this sets the given kb as a main_kb global variable. It is NOT threadsafe and must be called after each reconnect or fork.

Parameters
main_kbCurrent main kb.