|
OpenVAS Scanner 23.32.3
|
Performs various checks for requirements set in a given plugin. More...
#include "plugs_req.h"#include "pluginscheduler.h"#include <gvm/base/prefs.h>#include <gvm/util/nvticache.h>#include <regex.h>#include <stdio.h>#include <stdlib.h>#include <string.h>
Go to the source code of this file.
Functions | |
| int | kb_get_port_state_proto (kb_t, int, char *) |
| static int | get_closed_ports (kb_t kb, char *ports_list, char *proto) |
| Returns whether a port in a port list is closed or not. | |
| static int | kb_missing_keyname_of_namelist (kb_t kb, char *keys, char **keyname) |
Returns the name of the first key which is not present in the kb. | |
| static int | kb_present_keyname_of_namelist (kb_t kb, char *keys, char **keyname) |
Returns the name of the first key which is present in the kb. | |
| static int | check_mandatory_keys (kb_t kb, char *keys) |
| Checks mandatory keys presence and value in the KB. | |
| int | mandatory_requirements_met (kb_t kb, nvti_t *nvti) |
| Check whether mandatory requirements for plugin are met. | |
| char * | requirements_plugin (kb_t kb, nvti_t *nvti) |
| Determine if the plugin requirements are met. | |
Performs various checks for requirements set in a given plugin.
Definition in file plugs_req.c.
|
static |
Checks mandatory keys presence and value in the KB.
| [in] | kb | KB handle where to search for the keys. |
| [in] | keys | Comma separated list of mandatory keys. |
Definition at line 160 of file plugs_req.c.
Referenced by mandatory_requirements_met().

|
static |
Returns whether a port in a port list is closed or not.
Definition at line 39 of file plugs_req.c.
References kb_get_port_state_proto().
Referenced by requirements_plugin().


|
extern |
| proto | Protocol (udp/tcp). If NULL, "tcp" will be used. |
Definition at line 149 of file plugutils.c.
References unscanned_ports_as_closed().
Referenced by get_closed_ports().


|
static |
Returns the name of the first key which is not present in the kb.
| [in] | kb | KB handle where to search for the keys. |
| [in] | keys | Comma separated list of keys. |
| [out] | keyname | Key that was missing. Free with g_free(). |
Definition at line 83 of file plugs_req.c.
Referenced by requirements_plugin().

|
static |
Returns the name of the first key which is present in the kb.
| [in] | kb | KB handle where to search for the keys. |
| [in] | keys | Comma separated list of keys. |
| [out] | keyname | Key that was found. Free with g_free(). |
Definition at line 122 of file plugs_req.c.
Referenced by requirements_plugin().

| int mandatory_requirements_met | ( | kb_t | kb, |
| nvti_t * | nvti ) |
Check whether mandatory requirements for plugin are met.
| kb | The knowledge base with all keys. |
| plugin | The scheduler plugin. |
Definition at line 234 of file plugs_req.c.
References check_mandatory_keys().
Referenced by launch_plugin().


| char * requirements_plugin | ( | kb_t | kb, |
| nvti_t * | nvti ) |
Determine if the plugin requirements are met.
Definition at line 251 of file plugs_req.c.
References get_closed_ports(), kb_missing_keyname_of_namelist(), and kb_present_keyname_of_namelist().
Referenced by launch_plugin().

