Greenbone Vulnerability Manager  8.0.1~git
manage_sql_nvts.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
25 #ifndef _GVMD_MANAGE_SQL_NVTS_H
26 #define _GVMD_MANAGE_SQL_NVTS_H
27 
31 #define NVT_INFO_ITERATOR_FILTER_COLUMNS \
32  { \
33  GET_ITERATOR_FILTER_COLUMNS, "version", "cve", "bid", "xref", "family", \
34  "cvss_base", "severity", "cvss", "script_tags", "qod", "qod_type", \
35  "solution_type", NULL \
36  }
37 
41 #define NVT_ITERATOR_COLUMNS \
42  { \
43  GET_ITERATOR_COLUMNS_PREFIX (""), {"''", "_owner", KEYWORD_TYPE_STRING}, \
44  {"0", NULL, KEYWORD_TYPE_INTEGER}, {"oid", NULL, KEYWORD_TYPE_STRING}, \
45  {"modification_time", "version", KEYWORD_TYPE_INTEGER}, \
46  {"name", NULL, KEYWORD_TYPE_STRING}, {"cve", NULL, KEYWORD_TYPE_STRING}, \
47  {"bid", NULL, KEYWORD_TYPE_STRING}, {"xref", NULL, KEYWORD_TYPE_STRING}, \
48  {"tag", NULL, KEYWORD_TYPE_STRING}, \
49  {"category", NULL, KEYWORD_TYPE_STRING}, \
50  {"family", NULL, KEYWORD_TYPE_STRING}, \
51  {"cvss_base", NULL, KEYWORD_TYPE_DOUBLE}, \
52  {"cvss_base", "severity", KEYWORD_TYPE_DOUBLE}, \
53  {"cvss_base", "cvss", KEYWORD_TYPE_DOUBLE}, \
54  {"qod", NULL, KEYWORD_TYPE_INTEGER}, \
55  {"qod_type", NULL, KEYWORD_TYPE_STRING}, \
56  {"solution_type", NULL, KEYWORD_TYPE_STRING}, \
57  {"tag", "script_tags", KEYWORD_TYPE_STRING}, \
58  { \
59  NULL, NULL, KEYWORD_TYPE_UNKNOWN \
60  } \
61  }
62 
66 #define NVT_ITERATOR_COLUMNS_NVTS \
67  { \
68  GET_ITERATOR_COLUMNS_PREFIX ("nvts."), \
69  {"''", "_owner", KEYWORD_TYPE_STRING}, {"0", NULL, KEYWORD_TYPE_STRING}, \
70  {"oid", NULL, KEYWORD_TYPE_STRING}, \
71  {"modification_time", "version", KEYWORD_TYPE_INTEGER}, \
72  {"nvts.name", NULL, KEYWORD_TYPE_STRING}, \
73  {"cve", NULL, KEYWORD_TYPE_STRING}, {"bid", NULL, KEYWORD_TYPE_STRING}, \
74  {"xref", NULL, KEYWORD_TYPE_STRING}, {"tag", NULL, KEYWORD_TYPE_STRING}, \
75  {"category", NULL, KEYWORD_TYPE_STRING}, \
76  {"nvts.family", NULL, KEYWORD_TYPE_STRING}, \
77  {"cvss_base", NULL, KEYWORD_TYPE_DOUBLE}, \
78  {"cvss_base", "severity", KEYWORD_TYPE_DOUBLE}, \
79  {"cvss_base", "cvss", KEYWORD_TYPE_DOUBLE}, \
80  {"qod", NULL, KEYWORD_TYPE_INTEGER}, \
81  {"qod_type", NULL, KEYWORD_TYPE_STRING}, \
82  {"solution_type", NULL, KEYWORD_TYPE_STRING}, \
83  {"tag", "script_tags", KEYWORD_TYPE_STRING}, \
84  { \
85  NULL, NULL, KEYWORD_TYPE_UNKNOWN \
86  } \
87  }
88 
89 void
90 check_db_nvts ();
91 
92 int
94 
95 void
96 manage_sync_nvts (int (*) ());
97 
98 #endif /* not _GVMD_MANAGE_SQL_NVTS_H */
int check_config_families()
Ensure that all configs refer to the right NVT families.
Definition: manage_sql.c:41220
void manage_sync_nvts(int(*)())
Sync NVTs if newer NVTs are available.
Definition: manage_sql_nvts.c:1190
void check_db_nvts()
Ensures the sanity of nvts cache in DB.
Definition: manage_sql_nvts.c:59