OpenVAS Libraries
8.0.3
|
Protos and data structures for NVT Information data sets. More...
#include <glib.h>
Go to the source code of this file.
Data Structures | |
struct | nvtpref |
The structure for a preference of a NVT. More... | |
struct | nvti |
The structure of a information record that corresponds to a NVT. More... | |
Typedefs | |
typedef struct nvtpref | nvtpref_t |
The structure for a preference of a NVT. More... | |
typedef struct nvti | nvti_t |
The structure of a information record that corresponds to a NVT. More... | |
typedef GHashTable | nvtis_t |
A collection of information records corresponding to NVTs. More... | |
Functions | |
nvtpref_t * | nvtpref_new (gchar *, gchar *, gchar *) |
Create a new nvtpref structure filled with the given values. More... | |
void | nvtpref_free (nvtpref_t *) |
Free memory of a nvtpref structure. More... | |
gchar * | nvtpref_name (const nvtpref_t *) |
Get the Name of a NVT Preference. More... | |
gchar * | nvtpref_type (const nvtpref_t *) |
Get the Type of a NVT Preference. More... | |
gchar * | nvtpref_default (const nvtpref_t *) |
Get the Default of a NVT Preference. More... | |
nvti_t * | nvti_new (void) |
Create a new (empty) nvti structure. More... | |
void | nvti_free (nvti_t *) |
Free memory of a nvti structure. More... | |
gchar * | nvti_oid (const nvti_t *) |
Get the OID string. More... | |
gchar * | nvti_version (const nvti_t *) |
Get the version. More... | |
gchar * | nvti_name (const nvti_t *) |
Get the name. More... | |
gchar * | nvti_summary (const nvti_t *) |
Get the summary. More... | |
gchar * | nvti_copyright (const nvti_t *) |
Get the copyright notice. More... | |
gchar * | nvti_cve (const nvti_t *) |
Get the CVE references. More... | |
gchar * | nvti_bid (const nvti_t *) |
Get the bid references. More... | |
gchar * | nvti_xref (const nvti_t *) |
Get the xref's. More... | |
gchar * | nvti_tag (const nvti_t *) |
Get the tag. More... | |
gchar * | nvti_cvss_base (const nvti_t *) |
Get the CVSS base. More... | |
gchar * | nvti_dependencies (const nvti_t *) |
Get the dependencies list. More... | |
gchar * | nvti_required_keys (const nvti_t *) |
Get the required keys list. More... | |
gchar * | nvti_mandatory_keys (const nvti_t *) |
Get the mandatory keys list. More... | |
gchar * | nvti_excluded_keys (const nvti_t *) |
Get the excluded keys list. More... | |
gchar * | nvti_required_ports (const nvti_t *) |
Get the required ports list. More... | |
gchar * | nvti_required_udp_ports (const nvti_t *) |
Get the required udp ports list. More... | |
gint | nvti_timeout (const nvti_t *) |
Get the timeout for this NVT. More... | |
gint | nvti_category (const nvti_t *) |
Get the category for this NVT. More... | |
gchar * | nvti_family (const nvti_t *) |
Get the family name. More... | |
guint | nvti_pref_len (const nvti_t *) |
Get the number of preferences of the NVT. More... | |
const nvtpref_t * | nvti_pref (const nvti_t *, guint) |
Get the n'th preferences of the NVT. More... | |
int | nvti_set_oid (nvti_t *, const gchar *) |
Set the OID of a NVT Info. More... | |
int | nvti_set_version (nvti_t *, const gchar *) |
Set the version of a NVT. More... | |
int | nvti_set_name (nvti_t *, const gchar *) |
Set the name of a NVT. More... | |
int | nvti_set_summary (nvti_t *, const gchar *) |
Set the summary of a NVT. More... | |
int | nvti_set_copyright (nvti_t *, const gchar *) |
Set the copyright of a NVT. More... | |
int | nvti_set_cve (nvti_t *, const gchar *) |
Set the CVE references of a NVT. More... | |
int | nvti_set_bid (nvti_t *, const gchar *) |
Set the bid references of a NVT. More... | |
int | nvti_set_xref (nvti_t *, const gchar *) |
Set the xrefs of a NVT. More... | |
int | nvti_set_tag (nvti_t *, const gchar *) |
Set the tags of a NVT. More... | |
int | nvti_set_cvss_base (nvti_t *, const gchar *) |
Set the CVSS base of an NVT. More... | |
int | nvti_set_dependencies (nvti_t *, const gchar *) |
Set the dependencies of a NVT. More... | |
int | nvti_set_required_keys (nvti_t *, const gchar *) |
Set the required keys of a NVT. More... | |
int | nvti_set_mandatory_keys (nvti_t *, const gchar *) |
Set the mandatory keys of a NVT. More... | |
int | nvti_set_excluded_keys (nvti_t *, const gchar *) |
Set the excluded keys of a NVT. More... | |
int | nvti_set_required_ports (nvti_t *, const gchar *) |
Set the required ports of a NVT. More... | |
int | nvti_set_required_udp_ports (nvti_t *, const gchar *) |
Set the required udp ports of a NVT. More... | |
int | nvti_set_timeout (nvti_t *, const gint) |
Set the timout of a NVT Info. More... | |
int | nvti_set_category (nvti_t *, const gint) |
Set the category type of a NVT Info. More... | |
int | nvti_set_family (nvti_t *, const gchar *) |
Set the family of a NVT. More... | |
int | nvti_add_cve (nvti_t *, const gchar *) |
Add a single CVE ID of a NVT. More... | |
int | nvti_add_bid (nvti_t *, const gchar *) |
Add a single BID ID of a NVT. More... | |
int | nvti_add_required_keys (nvti_t *, const gchar *) |
Add a required key of a NVT. More... | |
int | nvti_add_mandatory_keys (nvti_t *, const gchar *) |
Add a mandatory key of a NVT. More... | |
int | nvti_add_excluded_keys (nvti_t *, const gchar *) |
Add a excluded key of a NVT. More... | |
int | nvti_add_required_ports (nvti_t *, const gchar *) |
Add a required port of a NVT. More... | |
int | nvti_add_required_udp_ports (nvti_t *, const gchar *) |
Add a required udp port of a NVT. More... | |
int | nvti_add_pref (nvti_t *, nvtpref_t *) |
Add a preference to the NVT Info. More... | |
nvti_t * | nvti_from_keyfile (const gchar *) |
Read NVT Info from a keyfile. More... | |
int | nvti_to_keyfile (const nvti_t *, const char *, const char *) |
nvtis_t * | nvtis_new (void) |
Make a collection of NVT Infos. More... | |
void | nvtis_free (nvtis_t *) |
Free a collection of NVT Infos. More... | |
void | nvtis_add (nvtis_t *, nvti_t *) |
Add an NVT Info to a collection of NVT Infos. More... | |
nvti_t * | nvtis_lookup (nvtis_t *, const char *) |
Add an NVT Info to a collection of NVT Infos. More... | |
Protos and data structures for NVT Information data sets.
This file contains the protos for nvti.c
The structure of a information record that corresponds to a NVT.
The elements of this structure should never be accessed directly. Only the functions corresponding to this module should be used.
typedef GHashTable nvtis_t |
A collection of information records corresponding to NVTs.
The structure for a preference of a NVT.
The elements of this structure should never be accessed directly. Only the functions corresponding to this module should be used.
int nvti_add_bid | ( | nvti_t * | n, |
const gchar * | bid_id | ||
) |
Add a single BID ID of a NVT.
n | The NVT Info structure. |
cve_id | The BID ID to add. A copy will be created from this. |
int nvti_add_cve | ( | nvti_t * | n, |
const gchar * | cve_id | ||
) |
Add a single CVE ID of a NVT.
n | The NVT Info structure. |
cve_id | The CVE ID to add. A copy will be created from this. |
int nvti_add_excluded_keys | ( | nvti_t * | n, |
const gchar * | key | ||
) |
Add a excluded key of a NVT.
n | The NVT Info structure. |
key | The excluded key to add. A copy will be created from this. |
int nvti_add_mandatory_keys | ( | nvti_t * | n, |
const gchar * | key | ||
) |
Add a mandatory key of a NVT.
n | The NVT Info structure. |
key | The mandatory key to add. A copy will be created from this. |
Add a preference to the NVT Info.
n | The NVT Info structure. |
np | The NVT preference to add. |
int nvti_add_required_keys | ( | nvti_t * | n, |
const gchar * | key | ||
) |
Add a required key of a NVT.
n | The NVT Info structure. |
key | The required key to add. A copy will be created from this. |
int nvti_add_required_ports | ( | nvti_t * | n, |
const gchar * | port | ||
) |
Add a required port of a NVT.
n | The NVT Info structure. |
port | The required port to add. A copy will be created from this. |
int nvti_add_required_udp_ports | ( | nvti_t * | n, |
const gchar * | port | ||
) |
Add a required udp port of a NVT.
n | The NVT Info structure. |
port | The required udp port to add. A copy will be created from this. |
gchar* nvti_bid | ( | const nvti_t * | n | ) |
Get the bid references.
n | The NVT Info structure of which the name should be returned. |
gint nvti_category | ( | const nvti_t * | n | ) |
Get the category for this NVT.
n | The NVT Info structure of which the category should be returned. |
gchar* nvti_copyright | ( | const nvti_t * | n | ) |
Get the copyright notice.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_cve | ( | const nvti_t * | n | ) |
Get the CVE references.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_cvss_base | ( | const nvti_t * | n | ) |
Get the CVSS base.
n | The NVT Info structure of which the CVSS base should be returned. |
gchar* nvti_dependencies | ( | const nvti_t * | n | ) |
Get the dependencies list.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_excluded_keys | ( | const nvti_t * | n | ) |
Get the excluded keys list.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_family | ( | const nvti_t * | n | ) |
Get the family name.
n | The NVT Info structure of which the name should be returned. |
void nvti_free | ( | nvti_t * | n | ) |
Free memory of a nvti structure.
n | The structure to be freed. |
nvti_t* nvti_from_keyfile | ( | const gchar * | fn | ) |
Read NVT Info from a keyfile.
fn | The filename to read from. |
gchar* nvti_mandatory_keys | ( | const nvti_t * | n | ) |
Get the mandatory keys list.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_name | ( | const nvti_t * | n | ) |
Get the name.
n | The NVT Info structure of which the name should be returned. |
nvti_t* nvti_new | ( | void | ) |
Create a new (empty) nvti structure.
gchar* nvti_oid | ( | const nvti_t * | n | ) |
Get the OID string.
n | The NVT Info structure of which the OID should be returned. |
Get the n'th preferences of the NVT.
n | The NVT Info structure. |
p | The position of the preference to return. |
guint nvti_pref_len | ( | const nvti_t * | n | ) |
Get the number of preferences of the NVT.
n | The NVT Info structure. |
gchar* nvti_required_keys | ( | const nvti_t * | n | ) |
Get the required keys list.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_required_ports | ( | const nvti_t * | n | ) |
Get the required ports list.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_required_udp_ports | ( | const nvti_t * | n | ) |
Get the required udp ports list.
n | The NVT Info structure of which the name should be returned. |
int nvti_set_bid | ( | nvti_t * | n, |
const gchar * | bid | ||
) |
Set the bid references of a NVT.
n | The NVT Info structure. |
bid | The bid to set. A copy will be created from this. |
int nvti_set_category | ( | nvti_t * | n, |
const gint | category | ||
) |
Set the category type of a NVT Info.
n | The NVT Info structure. |
category | The category to set. Values <= 0 will indicate it is not set. |
int nvti_set_copyright | ( | nvti_t * | n, |
const gchar * | copyright | ||
) |
Set the copyright of a NVT.
n | The NVT Info structure. |
copyright | The copyright to set. A copy will be created from this. |
int nvti_set_cve | ( | nvti_t * | n, |
const gchar * | cve | ||
) |
Set the CVE references of a NVT.
n | The NVT Info structure. |
cve | The cve list to set. A copy will be created from this. |
int nvti_set_cvss_base | ( | nvti_t * | n, |
const gchar * | cvss_base | ||
) |
Set the CVSS base of an NVT.
n | The NVT Info structure. |
tag | The CVSS base to set. A copy will be created from this. |
int nvti_set_dependencies | ( | nvti_t * | n, |
const gchar * | dependencies | ||
) |
Set the dependencies of a NVT.
n | The NVT Info structure. |
dependencies | The dependencies to set. A copy will be created from this. |
int nvti_set_excluded_keys | ( | nvti_t * | n, |
const gchar * | excluded_keys | ||
) |
Set the excluded keys of a NVT.
n | The NVT Info structure. |
excluded_keys | The excluded keys to set. A copy will be created from this. |
int nvti_set_family | ( | nvti_t * | n, |
const gchar * | family | ||
) |
Set the family of a NVT.
n | The NVT Info structure. |
family | The family to set. A copy will be created from this. |
int nvti_set_mandatory_keys | ( | nvti_t * | n, |
const gchar * | mandatory_keys | ||
) |
Set the mandatory keys of a NVT.
n | The NVT Info structure. |
mandatory_keys | The mandatory keys to set. A copy will be created from this. |
int nvti_set_name | ( | nvti_t * | n, |
const gchar * | name | ||
) |
Set the name of a NVT.
n | The NVT Info structure. |
name | The name to set. A copy will be created from this. |
int nvti_set_oid | ( | nvti_t * | n, |
const gchar * | oid | ||
) |
Set the OID of a NVT Info.
n | The NVT Info structure. |
oid | The OID to set. A copy will be created from this. |
int nvti_set_required_keys | ( | nvti_t * | n, |
const gchar * | required_keys | ||
) |
Set the required keys of a NVT.
n | The NVT Info structure. |
required_keys | The required keys to set. A copy will be created from this. |
int nvti_set_required_ports | ( | nvti_t * | n, |
const gchar * | required_ports | ||
) |
Set the required ports of a NVT.
n | The NVT Info structure. |
required_ports | The required ports to set. A copy will be created from this. |
int nvti_set_required_udp_ports | ( | nvti_t * | n, |
const gchar * | required_udp_ports | ||
) |
Set the required udp ports of a NVT.
n | The NVT Info structure. |
required_udp_ports | The required udp ports to set. A copy will be created from this. |
int nvti_set_summary | ( | nvti_t * | n, |
const gchar * | summary | ||
) |
Set the summary of a NVT.
n | The NVT Info structure. |
summary | The summary to set. A copy will be created from this. |
int nvti_set_tag | ( | nvti_t * | n, |
const gchar * | tag | ||
) |
Set the tags of a NVT.
n | The NVT Info structure. |
tag | The tags to set. A copy will be created from this. |
int nvti_set_timeout | ( | nvti_t * | n, |
const gint | timeout | ||
) |
Set the timout of a NVT Info.
n | The NVT Info structure. |
timout | The timeout to set. Values <= 0 will indicate it is not set. |
int nvti_set_version | ( | nvti_t * | n, |
const gchar * | version | ||
) |
Set the version of a NVT.
n | The NVT Info structure. |
version | The version to set. A copy will be created from this. |
int nvti_set_xref | ( | nvti_t * | n, |
const gchar * | xref | ||
) |
Set the xrefs of a NVT.
n | The NVT Info structure. |
xref | The xrefs to set. A copy will be created from this. |
gchar* nvti_summary | ( | const nvti_t * | n | ) |
Get the summary.
n | The NVT Info structure of which the name should be returned. |
gchar* nvti_tag | ( | const nvti_t * | n | ) |
Get the tag.
n | The NVT Info structure of which the name should be returned. |
gint nvti_timeout | ( | const nvti_t * | n | ) |
Get the timeout for this NVT.
n | The NVT Info structure of which the timeout should be returned. |
int nvti_to_keyfile | ( | const nvti_t * | , |
const char * | , | ||
const char * | |||
) |
gchar* nvti_version | ( | const nvti_t * | n | ) |
Get the version.
n | The NVT Info structure of which the OID should be returned. |
gchar* nvti_xref | ( | const nvti_t * | n | ) |
Get the xref's.
n | The NVT Info structure of which the name should be returned. |
Add an NVT Info to a collection of NVT Infos.
nvtis | The collection of NVT Infos. |
nvti | The NVT Info to add. |
void nvtis_free | ( | nvtis_t * | nvtis | ) |
Free a collection of NVT Infos.
nvtis | The collection of NVT Infos. |
Add an NVT Info to a collection of NVT Infos.
nvtis | The collection of NVT Infos. |
oid | The OID of the NVT. |
nvtis_t* nvtis_new | ( | void | ) |
Make a collection of NVT Infos.
gchar* nvtpref_default | ( | const nvtpref_t * | np | ) |
Get the Default of a NVT Preference.
np | The NVT Pref structure of which the Default should be returned. |
void nvtpref_free | ( | nvtpref_t * | np | ) |
Free memory of a nvtpref structure.
n | The structure to be freed. |
gchar* nvtpref_name | ( | const nvtpref_t * | np | ) |
Get the Name of a NVT Preference.
np | The NVT Pref structure of which the Name should be returned. |
nvtpref_t* nvtpref_new | ( | gchar * | name, |
gchar * | type, | ||
gchar * | dflt | ||
) |
Create a new nvtpref structure filled with the given values.
name | The name to be set. A copy will created of this. |
type | The type to be set. A copy will created of this. |
dflt | The default to be set. A copy will created of this. |
gchar* nvtpref_type | ( | const nvtpref_t * | np | ) |
Get the Type of a NVT Preference.
np | The NVT Pref structure of which the Type should be returned. |