|
Greenbone Vulnerability Management Libraries 22.32.0
|
Simple JSON reader. More...
#include "../base/cvss.h"#include "../base/nvti.h"#include "../util/jsonpull.h"#include <cjson/cJSON.h>#include <glib.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>

Go to the source code of this file.
Macros | |
| #define | _GNU_SOURCE /* See feature_test_macros(7) */ |
| #define | _FILE_OFFSET_BITS 64 |
Enumerations | |
| enum | nvt_category { ACT_INIT = 0 , ACT_SCANNER , ACT_SETTINGS , ACT_GATHER_INFO , ACT_ATTACK , ACT_MIXED_ATTACK , ACT_DESTRUCTIVE_ATTACK , ACT_DENIAL , ACT_KILL_HOST , ACT_FLOOD , ACT_END } |
| VT categories. More... | |
Functions | |
| int | parse_vt_json (gvm_json_pull_parser_t *, gvm_json_pull_event_t *, nvti_t **) |
| Parse a VT element given in json format. | |
Simple JSON reader.
Definition in file vtparser.h.
| #define _FILE_OFFSET_BITS 64 |
Definition at line 15 of file vtparser.h.
| #define _GNU_SOURCE /* See feature_test_macros(7) */ |
Definition at line 14 of file vtparser.h.
| enum nvt_category |
VT categories.
| Enumerator | |
|---|---|
| ACT_INIT | |
| ACT_SCANNER | |
| ACT_SETTINGS | |
| ACT_GATHER_INFO | |
| ACT_ATTACK | |
| ACT_MIXED_ATTACK | |
| ACT_DESTRUCTIVE_ATTACK | |
| ACT_DENIAL | |
| ACT_KILL_HOST | |
| ACT_FLOOD | |
| ACT_END | |
Definition at line 29 of file vtparser.h.
| int parse_vt_json | ( | gvm_json_pull_parser_t * | parser, |
| gvm_json_pull_event_t * | event, | ||
| nvti_t ** | nvt ) |
Parse a VT element given in json format.
| [in] | parser | Json pull parser. |
| [in] | event | Json pull event. |
| [out] | nvt | The NVT Info structure to fill with the parsed data. |
Definition at line 239 of file vtparser.c.
References add_preferences_to_nvt(), add_tags_to_nvt(), get_category_from_name(), gvm_json_obj_check_str(), gvm_json_path_to_string(), GVM_JSON_PULL_EVENT_ARRAY_END, GVM_JSON_PULL_EVENT_ARRAY_START, GVM_JSON_PULL_EVENT_EOF, GVM_JSON_PULL_EVENT_OBJECT_START, gvm_json_pull_expand_container(), gvm_json_pull_parser_next(), nvti_free(), nvti_new(), nvti_set_category(), nvti_set_family(), nvti_set_name(), nvti_set_oid(), parse_references(), gvm_json_pull_event_t::path, and gvm_json_pull_event_t::type.
Referenced by Ensure().

