|
OpenVAS Scanner 23.40.3
|
pluginlaunch.c header. More...


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) |
pluginlaunch.c header.
Definition in file pluginlaunch.h.
| #define ERR_CANT_FORK -2 |
Error for when it is not possible to fork a new plugin process.
Definition at line 22 of file pluginlaunch.h.
Referenced by attack_host(), launch_plugin(), and plugin_launch().
| #define ERR_NO_FREE_SLOT -99 |
Error for when the process table is full.
Definition at line 26 of file pluginlaunch.h.
Referenced by attack_host(), launch_plugin(), next_free_process(), and 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.
Definition at line 480 of file pluginlaunch.c.
References ERR_CANT_FORK, ERR_NO_FREE_SLOT, main_kb, nasl_plugin_launch(), next_free_process(), num_running_processes, scheduler_plugin::oid, pid, PLUGIN_STATUS_UNRUN, plugin_timeout(), pluginlaunch_wait_for_free_process(), and processes.
Referenced by launch_plugin().


| void pluginlaunch_disable_parallel_checks | ( | void | ) |
Definition at line 351 of file pluginlaunch.c.
References max_running_processes.
Referenced by get_next_in_range().

| void pluginlaunch_enable_parallel_checks | ( | void | ) |
Definition at line 357 of file pluginlaunch.c.
References max_running_processes, and old_max_running_processes.
Referenced by get_next_in_range().

| void pluginlaunch_init | ( | const char * | host | ) |
Definition at line 324 of file pluginlaunch.c.
References get_max_checks_number(), hostname, init_kb_usage(), MAX_PROCESSES, max_running_processes, non_simult_ports, num_running_processes, old_max_running_processes, and processes.
Referenced by attack_host().


| void pluginlaunch_stop | ( | void | ) |
Definition at line 363 of file pluginlaunch.c.
References MAX_PROCESSES, num_running_processes, pid, PLUGIN_STATUS_DONE, processes, and terminate_process().
Referenced by attack_host(), launch_plugin(), pluginlaunch_wait_for_free_process(), and scan_stop_cleanup().


| void pluginlaunch_wait | ( | kb_t | main_kb, |
| kb_t | kb ) |
Waits and 'pushes' processes until num_running_processes is 0.
Definition at line 517 of file pluginlaunch.c.
References main_kb, num_running_processes, and update_running_processes().
Referenced by attack_host().


| 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.
Definition at line 550 of file pluginlaunch.c.
References check_memory(), check_sysload(), main_kb, max_running_processes, num_running_processes, pluginlaunch_stop(), procs_cleanup_children(), timeout_running_processes(), and update_running_processes().
Referenced by attack_host(), and plugin_launch().


| int wait_for_children | ( | void | ) |