OpenVAS Libraries
9.0.3
|
Contains specialized structures and functions to use redis as a KB server. More...
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <hiredis/hiredis.h>
#include <glib.h>
#include "kb.h"
Go to the source code of this file.
Data Structures | |
struct | kb_redis |
Subclass of struct kb, it contains the redis-specific fields, such as the redis context, current DB (namespace) id and the server socket path. More... | |
struct | redis_tx |
Redis transaction handle. More... | |
Macros | |
#define | _GNU_SOURCE |
#define | G_LOG_DOMAIN "lib kb_redis" |
#define | GLOBAL_DBINDEX_NAME "OpenVAS.__GlobalDBIndex" |
Name of the namespace usage bitmap in redis. More... | |
#define | KB_RETRY_DELAY 60 |
Number of seconds to wait for between two attempts to acquire a KB namespace. More... | |
#define | redis_kb(__kb) ((struct kb_redis *)(__kb)) |
#define | MAX_DB_INDEX__24 1000 |
Functions | |
void | kb_item_free (struct kb_item *item) |
Release a KB item (or a list). More... | |
Variables | |
const struct kb_operations * | KBDefaultOperations = &KBRedisOperations |
Default KB operations. No selection mechanism is provided yet since there's only one implementation (redis-based). More... | |
Contains specialized structures and functions to use redis as a KB server.
Definition in file kb_redis.c.
#define _GNU_SOURCE |
Definition at line 27 of file kb_redis.c.
#define G_LOG_DOMAIN "lib kb_redis" |
Definition at line 46 of file kb_redis.c.
#define GLOBAL_DBINDEX_NAME "OpenVAS.__GlobalDBIndex" |
Name of the namespace usage bitmap in redis.
Definition at line 59 of file kb_redis.c.
#define KB_RETRY_DELAY 60 |
Number of seconds to wait for between two attempts to acquire a KB namespace.
Definition at line 65 of file kb_redis.c.
#define MAX_DB_INDEX__24 1000 |
Definition at line 135 of file kb_redis.c.
#define redis_kb | ( | __kb | ) | ((struct kb_redis *)(__kb)) |
Definition at line 84 of file kb_redis.c.
void kb_item_free | ( | struct kb_item * | item | ) |
Release a KB item (or a list).
Definition at line 501 of file kb_redis.c.
References KB_TYPE_STR, kb_item::next, kb_item::type, and kb_item::v_str.
const struct kb_operations* KBDefaultOperations = &KBRedisOperations |
Default KB operations. No selection mechanism is provided yet since there's only one implementation (redis-based).
Definition at line 1228 of file kb_redis.c.