OpenVAS Scanner
6.0.1
|
Basically creates a new process for each tested host. More...
#include "hosts.h"
#include "../misc/network.h"
#include "ntp.h"
#include "utils.h"
#include <errno.h>
#include <glib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
#include <gvm/base/prefs.h>
Data Structures | |
struct | host |
Host information, implemented as doubly linked list. More... | |
Macros | |
#define | G_LOG_DOMAIN "sd main" |
GLib log domain. More... | |
#define | KB_RETRY_DELAY 60 |
Functions | |
static int | send_to_client (int out, char *buf) |
static int | forward_status (struct host *h, int out) |
static int | forward (struct host *h, int out) |
static void | host_rm (struct host *h) |
static int | hosts_num (void) |
Returns the number of entries in the global hosts list. More... | |
static struct host * | hosts_get (char *name) |
Retrieves a host specified by its name from the global host list. More... | |
int | hosts_init (int soc, int max_hosts) |
int | hosts_new (struct scan_globals *globals, char *name, kb_t *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) |
static int | hosts_read_client (struct scan_globals *globals) |
int | hosts_read (struct scan_globals *globals) |
Returns -1 if client asked to stop all tests or connection was lost or error. 0 otherwise. More... | |
Variables | |
static struct host * | hosts = NULL |
static int | g_soc = -1 |
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.
#define KB_RETRY_DELAY 60 |
|
static |
|
static |
|
static |
|
static |
Retrieves a host specified by its name from the global host list.
int hosts_init | ( | int | soc, |
int | max_hosts | ||
) |
int hosts_new | ( | struct scan_globals * | globals, |
char * | name, | ||
kb_t * | kb | ||
) |
|
static |
Returns the number of entries in the global hosts list.
int hosts_read | ( | struct scan_globals * | globals | ) |
Returns -1 if client asked to stop all tests or connection was lost or error. 0 otherwise.
|
static |
Returns -1 if no socket, error or client asked to stop tests, 0 otherwise.
|
static |
int hosts_set_pid | ( | char * | name, |
pid_t | pid | ||
) |
void hosts_stop_all | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
int global_scan_stop |