OpenVAS Scanner
6.0.0~git
|
Communication manager; it manages the NTP Protocol version 1.0 and 1.1. More...
#include "comm.h"
#include "../misc/network.h"
#include "../misc/nvt_categories.h"
#include "../misc/plugutils.h"
#include "../nasl/nasl.h"
#include "ntp.h"
#include "pluginload.h"
#include "pluginscheduler.h"
#include "sighand.h"
#include "utils.h"
#include <errno.h>
#include <glib.h>
#include <gvm/base/prefs.h>
#include <gvm/util/nvticache.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Macros | |
#define | G_LOG_DOMAIN "sd main" |
GLib log domain. More... | |
Functions | |
int | comm_init (int soc) |
Initializes the communication between the scanner (us) and the client. More... | |
int | comm_loading (int soc) |
Informs the client that the scanner is still loading. More... | |
static int | is_client_present (int soc) |
void | comm_terminate (int soc) |
This function must be called at the end of a session. More... | |
void | send_plug_info (int soc, const char *oid) |
Sends a plugin info. More... | |
static void | comm_send_pluginlist (int soc, GSList *oids) |
Sends the list of plugins that the scanner could load to the client,. More... | |
static void | send_plugins_preferences (int soc, GSList *oids) |
Sends the list of plugins preferences to the client. More... | |
static void | comm_send_preferences (int soc, GSList *oids) |
Sends the preferences of the scanner. More... | |
int | comm_wait_order (struct scan_globals *globals) |
This function waits for the attack order of the client. Meanwhile, it processes all the messages the client could send. More... | |
static int | is_valid_feed_version (const char *feed_version) |
Determine whether a buffer contains a valid feed version. More... | |
void | comm_send_nvt_info (int soc) |
Send the OTP NVT_INFO message and then handle any COMPLETE_LIST. More... | |
Communication manager; it manages the NTP Protocol version 1.0 and 1.1.
#define G_LOG_DOMAIN "sd main" |
GLib log domain.
int comm_init | ( | int | soc | ) |
Initializes the communication between the scanner (us) and the client.
int comm_loading | ( | int | soc | ) |
Informs the client that the scanner is still loading.
[in] | soc | Socket to send and receive from. |
void comm_send_nvt_info | ( | int | soc | ) |
Send the OTP NVT_INFO message and then handle any COMPLETE_LIST.
|
static |
Sends the list of plugins that the scanner could load to the client,.
using the OTP format (calls send_plug_info for each).
soc | Socket to use for sending list of plugins. |
oids | List of OIDs to send. |
|
static |
Sends the preferences of the scanner.
soc | Socket to use for sending. |
oids | List of OIDs to send. |
void comm_terminate | ( | int | soc | ) |
This function must be called at the end of a session.
int comm_wait_order | ( | struct scan_globals * | globals | ) |
This function waits for the attack order of the client. Meanwhile, it processes all the messages the client could send.
|
static |
Determines if the client is still connected.
|
static |
Determine whether a buffer contains a valid feed version.
[in] | feed_version | Buffer containing feed_version. |
void send_plug_info | ( | int | soc, |
const char * | oid | ||
) |
Sends a plugin info.
|
static |
Sends the list of plugins preferences to the client.
soc | Socket to use for sending list of preferences. |
oids | List OIDs to send. |