OpenVAS Scanner 23.23.1
pluginlaunch.h File Reference

pluginlaunch.c header. More...

#include "pluginload.h"
#include "pluginscheduler.h"

Go to the source code of this file.

Macros

#define ERR_CANT_FORK   -2
 Error for when it is not possible to fork a new plugin process.
#define ERR_NO_FREE_SLOT   -99
 Error for when the process table is full.

Functions

void pluginlaunch_init (const char *)
void pluginlaunch_wait (kb_t, kb_t)
 Waits and 'pushes' processes until num_running_processes is 0.
void pluginlaunch_wait_for_free_process (kb_t, kb_t)
 Waits and 'pushes' processes until the number of running processes has changed.
void pluginlaunch_stop (void)
int plugin_launch (struct scan_globals *, struct scheduler_plugin *, struct in6_addr *, GSList *, kb_t, kb_t, nvti_t *, int *)
 Start a plugin.
void pluginlaunch_disable_parallel_checks (void)
void pluginlaunch_enable_parallel_checks (void)
int wait_for_children (void)

Detailed Description

Macro Definition Documentation

◆ ERR_CANT_FORK

#define ERR_CANT_FORK   -2

Error for when it is not possible to fork a new plugin process.

◆ ERR_NO_FREE_SLOT

#define ERR_NO_FREE_SLOT   -99

Error for when the process table is full.

Function Documentation

◆ plugin_launch()

int plugin_launch ( struct scan_globals * globals,
struct scheduler_plugin * plugin,
struct in6_addr * ip,
GSList * vhosts,
kb_t kb,
kb_t main_kb,
nvti_t * nvti,
int * error )

Start a plugin.

Check for free slots available in the process table. Set error with ERR_NO_FREE_SLOT if the process table is full. Set error with ERR_CANT_FORK if was not possible to fork() a new child.

Returns
PID of process that is connected to the plugin as returned by plugin classes pl_launch function. Less than 0 means there was a problem, but error param should be checked.

◆ pluginlaunch_disable_parallel_checks()

void pluginlaunch_disable_parallel_checks ( void )

◆ pluginlaunch_enable_parallel_checks()

void pluginlaunch_enable_parallel_checks ( void )

◆ pluginlaunch_init()

void pluginlaunch_init ( const char * host)

◆ pluginlaunch_stop()

void pluginlaunch_stop ( void )

◆ pluginlaunch_wait()

void pluginlaunch_wait ( kb_t main_kb,
kb_t kb )

Waits and 'pushes' processes until num_running_processes is 0.

◆ pluginlaunch_wait_for_free_process()

void pluginlaunch_wait_for_free_process ( kb_t main_kb,
kb_t kb )

Waits and 'pushes' processes until the number of running processes has changed.

◆ wait_for_children()

int wait_for_children ( void )