#include <string.h>
#include <stdlib.h>
#include <glib.h>
#include <openvas/misc/network.h>
#include <openvas/misc/internal_com.h>
#include <openvas/misc/prefs.h>
#include "ntp.h"
#include "otp.h"
#include "comm.h"
#include "log.h"
#include "utils.h"
#include "hosts.h"
Go to the source code of this file.
|
#define | MIN(x, y) ((x) < (y) ? (x):(y)) |
|
◆ MIN
#define MIN |
( |
|
x, |
|
|
|
y |
|
) |
| ((x) < (y) ? (x):(y)) |
Definition at line 45 of file ntp.c.
◆ ntp_parse_input()
int ntp_parse_input |
( |
struct arglist * |
globals, |
|
|
char * |
input |
|
) |
| |
Parses the input sent by the client before the NEW_ATTACK message.
Definition at line 57 of file ntp.c.
61 int soc = arg_get_value_int (globals,
"global_socket");
65 str = strstr (input,
" <|> ");
71 if (strcmp (input,
"CLIENT") == 0)
74 str = strchr (input,
' ');
78 if (input[strlen (input) - 1] ==
'\n')
79 input[strlen (input) - 1] =
'\0';
84 ntp_recv_file (globals);
88 result = ntp_long_attack (soc);
96 log_write (
"Stopping the whole test (requested by client)");
void hosts_stop_all(void)
void log_write(const char *str,...)
Write into the logfile / syslog.
void comm_send_nvt_info(int soc)
Send the OTP NVT_INFO message and then handle any COMPLETE_LIST.
void comm_send_preferences(int soc)
Sends the preferences of the scanner.
client_request_t otp_get_client_request(char *str)
Find the enum identifier for the client request which is given.
References CREQ_ATTACHED_FILE, and otp_get_client_request().
◆ ntp_timestamp_host_scan_ends()
int ntp_timestamp_host_scan_ends |
( |
int |
soc, |
|
|
char * |
host |
|
) |
| |
Definition at line 437 of file ntp.c.
439 return __ntp_timestamp_scan_host (soc,
"HOST_END",
host);
Host information, implemented as doubly linked list.
◆ ntp_timestamp_host_scan_starts()
int ntp_timestamp_host_scan_starts |
( |
int |
soc, |
|
|
char * |
host |
|
) |
| |
Definition at line 431 of file ntp.c.
433 return __ntp_timestamp_scan_host (soc,
"HOST_START",
host);
Host information, implemented as doubly linked list.
◆ ntp_timestamp_scan_ends()
int ntp_timestamp_scan_ends |
( |
int |
soc | ) |
|
Definition at line 425 of file ntp.c.
427 return __ntp_timestamp_scan (soc,
"SCAN_END");
◆ ntp_timestamp_scan_starts()
int ntp_timestamp_scan_starts |
( |
int |
soc | ) |
|
Definition at line 419 of file ntp.c.
421 return __ntp_timestamp_scan (soc,
"SCAN_START");