Greenbone Vulnerability Management Libraries: openvasd/openvasd.c Source File

Greenbone Vulnerability Management Libraries 23.1.1

openvasd.c
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
10
11#include "openvasd.h"
12
13#include "../base/array.h"
14#include "../base/networking.h"
15#include "../http/httputils.h"
16#include "../http_scanner/http_scanner.h"
17#include "../util/json.h"
18
19#include <cjson/cJSON.h>
20#include <netinet/in.h>
21#include <stddef.h>
22#include <stdio.h>
23#include <stdlib.h>
24#include <unistd.h>
25
26#undef G_LOG_DOMAIN
30#define G_LOG_DOMAIN "libgvm ovd"
31
32#define RESP_CODE_ERR -1
33#define RESP_CODE_OK 0
34
38 struct openvasd_target
39{
40 gchar *scan_id;
41 GSList *credentials;
42 gchar *exclude_hosts;
43 gchar *hosts;
44 gchar *ports;
45 gchar *finished_hosts;
46 gboolean icmp;
47 gboolean tcp_syn;
48 gboolean tcp_ack;
49 gboolean arp;
50 gboolean consider_alive;
51 int reverse_lookup_unify;
52 int reverse_lookup_only;
53};
54
58 struct openvasd_vt_single
59{
60 gchar *vt_id;
61 GHashTable *vt_values;
62};
63
71http_scanner_resp_t
72openvasd_get_vt_stream_init (http_scanner_connector_t conn)
73{
74 GString *path;
75 http_scanner_resp_t response = NULL;
76
77 path = g_string_new ("/vts?information=1");
78 response = http_scanner_init_request_multi (conn, path->str);
79
80 g_string_free (path, TRUE);
81
82 return response;
83}
84
96int
97openvasd_get_vt_stream (http_scanner_connector_t conn)
98{
99 return http_scanner_process_request_multi (conn, 5000);
100}
101
110http_scanner_resp_t
111openvasd_get_vts (http_scanner_connector_t conn)
112{
113 GString *path;
114 http_scanner_resp_t response = NULL;
115
116 path = g_string_new ("/vts?information=1");
117 response =
118 http_scanner_send_request (conn, HTTP_SCANNER_GET, path->str, NULL, NULL);
119
120 g_string_free (path, TRUE);
121
122 if (response->code != RESP_CODE_ERR)
123 response->body = g_strdup (http_scanner_stream_str (conn));
124
125 http_scanner_reset_stream (conn);
126 return response;
127}
128
137http_scanner_resp_t
138openvasd_get_performance (http_scanner_connector_t conn,
139 openvasd_get_performance_opts_t opts)
140{
141 http_scanner_resp_t response;
142 gchar *query;
143 time_t now;
144
145 time (&now);
146
147 if (!opts.titles || !strcmp (opts.titles, "") || opts.start < 0
148 || opts.start > now || opts.end < 0 || opts.end > now)
149 {
150 response = g_malloc0 (sizeof (struct http_scanner_response));
151 response->code = RESP_CODE_ERR;
152 response->body =
153 g_strdup ("{\"error\": \"Couldn't send get_performance command "
154 "to scanner. Bad or missing parameters.\"}");
155 return response;
156 }
157
158 query = g_strdup_printf ("/health/performance?start=%d&end=%d&titles=%s",
159 opts.start, opts.end, opts.titles);
160 response =
161 http_scanner_send_request (conn, HTTP_SCANNER_GET, query, NULL, NULL);
162 g_free (query);
163
164 if (response->code != RESP_CODE_ERR)
165 response->body = g_strdup (http_scanner_stream_str (conn));
166 else
167 {
168 response->body = g_strdup (
169 "{\"error\": \"Not possible to get performance information.\"}");
170 g_warning ("%s: Not possible to get performance information", __func__);
171 }
172
173 http_scanner_reset_stream (conn);
174 return response;
175}
176
187int
188openvasd_parsed_performance (http_scanner_connector_t conn,
189 openvasd_get_performance_opts_t opts,
190 gchar **graph, gchar **err)
191{
192 http_scanner_resp_t resp = NULL;
193 cJSON *parser;
194 cJSON *item;
195 int ret = 0;
196 resp = openvasd_get_performance (conn, opts);
197
198 // No results. No information.
199 parser = cJSON_Parse (resp->body);
200 if (parser == NULL)
201 {
202 *err = g_strdup ("Unable to parse sensor performance data");
203 ret = -1;
204 }
205 else if (resp->code != 200)
206 {
207 parser = cJSON_Parse (resp->body);
208 item = cJSON_GetObjectItem (parser, "error");
209 if (item != NULL)
210 *err = g_strdup (cJSON_GetStringValue (item));
211 ret = -1;
212 }
213 else
214 {
215 item = cJSON_GetArrayItem (parser, 0);
216 if (item != NULL)
217 *graph = g_strdup (cJSON_GetStringValue (item));
218 }
219
220 http_scanner_response_cleanup (resp);
221 cJSON_Delete (parser);
222
223 return ret;
224}
225
226// Scan config builder.
227
234static void
235add_port_to_scan_json (gpointer range, gpointer p_array)
236{
237 range_t *ports = range;
238
239 cJSON *port = cJSON_CreateObject ();
240 if (ports->type == 1)
241 cJSON_AddStringToObject (port, "protocol", "udp");
242 else
243 cJSON_AddStringToObject (port, "protocol", "tcp");
244
245 cJSON *ranges_array = cJSON_CreateArray ();
246 cJSON *range_obj = cJSON_CreateObject ();
247 cJSON_AddNumberToObject (range_obj, "start", ports->start);
248
249 if (ports->end > ports->start && ports->end < 65535)
250 cJSON_AddNumberToObject (range_obj, "end", ports->end);
251 else
252 cJSON_AddNumberToObject (range_obj, "end", ports->start);
253 cJSON_AddItemToArray (ranges_array, range_obj);
254 cJSON_AddItemToObject (port, "range", ranges_array);
255 cJSON_AddItemToArray ((cJSON *) p_array, port);
256}
257
265static void
266add_auth_data_key_value_as_json (const char *key, const char *value,
267 void *json_obj)
268{
269 if (!key || !value || !json_obj)
270 return;
271 cJSON_AddStringToObject ((cJSON *) json_obj, key, value);
272}
273
280static void
281add_credential_to_scan_json (gpointer credentials, gpointer cred_array)
282{
283 cJSON *cred_obj = NULL;
284
285 scan_credential_t *cred = credentials;
286
287 const gchar *type = scan_credential_get_type (cred);
288 const gchar *service = scan_credential_get_service (cred);
289 const gchar *port = scan_credential_get_port (cred);
290
291 cred_obj = cJSON_CreateObject ();
292 cJSON_AddStringToObject (cred_obj, "service", service ? service : "");
293
294 if (port)
295 {
296 cJSON_AddNumberToObject (cred_obj, "port", atoi (port));
297 }
298
299 cJSON *cred_type_obj = cJSON_CreateObject ();
300 scan_credential_foreach_auth_data (cred, add_auth_data_key_value_as_json,
301 cred_type_obj);
302 cJSON_AddItemToObject (cred_obj, type ? type : "", cred_type_obj);
303
304 cJSON_AddItemToArray ((cJSON *) cred_array, cred_obj);
305}
306
314static void
315add_scan_preferences_to_scan_json (gpointer key, gpointer val,
316 gpointer scan_prefs_array)
317{
318 cJSON *pref_obj = cJSON_CreateObject ();
319 cJSON_AddStringToObject (pref_obj, "id", key);
320 cJSON_AddStringToObject (pref_obj, "value", val);
321 cJSON_AddItemToArray (scan_prefs_array, pref_obj);
322}
323
330static void
331add_vts_to_scan_json (gpointer single_vt, gpointer vts_array)
332{
333 GHashTableIter vt_data_iter;
334 gchar *vt_param_id, *vt_param_value;
335
336 openvasd_vt_single_t *vt = single_vt;
337
338 cJSON *vt_obj = cJSON_CreateObject ();
339
340 cJSON_AddStringToObject (vt_obj, "oid", vt->vt_id);
341
342 if (g_hash_table_size (vt->vt_values))
343 {
344 cJSON *params_array = cJSON_CreateArray ();
345
346 g_hash_table_iter_init (&vt_data_iter, vt->vt_values);
347 while (g_hash_table_iter_next (&vt_data_iter, (gpointer *) &vt_param_id,
348 (gpointer *) &vt_param_value))
349 {
350 cJSON *param_obj = cJSON_CreateObject ();
351 cJSON_AddNumberToObject (param_obj, "id", atoi (vt_param_id));
352 cJSON_AddStringToObject (param_obj, "value", vt_param_value);
353 cJSON_AddItemToArray (params_array, param_obj);
354 }
355 cJSON_AddItemToObject (vt_obj, "parameters", params_array);
356 }
357 cJSON_AddItemToArray (vts_array, vt_obj);
358}
359
372char *
373openvasd_build_scan_config_json (openvasd_target_t *target,
374 GHashTable *scan_preferences, GSList *vts)
375{
376 cJSON *scan_obj = NULL;
377 cJSON *target_obj = NULL;
378 cJSON *hosts_array = NULL;
379 cJSON *exclude_hosts_array = NULL;
380 cJSON *finished_hosts_array = NULL;
381 gchar *json_str = NULL;
382
383 /* Build the message in json format to be published. */
384 scan_obj = cJSON_CreateObject ();
385
386 if (target->scan_id && target->scan_id[0] != '\0')
387 cJSON_AddStringToObject (scan_obj, "scan_id", target->scan_id);
388
389 // begin target
390 target_obj = cJSON_CreateObject ();
391
392 // hosts
393 hosts_array = cJSON_CreateArray ();
394 gchar **hosts_list = g_strsplit (target->hosts, ",", 0);
395 for (int i = 0; hosts_list[i] != NULL; i++)
396 {
397 cJSON *host_item = NULL;
398 host_item = cJSON_CreateString (hosts_list[i]);
399 cJSON_AddItemToArray (hosts_array, host_item);
400 }
401 g_strfreev (hosts_list);
402 cJSON_AddItemToObject (target_obj, "hosts", hosts_array);
403
404 // exclude hosts
405 if (target->exclude_hosts && target->exclude_hosts[0] != '\0')
406 {
407 exclude_hosts_array = cJSON_CreateArray ();
408 gchar **exclude_hosts_list = g_strsplit (target->exclude_hosts, ",", 0);
409 for (int i = 0; exclude_hosts_list[i] != NULL; i++)
410 {
411 cJSON *exclude_host_item = NULL;
412 exclude_host_item = cJSON_CreateString (exclude_hosts_list[i]);
413 cJSON_AddItemToArray (exclude_hosts_array, exclude_host_item);
414 }
415 g_strfreev (exclude_hosts_list);
416 cJSON_AddItemToObject (target_obj, "excluded_hosts", exclude_hosts_array);
417 }
418
419 // finished hosts
420 if (target->finished_hosts && target->finished_hosts[0] != '\0')
421 {
422 finished_hosts_array = cJSON_CreateArray ();
423 gchar **finished_hosts_list = g_strsplit (target->finished_hosts, ",", 0);
424 for (int i = 0; finished_hosts_list[i] != NULL; i++)
425 {
426 cJSON *finished_host_item = NULL;
427 finished_host_item = cJSON_CreateString (finished_hosts_list[i]);
428 cJSON_AddItemToArray (finished_hosts_array, finished_host_item);
429 }
430 g_strfreev (hosts_list);
431 cJSON_AddItemToObject (target_obj, "finished_hosts",
432 finished_hosts_array);
433 }
434
435 // ports
436 if (target->ports && target->ports[0] != '\0')
437 {
438 cJSON *ports_array = cJSON_CreateArray ();
439 array_t *ports = port_range_ranges (target->ports);
440 g_ptr_array_foreach (ports, add_port_to_scan_json, ports_array);
441 array_free (ports);
442 cJSON_AddItemToObject (target_obj, "ports", ports_array);
443 }
444
445 // credentials
446 cJSON *credentials = cJSON_CreateArray ();
447 g_slist_foreach (target->credentials, add_credential_to_scan_json,
448 credentials);
449 cJSON_AddItemToObject (target_obj, "credentials", credentials);
450
451 // reverse lookup
452 if (target->reverse_lookup_unify)
453 cJSON_AddBoolToObject (target_obj, "reverse_lookup_unify", 1);
454 else
455 cJSON_AddBoolToObject (target_obj, "reverse_lookup_unify", 0);
456
457 if (target->reverse_lookup_only)
458 cJSON_AddBoolToObject (target_obj, "reverse_lookup_only", 1);
459 else
460 cJSON_AddBoolToObject (target_obj, "reverse_lookup_only", 0);
461
462 // alive test methods
463 cJSON *alive_test_methods = cJSON_CreateArray ();
464 if (target->arp)
465 cJSON_AddItemToArray (alive_test_methods, cJSON_CreateString ("arp"));
466 if (target->tcp_ack)
467 cJSON_AddItemToArray (alive_test_methods, cJSON_CreateString ("tcp_ack"));
468 if (target->tcp_syn)
469 cJSON_AddItemToArray (alive_test_methods, cJSON_CreateString ("tcp_syn"));
470 if (target->consider_alive)
471 cJSON_AddItemToArray (alive_test_methods,
472 cJSON_CreateString ("consider_alive"));
473 if (target->icmp)
474 cJSON_AddItemToArray (alive_test_methods, cJSON_CreateString ("icmp"));
475 cJSON_AddItemToObject (target_obj, "alive_test_methods", alive_test_methods);
476
477 cJSON_AddItemToObject (scan_obj, "target", target_obj);
478
479 // Begin Scan Preferences
480 cJSON *scan_prefs_array = cJSON_CreateArray ();
481 g_hash_table_foreach (scan_preferences, add_scan_preferences_to_scan_json,
482 scan_prefs_array);
483 cJSON_AddItemToObject (scan_obj, "scan_preferences", scan_prefs_array);
484
485 // Begin VTs
486 cJSON *vts_array = cJSON_CreateArray ();
487 g_slist_foreach (vts, add_vts_to_scan_json, vts_array);
488 cJSON_AddItemToObject (scan_obj, "vts", vts_array);
489
490 json_str = cJSON_Print (scan_obj);
491 cJSON_Delete (scan_obj);
492 if (json_str == NULL)
493 g_warning ("%s: Error while creating JSON.", __func__);
494
495 return json_str;
496}
497
510 openvasd_target_t *
511openvasd_target_new (const gchar *scanid, const gchar *hosts,
512 const gchar *ports, const gchar *exclude_hosts,
513 int reverse_lookup_unify, int reverse_lookup_only)
514{
515 openvasd_target_t *new_target;
516 new_target = g_malloc0 (sizeof (openvasd_target_t));
517
518 if (scanid && *scanid)
519 new_target->scan_id = g_strdup (scanid);
520
521 new_target->exclude_hosts = exclude_hosts ? g_strdup (exclude_hosts) : NULL;
522 new_target->finished_hosts = NULL;
523 new_target->hosts = hosts ? g_strdup (hosts) : NULL;
524 new_target->ports = ports ? g_strdup (ports) : NULL;
525 new_target->reverse_lookup_unify =
526 reverse_lookup_unify ? reverse_lookup_unify : 0;
527 new_target->reverse_lookup_only =
528 reverse_lookup_only ? reverse_lookup_only : 0;
529
530 return new_target;
531}
532
539void
540openvasd_target_set_finished_hosts (openvasd_target_t *target,
541 const gchar *finished_hosts)
542{
543 g_free (target->finished_hosts);
544 target->finished_hosts = finished_hosts ? g_strdup (finished_hosts) : NULL;
545}
546
552void
553openvasd_target_free (openvasd_target_t *target)
554{
555 if (!target)
556 return;
557
558 g_slist_free_full (target->credentials,
559 (GDestroyNotify) scan_credential_free);
560 g_free (target->exclude_hosts);
561 g_free (target->finished_hosts);
562 g_free (target->scan_id);
563 g_free (target->hosts);
564 g_free (target->ports);
565 g_free (target);
566 target = NULL;
567}
568
579void
580openvasd_target_add_alive_test_methods (openvasd_target_t *target,
581 gboolean icmp, gboolean tcp_syn,
582 gboolean tcp_ack, gboolean arp,
583 gboolean consider_alive)
584{
585 if (!target)
586 return;
587
588 target->icmp = icmp;
589 target->tcp_syn = tcp_syn;
590 target->tcp_ack = tcp_ack;
591 target->arp = arp;
592 target->consider_alive = consider_alive;
593}
594
601void
602openvasd_target_add_credential (openvasd_target_t *target,
603 scan_credential_t *credential)
604{
605 if (!target || !credential)
606 return;
607
608 target->credentials = g_slist_prepend (target->credentials, credential);
609}
610
618 openvasd_vt_single_t *
619openvasd_vt_single_new (const gchar *vt_id)
620{
621 openvasd_vt_single_t *new_vt_single;
622 new_vt_single = g_malloc0 (sizeof (openvasd_vt_single_t));
623
624 new_vt_single->vt_id = vt_id ? g_strdup (vt_id) : NULL;
625 new_vt_single->vt_values =
626 g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
627
628 return new_vt_single;
629}
630
636void
637openvasd_vt_single_free (openvasd_vt_single_t *vt_single)
638{
639 if (!vt_single)
640 return;
641
642 g_hash_table_destroy (vt_single->vt_values);
643
644 g_free (vt_single->vt_id);
645 g_free (vt_single);
646}
647
657void
658openvasd_vt_single_add_value (openvasd_vt_single_t *vt_single,
659 const gchar *name, const gchar *value)
660{
661 g_hash_table_replace (vt_single->vt_values, g_strdup (name),
662 g_strdup (value));
663}
array_free
void array_free(GPtrArray *array)
Free global array value.
Definition array.c:50
array.h
Array utilities.
array_t
GPtrArray array_t
Definition array.h:16
scan_credential_get_port
const gchar * scan_credential_get_port(scan_credential_t *credential)
Get the port of a scan credential.
Definition credentialutils.c:93
scan_credential_free
void scan_credential_free(scan_credential_t *credential)
Free a scan credential.
Definition credentialutils.c:134
scan_credential_get_type
const gchar * scan_credential_get_type(scan_credential_t *credential)
Get the type of a scan credential.
Definition credentialutils.c:63
scan_credential_foreach_auth_data
void scan_credential_foreach_auth_data(scan_credential_t *credential, void(*func)(const char *name, const char *value, void *user_data), void *user_data)
Iterate over each authentication data item in a scan credential.
Definition credentialutils.c:109
scan_credential_get_service
const gchar * scan_credential_get_service(scan_credential_t *credential)
Get the service of a scan credential.
Definition credentialutils.c:78
scan_credential_t
struct scan_credential scan_credential_t
Definition credentialutils.h:16
json.h
port_range_ranges
array_t * port_range_ranges(const char *port_range)
Create a range array from a port_range string.
Definition networking.c:601
networking.h
GVM Networking related API.
range_t
struct range range_t
Definition networking.h:43
RESP_CODE_ERR
#define RESP_CODE_ERR
Definition openvasd.c:32
openvasd_parsed_performance
int openvasd_parsed_performance(http_scanner_connector_t conn, openvasd_get_performance_opts_t opts, gchar **graph, gchar **err)
Parse performance data.
Definition openvasd.c:188
openvasd_target_free
void openvasd_target_free(openvasd_target_t *target)
Free an openvasd target, including all added credentials.
Definition openvasd.c:553
openvasd_get_vts
http_scanner_resp_t openvasd_get_vts(http_scanner_connector_t conn)
Get VT's metadata.
Definition openvasd.c:111
add_auth_data_key_value_as_json
static void add_auth_data_key_value_as_json(const char *key, const char *value, void *json_obj)
Add authentication data key value to a JSON object.
Definition openvasd.c:266
openvasd_target_add_credential
void openvasd_target_add_credential(openvasd_target_t *target, scan_credential_t *credential)
Add a credential to an openvasd target.
Definition openvasd.c:602
openvasd_build_scan_config_json
char * openvasd_build_scan_config_json(openvasd_target_t *target, GHashTable *scan_preferences, GSList *vts)
Build a json object with data necessary to start a scan.
Definition openvasd.c:373
add_credential_to_scan_json
static void add_credential_to_scan_json(gpointer credentials, gpointer cred_array)
Add a credential to the scan json object.
Definition openvasd.c:281
openvasd_get_vt_stream_init
http_scanner_resp_t openvasd_get_vt_stream_init(http_scanner_connector_t conn)
Fetch feed metadata chunk by chunk.
Definition openvasd.c:72
openvasd_target_new
openvasd_target_t * openvasd_target_new(const gchar *scanid, const gchar *hosts, const gchar *ports, const gchar *exclude_hosts, int reverse_lookup_unify, int reverse_lookup_only)
Create a new openvasd target.
Definition openvasd.c:511
add_port_to_scan_json
static void add_port_to_scan_json(gpointer range, gpointer p_array)
Add a port range to the scan json object.
Definition openvasd.c:235
openvasd_target_set_finished_hosts
void openvasd_target_set_finished_hosts(openvasd_target_t *target, const gchar *finished_hosts)
Set the finished hosts of an openvasd target.
Definition openvasd.c:540
openvasd_vt_single_free
void openvasd_vt_single_free(openvasd_vt_single_t *vt_single)
Free a single openvasd VT, including all preference values.
Definition openvasd.c:637
openvasd_get_vt_stream
int openvasd_get_vt_stream(http_scanner_connector_t conn)
Get a new feed metadata chunk.
Definition openvasd.c:97
add_scan_preferences_to_scan_json
static void add_scan_preferences_to_scan_json(gpointer key, gpointer val, gpointer scan_prefs_array)
Add a scan preference to the scan json object.
Definition openvasd.c:315
add_vts_to_scan_json
static void add_vts_to_scan_json(gpointer single_vt, gpointer vts_array)
Add a VT to the scan json object.
Definition openvasd.c:331
openvasd_vt_single_add_value
void openvasd_vt_single_add_value(openvasd_vt_single_t *vt_single, const gchar *name, const gchar *value)
Add a preference value to an openvasd VT.
Definition openvasd.c:658
openvasd_get_performance
http_scanner_resp_t openvasd_get_performance(http_scanner_connector_t conn, openvasd_get_performance_opts_t opts)
Get performance data.
Definition openvasd.c:138
openvasd_target_add_alive_test_methods
void openvasd_target_add_alive_test_methods(openvasd_target_t *target, gboolean icmp, gboolean tcp_syn, gboolean tcp_ack, gboolean arp, gboolean consider_alive)
Add alive test methods to openvasd target.
Definition openvasd.c:580
openvasd_vt_single_new
openvasd_vt_single_t * openvasd_vt_single_new(const gchar *vt_id)
Create a new single openvasd VT.
Definition openvasd.c:619
openvasd.h
API for Openvas Daemon communication.
openvasd_vt_single_t
struct openvasd_vt_single openvasd_vt_single_t
Definition openvasd.h:43
openvasd_target_t
struct openvasd_target openvasd_target_t
Definition openvasd.h:41
openvasd_get_performance_opts_t
Definition openvasd.h:24
openvasd_get_performance_opts_t::titles
const gchar * titles
Definition openvasd.h:27
openvasd_get_performance_opts_t::end
int end
Definition openvasd.h:26
openvasd_get_performance_opts_t::start
int start
Definition openvasd.h:25
openvasd_target
Struct holding target information.
Definition openvasd.c:39
openvasd_target::reverse_lookup_only
int reverse_lookup_only
Definition openvasd.c:52
openvasd_target::icmp
gboolean icmp
Definition openvasd.c:46
openvasd_target::ports
gchar * ports
Definition openvasd.c:44
openvasd_target::tcp_ack
gboolean tcp_ack
Definition openvasd.c:48
openvasd_target::exclude_hosts
gchar * exclude_hosts
Definition openvasd.c:42
openvasd_target::reverse_lookup_unify
int reverse_lookup_unify
Definition openvasd.c:51
openvasd_target::arp
gboolean arp
Definition openvasd.c:49
openvasd_target::credentials
GSList * credentials
Definition openvasd.c:41
openvasd_target::tcp_syn
gboolean tcp_syn
Definition openvasd.c:47
openvasd_target::consider_alive
gboolean consider_alive
Definition openvasd.c:50
openvasd_target::finished_hosts
gchar * finished_hosts
Definition openvasd.c:45
openvasd_target::hosts
gchar * hosts
Definition openvasd.c:43
openvasd_target::scan_id
gchar * scan_id
Definition openvasd.c:40
openvasd_vt_single
Struct holding vt information.
Definition openvasd.c:59
openvasd_vt_single::vt_id
gchar * vt_id
Definition openvasd.c:60
openvasd_vt_single::vt_values
GHashTable * vt_values
Definition openvasd.c:61
range
A port range.
Definition networking.h:35
range::start
int start
Definition networking.h:40
range::type
port_protocol_t type
Definition networking.h:41
range::end
int end
Definition networking.h:38