OpenVAS Libraries
6.0+beta5
|
Implementation of API to handle NVT Info Cache. More...
Functions | |
nvticache_t * | nvticache_new (const gchar *cache_path, const gchar *src_path) |
Create a new nvticache structure initialized with a path. More... | |
void | nvticache_free (const nvticache_t *cache) |
Free memory of a nvticache structure. More... | |
nvti_t * | nvticache_get (const nvticache_t *cache, const gchar *filename) |
Retrieve NVT Information from a cache for the given filename. More... | |
int | nvticache_add (const nvticache_t *cache, nvti_t *nvti, gchar *filename) |
Add a NVT Information to the cache. More... | |
nvti_t * | nvticache_get_by_oid (const nvticache_t *cache, const gchar *oid) |
Get a NVT Information from the cache by OID. More... | |
gchar * | nvticache_get_src_by_oid (const nvticache_t *cache, const gchar *oid) |
Get the src element of a NVT Information from the cache by OID. More... | |
Implementation of API to handle NVT Info Cache.
This file contains all methods to handle NVT Information Cache (nvticache_t).
The module consequently uses glib datatypes and api for memory management etc.
int nvticache_add | ( | const nvticache_t * | cache, |
nvti_t * | nvti, | ||
gchar * | filename | ||
) |
Add a NVT Information to the cache.
cache | The NVTI Cache to use |
nvti | The NVT Information to add |
filename | The name of the original NVT without the path to the base location of NVTs (e.g. "scriptname1.nasl" or even "subdir1/subdir2/scriptname2.nasl" ) |
void nvticache_free | ( | const nvticache_t * | cache) |
Free memory of a nvticache structure.
cache | The structure to be freed. |
nvti_t* nvticache_get | ( | const nvticache_t * | cache, |
const gchar * | filename | ||
) |
Retrieve NVT Information from a cache for the given filename.
cache | The NVTI Cache to use |
filename | The name of the original NVT without the path to the base location of NVTs (e.g. "scriptname1.nasl" or even "subdir1/subdir2/scriptname2.nasl" ) |
nvti_t* nvticache_get_by_oid | ( | const nvticache_t * | cache, |
const gchar * | oid | ||
) |
Get a NVT Information from the cache by OID.
cache | The NVTI Cache to use |
oid | The OID to look up |
gchar* nvticache_get_src_by_oid | ( | const nvticache_t * | cache, |
const gchar * | oid | ||
) |
Get the src element of a NVT Information from the cache by OID.
cache | The NVTI Cache to use |
oid | The OID to look up |
nvticache_t* nvticache_new | ( | const gchar * | cache_path, |
const gchar * | src_path | ||
) |
Create a new nvticache structure initialized with a path.
path | The directory where the cache is to be stored. |