|
OpenVAS Scanner 22.7.9
|
#include "table_driven_lsc.h"#include <gvm/util/mqtt.h>#include <gvm/util/uuidutils.h>#include <json-glib/json-glib.h>
Go to the source code of this file.
Macros | |
| #define | G_LOG_DOMAIN "lib misc" |
| GLib logging domain. | |
Functions | |
| static JsonBuilder * | add_packages_str_to_list (JsonBuilder *builder, const gchar *packages) |
| Split the package list string and creates a json array. | |
| gchar * | make_table_driven_lsc_info_json_str (const char *scan_id, const char *ip_str, const char *hostname, const char *os_release, const char *package_list) |
| Build a json object with data necessary to start a table drive LSC. | |
| gchar * | get_status_of_table_driven_lsc_from_json (const char *scan_id, const char *host_ip, const char *json, int len) |
| Get the status of table driven lsc from json object. | |
| #define G_LOG_DOMAIN "lib misc" |
GLib logging domain.
Definition at line 21 of file table_driven_lsc.c.
|
static |
Split the package list string and creates a json array.
JSON result consists of scan_id, message type, host ip, hostname, port together with proto, OID, result message and uri.
| [in/out] | builder The Json builder to add the array to. | |
| [in] | packages | The installed package list as string |
Definition at line 35 of file table_driven_lsc.c.
Referenced by make_table_driven_lsc_info_json_str().

| gchar * get_status_of_table_driven_lsc_from_json | ( | const char * | scan_id, |
| const char * | host_ip, | ||
| const char * | json, | ||
| int | len | ||
| ) |
Get the status of table driven lsc from json object.
Checks for the corresponding status inside the JSON. If the status does not belong the the scan or host, NULL is returned instead. NULL is also returned if message JSON cannot be parsed correctly. Return value has to be freed by caller.
| scan_id | id of scan |
| host_ip | ip of host |
| json | json to get information from |
| len | length of json |
Definition at line 145 of file table_driven_lsc.c.
Referenced by run_table_driven_lsc().

| gchar * make_table_driven_lsc_info_json_str | ( | const char * | scan_id, |
| const char * | ip_str, | ||
| const char * | hostname, | ||
| const char * | os_release, | ||
| const char * | package_list | ||
| ) |
Build a json object with data necessary to start a table drive LSC.
JSON result consists of scan_id, message type, host ip, hostname, port together with proto, OID, result message and uri.
| scan_id | Scan Id. |
| ip_str | IP string of host. |
| hostname | Name of host. |
| os_release | OS release |
| package_list | The installed package list in the target system to be evaluated |
Definition at line 72 of file table_driven_lsc.c.
References add_packages_str_to_list(), hostname, and scan_id.
Referenced by run_table_driven_lsc().

