Headers for the GMP library.
More...
#include "manage.h"
#include "types.h"
#include <glib.h>
#include <gnutls/gnutls.h>
#include <gvm/util/serverutils.h>
#include <sys/types.h>
Go to the source code of this file.
|
int | init_gmp (GSList *, int, const gchar *, int, int, int, int, manage_connection_forker_t, int) |
| Initialise GMP library. More...
|
|
void | init_gmp_process (int, const gchar *, int(*)(const char *, void *), void *, gchar **) |
| Initialise GMP library data for a process. More...
|
|
int | process_gmp_client_input () |
| Process any XML available in from_client. More...
|
|
int | process_gmp_change () |
| Deal with any changes caused by other processes. More...
|
|
Headers for the GMP library.
◆ init_gmp()
int init_gmp |
( |
GSList * |
log_config, |
|
|
int |
nvt_cache_mode, |
|
|
const gchar * |
database, |
|
|
int |
max_ips_per_target, |
|
|
int |
max_email_attachment_size, |
|
|
int |
max_email_include_size, |
|
|
int |
max_email_message_size, |
|
|
manage_connection_forker_t |
fork_connection, |
|
|
int |
skip_db_check |
|
) |
| |
Initialise GMP library.
- Parameters
-
[in] | log_config | Logging configuration list. |
[in] | nvt_cache_mode | True when running in NVT caching mode. |
[in] | database | Location of manage database. |
[in] | max_ips_per_target | Max number of IPs per target. |
[in] | max_email_attachment_size | Max size of email attachments. |
[in] | max_email_include_size | Max size of email inclusions. |
[in] | max_email_message_size | Max size of email user message text. |
[in] | fork_connection | Function to fork a connection to the GMP daemon layer, or NULL. |
[in] | skip_db_check | Skip DB check. |
- Returns
- 0 success, -1 error, -2 database is wrong version, -4 max_ips_per_target out of range.
◆ init_gmp_process()
void init_gmp_process |
( |
int |
update_nvt_cache, |
|
|
const gchar * |
database, |
|
|
int(*)(const char *, void *) |
write_to_client, |
|
|
void * |
write_to_client_data, |
|
|
gchar ** |
disable |
|
) |
| |
Initialise GMP library data for a process.
- Parameters
-
[in] | update_nvt_cache | 0 operate normally, -1 just update NVT cache. |
[in] | database | Location of manage database. |
[in] | write_to_client | Function to write to client. |
[in] | write_to_client_data | Argument to write_to_client . |
[in] | disable | Commands to disable. |
This should run once per process, before the first call to process_gmp_client_input.
◆ process_gmp_change()
int process_gmp_change |
( |
| ) |
|
Deal with any changes caused by other processes.
- Returns
- 0 success, 1 did something, -1 too little space in the scanner output buffer.
◆ process_gmp_client_input()
int process_gmp_client_input |
( |
| ) |
|
Process any XML available in from_client.
- Todo:
- The -2 return has been replaced by send_to_client trying to write the to_client buffer to the client when it is full. This is necessary, as the to_client buffer may fill up halfway through the processing of a GMP element.
- Returns
- 0 success, -1 error, -2 or -3 too little space in to_client or the scanner output buffer (respectively), -4 XML syntax error.
◆ to_client