Greenbone Vulnerability Management Libraries: util/vtparser.h Source File

Greenbone Vulnerability Management Libraries 23.1.2

vtparser.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
10
11#ifndef _GVM_UTIL_VTPARSER_H
12#define _GVM_UTIL_VTPARSER_H
13
14#define _GNU_SOURCE /* See feature_test_macros(7) */
15#define _FILE_OFFSET_BITS 64
16#include "../base/cvss.h"
17#include "../base/nvti.h" /* for nvti_t */
18#include "../util/jsonpull.h"
19
20#include <cjson/cJSON.h>
21#include <glib.h>
22#include <stdio.h>
23#include <stdlib.h>
24#include <unistd.h>
25
29 typedef enum
30{
31 ACT_INIT = 0,
32 ACT_SCANNER,
33 ACT_SETTINGS,
34 ACT_GATHER_INFO,
35 ACT_ATTACK,
36 ACT_MIXED_ATTACK,
37 ACT_DESTRUCTIVE_ATTACK,
38 ACT_DENIAL,
39 ACT_KILL_HOST,
40 ACT_FLOOD,
41 ACT_END,
42} nvt_category;
43
44int
45 parse_vt_json (gvm_json_pull_parser_t *, gvm_json_pull_event_t *, nvti_t **);
46
47#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