vtparser.h File Reference

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.

## Detailed Description

Simple JSON reader.

## Macro Definition Documentation

## _FILE_OFFSET_BITS

#define _FILE_OFFSET_BITS 64

## _GNU_SOURCE

#define _GNU_SOURCE /* See feature_test_macros(7) */

## Enumeration Type Documentation

## nvt_category

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 |

## Function Documentation

## parse_vt_json()

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.

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.