Greenbone Vulnerability Manager
8.0.0~git
|
Headers for the GMP daemon. More...
#include "manage.h"
#include "types.h"
#include <glib.h>
#include <gnutls/gnutls.h>
#include <gvm/util/serverutils.h>
#include <netinet/in.h>
Go to the source code of this file.
Macros | |
#define | READ_PROTOCOL_TIMEOUT 300 |
Maximum number of seconds spent trying to read the protocol. | |
#define | FROM_BUFFER_SIZE 1048576 |
Size of from_client and from_scanner data buffers, in bytes. | |
Functions | |
int | init_gmpd (GSList *, int, const gchar *, int, int, int, int, manage_connection_forker_t, int) |
Initialise the GMP library for the GMP daemon. More... | |
void | init_gmpd_process (const gchar *, gchar **) |
Initialise a process forked within the GMP daemon. More... | |
int | serve_gmp (gvm_connection_t *, const gchar *, gchar **) |
Serve the Greenbone Management Protocol (GMP). More... | |
Headers for the GMP daemon.
int init_gmpd | ( | 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 the GMP library for the GMP daemon.
[in] | log_config | Log configuration |
[in] | nvt_cache_mode | 0 operate normally, -1 just update NVT cache. |
[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. |
void init_gmpd_process | ( | const gchar * | database, |
gchar ** | disable | ||
) |
Initialise a process forked within the GMP daemon.
[in] | database | Location of manage database. |
[in] | disable | Commands to disable. |
int serve_gmp | ( | gvm_connection_t * | client_connection, |
const gchar * | database, | ||
gchar ** | disable | ||
) |
Serve the Greenbone Management Protocol (GMP).
Loop reading input from the sockets, processing the input, and writing any results to the appropriate socket. Exit the loop on reaching end of file on the client socket.
Read input from the client and scanner. Process the input with process_gmp_client_input and process_otp_scanner_input. Write the results to the client.
If client socket is 0 or less, then update the NVT cache and exit.
[in] | client_connection | Connection. |
[in] | database | Location of manage database. |
[in] | disable | Commands to disable. |