|
OpenVAS Scanner
7.0.1~git
|
Loads plugins from disk into memory. More...
#include "pluginload.h"#include "../nasl/nasl.h"#include "processes.h"#include "sighand.h"#include "utils.h"#include <errno.h>#include <glib.h>#include <gvm/base/prefs.h>#include <gvm/base/proctitle.h>#include <gvm/util/nvticache.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/shm.h>#include <sys/time.h>#include <sys/wait.h>
Go to the source code of this file.
Macros | |
| #define | G_LOG_DOMAIN "sd main" |
| GLib log domain. More... | |
Functions | |
| GSList * | collect_nvts (const char *folder, const char *subdir, GSList *files) |
| Collects all NVT files in a directory and recurses into subdirs. More... | |
| int | calculate_eta (struct timeval start_time, int loaded, int total) |
| void | init_loading_shm (void) |
| void | destroy_loading_shm (void) |
| int | current_loading_plugins (void) |
| int | total_loading_plugins (void) |
| void | set_current_loading_plugins (int current) |
| void | set_total_loading_plugins (int total) |
| static void | cleanup_leftovers (int num_files) |
| static void | plugins_reload_from_dir (void *folder) |
| static void | include_dirs (void) |
| int | plugins_cache_init (void) |
| Main function for nvticache initialization without loading the plugins. More... | |
| int | plugins_init (void) |
Variables | |
| static int * | loading_shm = NULL |
| static int | loading_shmid = 0 |
Loads plugins from disk into memory.
Definition in file pluginload.c.
| #define G_LOG_DOMAIN "sd main" |
GLib log domain.
Definition at line 49 of file pluginload.c.
| int calculate_eta | ( | struct timeval | start_time, |
| int | loaded, | ||
| int | total | ||
| ) |
Definition at line 111 of file pluginload.c.
References timeval().
Referenced by plugins_reload_from_dir().


|
static |
Definition at line 230 of file pluginload.c.
Referenced by plugins_reload_from_dir().

| GSList* collect_nvts | ( | const char * | folder, |
| const char * | subdir, | ||
| GSList * | files | ||
| ) |
Collects all NVT files in a directory and recurses into subdirs.
| folder | The main directory from where to descend and collect. |
| subdir | A subdirectory to consider for the collection: "folder/subdir" is thus the effective directory to descend from. "subdir" can be "" to make "folder" the effective start. |
| files | A list that is extended with all found files. If it is NULL, a new list is created automatically. |
Definition at line 68 of file pluginload.c.
Referenced by plugins_reload_from_dir().

| int current_loading_plugins | ( | void | ) |
Definition at line 184 of file pluginload.c.
References loading_shm.
| void destroy_loading_shm | ( | void | ) |
|
static |
Definition at line 331 of file pluginload.c.
References add_nasl_inc_dir().
Referenced by plugins_cache_init().


| void init_loading_shm | ( | void | ) |
| int plugins_cache_init | ( | void | ) |
Main function for nvticache initialization without loading the plugins.
Definition at line 359 of file pluginload.c.
References include_dirs().
Referenced by plugins_init(), and start_single_task_scan().


| int plugins_init | ( | void | ) |
Definition at line 376 of file pluginload.c.
References create_process(), plugins_cache_init(), and plugins_reload_from_dir().
Referenced by openvas(), and reload_openvas().


|
static |
Definition at line 255 of file pluginload.c.
References calculate_eta(), cleanup_leftovers(), collect_nvts(), name, nasl_clean_inc(), nasl_plugin_add(), openvas_signal, set_current_loading_plugins(), set_total_loading_plugins(), and timeval().
Referenced by plugins_init().


| void set_current_loading_plugins | ( | int | current | ) |
Definition at line 206 of file pluginload.c.
References loading_shm.
Referenced by plugins_reload_from_dir().

| void set_total_loading_plugins | ( | int | total | ) |
Definition at line 218 of file pluginload.c.
References loading_shm.
Referenced by plugins_reload_from_dir().

| int total_loading_plugins | ( | void | ) |
Definition at line 195 of file pluginload.c.
References loading_shm.
|
static |
Definition at line 125 of file pluginload.c.
Referenced by current_loading_plugins(), destroy_loading_shm(), init_loading_shm(), set_current_loading_plugins(), set_total_loading_plugins(), and total_loading_plugins().
|
static |
Definition at line 126 of file pluginload.c.
Referenced by destroy_loading_shm(), and init_loading_shm().