OpenVAS Scanner
6.0.1
|
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>
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. More... | |
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 . More... | |
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 . More... | |
static int | check_mandatory_keys (kb_t kb, char *keys) |
Checks mandatory keys presence and value in the KB. More... | |
int | mandatory_requirements_met (kb_t kb, nvti_t *nvti) |
Check whether mandatory requirements for plugin are met. More... | |
char * | requirements_plugin (kb_t kb, nvti_t *nvti) |
Determine if the plugin requirements are met. More... | |
Performs various checks for requirements set in a given plugin.
|
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. |
|
static |
Returns whether a port in a port list is closed or not.
int kb_get_port_state_proto | ( | kb_t | kb, |
int | portnum, | ||
char * | proto | ||
) |
proto | Protocol (udp/tcp). If NULL, "tcp" will be used. |
|
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(). |
|
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(). |
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. |
char* requirements_plugin | ( | kb_t | kb, |
nvti_t * | nvti | ||
) |
Determine if the plugin requirements are met.