vtparser.h
Go to the documentation of this file.
/* SPDX-FileCopyrightText: 2024 Greenbone AG
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef _GVM_UTIL_VTPARSER_H
#define _GVM_UTIL_VTPARSER_H
#define _GNU_SOURCE /* See feature_test_macros(7) */
#define _FILE_OFFSET_BITS 64
#include "../base/cvss.h"
#include "../base/nvti.h" /* for nvti_t */
#include "../util/jsonpull.h"
#include <cjson/cJSON.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
typedef enum
{
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,
} nvt_category;
int
parse_vt_json (gvm_json_pull_parser_t *, gvm_json_pull_event_t *, nvti_t **);
#endif /* not _GVM_UTIL_VTPARSER_H */
cvss.h
Protos for CVSS utility functions.
jsonpull.h
nvti_t
struct nvti nvti_t
The structure of a information record that corresponds to a NVT.
nvti.h
Protos and data structures for NVT Information data sets.
gvm_json_pull_event_t
Event generated by the JSON pull parser.
Definition jsonpull.h:59
gvm_json_pull_parser_t
A json pull parser.
Definition jsonpull.h:86
nvt_category
nvt_category
VT categories.
Definition vtparser.h:30
ACT_KILL_HOST
@ ACT_KILL_HOST
Definition vtparser.h:39
ACT_DESTRUCTIVE_ATTACK
@ ACT_DESTRUCTIVE_ATTACK
Definition vtparser.h:37
ACT_SCANNER
@ ACT_SCANNER
Definition vtparser.h:32
ACT_END
@ ACT_END
Definition vtparser.h:41
ACT_FLOOD
@ ACT_FLOOD
Definition vtparser.h:40
ACT_GATHER_INFO
@ ACT_GATHER_INFO
Definition vtparser.h:34
ACT_DENIAL
@ ACT_DENIAL
Definition vtparser.h:38
ACT_ATTACK
@ ACT_ATTACK
Definition vtparser.h:35
ACT_SETTINGS
@ ACT_SETTINGS
Definition vtparser.h:33
ACT_MIXED_ATTACK
@ ACT_MIXED_ATTACK
Definition vtparser.h:36
ACT_INIT
@ ACT_INIT
Definition vtparser.h:31
parse_vt_json
int parse_vt_json(gvm_json_pull_parser_t *, gvm_json_pull_event_t *, nvti_t **)
Parse a VT element given in json format.
Definition vtparser.c:239