|
int | init_gmpd (GSList *log_config, 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. More...
|
|
void | init_gmpd_process (const gchar *database, gchar **disable) |
| Initialise a process forked within the GMP daemon. More...
|
|
static int | read_from_client_unix (int client_socket) |
| Read as much from the client as the from_client buffer will hold. More...
|
|
static int | read_from_client_tls (gnutls_session_t *client_session) |
| Read as much from the client as the from_client buffer will hold. More...
|
|
static int | read_from_client (gvm_connection_t *client_connection) |
| Read as much from the client as the from_client buffer will hold. More...
|
|
static int | write_to_client_tls (gnutls_session_t *client_session) |
| Write as much as possible from to_client to the client. More...
|
|
static int | write_to_client_unix (int client_socket) |
| Write as much as possible from to_client to the client. More...
|
|
static int | write_to_client (gvm_connection_t *client_connection) |
| Write as much as possible from to_client to the client. More...
|
|
static gboolean | gmpd_send_to_client (const char *msg, void *write_to_client_data) |
| Send a response message to the client. More...
|
|
static int | get_nfds (int socket) |
| Get nfds value. More...
|
|
int | serve_gmp (gvm_connection_t *client_connection, const gchar *database, gchar **disable) |
| Serve the Greenbone Management Protocol (GMP). More...
|
|
The Greenbone Vulnerability Manager GMP daemon.
This file defines the Greenbone Vulnerability Manager daemon. The Manager serves the Greenbone Management Protocol (GMP) to clients such as the Greenbone Security Assistant (GSA). The Manager and GMP give clients full access to an OpenVAS Scanner.
The library provides two functions: init_gmpd and serve_gmp. init_gmpd initialises the daemon. serve_gmp serves GMP to a single client socket until end of file is reached on the socket.
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. Process the input with process_gmp_client_input. Write the results to the client.
- Parameters
-
[in] | client_connection | Connection. |
[in] | database | Location of manage database. |
[in] | disable | Commands to disable. |
- Returns
- 0 success, -1 error.
- Todo:
- Confirm and clarify complications, especially last one.
- Todo:
- nfds must only include a socket if it's in >= one set.
- Todo:
- Shutdown on failure (for example, if a read fails).