|
OpenVAS Scanner 23.23.1
|
Basically creates a new process for each tested host. More...
#include "hosts.h"#include "../misc/network.h"#include "../misc/plugutils.h"#include "utils.h"#include <errno.h>#include <glib.h>#include <gvm/base/networking.h>#include <stdio.h>#include <string.h>#include <sys/wait.h>#include <unistd.h>Data Structures | |
| struct | host |
| Host information, implemented as doubly linked list. More... | |
Macros | |
| #define | G_LOG_DOMAIN "sd main" |
| GLib log domain. | |
Functions | |
| void | host_set_time (kb_t kb, char *ip, char *type) |
| Add star_scan and end_scan results to the main kb. | |
| static void | host_rm (struct host *h) |
| static int | hosts_num (void) |
| Returns the number of entries in the global hosts list. | |
| static struct host * | hosts_get (char *name) |
| Retrieves a host specified by its name from the global host list. | |
| int | hosts_init (int max_hosts) |
| int | hosts_new (char *name, kb_t kb, kb_t main_kb) |
| int | hosts_set_pid (char *name, pid_t pid) |
| static int | hosts_stop_host (struct host *h) |
| void | hosts_stop_all (void) |
| static void | hosts_read_data (void) |
| int | hosts_read (void) |
| Returns -1 if client asked to stop all tests or connection was lost or error. 0 otherwise. | |
| int | host_is_currently_scanned (gvm_host_t *host_to_check) |
| Returns 1 if the host is being scanned. 0 otherwise. | |
Variables | |
| static struct host * | hosts = NULL |
| static int | g_max_hosts = 15 |
| int | global_scan_stop |
Basically creates a new process for each tested host.
| #define G_LOG_DOMAIN "sd main" |
GLib log domain.
| int host_is_currently_scanned | ( | gvm_host_t * | host_to_check | ) |
Returns 1 if the host is being scanned. 0 otherwise.
It checks not only the main IP of the host, but also the ips that a dns-lookup returns.
|
static |
| void host_set_time | ( | kb_t | kb, |
| char * | ip, | ||
| char * | type ) |
Add star_scan and end_scan results to the main kb.
| [in] | kb | Main KB where results are stored. |
| [in] | ip | List of vhosts to add new vhosts to. |
| [in] | type | If it is start or end message. |
|
static |
Retrieves a host specified by its name from the global host list.
| int hosts_init | ( | int | max_hosts | ) |
| int hosts_new | ( | char * | name, |
| kb_t | kb, | ||
| kb_t | main_kb ) |
|
static |
Returns the number of entries in the global hosts list.
| int hosts_read | ( | void | ) |
Returns -1 if client asked to stop all tests or connection was lost or error. 0 otherwise.
|
static |
| int hosts_set_pid | ( | char * | name, |
| pid_t | pid ) |
| void hosts_stop_all | ( | void | ) |
|
static |
|
static |
|
extern |