OpenVAS Libraries  9.0.3
nvti.c
Go to the documentation of this file.
1 /* openvas-libraries/base
2  * $Id$
3  * Description: Implementation of API to handle NVT Info datasets
4  *
5  * Authors:
6  * Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>
7  * Matthew Mundell <matthew.mundell@greenbone.net>
8  *
9  * Copyright:
10  * Copyright (C) 2009,2011 Greenbone Networks GmbH
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25  */
26 
38 #include <string.h>
39 #include <stdio.h>
40 #include <errno.h>
41 #include <sys/stat.h>
42 #include <utime.h>
43 
44 #include "nvti.h"
45 
46 #undef G_LOG_DOMAIN
47 #define G_LOG_DOMAIN "lib nvti"
48 
62 nvtpref_t *
63 nvtpref_new (gchar * name, gchar * type, gchar * dflt)
64 {
65  nvtpref_t *np = g_malloc0 (sizeof (nvtpref_t));
66 
67  if (!np)
68  return NULL;
69 
70  if (name)
71  np->name = g_strdup (name);
72  if (type)
73  np->type = g_strdup (type);
74  if (dflt)
75  np->dflt = g_strdup (dflt);
76 
77  return (np);
78 }
79 
85 void
87 {
88  if (!np)
89  return;
90 
91  if (np->name)
92  g_free (np->name);
93  if (np->type)
94  g_free (np->type);
95  if (np->dflt)
96  g_free (np->dflt);
97  g_free (np);
98 }
99 
108 gchar *
110 {
111  return (np ? np->name : NULL);
112 }
113 
122 gchar *
124 {
125  return (np ? np->type : NULL);
126 }
127 
136 gchar *
138 {
139  return (np ? np->dflt : NULL);
140 }
141 
150 nvti_t *
151 nvti_new (void)
152 {
153  return ((nvti_t *) g_malloc0 (sizeof (nvti_t)));
154 }
155 
161 void
163 {
164  if (!n)
165  return;
166 
167  if (n->oid)
168  g_free (n->oid);
169  if (n->version)
170  g_free (n->version);
171  if (n->name)
172  g_free (n->name);
173  if (n->copyright)
174  g_free (n->copyright);
175  if (n->cve)
176  g_free (n->cve);
177  if (n->bid)
178  g_free (n->bid);
179  if (n->xref)
180  g_free (n->xref);
181  if (n->tag)
182  g_free (n->tag);
183  if (n->cvss_base)
184  g_free (n->cvss_base);
185  if (n->dependencies)
186  g_free (n->dependencies);
187  if (n->required_keys)
188  g_free (n->required_keys);
189  if (n->mandatory_keys)
190  g_free (n->mandatory_keys);
191  if (n->excluded_keys)
192  g_free (n->excluded_keys);
193  if (n->required_ports)
194  g_free (n->required_ports);
195  if (n->required_udp_ports)
196  g_free (n->required_udp_ports);
197  if (n->family)
198  g_free (n->family);
199  if (n->prefs)
200  {
201  int i, len = g_slist_length (n->prefs);
202  for (i = 0; i < len; i++)
203  nvtpref_free (g_slist_nth_data (n->prefs, i));
204  g_slist_free (n->prefs);
205  }
206  g_free (n);
207 }
208 
217 gchar *
218 nvti_oid (const nvti_t * n)
219 {
220  return (n ? n->oid : NULL);
221 }
222 
231 gchar *
232 nvti_version (const nvti_t * n)
233 {
234  return (n ? n->version : NULL);
235 }
236 
245 gchar *
246 nvti_name (const nvti_t * n)
247 {
248  return (n ? n->name : NULL);
249 }
250 
259 gchar *
261 {
262  return (n ? n->copyright : NULL);
263 }
264 
273 gchar *
274 nvti_cve (const nvti_t * n)
275 {
276  return (n ? n->cve : NULL);
277 }
278 
287 gchar *
288 nvti_bid (const nvti_t * n)
289 {
290  return (n ? n->bid : NULL);
291 }
292 
301 gchar *
302 nvti_xref (const nvti_t * n)
303 {
304  return (n ? n->xref : NULL);
305 }
306 
315 gchar *
316 nvti_tag (const nvti_t * n)
317 {
318  return (n ? n->tag : NULL);
319 }
320 
329 gchar *
331 {
332  return (n ? n->cvss_base : NULL);
333 }
334 
343 gchar *
345 {
346  return (n ? n->dependencies : NULL);
347 }
348 
357 gchar *
359 {
360  return (n ? n->required_keys : NULL);
361 }
362 
371 gchar *
373 {
374  return (n ? n->mandatory_keys : NULL);
375 }
376 
385 gchar *
387 {
388  return (n ? n->excluded_keys : NULL);
389 }
390 
399 gchar *
401 {
402  return (n ? n->required_ports : NULL);
403 }
404 
413 gchar *
415 {
416  return (n ? n->required_udp_ports : NULL);
417 }
418 
427 gchar *
428 nvti_family (const nvti_t * n)
429 {
430  return (n ? n->family : NULL);
431 }
432 
440 guint
442 {
443  return (n ? g_slist_length (n->prefs) : 0);
444 }
445 
455 const nvtpref_t *
456 nvti_pref (const nvti_t * n, guint p)
457 {
458  return (n ? g_slist_nth_data (n->prefs, p) : NULL);
459 }
460 
469 gint
470 nvti_timeout (const nvti_t * n)
471 {
472  return (n ? n->timeout : -1);
473 }
474 
482 gint
484 {
485  return (n ? n->category : -1);
486 }
487 
497 int
498 nvti_set_oid (nvti_t * n, const gchar * oid)
499 {
500  if (! n)
501  return (-1);
502 
503  if (n->oid)
504  g_free (n->oid);
505  n->oid = g_strdup (oid);
506  return (0);
507 }
508 
518 int
519 nvti_set_version (nvti_t * n, const gchar * version)
520 {
521  if (! n)
522  return (-1);
523 
524  if (n->version)
525  g_free (n->version);
526  n->version = g_strdup (version);
527  return (0);
528 }
529 
539 int
540 nvti_set_name (nvti_t * n, const gchar * name)
541 {
542  if (! n)
543  return (-1);
544 
545  if (n->name)
546  g_free (n->name);
547  n->name = g_strdup (name);
548  return (0);
549 }
550 
560 int
561 nvti_set_copyright (nvti_t * n, const gchar * copyright)
562 {
563  if (! n)
564  return (-1);
565 
566  if (n->copyright)
567  g_free (n->copyright);
568  n->copyright = g_strdup (copyright);
569  return (0);
570 }
571 
581 int
582 nvti_set_cve (nvti_t * n, const gchar * cve)
583 {
584  if (! n)
585  return (-1);
586 
587  if (n->cve)
588  g_free (n->cve);
589  n->cve = g_strdup (cve);
590  return (0);
591 }
592 
602 int
603 nvti_set_bid (nvti_t * n, const gchar * bid)
604 {
605  if (! n)
606  return (-1);
607 
608  if (n->bid)
609  g_free (n->bid);
610  n->bid = g_strdup (bid);
611  return (0);
612 }
613 
623 int
624 nvti_set_xref (nvti_t * n, const gchar * xref)
625 {
626  if (! n)
627  return (-1);
628 
629  if (n->xref)
630  g_free (n->xref);
631  if (xref && xref[0])
632  n->xref = g_strdup (xref);
633  else
634  n->xref = NULL;
635  return (0);
636 }
637 
647 int
648 nvti_set_tag (nvti_t * n, const gchar * tag)
649 {
650  if (! n)
651  return (-1);
652 
653  if (n->tag)
654  g_free (n->tag);
655  if (tag && tag[0])
656  n->tag = g_strdup (tag);
657  else
658  n->tag = NULL;
659  return (0);
660 }
661 
671 int
672 nvti_set_cvss_base (nvti_t * n, const gchar * cvss_base)
673 {
674  if (! n)
675  return (-1);
676 
677  if (n->cvss_base)
678  g_free (n->cvss_base);
679  if (cvss_base && cvss_base[0])
680  n->cvss_base = g_strdup (cvss_base);
681  else
682  n->cvss_base = NULL;
683  return (0);
684 }
685 
695 int
696 nvti_set_dependencies (nvti_t * n, const gchar * dependencies)
697 {
698  if (! n)
699  return (-1);
700 
701  if (n->dependencies)
702  g_free (n->dependencies);
703  if (dependencies && dependencies[0])
704  n->dependencies = g_strdup (dependencies);
705  else
706  n->dependencies = NULL;
707  return (0);
708 }
709 
719 int
720 nvti_set_required_keys (nvti_t * n, const gchar * required_keys)
721 {
722  if (! n)
723  return (-1);
724 
725  if (n->required_keys)
726  g_free (n->required_keys);
727  if (required_keys && required_keys[0])
728  n->required_keys = g_strdup (required_keys);
729  else
730  n->required_keys = NULL;
731  return (0);
732 }
733 
743 int
744 nvti_set_mandatory_keys (nvti_t * n, const gchar * mandatory_keys)
745 {
746  if (! n)
747  return (-1);
748 
749  if (n->mandatory_keys)
750  g_free (n->mandatory_keys);
751  if (mandatory_keys && mandatory_keys[0])
752  n->mandatory_keys = g_strdup (mandatory_keys);
753  else
754  n->mandatory_keys = NULL;
755  return (0);
756 }
757 
767 int
768 nvti_set_excluded_keys (nvti_t * n, const gchar * excluded_keys)
769 {
770  if (! n)
771  return (-1);
772 
773  if (n->excluded_keys)
774  g_free (n->excluded_keys);
775  if (excluded_keys && excluded_keys[0])
776  n->excluded_keys = g_strdup (excluded_keys);
777  else
778  n->excluded_keys = NULL;
779  return (0);
780 }
781 
791 int
792 nvti_set_required_ports (nvti_t * n, const gchar * required_ports)
793 {
794  if (! n)
795  return (-1);
796 
797  if (n->required_ports)
798  g_free (n->required_ports);
799  if (required_ports && required_ports[0])
800  n->required_ports = g_strdup (required_ports);
801  else
802  n->required_ports = NULL;
803  return (0);
804 }
805 
815 int
816 nvti_set_required_udp_ports (nvti_t * n, const gchar * required_udp_ports)
817 {
818  if (! n)
819  return (-1);
820 
821  if (n->required_udp_ports)
822  g_free (n->required_udp_ports);
823  if (required_udp_ports && required_udp_ports[0])
824  n->required_udp_ports = g_strdup (required_udp_ports);
825  else
826  n->required_udp_ports = NULL;
827  return (0);
828 }
829 
839 int
840 nvti_set_family (nvti_t * n, const gchar * family)
841 {
842  if (! n)
843  return (-1);
844 
845  if (n->family)
846  g_free (n->family);
847  n->family = g_strdup (family);
848  return (0);
849 }
850 
860 int
861 nvti_set_timeout (nvti_t * n, const gint timeout)
862 {
863  if (! n)
864  return (-1);
865 
866  n->timeout = timeout;
867  return (0);
868 }
869 
879 int
880 nvti_set_category (nvti_t * n, const gint category)
881 {
882  if (! n)
883  return (-1);
884 
885  n->category = category;
886  return (0);
887 }
888 
898 int
899 nvti_add_cve (nvti_t * n, const gchar * cve_id)
900 {
901  gchar * old;
902 
903  if (! n) return (1);
904  if (! cve_id) return (2);
905 
906  old = n->cve;
907 
908  if (old)
909  {
910  n->cve = g_strdup_printf ("%s, %s", old, cve_id);
911  g_free (old);
912  }
913  else
914  n->cve = g_strdup (cve_id);
915 
916  return (0);
917 }
918 
928 int
929 nvti_add_bid (nvti_t * n, const gchar * bid_id)
930 {
931  gchar * old;
932 
933  if (! n) return (1);
934  if (! bid_id) return (2);
935 
936  old = n->bid;
937 
938  if (old)
939  {
940  n->bid = g_strdup_printf ("%s, %s", old, bid_id);
941  g_free (old);
942  }
943  else
944  n->bid = g_strdup (bid_id);
945 
946  return (0);
947 }
948 
958 int
959 nvti_add_required_keys (nvti_t * n, const gchar * key)
960 {
961  gchar * old;
962 
963  if (! n) return (1);
964  if (! key) return (2);
965 
966  old = n->required_keys;
967 
968  if (old)
969  {
970  n->required_keys = g_strdup_printf ("%s, %s", old, key);
971  g_free (old);
972  }
973  else
974  n->required_keys = g_strdup (key);
975 
976  return (0);
977 }
978 
988 int
989 nvti_add_mandatory_keys (nvti_t * n, const gchar * key)
990 {
991  gchar * old;
992 
993  if (! n) return (1);
994  if (! key) return (2);
995 
996  old = n->mandatory_keys;
997 
998  if (old)
999  {
1000  n->mandatory_keys = g_strdup_printf ("%s, %s", old, key);
1001  g_free (old);
1002  }
1003  else
1004  n->mandatory_keys = g_strdup (key);
1005 
1006  return (0);
1007 }
1008 
1018 int
1019 nvti_add_excluded_keys (nvti_t * n, const gchar * key)
1020 {
1021  gchar * old;
1022 
1023  if (! n) return (1);
1024  if (! key) return (2);
1025 
1026  old = n->excluded_keys;
1027 
1028  if (old)
1029  {
1030  n->excluded_keys = g_strdup_printf ("%s, %s", old, key);
1031  g_free (old);
1032  }
1033  else
1034  n->excluded_keys = g_strdup (key);
1035 
1036  return (0);
1037 }
1038 
1048 int
1049 nvti_add_required_ports (nvti_t * n, const gchar * port)
1050 {
1051  gchar * old;
1052 
1053  if (! n) return (1);
1054  if (! port) return (2);
1055 
1056  old = n->required_ports;
1057 
1058  if (old)
1059  {
1060  n->required_ports = g_strdup_printf ("%s, %s", old, port);
1061  g_free (old);
1062  }
1063  else
1064  n->required_ports = g_strdup (port);
1065 
1066  return (0);
1067 }
1068 
1078 int
1079 nvti_add_required_udp_ports (nvti_t * n, const gchar * port)
1080 {
1081  gchar * old;
1082 
1083  if (! n) return (1);
1084  if (! port) return (2);
1085 
1086  old = n->required_udp_ports;
1087 
1088  if (old)
1089  {
1090  n->required_udp_ports = g_strdup_printf ("%s, %s", old, port);
1091  g_free (old);
1092  }
1093  else
1094  n->required_udp_ports = g_strdup (port);
1095 
1096  return (0);
1097 }
1098 
1108 int
1110 {
1111  if (! n)
1112  return (-1);
1113 
1114  n->prefs = g_slist_append (n->prefs, np);
1115  return (0);
1116 }
1117 
1118 /* Collections of nvtis. */
1119 
1125 static void
1126 free_nvti_for_hash_table (gpointer nvti)
1127 {
1128  nvti_free ((nvti_t *) nvti);
1129 }
1130 
1134 nvtis_t *
1136 {
1137  return g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
1138  free_nvti_for_hash_table);
1139 }
1140 
1146 void
1148 {
1149  if (nvtis)
1150  g_hash_table_destroy (nvtis);
1151 }
1152 
1159 void
1161 {
1162  if (nvti)
1163  g_hash_table_insert (nvtis, (gpointer) nvti_oid (nvti), (gpointer) nvti);
1164 }
1165 
1174 nvti_t *
1175 nvtis_lookup (nvtis_t * nvtis, const char *oid)
1176 {
1177  return g_hash_table_lookup (nvtis, oid);
1178 }
gchar * copyright
Copyright for the NVT.
Definition: nvti.h:69
int nvti_set_category(nvti_t *n, const gint category)
Set the category type of a NVT Info.
Definition: nvti.c:880
gchar * nvtpref_default(const nvtpref_t *np)
Get the Default of a NVT Preference.
Definition: nvti.c:137
gchar * nvtpref_name(const nvtpref_t *np)
Get the Name of a NVT Preference.
Definition: nvti.c:109
gchar * nvti_xref(const nvti_t *n)
Get the xref&#39;s.
Definition: nvti.c:302
void nvti_free(nvti_t *n)
Free memory of a nvti structure.
Definition: nvti.c:162
gchar * nvti_required_ports(const nvti_t *n)
Get the required ports list.
Definition: nvti.c:400
gchar * required_keys
List of required KB keys of this NVT.
Definition: nvti.h:80
int nvti_set_copyright(nvti_t *n, const gchar *copyright)
Set the copyright of a NVT.
Definition: nvti.c:561
int nvti_set_cvss_base(nvti_t *n, const gchar *cvss_base)
Set the CVSS base of an NVT.
Definition: nvti.c:672
nvti_t * nvti_new(void)
Create a new (empty) nvti structure.
Definition: nvti.c:151
int nvti_set_family(nvti_t *n, const gchar *family)
Set the family of a NVT.
Definition: nvti.c:840
gchar * nvtpref_type(const nvtpref_t *np)
Get the Type of a NVT Preference.
Definition: nvti.c:123
int nvti_set_required_ports(nvti_t *n, const gchar *required_ports)
Set the required ports of a NVT.
Definition: nvti.c:792
nvtpref_t * nvtpref_new(gchar *name, gchar *type, gchar *dflt)
Create a new nvtpref structure filled with the given values.
Definition: nvti.c:63
gchar * nvti_copyright(const nvti_t *n)
Get the copyright notice.
Definition: nvti.c:260
gchar * nvti_cve(const nvti_t *n)
Get the CVE references.
Definition: nvti.c:274
gchar * cvss_base
CVSS base score for this NVT.
Definition: nvti.h:77
gchar * name
Name of the preference.
Definition: nvti.h:48
The structure of a information record that corresponds to a NVT.
Definition: nvti.h:64
gint timeout
Default timeout time for this NVT.
Definition: nvti.h:89
const nvtpref_t * nvti_pref(const nvti_t *n, guint p)
Get the n&#39;th preferences of the NVT.
Definition: nvti.c:456
gchar * version
Version of the NVT.
Definition: nvti.h:67
gchar * bid
List of Bugtraq IDs, this NVT corresponds to.
Definition: nvti.h:72
const char * oid
gint nvti_category(const nvti_t *n)
Get the category for this NVT.
Definition: nvti.c:483
gchar * name
The name.
Definition: nvti.h:68
void nvtpref_free(nvtpref_t *np)
Free memory of a nvtpref structure.
Definition: nvti.c:86
int nvti_set_timeout(nvti_t *n, const gint timeout)
Set the timout of a NVT Info.
Definition: nvti.c:861
int nvti_set_tag(nvti_t *n, const gchar *tag)
Set the tags of a NVT.
Definition: nvti.c:648
int nvti_add_required_udp_ports(nvti_t *n, const gchar *port)
Add a required udp port of a NVT.
Definition: nvti.c:1079
gchar * oid
Object ID.
Definition: nvti.h:66
gint nvti_timeout(const nvti_t *n)
Get the timeout for this NVT.
Definition: nvti.c:470
int nvti_add_cve(nvti_t *n, const gchar *cve_id)
Add a single CVE ID of a NVT.
Definition: nvti.c:899
int nvti_set_cve(nvti_t *n, const gchar *cve)
Set the CVE references of a NVT.
Definition: nvti.c:582
gint category
The category, this NVT belongs to.
Definition: nvti.h:90
gchar * nvti_tag(const nvti_t *n)
Get the tag.
Definition: nvti.c:316
gchar * nvti_family(const nvti_t *n)
Get the family name.
Definition: nvti.c:428
gchar * type
Preference type.
Definition: nvti.h:47
gchar * nvti_dependencies(const nvti_t *n)
Get the dependencies list.
Definition: nvti.c:344
gchar * nvti_excluded_keys(const nvti_t *n)
Get the excluded keys list.
Definition: nvti.c:386
gchar * required_udp_ports
List of required UDP ports of this NVT.
Definition: nvti.h:84
gchar * nvti_mandatory_keys(const nvti_t *n)
Get the mandatory keys list.
Definition: nvti.c:372
void nvtis_add(nvtis_t *nvtis, nvti_t *nvti)
Add an NVT Info to a collection of NVT Infos.
Definition: nvti.c:1160
int nvti_set_oid(nvti_t *n, const gchar *oid)
Set the OID of a NVT Info.
Definition: nvti.c:498
gchar * cve
List of CVEs, this NVT corresponds to.
Definition: nvti.h:71
int nvti_add_mandatory_keys(nvti_t *n, const gchar *key)
Add a mandatory key of a NVT.
Definition: nvti.c:989
int nvti_set_version(nvti_t *n, const gchar *version)
Set the version of a NVT.
Definition: nvti.c:519
int nvti_add_bid(nvti_t *n, const gchar *bid_id)
Add a single BID ID of a NVT.
Definition: nvti.c:929
int nvti_set_mandatory_keys(nvti_t *n, const gchar *mandatory_keys)
Set the mandatory keys of a NVT.
Definition: nvti.c:744
int nvti_set_name(nvti_t *n, const gchar *name)
Set the name of a NVT.
Definition: nvti.c:540
int nvti_set_xref(nvti_t *n, const gchar *xref)
Set the xrefs of a NVT.
Definition: nvti.c:624
Protos and data structures for NVT Information data sets.
int nvti_add_pref(nvti_t *n, nvtpref_t *np)
Add a preference to the NVT Info.
Definition: nvti.c:1109
gchar * excluded_keys
List of excluded KB keys of this NVT.
Definition: nvti.h:82
const char * name
Definition: nasl_init.c:524
int nvti_set_bid(nvti_t *n, const gchar *bid)
Set the bid references of a NVT.
Definition: nvti.c:603
gchar * nvti_required_udp_ports(const nvti_t *n)
Get the required udp ports list.
Definition: nvti.c:414
int nvti_set_required_udp_ports(nvti_t *n, const gchar *required_udp_ports)
Set the required udp ports of a NVT.
Definition: nvti.c:816
gchar * dependencies
List of dependencies of this NVT.
Definition: nvti.h:79
gchar * dflt
Default value of the preference.
Definition: nvti.h:49
int nvti_add_excluded_keys(nvti_t *n, const gchar *key)
Add a excluded key of a NVT.
Definition: nvti.c:1019
nvtis_t * nvtis_new(void)
Make a collection of NVT Infos.
Definition: nvti.c:1135
gchar * required_ports
List of required ports of this NVT.
Definition: nvti.h:83
int nvti_set_excluded_keys(nvti_t *n, const gchar *excluded_keys)
Set the excluded keys of a NVT.
Definition: nvti.c:768
void nvtis_free(nvtis_t *nvtis)
Free a collection of NVT Infos.
Definition: nvti.c:1147
gchar * family
Family the NVT belongs to.
Definition: nvti.h:91
The structure for a preference of a NVT.
Definition: nvti.h:45
int nvti_set_dependencies(nvti_t *n, const gchar *dependencies)
Set the dependencies of a NVT.
Definition: nvti.c:696
gchar * nvti_required_keys(const nvti_t *n)
Get the required keys list.
Definition: nvti.c:358
gchar * mandatory_keys
List of mandatory KB keys of this NVT.
Definition: nvti.h:81
gchar * tag
List of tags attached to this NVT.
Definition: nvti.h:76
int nvti_add_required_ports(nvti_t *n, const gchar *port)
Add a required port of a NVT.
Definition: nvti.c:1049
nvti_t * nvtis_lookup(nvtis_t *nvtis, const char *oid)
Add an NVT Info to a collection of NVT Infos.
Definition: nvti.c:1175
int nvti_add_required_keys(nvti_t *n, const gchar *key)
Add a required key of a NVT.
Definition: nvti.c:959
guint nvti_pref_len(const nvti_t *n)
Get the number of preferences of the NVT.
Definition: nvti.c:441
gchar * nvti_cvss_base(const nvti_t *n)
Get the CVSS base.
Definition: nvti.c:330
gchar * nvti_oid(const nvti_t *n)
Get the OID string.
Definition: nvti.c:218
gchar * nvti_bid(const nvti_t *n)
Get the bid references.
Definition: nvti.c:288
GHashTable nvtis_t
A collection of information records corresponding to NVTs.
Definition: nvti.h:151
gchar * xref
List of Cross-references, this NVT corresponds to.
Definition: nvti.h:74
gchar * nvti_version(const nvti_t *n)
Get the version.
Definition: nvti.c:232
int nvti_set_required_keys(nvti_t *n, const gchar *required_keys)
Set the required keys of a NVT.
Definition: nvti.c:720
gchar * nvti_name(const nvti_t *n)
Get the name.
Definition: nvti.c:246
GSList * prefs
Collection of NVT preferences.
Definition: nvti.h:86