|
Greenbone Vulnerability Management Libraries 22.23.0
|
Protos and data structures for NVT Information Cache. More...
Go to the source code of this file.
Macros | |
| #define | NVTICACHE_STR "nvticache" |
Functions | |
| int | nvticache_init (const char *, const char *) |
| Initializes the nvti cache. | |
| void | nvticache_reset (void) |
| Reset connection to KB. To be called after a fork(). | |
| kb_t | nvticache_get_kb (void) |
| Return the nvticache kb. | |
| void | nvticache_save (void) |
| Save the nvticache to disk. | |
| int | nvticache_initialized (void) |
| Return whether the nvt cache is initialized. | |
| int | nvticache_check (const gchar *) |
| Check if the nvt for the given filename exists in cache. | |
| int | nvticache_add (const nvti_t *, const char *) |
| Add a NVT Information to the cache. | |
| char * | nvticache_get_src (const char *) |
| Get the full source filename of an OID. | |
| char * | nvticache_get_oid (const char *) |
| Get the OID from a plugin filename. | |
| char * | nvticache_get_name (const char *) |
| Get the name from a plugin OID. | |
| char * | nvticache_get_tags (const char *) |
| Get the tags from a plugin OID. | |
| GSList * | nvticache_get_prefs (const char *) |
| Get the prefs from a plugin OID. | |
| char * | nvticache_get_cves (const char *) |
| Get the cves from a plugin OID. | |
| char * | nvticache_get_bids (const char *) |
| Get the bids from a plugin OID. | |
| char * | nvticache_get_xrefs (const char *) |
| Get the xrefs from a plugin OID. | |
| char * | nvticache_get_family (const char *) |
| Get the family from a plugin OID. | |
| char * | nvticache_get_filename (const char *) |
| Get the filename from a plugin OID. | |
| char * | nvticache_get_required_keys (const char *) |
| Get the Required Keys from a plugin OID. | |
| char * | nvticache_get_mandatory_keys (const char *) |
| Get the Mandatory Keys from a plugin OID. | |
| char * | nvticache_get_excluded_keys (const char *) |
| Get the Excluded Keys from a plugin OID. | |
| char * | nvticache_get_required_ports (const char *) |
| Get the Required ports from a plugin OID. | |
| char * | nvticache_get_required_udp_ports (const char *) |
| Get the Required udp ports from a plugin OID. | |
| int | nvticache_get_category (const char *) |
| Get the Category from a plugin OID. | |
| char * | nvticache_get_dependencies (const char *) |
| Get the Dependencies from a plugin OID. | |
| nvti_t * | nvticache_get_nvt (const char *) |
| Get the nvti from a plugin OID. | |
| GSList * | nvticache_get_oids (void) |
| Get the list of nvti OIDs. | |
| size_t | nvticache_count (void) |
| Get the number of nvt's in the cache. | |
| void | nvticache_delete (const char *) |
| Delete NVT from the cache. | |
| char * | nvticache_feed_version (void) |
| Get the NVT feed version. | |
| int | nvticache_check_feed (void) |
| Check if the plugins feed was newer than cached feed. | |
Protos and data structures for NVT Information Cache.
This file contains the protos for nvticache.c
| #define NVTICACHE_STR "nvticache" |
| int nvticache_add | ( | const nvti_t * | nvti, |
| const char * | filename ) |
Add a NVT Information to the cache.
| 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" ) |
| int nvticache_check | ( | const gchar * | filename | ) |
Check if the nvt for the given filename exists in cache.
| 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" ) |
| int nvticache_check_feed | ( | void | ) |
Check if the plugins feed was newer than cached feed.
| size_t nvticache_count | ( | void | ) |
Get the number of nvt's in the cache.
| void nvticache_delete | ( | const char * | oid | ) |
Delete NVT from the cache.
| [in] | oid | OID to match. |
| char * nvticache_feed_version | ( | void | ) |
Get the NVT feed version.
| char * nvticache_get_bids | ( | const char * | oid | ) |
Get the bids from a plugin OID.
| [in] | oid | OID to match. |
| int nvticache_get_category | ( | const char * | oid | ) |
Get the Category from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_cves | ( | const char * | oid | ) |
Get the cves from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_dependencies | ( | const char * | oid | ) |
Get the Dependencies from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_excluded_keys | ( | const char * | oid | ) |
Get the Excluded Keys from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_family | ( | const char * | oid | ) |
Get the family from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_filename | ( | const char * | oid | ) |
Get the filename from a plugin OID.
| [in] | oid | OID to match. |
| kb_t nvticache_get_kb | ( | void | ) |
Return the nvticache kb.
| char * nvticache_get_mandatory_keys | ( | const char * | oid | ) |
Get the Mandatory Keys from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_name | ( | const char * | oid | ) |
Get the name from a plugin OID.
| [in] | oid | OID to match. |
| nvti_t * nvticache_get_nvt | ( | const char * | oid | ) |
Get the nvti from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_oid | ( | const char * | filename | ) |
Get the OID from a plugin filename.
| filename | Filename to lookup. |
| GSList * nvticache_get_oids | ( | void | ) |
Get the list of nvti OIDs.
| GSList * nvticache_get_prefs | ( | const char * | oid | ) |
Get the prefs from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_required_keys | ( | const char * | oid | ) |
Get the Required Keys from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_required_ports | ( | const char * | oid | ) |
Get the Required ports from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_required_udp_ports | ( | const char * | oid | ) |
Get the Required udp ports from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_src | ( | const char * | oid | ) |
Get the full source filename of an OID.
| oid | The OID to look up. |
| char * nvticache_get_tags | ( | const char * | oid | ) |
Get the tags from a plugin OID.
| [in] | oid | OID to match. |
| char * nvticache_get_xrefs | ( | const char * | oid | ) |
Get the xrefs from a plugin OID.
| [in] | oid | OID to match. |
| int nvticache_init | ( | const char * | src, |
| const char * | kb_path ) |
Initializes the nvti cache.
| src | The directory that contains the nvt files. |
| kb_path | Path to kb socket. |
| int nvticache_initialized | ( | void | ) |
Return whether the nvt cache is initialized.
| void nvticache_reset | ( | void | ) |
Reset connection to KB. To be called after a fork().
| void nvticache_save | ( | void | ) |
Save the nvticache to disk.