OpenVAS Scanner 23.23.1
kb_cache.c File Reference

kb_cache.h implementation. More...

#include "kb_cache.h"

Functions

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

Variables

kb_t main_kb = NULL

Detailed Description

kb_cache.h implementation.

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.

Variable Documentation

◆ main_kb

kb_t main_kb = NULL