OpenVAS Libraries  9.0.1
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
kb.h File Reference
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  kb_item
 Knowledge base item (defined by name, type (int/char*) and value). Implemented as a singly linked list. More...
 
struct  kb
 Top-level KB. This is to be inherited by KB implementations. More...
 
struct  kb_operations
 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...
 

Macros

#define KB_PATH_DEFAULT   "/tmp/redis.sock"
 Default KB location. More...
 

Typedefs

typedef struct kbkb_t
 type abstraction to hide KB internals. More...
 

Enumerations

enum  kb_item_type { KB_TYPE_UNSPEC, KB_TYPE_INT, KB_TYPE_STR, KB_TYPE_CNT }
 Possible type of a kb_item. More...
 

Functions

void kb_item_free (struct kb_item *)
 Release a KB item (or a list). More...
 

Variables

const struct kb_operationsKBDefaultOperations
 Default KB operations. No selection mechanism is provided yet since there's only one implementation (redis-based). More...
 

Macro Definition Documentation

◆ KB_PATH_DEFAULT

#define KB_PATH_DEFAULT   "/tmp/redis.sock"

Default KB location.

TODO This should eventually be expressed as an URI when/if multiple KB backends are supported (e.g.: redis:///tmp/redis.sock).

Typedef Documentation

◆ kb_t

typedef struct kb* kb_t

type abstraction to hide KB internals.

Enumeration Type Documentation

◆ kb_item_type

Possible type of a kb_item.

Enumerator
KB_TYPE_UNSPEC 

Ignore the value (name/presence test).

KB_TYPE_INT 

The kb_items v should then be interpreted as int.

KB_TYPE_STR 

The kb_items v should then be interpreted as char*.

KB_TYPE_CNT 

Function Documentation

◆ kb_item_free()

void kb_item_free ( struct kb_item )

Release a KB item (or a list).

Variable Documentation

◆ KBDefaultOperations

const struct kb_operations* KBDefaultOperations

Default KB operations. No selection mechanism is provided yet since there's only one implementation (redis-based).