Simple JSON reader.
More...
Go to the source code of this file.
◆ G_LOG_DOMAIN
| #define G_LOG_DOMAIN "libgvm util" |
◆ add_preferences_to_nvt()
| static void add_preferences_to_nvt |
( |
nvti_t * |
nvt, |
|
|
cJSON * |
vt_obj |
|
) |
| |
|
static |
◆ add_tags_to_nvt()
| static int add_tags_to_nvt |
( |
nvti_t * |
nvt, |
|
|
cJSON * |
tag_obj |
|
) |
| |
|
static |
Add to the NVT Info structure.
- Parameters
-
| nvt | The NVT Info structure. |
| tag_obj | The JSON object containing the tags. |
- Returns
- 0 on success, -1 on error.
◆ get_category_from_name()
| static int get_category_from_name |
( |
const gchar * |
cat | ) |
|
|
static |
Get the VT category type given the category as string.
- Parameters
-
| cat | The category as string. |
- Returns
- Integer representing the category type.
◆ parse_references()
| static void parse_references |
( |
nvti_t * |
nvt, |
|
|
cJSON * |
vt_obj |
|
) |
| |
|
static |
◆ parse_vt_json()
Parse a VT element given in json format.
- Parameters
-
| [in] | parser | Json pull parser. |
| [in] | event | Json pull event. |
| [out] | nvt | The NVT Info structure to fill with the parsed data. |
- Returns
- 0 on success, 1 on end of feed, -1 on error. In case of success the nvti struct must be freed with nvti_free() by the caller.