OpenVAS Scanner
7.0.0~git
|
Go to the documentation of this file.
28 #include "../misc/network.h"
41 #define G_LOG_DOMAIN "sd main"
74 timestr[
sizeof (timestr) - 1] =
'\0';
75 strncpy (timestr, tmp,
sizeof (timestr) - 1);
76 len = strlen (timestr);
77 if (timestr[len - 1] ==
'\n')
78 timestr[len - 1] =
'\0';
80 kb_item_push_str (kb, key, timestr);
87 waitpid (h->
pid, NULL, WNOHANG);
114 for (num = 0; h != NULL; num++, h = h->
next)
156 h = g_malloc0 (
sizeof (
struct host));
174 g_debug (
"host_set_pid() failed!\n");
189 g_message (
"Stopping host %s scan", h->
name);
190 kill (h->
pid, SIGUSR1);
215 waitpid (-1, NULL, WNOHANG);
225 h->
ip = kb_item_get_str (h->
host_kb,
"internal/ip");
231 if (kill (h->
pid, 0) < 0)
else(PROJECT_BETA_RELEASE) set(NASL_VERSION_SUFFIX ".$
int hosts_read(void)
Returns -1 if client asked to stop all tests or connection was lost or error. 0 otherwise.
endif(PROJECT_BETA_RELEASE) set(NASL_VERSION_STRING "$
static struct host * hosts_get(char *name)
Retrieves a host specified by its name from the global host list.
static void host_rm(struct host *h)
static void hosts_read_data(void)
int hosts_init(int max_hosts)
static void host_set_time(kb_t kb, char *key)
int hosts_new(char *name, kb_t kb)
static int hosts_stop_host(struct host *h)
Host information, implemented as doubly linked list.
void hosts_stop_all(void)
int openvas(int argc, char *argv[])
openvas.
static int hosts_num(void)
Returns the number of entries in the global hosts list.
int hosts_set_pid(char *name, pid_t pid)
static struct host * hosts
set(NASL_VERSION_MAJOR 11) set(NASL_VERSION_MINOR 0) set(NASL_VERSION_PATCH 0) if(PROJECT_BETA_RELEASE) set(NASL_VERSION_SUFFIX "+beta$
static struct running processes[MAX_PROCESSES]