OpenVAS Scanner  6.0.0~git
Macros | Functions
nasl_plugins.c File Reference

The nasl - plugin class. Loads or launches nasl- plugins. More...

#include "../misc/network.h"
#include "../misc/plugutils.h"
#include "../nasl/nasl.h"
#include "pluginlaunch.h"
#include "pluginload.h"
#include "pluginscheduler.h"
#include "processes.h"
#include <errno.h>
#include <glib.h>
#include <gvm/base/drop_privileges.h>
#include <gvm/base/networking.h>
#include <gvm/base/prefs.h>
#include <gvm/base/proctitle.h>
#include <gvm/util/nvticache.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <utime.h>

Macros

#define G_LOG_DOMAIN   "sd main"
 GLib log domain. More...
 

Functions

static int check_nvti (const char *filename, nvti_t *nvt)
 Check that the nvt's data is valid. More...
 
int nasl_plugin_add (char *folder, char *filename)
 Add one .nasl plugin to the plugin list. More...
 
static void nasl_thread (struct script_infos *)
 
int nasl_plugin_launch (struct scan_globals *globals, struct in6_addr *ip, GSList *vhosts, kb_t kb, const char *oid)
 Launch a NASL plugin. More...
 

Detailed Description

The nasl - plugin class. Loads or launches nasl- plugins.

Macro Definition Documentation

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "sd main"

GLib log domain.

Function Documentation

◆ check_nvti()

static int check_nvti ( const char *  filename,
nvti_t *  nvt 
)
static

Check that the nvt's data is valid.

Parameters
filenameFilename of the NVT.
nvtNVT to check.
Returns
0 on success, -1 on error.

◆ nasl_plugin_add()

int nasl_plugin_add ( char *  folder,
char *  filename 
)

Add one .nasl plugin to the plugin list.

The plugin is first attempted to be loaded from the cache. If that fails, it is parsed (via exec_nasl_script) and added to the cache.

Parameters
folderPath to the plugin folder.
filenameFile-name of the plugin
Returns
0 on success, -1 on error.

◆ nasl_plugin_launch()

int nasl_plugin_launch ( struct scan_globals globals,
struct in6_addr *  ip,
GSList *  vhosts,
kb_t  kb,
const char *  oid 
)

Launch a NASL plugin.

◆ nasl_thread()

static void nasl_thread ( struct script_infos args)
static